From 9cb27ff124704d3c04c259019383b6610bbb7204 Mon Sep 17 00:00:00 2001 From: wicm84266964 Date: Sat, 5 Sep 2026 19:39:42 +0800 Subject: [PATCH] release: prepare v2.0.7 dependency security patch --- CHANGELOG.md | 31 + README.md | 2 +- .../2.0.7-dependency-security-patch_zh.md | 38 + npm-shrinkwrap.json | 330 ++-- package-lock.json | 330 ++-- package.json | 6 +- scripts/verify-release-seal.ts | 4 +- src/dashboard/public/vendor/rich-renderers.js | 1650 ++++++++++------- src/version.ts | 2 +- 9 files changed, 1389 insertions(+), 1004 deletions(-) create mode 100644 docs/releases/2.0.7-dependency-security-patch_zh.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eeb862..a1b22be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,37 @@ ## Unreleased +## 2.0.7 - 2026-09-05 + +This is a dependency security patch on the 2.0 TypeScript runtime. +Dashboard Mermaid is updated to `11.17.2` with DOMPurify `3.4.14`. +The TUI `ink` stack now uses `ws` `8.21.3`. The Dashboard asset bundler +`esbuild` is `0.28.2`. Permission mode ids, search, and tool behavior are +unchanged. + +### Fixed + +- Mermaid `11.17.2` and DOMPurify `3.4.14` close the stacked Dashboard + diagram/sanitizer advisories. +- `ws` `8.21.3` closes the high-severity WebSocket memory-exhaustion issue + pulled in by `ink`. +- `esbuild` `0.28.2` closes the Windows development-server advisory. This + package is not on the user runtime path. + +### Upgrade + +```sh +git pull +npm ci +npm run verify:install +npm link +ant-code --version +``` + +`ant-code --version` should print `2.0.7`. Restart a running Dashboard so it +loads the rebuilt local Mermaid bundle. Gateway config and `.lab-agent` +sessions do not need to be recreated. + ## 2.0.6 - 2026-09-05 This is a small reliability release on the 2.0 TypeScript runtime. diff --git a/README.md b/README.md index 265aabd..c417fa9 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ ant-code doctor ant-code ``` -`ant-code --version` should print `2.0.6`. If you previously linked a +`ant-code --version` should print `2.0.7`. If you previously linked a JavaScript install, run `npm link` again so the global command points at `src/cli/index.ts`. diff --git a/docs/releases/2.0.7-dependency-security-patch_zh.md b/docs/releases/2.0.7-dependency-security-patch_zh.md new file mode 100644 index 0000000..301f8c5 --- /dev/null +++ b/docs/releases/2.0.7-dependency-security-patch_zh.md @@ -0,0 +1,38 @@ +# Ant Code v2.0.7:Dashboard 与 TUI 依赖安全补丁 + +发布日期:2026-09-05 + +这是 2.0 TypeScript 运行时上的依赖补丁。把 Dashboard 流程图用的 Mermaid、其消毒库 DOMPurify、TUI 间接依赖 `ws`,以及仅用于打包的 `esbuild` 升到已修复版本,清掉公开仓 Dependabot 上叠出的那组告警。权限模式 id、搜索渠道和工具行为不变。本说明处于公开发布候选阶段,不表示 CI、tag 或 GitHub Release 已经完成。 + +## 对用户工作流的直接变化 + +- Dashboard 本地打包的 Mermaid 从 `11.15.0` 升到 `11.17.2`,DOMPurify 升到 `3.4.14`。流程图仍在本机渲染,不走 CDN。 +- TUI 使用的 `ink` 所带 `ws` 升到 `8.21.3`,避免已知的 WebSocket 内存耗尽与未初始化内存问题。 +- 开发打包用的 `esbuild` 升到 `0.28.2`。这不影响用户日常运行 TUI/CLI;正在跑的 Dashboard 需要重启才能加载新的本地资源。 +- 命令、权限模式、网关协议、搜索和 `rg_*` 行为没有改。 + +## 配置、数据与安全边界 + +- 配置格式、session / transcript、凭据存储和网关协议没有迁移。现有配置和 `.lab-agent` 会话可继续使用。 +- 这次没有改权限模式 id,也没有改默认允许主机。 +- 这些补丁修的是依赖库已知漏洞,不能代表所有私有研究数据、外部模型供应商或现场网络环境都已得到验证。 + +## 升级与产物位置 + +需要 Node.js 22.18+。从源码更新: + +```sh +git pull +npm ci +npm run verify:install +npm link +ant-code --version +``` + +`ant-code --version` 应显示 `2.0.7`。若以前 link 过旧安装,需要重新 `npm link`。正在跑的 Dashboard 需要重启。现有网关配置和会话不必重建。本次没有新的安装包要求。 + +## 验证、限制与待完成门禁 + +- 开发仓 `npm test`(`node:test` 口径):tests 1273,pass 1272,fail 1。失败项是 `MCP request timeout is a failed request, not a user interrupt`,与本次依赖补丁无关。Dashboard 浏览器套件 35 项全部通过。`check:dashboard-assets` 62 个文件字节一致。完整 `npm run verify:release` 交给 GitHub CI。 +- 未把 TaxaMask 内嵌主题、`dashboard-embed` 或源码写入守卫带入独立版。独立 Ant Code 发布不会自动更新 TaxaMask 内嵌拷贝。 +- 候选阶段最终结论以正式仓同一提交的 CI 和 Release 门禁为准。 diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 4b9fadf..9cd4a75 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,17 +1,18 @@ { "name": "@ant-code/cli", - "version": "2.0.6", + "version": "2.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ant-code/cli", - "version": "2.0.6", + "version": "2.0.7", + "license": "AGPL-3.0-only", "dependencies": { "@vscode/ripgrep": "1.18.0", "ink": "^6.8.0", "katex": "^0.16.46", - "mermaid": "^11.15.0", + "mermaid": "^11.17.2", "react": "^19.2.5", "typescript": "6.0.3", "yaml": "^2.9.0" @@ -24,7 +25,7 @@ "@types/node": "20.19.43", "@types/react": "^19.2.18", "axe-core": "4.12.1", - "esbuild": "^0.28.0", + "esbuild": "^0.28.2", "playwright-core": "1.61.1", "postject": "^1.0.0-alpha.6" }, @@ -71,9 +72,9 @@ "license": "Apache-2.0" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", - "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", "cpu": [ "ppc64" ], @@ -88,9 +89,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.28.0.tgz", - "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", "cpu": [ "arm" ], @@ -105,9 +106,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", - "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", "cpu": [ "arm64" ], @@ -122,9 +123,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.28.0.tgz", - "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", "cpu": [ "x64" ], @@ -139,9 +140,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", - "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", "cpu": [ "arm64" ], @@ -156,9 +157,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", - "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", "cpu": [ "x64" ], @@ -173,9 +174,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", - "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", "cpu": [ "arm64" ], @@ -190,9 +191,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", - "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", "cpu": [ "x64" ], @@ -207,9 +208,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", - "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", "cpu": [ "arm" ], @@ -224,9 +225,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", - "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", "cpu": [ "arm64" ], @@ -241,9 +242,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", - "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", "cpu": [ "ia32" ], @@ -258,9 +259,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", - "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", "cpu": [ "loong64" ], @@ -275,9 +276,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", - "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", "cpu": [ "mips64el" ], @@ -292,9 +293,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", - "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", "cpu": [ "ppc64" ], @@ -309,9 +310,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", - "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", "cpu": [ "riscv64" ], @@ -326,9 +327,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", - "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", "cpu": [ "s390x" ], @@ -343,9 +344,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", - "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", "cpu": [ "x64" ], @@ -360,9 +361,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", - "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", "cpu": [ "arm64" ], @@ -377,9 +378,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", - "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", "cpu": [ "x64" ], @@ -394,9 +395,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", - "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", "cpu": [ "arm64" ], @@ -411,9 +412,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", - "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", "cpu": [ "x64" ], @@ -428,9 +429,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", - "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", "cpu": [ "arm64" ], @@ -445,9 +446,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", - "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", "cpu": [ "x64" ], @@ -462,9 +463,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", - "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", "cpu": [ "arm64" ], @@ -479,9 +480,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", - "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", "cpu": [ "ia32" ], @@ -496,9 +497,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", - "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", "cpu": [ "x64" ], @@ -530,12 +531,12 @@ } }, "node_modules/@mermaid-js/parser": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@mermaid-js/parser/-/parser-1.1.1.tgz", - "integrity": "sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/@mermaid-js/parser/-/parser-1.2.1.tgz", + "integrity": "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==", "license": "MIT", "dependencies": { - "@chevrotain/types": "~11.1.1" + "@chevrotain/types": "~11.1.2" } }, "node_modules/@types/d3": { @@ -811,7 +812,7 @@ "version": "19.2.18", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -1166,10 +1167,17 @@ "layout-base": "^1.0.0" } }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT" + }, "node_modules/cytoscape": { - "version": "3.33.3", - "resolved": "https://registry.npmmirror.com/cytoscape/-/cytoscape-3.33.3.tgz", - "integrity": "sha512-Gej7U+OKR+LZ8kvX7rb2HhCYJ0IhvEFsnkud4SB1PR+BUY/TsSO0dmOW59WEVLu51b1Rm+gQRKoz4bLYxGSZ2g==", + "version": "3.34.2", + "resolved": "https://registry.npmmirror.com/cytoscape/-/cytoscape-3.34.2.tgz", + "integrity": "sha512-Cm2jaj1X/PBNlzV9yH8zcfGOxO7U+CJ/+mxSBVPSchLaugdp4jtlGx5qaHtPRZ6tgiZ5P+o1XoRfJA+ba6KM3g==", "license": "MIT", "engines": { "node": ">=0.10" @@ -1214,13 +1222,6 @@ "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", "license": "MIT" }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - }, "node_modules/d3": { "version": "7.9.0", "resolved": "https://registry.npmmirror.com/d3/-/d3-7.9.0.tgz", @@ -1682,9 +1683,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.20", - "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.20.tgz", - "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", + "version": "1.11.23", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.23.tgz", + "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==", "license": "MIT" }, "node_modules/delaunator": { @@ -1697,9 +1698,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-3.4.3.tgz", - "integrity": "sha512-VVwJidIJcp1hpg2OMXML3ZVRPYSZiq4aX7qBh83BSIpOaRDqI+qxhXjjIWnpzkOXhmp0L81lnoME1mnCc9H48A==", + "version": "3.4.14", + "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-3.4.14.tgz", + "integrity": "sha512-dVoH9z+MY+C9IilgGCk3YfFqjLi3fChm2OiKJMzh6axrJ5qwxqWaZamgmHrpv22CN/KdbZJuGEGgfQoL00LTdg==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -1734,9 +1735,9 @@ ] }, "node_modules/esbuild": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.28.0.tgz", - "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1747,32 +1748,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.0", - "@esbuild/android-arm": "0.28.0", - "@esbuild/android-arm64": "0.28.0", - "@esbuild/android-x64": "0.28.0", - "@esbuild/darwin-arm64": "0.28.0", - "@esbuild/darwin-x64": "0.28.0", - "@esbuild/freebsd-arm64": "0.28.0", - "@esbuild/freebsd-x64": "0.28.0", - "@esbuild/linux-arm": "0.28.0", - "@esbuild/linux-arm64": "0.28.0", - "@esbuild/linux-ia32": "0.28.0", - "@esbuild/linux-loong64": "0.28.0", - "@esbuild/linux-mips64el": "0.28.0", - "@esbuild/linux-ppc64": "0.28.0", - "@esbuild/linux-riscv64": "0.28.0", - "@esbuild/linux-s390x": "0.28.0", - "@esbuild/linux-x64": "0.28.0", - "@esbuild/netbsd-arm64": "0.28.0", - "@esbuild/netbsd-x64": "0.28.0", - "@esbuild/openbsd-arm64": "0.28.0", - "@esbuild/openbsd-x64": "0.28.0", - "@esbuild/openharmony-arm64": "0.28.0", - "@esbuild/sunos-x64": "0.28.0", - "@esbuild/win32-arm64": "0.28.0", - "@esbuild/win32-ia32": "0.28.0", - "@esbuild/win32-x64": "0.28.0" + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" } }, "node_modules/escape-string-regexp": { @@ -1784,6 +1785,15 @@ "node": ">=8" } }, + "node_modules/fastdom": { + "version": "1.0.12", + "resolved": "https://registry.npmmirror.com/fastdom/-/fastdom-1.0.12.tgz", + "integrity": "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==", + "license": "MIT", + "dependencies": { + "strictdom": "^1.0.1" + } + }, "node_modules/get-east-asian-width": { "version": "1.5.0", "resolved": "https://registry.npmmirror.com/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", @@ -1979,26 +1989,27 @@ } }, "node_modules/mermaid": { - "version": "11.15.0", - "resolved": "https://registry.npmmirror.com/mermaid/-/mermaid-11.15.0.tgz", - "integrity": "sha512-pTMbcf3rWdtLiYGpmoTjHEpeY8seiy6sR+9nD7LOs8KfUbHE4lOUAprTRqRAcWSQ6MQpdX+YEsxShtGsINtPtw==", + "version": "11.17.2", + "resolved": "https://registry.npmmirror.com/mermaid/-/mermaid-11.17.2.tgz", + "integrity": "sha512-V6K3C8EBdEsPFZXSKMJe6ppQOENxuHARr9GvHX4hh47lAbhMRD9qf4oEK7LoaRQxULMa80/qt5gHO73aCleBBg==", "license": "MIT", "dependencies": { - "@braintree/sanitize-url": "^7.1.1", + "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", - "@mermaid-js/parser": "^1.1.1", + "@mermaid-js/parser": "^1.2.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", - "cytoscape": "^3.33.1", + "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", - "dayjs": "^1.11.19", - "dompurify": "^3.3.1", + "dayjs": "^1.11.21", + "dompurify": "^3.3.3", "es-toolkit": "^1.45.1", - "katex": "^0.16.25", + "fastdom": "1.0.12", + "katex": "^0.16.47", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", @@ -2007,6 +2018,31 @@ "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, + "node_modules/mermaid/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/mermaid/node_modules/katex": { + "version": "0.16.47", + "resolved": "https://registry.npmmirror.com/katex/-/katex-0.16.47.tgz", + "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -2207,6 +2243,12 @@ "node": ">=10" } }, + "node_modules/strictdom": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/strictdom/-/strictdom-1.0.1.tgz", + "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==", + "license": "MIT" + }, "node_modules/string-width": { "version": "8.2.1", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-8.2.1.tgz", @@ -2384,9 +2426,9 @@ } }, "node_modules/ws": { - "version": "8.20.0", - "resolved": "https://registry.npmmirror.com/ws/-/ws-8.20.0.tgz", - "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "version": "8.21.3", + "resolved": "https://registry.npmmirror.com/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package-lock.json b/package-lock.json index 4b9fadf..9cd4a75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,18 @@ { "name": "@ant-code/cli", - "version": "2.0.6", + "version": "2.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ant-code/cli", - "version": "2.0.6", + "version": "2.0.7", + "license": "AGPL-3.0-only", "dependencies": { "@vscode/ripgrep": "1.18.0", "ink": "^6.8.0", "katex": "^0.16.46", - "mermaid": "^11.15.0", + "mermaid": "^11.17.2", "react": "^19.2.5", "typescript": "6.0.3", "yaml": "^2.9.0" @@ -24,7 +25,7 @@ "@types/node": "20.19.43", "@types/react": "^19.2.18", "axe-core": "4.12.1", - "esbuild": "^0.28.0", + "esbuild": "^0.28.2", "playwright-core": "1.61.1", "postject": "^1.0.0-alpha.6" }, @@ -71,9 +72,9 @@ "license": "Apache-2.0" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", - "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", "cpu": [ "ppc64" ], @@ -88,9 +89,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.28.0.tgz", - "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", "cpu": [ "arm" ], @@ -105,9 +106,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", - "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", "cpu": [ "arm64" ], @@ -122,9 +123,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.28.0.tgz", - "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", "cpu": [ "x64" ], @@ -139,9 +140,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", - "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", "cpu": [ "arm64" ], @@ -156,9 +157,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", - "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", "cpu": [ "x64" ], @@ -173,9 +174,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", - "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", "cpu": [ "arm64" ], @@ -190,9 +191,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", - "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", "cpu": [ "x64" ], @@ -207,9 +208,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", - "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", "cpu": [ "arm" ], @@ -224,9 +225,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", - "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", "cpu": [ "arm64" ], @@ -241,9 +242,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", - "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", "cpu": [ "ia32" ], @@ -258,9 +259,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", - "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", "cpu": [ "loong64" ], @@ -275,9 +276,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", - "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", "cpu": [ "mips64el" ], @@ -292,9 +293,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", - "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", "cpu": [ "ppc64" ], @@ -309,9 +310,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", - "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", "cpu": [ "riscv64" ], @@ -326,9 +327,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", - "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", "cpu": [ "s390x" ], @@ -343,9 +344,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", - "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", "cpu": [ "x64" ], @@ -360,9 +361,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", - "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", "cpu": [ "arm64" ], @@ -377,9 +378,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", - "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", "cpu": [ "x64" ], @@ -394,9 +395,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", - "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", "cpu": [ "arm64" ], @@ -411,9 +412,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", - "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", "cpu": [ "x64" ], @@ -428,9 +429,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", - "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", "cpu": [ "arm64" ], @@ -445,9 +446,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", - "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", "cpu": [ "x64" ], @@ -462,9 +463,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", - "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", "cpu": [ "arm64" ], @@ -479,9 +480,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", - "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", "cpu": [ "ia32" ], @@ -496,9 +497,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", - "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", "cpu": [ "x64" ], @@ -530,12 +531,12 @@ } }, "node_modules/@mermaid-js/parser": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/@mermaid-js/parser/-/parser-1.1.1.tgz", - "integrity": "sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/@mermaid-js/parser/-/parser-1.2.1.tgz", + "integrity": "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==", "license": "MIT", "dependencies": { - "@chevrotain/types": "~11.1.1" + "@chevrotain/types": "~11.1.2" } }, "node_modules/@types/d3": { @@ -811,7 +812,7 @@ "version": "19.2.18", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -1166,10 +1167,17 @@ "layout-base": "^1.0.0" } }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT" + }, "node_modules/cytoscape": { - "version": "3.33.3", - "resolved": "https://registry.npmmirror.com/cytoscape/-/cytoscape-3.33.3.tgz", - "integrity": "sha512-Gej7U+OKR+LZ8kvX7rb2HhCYJ0IhvEFsnkud4SB1PR+BUY/TsSO0dmOW59WEVLu51b1Rm+gQRKoz4bLYxGSZ2g==", + "version": "3.34.2", + "resolved": "https://registry.npmmirror.com/cytoscape/-/cytoscape-3.34.2.tgz", + "integrity": "sha512-Cm2jaj1X/PBNlzV9yH8zcfGOxO7U+CJ/+mxSBVPSchLaugdp4jtlGx5qaHtPRZ6tgiZ5P+o1XoRfJA+ba6KM3g==", "license": "MIT", "engines": { "node": ">=0.10" @@ -1214,13 +1222,6 @@ "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", "license": "MIT" }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - }, "node_modules/d3": { "version": "7.9.0", "resolved": "https://registry.npmmirror.com/d3/-/d3-7.9.0.tgz", @@ -1682,9 +1683,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.20", - "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.20.tgz", - "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", + "version": "1.11.23", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.23.tgz", + "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==", "license": "MIT" }, "node_modules/delaunator": { @@ -1697,9 +1698,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-3.4.3.tgz", - "integrity": "sha512-VVwJidIJcp1hpg2OMXML3ZVRPYSZiq4aX7qBh83BSIpOaRDqI+qxhXjjIWnpzkOXhmp0L81lnoME1mnCc9H48A==", + "version": "3.4.14", + "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-3.4.14.tgz", + "integrity": "sha512-dVoH9z+MY+C9IilgGCk3YfFqjLi3fChm2OiKJMzh6axrJ5qwxqWaZamgmHrpv22CN/KdbZJuGEGgfQoL00LTdg==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -1734,9 +1735,9 @@ ] }, "node_modules/esbuild": { - "version": "0.28.0", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.28.0.tgz", - "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", + "version": "0.28.2", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1747,32 +1748,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.0", - "@esbuild/android-arm": "0.28.0", - "@esbuild/android-arm64": "0.28.0", - "@esbuild/android-x64": "0.28.0", - "@esbuild/darwin-arm64": "0.28.0", - "@esbuild/darwin-x64": "0.28.0", - "@esbuild/freebsd-arm64": "0.28.0", - "@esbuild/freebsd-x64": "0.28.0", - "@esbuild/linux-arm": "0.28.0", - "@esbuild/linux-arm64": "0.28.0", - "@esbuild/linux-ia32": "0.28.0", - "@esbuild/linux-loong64": "0.28.0", - "@esbuild/linux-mips64el": "0.28.0", - "@esbuild/linux-ppc64": "0.28.0", - "@esbuild/linux-riscv64": "0.28.0", - "@esbuild/linux-s390x": "0.28.0", - "@esbuild/linux-x64": "0.28.0", - "@esbuild/netbsd-arm64": "0.28.0", - "@esbuild/netbsd-x64": "0.28.0", - "@esbuild/openbsd-arm64": "0.28.0", - "@esbuild/openbsd-x64": "0.28.0", - "@esbuild/openharmony-arm64": "0.28.0", - "@esbuild/sunos-x64": "0.28.0", - "@esbuild/win32-arm64": "0.28.0", - "@esbuild/win32-ia32": "0.28.0", - "@esbuild/win32-x64": "0.28.0" + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" } }, "node_modules/escape-string-regexp": { @@ -1784,6 +1785,15 @@ "node": ">=8" } }, + "node_modules/fastdom": { + "version": "1.0.12", + "resolved": "https://registry.npmmirror.com/fastdom/-/fastdom-1.0.12.tgz", + "integrity": "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==", + "license": "MIT", + "dependencies": { + "strictdom": "^1.0.1" + } + }, "node_modules/get-east-asian-width": { "version": "1.5.0", "resolved": "https://registry.npmmirror.com/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", @@ -1979,26 +1989,27 @@ } }, "node_modules/mermaid": { - "version": "11.15.0", - "resolved": "https://registry.npmmirror.com/mermaid/-/mermaid-11.15.0.tgz", - "integrity": "sha512-pTMbcf3rWdtLiYGpmoTjHEpeY8seiy6sR+9nD7LOs8KfUbHE4lOUAprTRqRAcWSQ6MQpdX+YEsxShtGsINtPtw==", + "version": "11.17.2", + "resolved": "https://registry.npmmirror.com/mermaid/-/mermaid-11.17.2.tgz", + "integrity": "sha512-V6K3C8EBdEsPFZXSKMJe6ppQOENxuHARr9GvHX4hh47lAbhMRD9qf4oEK7LoaRQxULMa80/qt5gHO73aCleBBg==", "license": "MIT", "dependencies": { - "@braintree/sanitize-url": "^7.1.1", + "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", - "@mermaid-js/parser": "^1.1.1", + "@mermaid-js/parser": "^1.2.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", - "cytoscape": "^3.33.1", + "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", - "dayjs": "^1.11.19", - "dompurify": "^3.3.1", + "dayjs": "^1.11.21", + "dompurify": "^3.3.3", "es-toolkit": "^1.45.1", - "katex": "^0.16.25", + "fastdom": "1.0.12", + "katex": "^0.16.47", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", @@ -2007,6 +2018,31 @@ "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, + "node_modules/mermaid/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/mermaid/node_modules/katex": { + "version": "0.16.47", + "resolved": "https://registry.npmmirror.com/katex/-/katex-0.16.47.tgz", + "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -2207,6 +2243,12 @@ "node": ">=10" } }, + "node_modules/strictdom": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/strictdom/-/strictdom-1.0.1.tgz", + "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==", + "license": "MIT" + }, "node_modules/string-width": { "version": "8.2.1", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-8.2.1.tgz", @@ -2384,9 +2426,9 @@ } }, "node_modules/ws": { - "version": "8.20.0", - "resolved": "https://registry.npmmirror.com/ws/-/ws-8.20.0.tgz", - "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "version": "8.21.3", + "resolved": "https://registry.npmmirror.com/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index 56a86fe..6a87288 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ant-code/cli", - "version": "2.0.6", + "version": "2.0.7", "description": "AGPL-licensed local coding agent with a terminal UI, local dashboard, tool permissions, skills, MCP integration, and model gateway adapters.", "type": "module", "private": true, @@ -93,7 +93,7 @@ "@vscode/ripgrep": "1.18.0", "ink": "^6.8.0", "katex": "^0.16.46", - "mermaid": "^11.15.0", + "mermaid": "^11.17.2", "react": "^19.2.5", "typescript": "6.0.3", "yaml": "^2.9.0" @@ -102,7 +102,7 @@ "@types/node": "20.19.43", "@types/react": "^19.2.18", "axe-core": "4.12.1", - "esbuild": "^0.28.0", + "esbuild": "^0.28.2", "playwright-core": "1.61.1", "postject": "^1.0.0-alpha.6" } diff --git a/scripts/verify-release-seal.ts b/scripts/verify-release-seal.ts index b7b24e2..4fd0680 100644 --- a/scripts/verify-release-seal.ts +++ b/scripts/verify-release-seal.ts @@ -24,8 +24,8 @@ const REVIEWED_RUNTIME_DEPENDENCIES = new Map([ provenanceMarker: "open_source: KaTeX math rendering library, MIT licensed, public npm package" }], ["mermaid", { - versionSpec: "^11.15.0", - installedVersion: "11.15.0", + versionSpec: "^11.17.2", + installedVersion: "11.17.2", license: "MIT", provenanceMarker: "open_source: Mermaid diagram rendering library, MIT licensed, public npm package" }], diff --git a/src/dashboard/public/vendor/rich-renderers.js b/src/dashboard/public/vendor/rich-renderers.js index 9bb8bcf..5c96b5f 100644 --- a/src/dashboard/public/vendor/rich-renderers.js +++ b/src/dashboard/public/vendor/rich-renderers.js @@ -1,5 +1,5 @@ // @ts-nocheck -var eDe=Object.create;var i8=Object.defineProperty;var tDe=Object.getOwnPropertyDescriptor;var rDe=Object.getOwnPropertyNames;var iDe=Object.getPrototypeOf,nDe=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>(e&&(t=e(e=0)),t);var eo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lr=(e,t)=>{for(var r in t)i8(e,r,{get:t[r],enumerable:!0})},aDe=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rDe(t))!nDe.call(e,n)&&n!==r&&i8(e,n,{get:()=>t[n],enumerable:!(i=tDe(t,n))||i.enumerable});return e};var ks=(e,t,r)=>(r=e!=null?eDe(iDe(e)):{},aDe(t||!e||!e.__esModule?i8(r,"default",{value:e,enumerable:!0}):r,e));var HH={};Lr(HH,{ParseError:()=>kt,SETTINGS_SCHEMA:()=>Tk,__defineFunction:()=>Nt,__defineMacro:()=>de,__defineSymbol:()=>W,__domTree:()=>UH,__parse:()=>GH,__renderToDomTree:()=>qk,__renderToHTMLTree:()=>VH,__setFontMetrics:()=>ZU,default:()=>J8,render:()=>Q8,renderToString:()=>zH,version:()=>WH});function fDe(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function dDe(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return fDe(t)}function pDe(e,t,r,i){var n=r[t];e[t]=n!==void 0?i.processor?i.processor(n):n:dDe(i)}function TDe(e){for(var t=0;t=n[0]&&e<=n[1])return r.name}return null}function HU(e){for(var t=0;t=xk[t]&&e<=xk[t+1])return!0;return!1}function DDe(e){return"toText"in e}function PDe(e){if(e instanceof Ya)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function BDe(e){if(e instanceof hf)return e;throw new Error("Expected span but got "+String(e)+".")}function ZU(e,t){fc[e]=t}function z8(e,t,r){if(!fc[t])throw new Error("Font metrics not found for font: "+t+".");var i=e.charCodeAt(0),n=fc[t][i];if(!n&&e[0]in fU&&(i=fU[e[0]].charCodeAt(0),n=fc[t][i]),!n&&r==="text"&&HU(i)&&(n=fc[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}function $De(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!n8[t]){var r=n8[t]={cssEmPerMu:ck.quad[t]/18};for(var i in ck)ck.hasOwnProperty(i)&&(r[i]=ck[i][t])}return n8[t]}function W(e,t,r,i,n,a){Fi[e][n]={font:t,group:r,replace:i},a&&i&&(Fi[e][i]=Fi[e][n])}function Nt(e){for(var{type:t,names:r,props:i,handler:n,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:i.numArgs,argTypes:i.argTypes,allowedInArgument:!!i.allowedInArgument,allowedInText:!!i.allowedInText,allowedInMath:i.allowedInMath===void 0?!0:i.allowedInMath,numOptionalArgs:i.numOptionalArgs||0,infix:!!i.infix,primitive:!!i.primitive,handler:n},l=0;l0&&(a.push(gk(s,t)),s=[]),a.push(i[o]));s.length>0&&a.push(gk(s,t));var u;r?(u=gk(On(r,t,!0),t),u.classes=["tag"],a.push(u)):n&&a.push(n);var h=xt(["katex-html"],a);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=St(h.height+h.depth),h.depth&&(f.style.verticalAlign=St(-h.depth))}return h}function aH(e){return new cf(e)}function o8(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof tn&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof tn&&r.text===","}else return!1}function wU(e,t,r,i,n){var a=io(e,r),s;a.length===1&&a[0]instanceof wt&&e9e.has(a[0].type)?s=a[0]:s=new wt("mrow",a);var o=new wt("annotation",[new tn(t)]);o.setAttribute("encoding","application/x-tex");var l=new wt("semantics",[s,o]),u=new wt("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),i&&u.setAttribute("display","block");var h=n?"katex":"katex-mathml";return xt([h],[u])}function h9e(e){return e in c9e}function Rr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ok(e){var t=Pk(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Pk(e){return e&&(e.type==="atom"||u9e.hasOwnProperty(e.type))?e:null}function uH(e,t){var r=On(e.body,t,!0);return xt([e.mclass],r,t)}function hH(e,t){var r,i=io(e.body,t);return e.mclass==="minner"?r=new wt("mpadded",i):e.mclass==="mord"?e.isCharacterBox?(r=i[0],r.type="mi"):r=new wt("mi",i):(e.isCharacterBox?(r=i[0],r.type="mo"):r=new wt("mo",i),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function g9e(e,t,r){var i=d9e[e];switch(i){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(i,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var n=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:i,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[n,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function m9e(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new kt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var i=[],n=[i],a=0;aAV".includes(u))for(var f=0;f<2;f++){for(var d=!0,p=l+1;pAV=|." after @',s[l]);var g=g9e(u,h,e),m={type:"styling",body:[g],mode:"math",style:"display",resetFont:!0};i.push(m),o=SU()}a%2===0?i.push(o):i.shift(),i=[],n.push(i)}e.gullet.endGroup(),e.gullet.endGroup();var y=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}function _U(e){return"isMiddle"in e}function Fk(e,t){var r=Pk(e);if(r&&A9e.has(r.text))return r;throw r?new kt("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new kt("Invalid delimiter type '"+e.type+"'",e)}function LU(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function pc(e){for(var{type:t,names:r,props:i,handler:n,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:i.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l1||!h)&&m.pop(),v.length{kt=class e extends Error{constructor(t,r){var i="KaTeX parse error: "+t,n,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;n=s.start,a=s.end,n===o.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var l=o.slice(n,a).replace(/[^]/g,"$&\u0332"),u;n>15?u="\u2026"+o.slice(n-15,n):u=o.slice(0,n);var h;a+15e.replace(sDe,"-$1").toLowerCase(),lDe={"&":"&",">":">","<":"<",'"':""","'":"'"},cDe=/[&><"']/g,Ia=e=>String(e).replace(cDe,t=>lDe[t]),bk=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?bk(e.body[0]):e:e.type==="font"?bk(e.body):e,uDe=new Set(["mathord","textord","atom"]),Fu=e=>uDe.has(bk(e).type),hDe=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Tk={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};Nv=class{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r of Object.keys(Tk)){var i=Tk[r];i&&pDe(this,r,t,i)}}reportNonstrict(t,r,i){var n=this.strict;if(typeof n=="function"&&(n=n(t,r,i)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new kt("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),i);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,i){var n=this.strict;if(typeof n=="function")try{n=n(t,r,i)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=hDe(t.url);if(r==null)return!1;t.protocol=r}var i=typeof this.trust=="function"?this.trust(t):this.trust;return!!i}},uc=class{constructor(t,r,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=i}sup(){return hc[gDe[this.id]]}sub(){return hc[mDe[this.id]]}fracNum(){return hc[yDe[this.id]]}fracDen(){return hc[vDe[this.id]]}cramp(){return hc[bDe[this.id]]}text(){return hc[xDe[this.id]]}isTight(){return this.size>=2}},F8=0,wk=1,em=2,Bu=3,Mv=4,Lo=5,tm=6,Ha=7,hc=[new uc(F8,0,!1),new uc(wk,0,!0),new uc(em,1,!1),new uc(Bu,1,!0),new uc(Mv,2,!1),new uc(Lo,2,!0),new uc(tm,3,!1),new uc(Ha,3,!0)],gDe=[Mv,Lo,Mv,Lo,tm,Ha,tm,Ha],mDe=[Lo,Lo,Lo,Lo,Ha,Ha,Ha,Ha],yDe=[em,Bu,Mv,Lo,tm,Ha,tm,Ha],vDe=[Bu,Bu,Lo,Lo,Ha,Ha,Ha,Ha],bDe=[wk,wk,Bu,Bu,Lo,Lo,Ha,Ha],xDe=[F8,wk,em,Bu,em,Bu,em,Bu],Sr={DISPLAY:hc[F8],TEXT:hc[em],SCRIPT:hc[Mv],SCRIPTSCRIPT:hc[tm]},v8=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];xk=[];v8.forEach(e=>e.blocks.forEach(t=>xk.push(...t)));Mn=e=>e+" "+e,Jg=80,wDe=function(t,r){return"M95,"+(622+t+r)+` +var YBe=Object.create;var VL=Object.defineProperty;var XBe=Object.getOwnPropertyDescriptor;var jBe=Object.getOwnPropertyNames;var KBe=Object.getPrototypeOf,ZBe=Object.prototype.hasOwnProperty;var X=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var Rs=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},cr=(e,t)=>{for(var r in t)VL(e,r,{get:t[r],enumerable:!0})},QBe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jBe(t))!ZBe.call(e,i)&&i!==r&&VL(e,i,{get:()=>t[i],enumerable:!(n=XBe(t,i))||n.enumerable});return e};var Ls=(e,t,r)=>(r=e!=null?YBe(KBe(e)):{},QBe(t||!e||!e.__esModule?VL(r,"default",{value:e,enumerable:!0}):r,e));var dZ={};cr(dZ,{ParseError:()=>Lt,SETTINGS_SCHEMA:()=>Yk,__defineFunction:()=>qt,__defineMacro:()=>Ee,__defineSymbol:()=>J,__domTree:()=>fZ,__parse:()=>lZ,__renderToDomTree:()=>pS,__renderToHTMLTree:()=>uZ,__setFontMetrics:()=>vK,default:()=>F8,render:()=>$8,renderToString:()=>oZ,version:()=>hZ});function a$e(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function s$e(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return a$e(t)}function o$e(e,t,r,n){var i=r[t];e[t]=i!==void 0?n.processor?n.processor(i):i:s$e(n)}function p$e(e){for(var t=0;t=i[0]&&e<=i[1])return r.name}return null}function dK(e){for(var t=0;t=Hk[t]&&e<=Hk[t+1])return!0;return!1}function S$e(e){return"toText"in e}function R$e(e){if(e instanceof Ds)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function L$e(e){if(e instanceof Kf)return e;throw new Error("Expected span but got "+String(e)+".")}function vK(e,t){Uc[e]=t}function E8(e,t,r){if(!Uc[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=Uc[t][n];if(!i&&e[0]in Dj&&(n=Dj[e[0]].charCodeAt(0),i=Uc[t][n]),!i&&r==="text"&&dK(n)&&(i=Uc[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function M$e(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!WL[t]){var r=WL[t]={cssEmPerMu:Ok.quad[t]/18};for(var n in Ok)Ok.hasOwnProperty(n)&&(r[n]=Ok[n][t])}return WL[t]}function J(e,t,r,n,i,a){li[e][i]={font:t,group:r,replace:n},a&&n&&(li[e][n]=li[e][i])}function qt(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l0&&(a.push(Gk(s,t)),s=[]),a.push(n[o]));s.length>0&&a.push(Gk(s,t));var u;r?(u=Gk(ca(r,t,!0),t),u.classes=["tag"],a.push(u)):i&&a.push(i);var h=St(["katex-html"],a);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=Mt(h.height+h.depth),h.depth&&(f.style.verticalAlign=Mt(-h.depth))}return h}function EK(e){return new Xf(e)}function YL(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Ai&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof Ai&&r.text===","}else return!1}function Vj(e,t,r,n,i){var a=Vo(e,r),s;a.length===1&&a[0]instanceof Rt&&Y$e.has(a[0].type)?s=a[0]:s=new Rt("mrow",a);var o=new Rt("annotation",[new Ai(t)]);o.setAttribute("encoding","application/x-tex");var l=new Rt("semantics",[s,o]),u=new Rt("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var h=i?"katex":"katex-mathml";return St([h],[u])}function iFe(e){return e in rFe}function Wr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function oS(e){var t=lS(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function lS(e){return e&&(e.type==="atom"||nFe.hasOwnProperty(e.type))?e:null}function IK(e,t){var r=ca(e.body,t,!0);return St([e.mclass],r,t)}function MK(e,t){var r,n=Vo(e.body,t);return e.mclass==="minner"?r=new Rt("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new Rt("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new Rt("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function lFe(e,t,r){var n=sFe[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function cFe(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Lt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;aAV".includes(u))for(var f=0;f<2;f++){for(var d=!0,p=l+1;pAV=|." after @',s[l]);var g=lFe(u,h,e),m={type:"styling",body:[g],mode:"math",style:"display",resetFont:!0};n.push(m),o=Hj()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function jj(e){return"isMiddle"in e}function uS(e,t){var r=lS(e);if(r&&bFe.has(r.text))return r;throw r?new Lt("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new Lt("Invalid delimiter type '"+e.type+"'",e)}function Kj(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Yc(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l1||!h)&&m.pop(),x.length{Lt=class e extends Error{constructor(t,r){var n="KaTeX parse error: "+t,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&\u0332"),u;i>15?u="\u2026"+o.slice(i-15,i):u=o.slice(0,i);var h;a+15e.replace(JBe,"-$1").toLowerCase(),t$e={"&":"&",">":">","<":"<",'"':""","'":"'"},r$e=/[&><"']/g,hs=e=>String(e).replace(r$e,t=>t$e[t]),Uk=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Uk(e.body[0]):e:e.type==="font"?Uk(e.body):e,n$e=new Set(["mathord","textord","atom"]),Th=e=>n$e.has(Uk(e).type),i$e=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Yk={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};eb=class{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r of Object.keys(Yk)){var n=Yk[r];n&&o$e(this,r,t,n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Lt("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=i$e(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},Vc=class{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return Wc[l$e[this.id]]}sub(){return Wc[c$e[this.id]]}fracNum(){return Wc[u$e[this.id]]}fracDen(){return Wc[h$e[this.id]]}cramp(){return Wc[f$e[this.id]]}text(){return Wc[d$e[this.id]]}isTight(){return this.size>=2}},k8=0,Xk=1,ay=2,bh=3,tb=4,vl=5,sy=6,Ms=7,Wc=[new Vc(k8,0,!1),new Vc(Xk,0,!0),new Vc(ay,1,!1),new Vc(bh,1,!0),new Vc(tb,2,!1),new Vc(vl,2,!0),new Vc(sy,3,!1),new Vc(Ms,3,!0)],l$e=[tb,vl,tb,vl,sy,Ms,sy,Ms],c$e=[vl,vl,vl,vl,Ms,Ms,Ms,Ms],u$e=[ay,bh,tb,vl,sy,Ms,sy,Ms],h$e=[bh,bh,vl,vl,Ms,Ms,Ms,Ms],f$e=[Xk,Xk,bh,bh,vl,vl,Ms,Ms],d$e=[k8,Xk,ay,bh,ay,bh,ay,bh],Fr={DISPLAY:Wc[k8],TEXT:Wc[ay],SCRIPT:Wc[tb],SCRIPTSCRIPT:Wc[sy]},i8=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];Hk=[];i8.forEach(e=>e.blocks.forEach(t=>Hk.push(...t)));la=e=>e+" "+e,iy=80,g$e=function(t,r){return"M95,"+(622+t+r)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 @@ -10,7 +10,7 @@ c5.3,-9.3,12,-14,20,-14 H400000v`+(40+t)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},kDe=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119 +M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},m$e=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+t/2.084+" -"+t+` @@ -20,7 +20,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5, c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},CDe=function(t,r){return"M983 "+(10+t+r)+` +M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},y$e=function(t,r){return"M983 "+(10+t+r)+` l`+t/3.13+" -"+t+` c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 @@ -29,7 +29,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},SDe=function(t,r){return"M424,"+(2398+t+r)+` +M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},v$e=function(t,r){return"M424,"+(2398+t+r)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 @@ -39,18 +39,18 @@ v`+(40+t)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+` -h400000v`+(40+t)+"h-400000z"},EDe=function(t,r){return"M473,"+(2713+t+r)+` +h400000v`+(40+t)+"h-400000z"},x$e=function(t,r){return"M473,"+(2713+t+r)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},ADe=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},_De=function(t,r,i){var n=i-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` -H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},b$e=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},T$e=function(t,r,n){var i=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},LDe=function(t,r,i){r=1e3*r;var n="";switch(t){case"sqrtMain":n=wDe(r,Jg);break;case"sqrtSize1":n=kDe(r,Jg);break;case"sqrtSize2":n=CDe(r,Jg);break;case"sqrtSize3":n=SDe(r,Jg);break;case"sqrtSize4":n=EDe(r,Jg);break;case"sqrtTall":n=_De(r,Jg,i)}return n},RDe=function(t,r){switch(t){case"\u239C":return Mn("M291 0 H417 V"+r+" H291z");case"\u2223":return Mn("M145 0 H188 V"+r+" H145z");case"\u2225":return Mn("M145 0 H188 V"+r+" H145z")+Mn("M367 0 H410 V"+r+" H367z");case"\u239F":return Mn("M457 0 H583 V"+r+" H457z");case"\u23A2":return Mn("M319 0 H403 V"+r+" H319z");case"\u23A5":return Mn("M263 0 H347 V"+r+" H263z");case"\u23AA":return Mn("M384 0 H504 V"+r+" H384z");case"\u23D0":return Mn("M312 0 H355 V"+r+" H312z");case"\u2016":return Mn("M257 0 H300 V"+r+" H257z")+Mn("M478 0 H521 V"+r+" H478z");default:return""}},hU={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},w$e=function(t,r,n){r=1e3*r;var i="";switch(t){case"sqrtMain":i=g$e(r,iy);break;case"sqrtSize1":i=m$e(r,iy);break;case"sqrtSize2":i=y$e(r,iy);break;case"sqrtSize3":i=v$e(r,iy);break;case"sqrtSize4":i=x$e(r,iy);break;case"sqrtTall":i=T$e(r,iy,n)}return i},C$e=function(t,r){switch(t){case"\u239C":return la("M291 0 H417 V"+r+" H291z");case"\u2223":return la("M145 0 H188 V"+r+" H145z");case"\u2225":return la("M145 0 H188 V"+r+" H145z")+la("M367 0 H410 V"+r+" H367z");case"\u239F":return la("M457 0 H583 V"+r+" H457z");case"\u23A2":return la("M319 0 H403 V"+r+" H319z");case"\u23A5":return la("M263 0 H347 V"+r+" H263z");case"\u23AA":return la("M384 0 H504 V"+r+" H384z");case"\u23D0":return la("M312 0 H355 V"+r+" H312z");case"\u2016":return la("M257 0 H300 V"+r+" H257z")+la("M478 0 H521 V"+r+" H478z");default:return""}},Mj={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 @@ -96,10 +96,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Mn("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Mn("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Mn("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Mn("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:la("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:la("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:la("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:la("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Mn("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:la("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 @@ -148,7 +148,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Mn("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Mn("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Mn("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:la("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:la("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:la("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 @@ -221,7 +221,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},IDe=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},k$e=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 @@ -249,17 +249,17 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};cf=class{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r{if(DDe(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}},b8={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},NDe={ex:!0,em:!0,mu:!0},YU=function(t){return typeof t!="string"&&(t=t.unit),t in b8||t in NDe||t==="ex"},ji=function(t,r){var i;if(t.unit in b8)i=b8[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")i=r.fontMetrics().cssEmPerMu;else{var n;if(r.style.isTight()?n=r.havingStyle(r.style.text()):n=r,t.unit==="ex")i=n.fontMetrics().xHeight;else if(t.unit==="em")i=n.fontMetrics().quad;else throw new kt("Invalid unit: '"+t.unit+"'");n!==r&&(i*=n.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*i,r.maxSize)},St=function(t){return+t.toFixed(4)+"em"},uf=function(t){return t.filter(r=>r).join(" ")},$8=function(t){var r="";for(var i of Object.keys(t)){var n=t[i];n!==void 0&&(r+=oDe(i)+":"+n+";")}return r},jU=function(t,r,i){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},r){r.style.isTight()&&this.classes.push("mtight");var n=r.getColor();n&&(this.style.color=n)}},XU=function(t){var r=document.createElement(t);r.className=uf(this.classes),Object.assign(r.style,this.style);for(var i of Object.keys(this.attributes))r.setAttribute(i,this.attributes[i]);for(var n=0;n/=\x00-\x1f]/,KU=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+Ia(uf(this.classes))+'"');var i=$8(this.style);i&&(r+=' style="'+Ia(i)+'"');for(var n of Object.keys(this.attributes)){if(MDe.test(n))throw new kt("Invalid attribute name '"+n+"'");r+=" "+n+'="'+Ia(this.attributes[n])+'"'}r+=">";for(var a=0;a",r},hf=class{constructor(t,r,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,jU.call(this,t,i,n),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return XU.call(this,"span")}toMarkup(){return KU.call(this,"span")}},rm=class{constructor(t,r,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,jU.call(this,r,n),this.children=i||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return XU.call(this,"a")}toMarkup(){return KU.call(this,"a")}},x8=class{constructor(t,r,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=i}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t=''+Ia(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=St(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=uf(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="0&&(i+="margin-right:"+St(this.italic)+";"),i+=$8(this.style),i&&(t=!0,r+=' style="'+Ia(i)+'"');var n=Ia(this.text);return t?(r+=">",r+=n,r+="",r):n}},ml=class{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var i of Object.keys(this.attributes))r.setAttribute(i,this.attributes[i]);for(var n=0;n':''}},Ov=class{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var i of Object.keys(this.attributes))r.setAttribute(i,this.attributes[i]);return r}toMarkup(){var t="e instanceof hf||e instanceof rm||e instanceof cf,fc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ck={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},fU={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};n8={};Fi={math:{},text:{}};K="math",gt="text",ae="main",Le="ams",$i="accent-token",Bt="bin",ja="close",am="inner",tr="mathord",Cn="op-token",ro="open",Bv="punct",Ne="rel",$u="spacing",$e="textord";W(K,ae,Ne,"\u2261","\\equiv",!0);W(K,ae,Ne,"\u227A","\\prec",!0);W(K,ae,Ne,"\u227B","\\succ",!0);W(K,ae,Ne,"\u223C","\\sim",!0);W(K,ae,Ne,"\u22A5","\\perp");W(K,ae,Ne,"\u2AAF","\\preceq",!0);W(K,ae,Ne,"\u2AB0","\\succeq",!0);W(K,ae,Ne,"\u2243","\\simeq",!0);W(K,ae,Ne,"\u2223","\\mid",!0);W(K,ae,Ne,"\u226A","\\ll",!0);W(K,ae,Ne,"\u226B","\\gg",!0);W(K,ae,Ne,"\u224D","\\asymp",!0);W(K,ae,Ne,"\u2225","\\parallel");W(K,ae,Ne,"\u22C8","\\bowtie",!0);W(K,ae,Ne,"\u2323","\\smile",!0);W(K,ae,Ne,"\u2291","\\sqsubseteq",!0);W(K,ae,Ne,"\u2292","\\sqsupseteq",!0);W(K,ae,Ne,"\u2250","\\doteq",!0);W(K,ae,Ne,"\u2322","\\frown",!0);W(K,ae,Ne,"\u220B","\\ni",!0);W(K,ae,Ne,"\u221D","\\propto",!0);W(K,ae,Ne,"\u22A2","\\vdash",!0);W(K,ae,Ne,"\u22A3","\\dashv",!0);W(K,ae,Ne,"\u220B","\\owns");W(K,ae,Bv,".","\\ldotp");W(K,ae,Bv,"\u22C5","\\cdotp");W(K,ae,Bv,"\u22C5","\xB7");W(gt,ae,$e,"\u22C5","\xB7");W(K,ae,$e,"#","\\#");W(gt,ae,$e,"#","\\#");W(K,ae,$e,"&","\\&");W(gt,ae,$e,"&","\\&");W(K,ae,$e,"\u2135","\\aleph",!0);W(K,ae,$e,"\u2200","\\forall",!0);W(K,ae,$e,"\u210F","\\hbar",!0);W(K,ae,$e,"\u2203","\\exists",!0);W(K,ae,$e,"\u2207","\\nabla",!0);W(K,ae,$e,"\u266D","\\flat",!0);W(K,ae,$e,"\u2113","\\ell",!0);W(K,ae,$e,"\u266E","\\natural",!0);W(K,ae,$e,"\u2663","\\clubsuit",!0);W(K,ae,$e,"\u2118","\\wp",!0);W(K,ae,$e,"\u266F","\\sharp",!0);W(K,ae,$e,"\u2662","\\diamondsuit",!0);W(K,ae,$e,"\u211C","\\Re",!0);W(K,ae,$e,"\u2661","\\heartsuit",!0);W(K,ae,$e,"\u2111","\\Im",!0);W(K,ae,$e,"\u2660","\\spadesuit",!0);W(K,ae,$e,"\xA7","\\S",!0);W(gt,ae,$e,"\xA7","\\S");W(K,ae,$e,"\xB6","\\P",!0);W(gt,ae,$e,"\xB6","\\P");W(K,ae,$e,"\u2020","\\dag");W(gt,ae,$e,"\u2020","\\dag");W(gt,ae,$e,"\u2020","\\textdagger");W(K,ae,$e,"\u2021","\\ddag");W(gt,ae,$e,"\u2021","\\ddag");W(gt,ae,$e,"\u2021","\\textdaggerdbl");W(K,ae,ja,"\u23B1","\\rmoustache",!0);W(K,ae,ro,"\u23B0","\\lmoustache",!0);W(K,ae,ja,"\u27EF","\\rgroup",!0);W(K,ae,ro,"\u27EE","\\lgroup",!0);W(K,ae,Bt,"\u2213","\\mp",!0);W(K,ae,Bt,"\u2296","\\ominus",!0);W(K,ae,Bt,"\u228E","\\uplus",!0);W(K,ae,Bt,"\u2293","\\sqcap",!0);W(K,ae,Bt,"\u2217","\\ast");W(K,ae,Bt,"\u2294","\\sqcup",!0);W(K,ae,Bt,"\u25EF","\\bigcirc",!0);W(K,ae,Bt,"\u2219","\\bullet",!0);W(K,ae,Bt,"\u2021","\\ddagger");W(K,ae,Bt,"\u2240","\\wr",!0);W(K,ae,Bt,"\u2A3F","\\amalg");W(K,ae,Bt,"&","\\And");W(K,ae,Ne,"\u27F5","\\longleftarrow",!0);W(K,ae,Ne,"\u21D0","\\Leftarrow",!0);W(K,ae,Ne,"\u27F8","\\Longleftarrow",!0);W(K,ae,Ne,"\u27F6","\\longrightarrow",!0);W(K,ae,Ne,"\u21D2","\\Rightarrow",!0);W(K,ae,Ne,"\u27F9","\\Longrightarrow",!0);W(K,ae,Ne,"\u2194","\\leftrightarrow",!0);W(K,ae,Ne,"\u27F7","\\longleftrightarrow",!0);W(K,ae,Ne,"\u21D4","\\Leftrightarrow",!0);W(K,ae,Ne,"\u27FA","\\Longleftrightarrow",!0);W(K,ae,Ne,"\u21A6","\\mapsto",!0);W(K,ae,Ne,"\u27FC","\\longmapsto",!0);W(K,ae,Ne,"\u2197","\\nearrow",!0);W(K,ae,Ne,"\u21A9","\\hookleftarrow",!0);W(K,ae,Ne,"\u21AA","\\hookrightarrow",!0);W(K,ae,Ne,"\u2198","\\searrow",!0);W(K,ae,Ne,"\u21BC","\\leftharpoonup",!0);W(K,ae,Ne,"\u21C0","\\rightharpoonup",!0);W(K,ae,Ne,"\u2199","\\swarrow",!0);W(K,ae,Ne,"\u21BD","\\leftharpoondown",!0);W(K,ae,Ne,"\u21C1","\\rightharpoondown",!0);W(K,ae,Ne,"\u2196","\\nwarrow",!0);W(K,ae,Ne,"\u21CC","\\rightleftharpoons",!0);W(K,Le,Ne,"\u226E","\\nless",!0);W(K,Le,Ne,"\uE010","\\@nleqslant");W(K,Le,Ne,"\uE011","\\@nleqq");W(K,Le,Ne,"\u2A87","\\lneq",!0);W(K,Le,Ne,"\u2268","\\lneqq",!0);W(K,Le,Ne,"\uE00C","\\@lvertneqq");W(K,Le,Ne,"\u22E6","\\lnsim",!0);W(K,Le,Ne,"\u2A89","\\lnapprox",!0);W(K,Le,Ne,"\u2280","\\nprec",!0);W(K,Le,Ne,"\u22E0","\\npreceq",!0);W(K,Le,Ne,"\u22E8","\\precnsim",!0);W(K,Le,Ne,"\u2AB9","\\precnapprox",!0);W(K,Le,Ne,"\u2241","\\nsim",!0);W(K,Le,Ne,"\uE006","\\@nshortmid");W(K,Le,Ne,"\u2224","\\nmid",!0);W(K,Le,Ne,"\u22AC","\\nvdash",!0);W(K,Le,Ne,"\u22AD","\\nvDash",!0);W(K,Le,Ne,"\u22EA","\\ntriangleleft");W(K,Le,Ne,"\u22EC","\\ntrianglelefteq",!0);W(K,Le,Ne,"\u228A","\\subsetneq",!0);W(K,Le,Ne,"\uE01A","\\@varsubsetneq");W(K,Le,Ne,"\u2ACB","\\subsetneqq",!0);W(K,Le,Ne,"\uE017","\\@varsubsetneqq");W(K,Le,Ne,"\u226F","\\ngtr",!0);W(K,Le,Ne,"\uE00F","\\@ngeqslant");W(K,Le,Ne,"\uE00E","\\@ngeqq");W(K,Le,Ne,"\u2A88","\\gneq",!0);W(K,Le,Ne,"\u2269","\\gneqq",!0);W(K,Le,Ne,"\uE00D","\\@gvertneqq");W(K,Le,Ne,"\u22E7","\\gnsim",!0);W(K,Le,Ne,"\u2A8A","\\gnapprox",!0);W(K,Le,Ne,"\u2281","\\nsucc",!0);W(K,Le,Ne,"\u22E1","\\nsucceq",!0);W(K,Le,Ne,"\u22E9","\\succnsim",!0);W(K,Le,Ne,"\u2ABA","\\succnapprox",!0);W(K,Le,Ne,"\u2246","\\ncong",!0);W(K,Le,Ne,"\uE007","\\@nshortparallel");W(K,Le,Ne,"\u2226","\\nparallel",!0);W(K,Le,Ne,"\u22AF","\\nVDash",!0);W(K,Le,Ne,"\u22EB","\\ntriangleright");W(K,Le,Ne,"\u22ED","\\ntrianglerighteq",!0);W(K,Le,Ne,"\uE018","\\@nsupseteqq");W(K,Le,Ne,"\u228B","\\supsetneq",!0);W(K,Le,Ne,"\uE01B","\\@varsupsetneq");W(K,Le,Ne,"\u2ACC","\\supsetneqq",!0);W(K,Le,Ne,"\uE019","\\@varsupsetneqq");W(K,Le,Ne,"\u22AE","\\nVdash",!0);W(K,Le,Ne,"\u2AB5","\\precneqq",!0);W(K,Le,Ne,"\u2AB6","\\succneqq",!0);W(K,Le,Ne,"\uE016","\\@nsubseteqq");W(K,Le,Bt,"\u22B4","\\unlhd");W(K,Le,Bt,"\u22B5","\\unrhd");W(K,Le,Ne,"\u219A","\\nleftarrow",!0);W(K,Le,Ne,"\u219B","\\nrightarrow",!0);W(K,Le,Ne,"\u21CD","\\nLeftarrow",!0);W(K,Le,Ne,"\u21CF","\\nRightarrow",!0);W(K,Le,Ne,"\u21AE","\\nleftrightarrow",!0);W(K,Le,Ne,"\u21CE","\\nLeftrightarrow",!0);W(K,Le,Ne,"\u25B3","\\vartriangle");W(K,Le,$e,"\u210F","\\hslash");W(K,Le,$e,"\u25BD","\\triangledown");W(K,Le,$e,"\u25CA","\\lozenge");W(K,Le,$e,"\u24C8","\\circledS");W(K,Le,$e,"\xAE","\\circledR");W(gt,Le,$e,"\xAE","\\circledR");W(K,Le,$e,"\u2221","\\measuredangle",!0);W(K,Le,$e,"\u2204","\\nexists");W(K,Le,$e,"\u2127","\\mho");W(K,Le,$e,"\u2132","\\Finv",!0);W(K,Le,$e,"\u2141","\\Game",!0);W(K,Le,$e,"\u2035","\\backprime");W(K,Le,$e,"\u25B2","\\blacktriangle");W(K,Le,$e,"\u25BC","\\blacktriangledown");W(K,Le,$e,"\u25A0","\\blacksquare");W(K,Le,$e,"\u29EB","\\blacklozenge");W(K,Le,$e,"\u2605","\\bigstar");W(K,Le,$e,"\u2222","\\sphericalangle",!0);W(K,Le,$e,"\u2201","\\complement",!0);W(K,Le,$e,"\xF0","\\eth",!0);W(gt,ae,$e,"\xF0","\xF0");W(K,Le,$e,"\u2571","\\diagup");W(K,Le,$e,"\u2572","\\diagdown");W(K,Le,$e,"\u25A1","\\square");W(K,Le,$e,"\u25A1","\\Box");W(K,Le,$e,"\u25CA","\\Diamond");W(K,Le,$e,"\xA5","\\yen",!0);W(gt,Le,$e,"\xA5","\\yen",!0);W(K,Le,$e,"\u2713","\\checkmark",!0);W(gt,Le,$e,"\u2713","\\checkmark");W(K,Le,$e,"\u2136","\\beth",!0);W(K,Le,$e,"\u2138","\\daleth",!0);W(K,Le,$e,"\u2137","\\gimel",!0);W(K,Le,$e,"\u03DD","\\digamma",!0);W(K,Le,$e,"\u03F0","\\varkappa");W(K,Le,ro,"\u250C","\\@ulcorner",!0);W(K,Le,ja,"\u2510","\\@urcorner",!0);W(K,Le,ro,"\u2514","\\@llcorner",!0);W(K,Le,ja,"\u2518","\\@lrcorner",!0);W(K,Le,Ne,"\u2266","\\leqq",!0);W(K,Le,Ne,"\u2A7D","\\leqslant",!0);W(K,Le,Ne,"\u2A95","\\eqslantless",!0);W(K,Le,Ne,"\u2272","\\lesssim",!0);W(K,Le,Ne,"\u2A85","\\lessapprox",!0);W(K,Le,Ne,"\u224A","\\approxeq",!0);W(K,Le,Bt,"\u22D6","\\lessdot");W(K,Le,Ne,"\u22D8","\\lll",!0);W(K,Le,Ne,"\u2276","\\lessgtr",!0);W(K,Le,Ne,"\u22DA","\\lesseqgtr",!0);W(K,Le,Ne,"\u2A8B","\\lesseqqgtr",!0);W(K,Le,Ne,"\u2251","\\doteqdot");W(K,Le,Ne,"\u2253","\\risingdotseq",!0);W(K,Le,Ne,"\u2252","\\fallingdotseq",!0);W(K,Le,Ne,"\u223D","\\backsim",!0);W(K,Le,Ne,"\u22CD","\\backsimeq",!0);W(K,Le,Ne,"\u2AC5","\\subseteqq",!0);W(K,Le,Ne,"\u22D0","\\Subset",!0);W(K,Le,Ne,"\u228F","\\sqsubset",!0);W(K,Le,Ne,"\u227C","\\preccurlyeq",!0);W(K,Le,Ne,"\u22DE","\\curlyeqprec",!0);W(K,Le,Ne,"\u227E","\\precsim",!0);W(K,Le,Ne,"\u2AB7","\\precapprox",!0);W(K,Le,Ne,"\u22B2","\\vartriangleleft");W(K,Le,Ne,"\u22B4","\\trianglelefteq");W(K,Le,Ne,"\u22A8","\\vDash",!0);W(K,Le,Ne,"\u22AA","\\Vvdash",!0);W(K,Le,Ne,"\u2323","\\smallsmile");W(K,Le,Ne,"\u2322","\\smallfrown");W(K,Le,Ne,"\u224F","\\bumpeq",!0);W(K,Le,Ne,"\u224E","\\Bumpeq",!0);W(K,Le,Ne,"\u2267","\\geqq",!0);W(K,Le,Ne,"\u2A7E","\\geqslant",!0);W(K,Le,Ne,"\u2A96","\\eqslantgtr",!0);W(K,Le,Ne,"\u2273","\\gtrsim",!0);W(K,Le,Ne,"\u2A86","\\gtrapprox",!0);W(K,Le,Bt,"\u22D7","\\gtrdot");W(K,Le,Ne,"\u22D9","\\ggg",!0);W(K,Le,Ne,"\u2277","\\gtrless",!0);W(K,Le,Ne,"\u22DB","\\gtreqless",!0);W(K,Le,Ne,"\u2A8C","\\gtreqqless",!0);W(K,Le,Ne,"\u2256","\\eqcirc",!0);W(K,Le,Ne,"\u2257","\\circeq",!0);W(K,Le,Ne,"\u225C","\\triangleq",!0);W(K,Le,Ne,"\u223C","\\thicksim");W(K,Le,Ne,"\u2248","\\thickapprox");W(K,Le,Ne,"\u2AC6","\\supseteqq",!0);W(K,Le,Ne,"\u22D1","\\Supset",!0);W(K,Le,Ne,"\u2290","\\sqsupset",!0);W(K,Le,Ne,"\u227D","\\succcurlyeq",!0);W(K,Le,Ne,"\u22DF","\\curlyeqsucc",!0);W(K,Le,Ne,"\u227F","\\succsim",!0);W(K,Le,Ne,"\u2AB8","\\succapprox",!0);W(K,Le,Ne,"\u22B3","\\vartriangleright");W(K,Le,Ne,"\u22B5","\\trianglerighteq");W(K,Le,Ne,"\u22A9","\\Vdash",!0);W(K,Le,Ne,"\u2223","\\shortmid");W(K,Le,Ne,"\u2225","\\shortparallel");W(K,Le,Ne,"\u226C","\\between",!0);W(K,Le,Ne,"\u22D4","\\pitchfork",!0);W(K,Le,Ne,"\u221D","\\varpropto");W(K,Le,Ne,"\u25C0","\\blacktriangleleft");W(K,Le,Ne,"\u2234","\\therefore",!0);W(K,Le,Ne,"\u220D","\\backepsilon");W(K,Le,Ne,"\u25B6","\\blacktriangleright");W(K,Le,Ne,"\u2235","\\because",!0);W(K,Le,Ne,"\u22D8","\\llless");W(K,Le,Ne,"\u22D9","\\gggtr");W(K,Le,Bt,"\u22B2","\\lhd");W(K,Le,Bt,"\u22B3","\\rhd");W(K,Le,Ne,"\u2242","\\eqsim",!0);W(K,ae,Ne,"\u22C8","\\Join");W(K,Le,Ne,"\u2251","\\Doteq",!0);W(K,Le,Bt,"\u2214","\\dotplus",!0);W(K,Le,Bt,"\u2216","\\smallsetminus");W(K,Le,Bt,"\u22D2","\\Cap",!0);W(K,Le,Bt,"\u22D3","\\Cup",!0);W(K,Le,Bt,"\u2A5E","\\doublebarwedge",!0);W(K,Le,Bt,"\u229F","\\boxminus",!0);W(K,Le,Bt,"\u229E","\\boxplus",!0);W(K,Le,Bt,"\u22C7","\\divideontimes",!0);W(K,Le,Bt,"\u22C9","\\ltimes",!0);W(K,Le,Bt,"\u22CA","\\rtimes",!0);W(K,Le,Bt,"\u22CB","\\leftthreetimes",!0);W(K,Le,Bt,"\u22CC","\\rightthreetimes",!0);W(K,Le,Bt,"\u22CF","\\curlywedge",!0);W(K,Le,Bt,"\u22CE","\\curlyvee",!0);W(K,Le,Bt,"\u229D","\\circleddash",!0);W(K,Le,Bt,"\u229B","\\circledast",!0);W(K,Le,Bt,"\u22C5","\\centerdot");W(K,Le,Bt,"\u22BA","\\intercal",!0);W(K,Le,Bt,"\u22D2","\\doublecap");W(K,Le,Bt,"\u22D3","\\doublecup");W(K,Le,Bt,"\u22A0","\\boxtimes",!0);W(K,Le,Ne,"\u21E2","\\dashrightarrow",!0);W(K,Le,Ne,"\u21E0","\\dashleftarrow",!0);W(K,Le,Ne,"\u21C7","\\leftleftarrows",!0);W(K,Le,Ne,"\u21C6","\\leftrightarrows",!0);W(K,Le,Ne,"\u21DA","\\Lleftarrow",!0);W(K,Le,Ne,"\u219E","\\twoheadleftarrow",!0);W(K,Le,Ne,"\u21A2","\\leftarrowtail",!0);W(K,Le,Ne,"\u21AB","\\looparrowleft",!0);W(K,Le,Ne,"\u21CB","\\leftrightharpoons",!0);W(K,Le,Ne,"\u21B6","\\curvearrowleft",!0);W(K,Le,Ne,"\u21BA","\\circlearrowleft",!0);W(K,Le,Ne,"\u21B0","\\Lsh",!0);W(K,Le,Ne,"\u21C8","\\upuparrows",!0);W(K,Le,Ne,"\u21BF","\\upharpoonleft",!0);W(K,Le,Ne,"\u21C3","\\downharpoonleft",!0);W(K,ae,Ne,"\u22B6","\\origof",!0);W(K,ae,Ne,"\u22B7","\\imageof",!0);W(K,Le,Ne,"\u22B8","\\multimap",!0);W(K,Le,Ne,"\u21AD","\\leftrightsquigarrow",!0);W(K,Le,Ne,"\u21C9","\\rightrightarrows",!0);W(K,Le,Ne,"\u21C4","\\rightleftarrows",!0);W(K,Le,Ne,"\u21A0","\\twoheadrightarrow",!0);W(K,Le,Ne,"\u21A3","\\rightarrowtail",!0);W(K,Le,Ne,"\u21AC","\\looparrowright",!0);W(K,Le,Ne,"\u21B7","\\curvearrowright",!0);W(K,Le,Ne,"\u21BB","\\circlearrowright",!0);W(K,Le,Ne,"\u21B1","\\Rsh",!0);W(K,Le,Ne,"\u21CA","\\downdownarrows",!0);W(K,Le,Ne,"\u21BE","\\upharpoonright",!0);W(K,Le,Ne,"\u21C2","\\downharpoonright",!0);W(K,Le,Ne,"\u21DD","\\rightsquigarrow",!0);W(K,Le,Ne,"\u21DD","\\leadsto");W(K,Le,Ne,"\u21DB","\\Rrightarrow",!0);W(K,Le,Ne,"\u21BE","\\restriction");W(K,ae,$e,"\u2018","`");W(K,ae,$e,"$","\\$");W(gt,ae,$e,"$","\\$");W(gt,ae,$e,"$","\\textdollar");W(K,ae,$e,"%","\\%");W(gt,ae,$e,"%","\\%");W(K,ae,$e,"_","\\_");W(gt,ae,$e,"_","\\_");W(gt,ae,$e,"_","\\textunderscore");W(K,ae,$e,"\u2220","\\angle",!0);W(K,ae,$e,"\u221E","\\infty",!0);W(K,ae,$e,"\u2032","\\prime");W(K,ae,$e,"\u25B3","\\triangle");W(K,ae,$e,"\u0393","\\Gamma",!0);W(K,ae,$e,"\u0394","\\Delta",!0);W(K,ae,$e,"\u0398","\\Theta",!0);W(K,ae,$e,"\u039B","\\Lambda",!0);W(K,ae,$e,"\u039E","\\Xi",!0);W(K,ae,$e,"\u03A0","\\Pi",!0);W(K,ae,$e,"\u03A3","\\Sigma",!0);W(K,ae,$e,"\u03A5","\\Upsilon",!0);W(K,ae,$e,"\u03A6","\\Phi",!0);W(K,ae,$e,"\u03A8","\\Psi",!0);W(K,ae,$e,"\u03A9","\\Omega",!0);W(K,ae,$e,"A","\u0391");W(K,ae,$e,"B","\u0392");W(K,ae,$e,"E","\u0395");W(K,ae,$e,"Z","\u0396");W(K,ae,$e,"H","\u0397");W(K,ae,$e,"I","\u0399");W(K,ae,$e,"K","\u039A");W(K,ae,$e,"M","\u039C");W(K,ae,$e,"N","\u039D");W(K,ae,$e,"O","\u039F");W(K,ae,$e,"P","\u03A1");W(K,ae,$e,"T","\u03A4");W(K,ae,$e,"X","\u03A7");W(K,ae,$e,"\xAC","\\neg",!0);W(K,ae,$e,"\xAC","\\lnot");W(K,ae,$e,"\u22A4","\\top");W(K,ae,$e,"\u22A5","\\bot");W(K,ae,$e,"\u2205","\\emptyset");W(K,Le,$e,"\u2205","\\varnothing");W(K,ae,tr,"\u03B1","\\alpha",!0);W(K,ae,tr,"\u03B2","\\beta",!0);W(K,ae,tr,"\u03B3","\\gamma",!0);W(K,ae,tr,"\u03B4","\\delta",!0);W(K,ae,tr,"\u03F5","\\epsilon",!0);W(K,ae,tr,"\u03B6","\\zeta",!0);W(K,ae,tr,"\u03B7","\\eta",!0);W(K,ae,tr,"\u03B8","\\theta",!0);W(K,ae,tr,"\u03B9","\\iota",!0);W(K,ae,tr,"\u03BA","\\kappa",!0);W(K,ae,tr,"\u03BB","\\lambda",!0);W(K,ae,tr,"\u03BC","\\mu",!0);W(K,ae,tr,"\u03BD","\\nu",!0);W(K,ae,tr,"\u03BE","\\xi",!0);W(K,ae,tr,"\u03BF","\\omicron",!0);W(K,ae,tr,"\u03C0","\\pi",!0);W(K,ae,tr,"\u03C1","\\rho",!0);W(K,ae,tr,"\u03C3","\\sigma",!0);W(K,ae,tr,"\u03C4","\\tau",!0);W(K,ae,tr,"\u03C5","\\upsilon",!0);W(K,ae,tr,"\u03D5","\\phi",!0);W(K,ae,tr,"\u03C7","\\chi",!0);W(K,ae,tr,"\u03C8","\\psi",!0);W(K,ae,tr,"\u03C9","\\omega",!0);W(K,ae,tr,"\u03B5","\\varepsilon",!0);W(K,ae,tr,"\u03D1","\\vartheta",!0);W(K,ae,tr,"\u03D6","\\varpi",!0);W(K,ae,tr,"\u03F1","\\varrho",!0);W(K,ae,tr,"\u03C2","\\varsigma",!0);W(K,ae,tr,"\u03C6","\\varphi",!0);W(K,ae,Bt,"\u2217","*",!0);W(K,ae,Bt,"+","+");W(K,ae,Bt,"\u2212","-",!0);W(K,ae,Bt,"\u22C5","\\cdot",!0);W(K,ae,Bt,"\u2218","\\circ",!0);W(K,ae,Bt,"\xF7","\\div",!0);W(K,ae,Bt,"\xB1","\\pm",!0);W(K,ae,Bt,"\xD7","\\times",!0);W(K,ae,Bt,"\u2229","\\cap",!0);W(K,ae,Bt,"\u222A","\\cup",!0);W(K,ae,Bt,"\u2216","\\setminus",!0);W(K,ae,Bt,"\u2227","\\land");W(K,ae,Bt,"\u2228","\\lor");W(K,ae,Bt,"\u2227","\\wedge",!0);W(K,ae,Bt,"\u2228","\\vee",!0);W(K,ae,$e,"\u221A","\\surd");W(K,ae,ro,"\u27E8","\\langle",!0);W(K,ae,ro,"\u2223","\\lvert");W(K,ae,ro,"\u2225","\\lVert");W(K,ae,ja,"?","?");W(K,ae,ja,"!","!");W(K,ae,ja,"\u27E9","\\rangle",!0);W(K,ae,ja,"\u2223","\\rvert");W(K,ae,ja,"\u2225","\\rVert");W(K,ae,Ne,"=","=");W(K,ae,Ne,":",":");W(K,ae,Ne,"\u2248","\\approx",!0);W(K,ae,Ne,"\u2245","\\cong",!0);W(K,ae,Ne,"\u2265","\\ge");W(K,ae,Ne,"\u2265","\\geq",!0);W(K,ae,Ne,"\u2190","\\gets");W(K,ae,Ne,">","\\gt",!0);W(K,ae,Ne,"\u2208","\\in",!0);W(K,ae,Ne,"\uE020","\\@not");W(K,ae,Ne,"\u2282","\\subset",!0);W(K,ae,Ne,"\u2283","\\supset",!0);W(K,ae,Ne,"\u2286","\\subseteq",!0);W(K,ae,Ne,"\u2287","\\supseteq",!0);W(K,Le,Ne,"\u2288","\\nsubseteq",!0);W(K,Le,Ne,"\u2289","\\nsupseteq",!0);W(K,ae,Ne,"\u22A8","\\models");W(K,ae,Ne,"\u2190","\\leftarrow",!0);W(K,ae,Ne,"\u2264","\\le");W(K,ae,Ne,"\u2264","\\leq",!0);W(K,ae,Ne,"<","\\lt",!0);W(K,ae,Ne,"\u2192","\\rightarrow",!0);W(K,ae,Ne,"\u2192","\\to");W(K,Le,Ne,"\u2271","\\ngeq",!0);W(K,Le,Ne,"\u2270","\\nleq",!0);W(K,ae,$u,"\xA0","\\ ");W(K,ae,$u,"\xA0","\\space");W(K,ae,$u,"\xA0","\\nobreakspace");W(gt,ae,$u,"\xA0","\\ ");W(gt,ae,$u,"\xA0"," ");W(gt,ae,$u,"\xA0","\\space");W(gt,ae,$u,"\xA0","\\nobreakspace");W(K,ae,$u,"","\\nobreak");W(K,ae,$u,"","\\allowbreak");W(K,ae,Bv,",",",");W(K,ae,Bv,";",";");W(K,Le,Bt,"\u22BC","\\barwedge",!0);W(K,Le,Bt,"\u22BB","\\veebar",!0);W(K,ae,Bt,"\u2299","\\odot",!0);W(K,ae,Bt,"\u2295","\\oplus",!0);W(K,ae,Bt,"\u2297","\\otimes",!0);W(K,ae,$e,"\u2202","\\partial",!0);W(K,ae,Bt,"\u2298","\\oslash",!0);W(K,Le,Bt,"\u229A","\\circledcirc",!0);W(K,Le,Bt,"\u22A1","\\boxdot",!0);W(K,ae,Bt,"\u25B3","\\bigtriangleup");W(K,ae,Bt,"\u25BD","\\bigtriangledown");W(K,ae,Bt,"\u2020","\\dagger");W(K,ae,Bt,"\u22C4","\\diamond");W(K,ae,Bt,"\u22C6","\\star");W(K,ae,Bt,"\u25C3","\\triangleleft");W(K,ae,Bt,"\u25B9","\\triangleright");W(K,ae,ro,"{","\\{");W(gt,ae,$e,"{","\\{");W(gt,ae,$e,"{","\\textbraceleft");W(K,ae,ja,"}","\\}");W(gt,ae,$e,"}","\\}");W(gt,ae,$e,"}","\\textbraceright");W(K,ae,ro,"{","\\lbrace");W(K,ae,ja,"}","\\rbrace");W(K,ae,ro,"[","\\lbrack",!0);W(gt,ae,$e,"[","\\lbrack",!0);W(K,ae,ja,"]","\\rbrack",!0);W(gt,ae,$e,"]","\\rbrack",!0);W(K,ae,ro,"(","\\lparen",!0);W(K,ae,ja,")","\\rparen",!0);W(gt,ae,$e,"<","\\textless",!0);W(gt,ae,$e,">","\\textgreater",!0);W(K,ae,ro,"\u230A","\\lfloor",!0);W(K,ae,ja,"\u230B","\\rfloor",!0);W(K,ae,ro,"\u2308","\\lceil",!0);W(K,ae,ja,"\u2309","\\rceil",!0);W(K,ae,$e,"\\","\\backslash");W(K,ae,$e,"\u2223","|");W(K,ae,$e,"\u2223","\\vert");W(gt,ae,$e,"|","\\textbar",!0);W(K,ae,$e,"\u2225","\\|");W(K,ae,$e,"\u2225","\\Vert");W(gt,ae,$e,"\u2225","\\textbardbl");W(gt,ae,$e,"~","\\textasciitilde");W(gt,ae,$e,"\\","\\textbackslash");W(gt,ae,$e,"^","\\textasciicircum");W(K,ae,Ne,"\u2191","\\uparrow",!0);W(K,ae,Ne,"\u21D1","\\Uparrow",!0);W(K,ae,Ne,"\u2193","\\downarrow",!0);W(K,ae,Ne,"\u21D3","\\Downarrow",!0);W(K,ae,Ne,"\u2195","\\updownarrow",!0);W(K,ae,Ne,"\u21D5","\\Updownarrow",!0);W(K,ae,Cn,"\u2210","\\coprod");W(K,ae,Cn,"\u22C1","\\bigvee");W(K,ae,Cn,"\u22C0","\\bigwedge");W(K,ae,Cn,"\u2A04","\\biguplus");W(K,ae,Cn,"\u22C2","\\bigcap");W(K,ae,Cn,"\u22C3","\\bigcup");W(K,ae,Cn,"\u222B","\\int");W(K,ae,Cn,"\u222B","\\intop");W(K,ae,Cn,"\u222C","\\iint");W(K,ae,Cn,"\u222D","\\iiint");W(K,ae,Cn,"\u220F","\\prod");W(K,ae,Cn,"\u2211","\\sum");W(K,ae,Cn,"\u2A02","\\bigotimes");W(K,ae,Cn,"\u2A01","\\bigoplus");W(K,ae,Cn,"\u2A00","\\bigodot");W(K,ae,Cn,"\u222E","\\oint");W(K,ae,Cn,"\u222F","\\oiint");W(K,ae,Cn,"\u2230","\\oiiint");W(K,ae,Cn,"\u2A06","\\bigsqcup");W(K,ae,Cn,"\u222B","\\smallint");W(gt,ae,am,"\u2026","\\textellipsis");W(K,ae,am,"\u2026","\\mathellipsis");W(gt,ae,am,"\u2026","\\ldots",!0);W(K,ae,am,"\u2026","\\ldots",!0);W(K,ae,am,"\u22EF","\\@cdots",!0);W(K,ae,am,"\u22F1","\\ddots",!0);W(K,ae,$e,"\u22EE","\\varvdots");W(gt,ae,$e,"\u22EE","\\varvdots");W(K,ae,$i,"\u02CA","\\acute");W(K,ae,$i,"\u02CB","\\grave");W(K,ae,$i,"\xA8","\\ddot");W(K,ae,$i,"~","\\tilde");W(K,ae,$i,"\u02C9","\\bar");W(K,ae,$i,"\u02D8","\\breve");W(K,ae,$i,"\u02C7","\\check");W(K,ae,$i,"^","\\hat");W(K,ae,$i,"\u20D7","\\vec");W(K,ae,$i,"\u02D9","\\dot");W(K,ae,$i,"\u02DA","\\mathring");W(K,ae,tr,"\uE131","\\@imath");W(K,ae,tr,"\uE237","\\@jmath");W(K,ae,$e,"\u0131","\u0131");W(K,ae,$e,"\u0237","\u0237");W(gt,ae,$e,"\u0131","\\i",!0);W(gt,ae,$e,"\u0237","\\j",!0);W(gt,ae,$e,"\xDF","\\ss",!0);W(gt,ae,$e,"\xE6","\\ae",!0);W(gt,ae,$e,"\u0153","\\oe",!0);W(gt,ae,$e,"\xF8","\\o",!0);W(gt,ae,$e,"\xC6","\\AE",!0);W(gt,ae,$e,"\u0152","\\OE",!0);W(gt,ae,$e,"\xD8","\\O",!0);W(gt,ae,$i,"\u02CA","\\'");W(gt,ae,$i,"\u02CB","\\`");W(gt,ae,$i,"\u02C6","\\^");W(gt,ae,$i,"\u02DC","\\~");W(gt,ae,$i,"\u02C9","\\=");W(gt,ae,$i,"\u02D8","\\u");W(gt,ae,$i,"\u02D9","\\.");W(gt,ae,$i,"\xB8","\\c");W(gt,ae,$i,"\u02DA","\\r");W(gt,ae,$i,"\u02C7","\\v");W(gt,ae,$i,"\xA8",'\\"');W(gt,ae,$i,"\u02DD","\\H");W(gt,ae,$i,"\u25EF","\\textcircled");QU={"--":!0,"---":!0,"``":!0,"''":!0};W(gt,ae,$e,"\u2013","--",!0);W(gt,ae,$e,"\u2013","\\textendash");W(gt,ae,$e,"\u2014","---",!0);W(gt,ae,$e,"\u2014","\\textemdash");W(gt,ae,$e,"\u2018","`",!0);W(gt,ae,$e,"\u2018","\\textquoteleft");W(gt,ae,$e,"\u2019","'",!0);W(gt,ae,$e,"\u2019","\\textquoteright");W(gt,ae,$e,"\u201C","``",!0);W(gt,ae,$e,"\u201C","\\textquotedblleft");W(gt,ae,$e,"\u201D","''",!0);W(gt,ae,$e,"\u201D","\\textquotedblright");W(K,ae,$e,"\xB0","\\degree",!0);W(gt,ae,$e,"\xB0","\\degree");W(gt,ae,$e,"\xB0","\\textdegree",!0);W(K,ae,$e,"\xA3","\\pounds");W(K,ae,$e,"\xA3","\\mathsterling",!0);W(gt,ae,$e,"\xA3","\\pounds");W(gt,ae,$e,"\xA3","\\textsterling",!0);W(K,Le,$e,"\u2720","\\maltese");W(gt,Le,$e,"\u2720","\\maltese");dU='0123456789/@."';for(uk=0;uk{var t=e.charCodeAt(0),r=e.charCodeAt(1),i=(t-55296)*1024+(r-56320)+65536;if(119808<=i&&i<120484){var n=Math.floor((i-119808)/26);return TU[n]}else if(120782<=i&&i<=120831){var a=Math.floor((i-120782)/10);return GDe[a]}else{if(i===120485||i===120486)return TU[0];if(120486{if(uf(e.classes)!==uf(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var i of Object.keys(e.style))if(e.style[i]!==t.style[i])return!1;for(var n of Object.keys(t.style))if(e.style[n]!==t.style[n])return!1;return!0},JU=e=>{for(var t=0;tr&&(r=s.height),s.depth>i&&(i=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}t.height=r,t.depth=i,t.maxFontSize=n},xt=function(t,r,i,n){var a=new hf(t,r,i,n);return q8(a),a},ff=(e,t,r,i)=>new hf(e,t,r,i),im=function(t,r,i){var n=xt([t],[],r);return n.height=Math.max(i||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),n.style.borderBottomWidth=St(n.height),n.maxFontSize=1,n},UDe=function(t,r,i,n){var a=new rm(t,r,i,n);return q8(a),a},zu=function(t){var r=new cf(t);return q8(r),r},nm=function(t,r){return t instanceof cf?xt([],[t],r):t},HDe=function(t){if(t.positionType==="individualShift"){for(var r=t.children,i=[r[0]],n=-r[0].shift-r[0].elem.depth,a=n,s=1;s{var r=xt(["mspace"],[],t),i=ji(e,t);return r.style.marginRight=St(i),r},pk=(e,t,r)=>{var i,n;switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}return t==="textbf"&&r==="textit"?n="BoldItalic":t==="textbf"?n="Bold":r==="textit"?n="Italic":n="Regular",i+"-"+n},E8={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},tH={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},rH=function(t,r){var[i,n,a]=tH[t],s=new dc(i),o=new ml([s],{width:St(n),height:St(a),style:"width:"+St(n),viewBox:"0 0 "+1e3*n+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=ff(["overlay"],[o],r);return l.height=a,l.style.height=St(a),l.style.width=St(n),l},Yi={number:3,unit:"mu"},dp={number:4,unit:"mu"},Pu={number:5,unit:"mu"},YDe={mord:{mop:Yi,mbin:dp,mrel:Pu,minner:Yi},mop:{mord:Yi,mop:Yi,mrel:Pu,minner:Yi},mbin:{mord:dp,mop:dp,mopen:dp,minner:dp},mrel:{mord:Pu,mop:Pu,mopen:Pu,minner:Pu},mopen:{},mclose:{mop:Yi,mbin:dp,mrel:Pu,minner:Yi},mpunct:{mord:Yi,mop:Yi,mrel:Pu,mopen:Yi,mclose:Yi,mpunct:Yi,minner:Yi},minner:{mord:Yi,mop:Yi,mbin:dp,mrel:Pu,mopen:Yi,mpunct:Yi,minner:Yi}},jDe={mord:{mop:Yi},mop:{mord:Yi,mop:Yi},mbin:{},mrel:{},mopen:{},mclose:{mop:Yi},mpunct:{},minner:{mop:Yi}},iH={},Ck={},Sk={};Ek=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},kn=function(t){return t.type==="ordgroup"?t.body:[t]},XDe=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),KDe=new Set(["rightmost","mrel","mclose","mpunct"]),ZDe={display:Sr.DISPLAY,text:Sr.TEXT,script:Sr.SCRIPT,scriptscript:Sr.SCRIPTSCRIPT},QDe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},On=function(t,r,i,n){n===void 0&&(n=[null,null]);for(var a=[],s=0;s{var y=m.classes[0],v=g.classes[0];y==="mbin"&&KDe.has(v)?m.classes[0]="mord":v==="mbin"&&XDe.has(y)&&(g.classes[0]="mord")},{node:f},d,p),A8(a,(g,m)=>{var y,v,x=L8(m),T=L8(g),C=x&&T?g.hasClass("mtight")?(y=jDe[x])==null?void 0:y[T]:(v=YDe[x])==null?void 0:v[T]:null;if(C)return eH(C,u)},{node:f},d,p),a},A8=function(t,r,i,n,a){n&&t.push(n);for(var s=0;sd=>{t.splice(f+1,0,d),s++})(s)}n&&t.pop()},nH=function(t){return t instanceof cf||t instanceof rm||t instanceof hf&&t.hasClass("enclosing")?t:null},_8=function(t,r){var i=nH(t);if(i){var n=i.children;if(n.length){if(r==="right")return _8(n[n.length-1],"right");if(r==="left")return _8(n[0],"left")}}return t},L8=function(t,r){if(!t)return null;r&&(t=_8(t,r));var i=t.classes[0];return QDe[i]||null},Pv=function(t,r){var i=["nulldelimiter"].concat(t.baseSizingClasses());return xt(r.concat(i))},ni=function(t,r,i){if(!t)return xt();if(Ck[t.type]){var n=Ck[t.type](t,r);if(i&&r.size!==i.size){n=xt(r.sizingClasses(i),[n],r);var a=r.sizeMultiplier/i.sizeMultiplier;n.height*=a,n.depth*=a}return n}else throw new kt("Got group of unknown type: '"+t.type+"'")};wt=class{constructor(t,r,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=i||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=uf(this.classes));for(var i=0;i0&&(t+=' class ="'+Ia(uf(this.classes))+'"'),t+=">";for(var i=0;i",t}toText(){return this.children.map(t=>t.toText()).join("")}},tn=class{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ia(this.toText())}toText(){return this.text}},Ak=class{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character="\u200A":t>=.1666&&t<=.1667?this.character="\u2009":t>=.2222&&t<=.2223?this.character="\u2005":t>=.2777&&t<=.2778?this.character="\u2005\u200A":t>=-.05556&&t<=-.05555?this.character="\u200A\u2063":t>=-.1667&&t<=-.1666?this.character="\u2009\u2063":t>=-.2223&&t<=-.2222?this.character="\u205F\u2063":t>=-.2778&&t<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",St(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},JDe=new Set(["\\imath","\\jmath"]),e9e=new Set(["mrow","mtable"]),Ro=function(t,r,i){return Fi[r][t]&&Fi[r][t].replace&&t.charCodeAt(0)!==55349&&!(QU.hasOwnProperty(t)&&i&&(i.fontFamily&&i.fontFamily.slice(4,6)==="tt"||i.font&&i.font.slice(4,6)==="tt"))&&(t=Fi[r][t].replace),new tn(t)},V8=function(t){return t.length===1?t[0]:new wt("mrow",t)},t9e={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},W8=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var r=t.font;if(!r||r==="mathnormal")return null;var i=e.mode,n=t9e[r];if(n)return typeof n=="function"?n(e):n;var a=e.text;if(JDe.has(a))return null;if(Fi[i][a]){var s=Fi[i][a].replace;s&&(a=s)}var o=E8[r].fontName;return z8(a,o,i)?E8[r].variant:null};io=function(t,r,i){if(t.length===1){var n=wi(t[0],r);return i&&n instanceof wt&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a=[],s,o=0;o=1&&(s.type==="mn"||o8(s))){var u=l.children[0];u instanceof wt&&u.type==="mn"&&(u.children=[...s.children,...u.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var h=s.children[0];if(h instanceof tn&&h.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof tn&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(l),s=l}return a},df=function(t,r,i){return V8(io(t,r,i))},wi=function(t,r){if(!t)return new wt("mrow");if(Sk[t.type])return Sk[t.type](t,r);throw new kt("Got group of unknown type: '"+t.type+"'")};r9e=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],kU=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],CU=function(t,r){return r.size<2?t:r9e[t-1][r.size-1]},_k=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=kU[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,t),new e(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:CU(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:kU[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=CU(e.BASESIZE,t);return this.size===r&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=$De(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};_k.BASESIZE=6;sH=function(t){return new _k({style:t.displayMode?Sr.DISPLAY:Sr.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},oH=function(t,r){if(r.displayMode){var i=["katex-display"];r.leqno&&i.push("leqno"),r.fleqn&&i.push("fleqn"),t=xt(i,[t])}return t},i9e=function(t,r,i){var n=sH(i),a;if(i.output==="mathml")return wU(t,r,n,i.displayMode,!0);if(i.output==="html"){var s=R8(t,n);a=xt(["katex"],[s])}else{var o=wU(t,r,n,i.displayMode,!1),l=R8(t,n);a=xt(["katex"],[o,l])}return oH(a,i)},n9e=function(t,r,i){var n=sH(i),a=R8(t,n),s=xt(["katex"],[a]);return oH(s,i)},a9e={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Nk=function(t){var r=new wt("mo",[new tn(a9e[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},s9e={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},o9e=new Set(["widehat","widecheck","widetilde","utilde"]),Mk=function(t,r){function i(){var o=4e5,l=t.label.slice(1);if(o9e.has(l)&&"base"in t){var u=t.base.type==="ordgroup"?t.base.body.length:1,h,f,d;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,d=.42,f=l+"4"):(h=312,o=2340,d=.34,f="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],d=[0,.24,.3,.3,.36,.42][p],f=l+p):(o=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],d=[0,.26,.286,.3,.306,.34][p],f="tilde"+p)}var g=new dc(f),m=new ml([g],{width:"100%",height:St(d),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:ff([],[m],r),minWidth:0,height:d}}else{var y=[],v=s9e[l];if(!v)throw new Error('No SVG data for "'+l+'".');var[x,T,C]=v,w=C/1e3,k=x.length,E,A;if(k===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');E=["hide-tail"],A=[v[3]]}else if(k===2)E=["halfarrow-left","halfarrow-right"],A=["xMinYMin","xMaxYMin"];else if(k===3)E=["brace-left","brace-center","brace-right"],A=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+k+" children.");for(var N=0;N0&&(n.style.minWidth=St(a)),n},l9e=function(t,r,i,n,a){var s,o=t.height+t.depth+i+n;if(/fbox|color|angl/.test(r)){if(s=xt(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Ov({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Ov({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new ml(u,{width:"100%",height:St(o)});s=ff([],[h],a)}return s.height=o,s.style.height=St(o),s},c9e={bin:1,close:1,inner:1,open:1,punct:1,rel:1},u9e={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};lH=e=>{if(e instanceof Ya)return e;if(FDe(e)&&e.children.length===1)return lH(e.children[0])},U8=(e,t)=>{var r,i,n;e&&e.type==="supsub"?(i=Rr(e.base,"accent"),r=i.base,e.base=r,n=BDe(ni(e,t)),e.base=i):(i=Rr(e,"accent"),r=i.base);var a=ni(r,t.havingCrampedStyle()),s=i.isShifty&&Fu(r),o=0;if(s){var l,u;o=(l=(u=lH(a))==null?void 0:u.skew)!=null?l:0}var h=i.label==="\\c",f=h?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),d;if(i.isStretchy)d=Mk(i,t),d=ii({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+St(2*o)+")",marginLeft:St(2*o)}:void 0}]});else{var p,g;i.label==="\\vec"?(p=rH("vec",t),g=tH.vec[1]):(p=Dk({type:"textord",mode:i.mode,text:i.label},t,"textord"),p=PDe(p),p.italic=0,g=p.width,h&&(f+=p.depth)),d=xt(["accent-body"],[p]);var m=i.label==="\\textcircled";m&&(d.classes.push("accent-full"),f=a.height);var y=o;m||(y-=g/2),d.style.left=St(y),i.label==="\\textcircled"&&(d.style.top=".2em"),d=ii({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:d}]})}var v=xt(["mord","accent"],[d],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},cH=(e,t)=>{var r=e.isStretchy?Nk(e.label):new wt("mo",[Ro(e.label,e.mode)]),i=new wt("mover",[wi(e.base,t),r]);return i.setAttribute("accent","true"),i},f9e=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Nt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=Ek(t[0]),i=!f9e.test(e.funcName),n=!i||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:i,isShifty:n,base:r}},htmlBuilder:U8,mathmlBuilder:cH});Nt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],i=e.parser.mode;return i==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),i="text"),{type:"accent",mode:i,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:U8,mathmlBuilder:cH});Nt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:i,base:n}},htmlBuilder:(e,t)=>{var r=ni(e.base,t),i=Mk(e,t),n=e.label==="\\utilde"?.12:0,a=ii({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return xt(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=Nk(e.label),i=new wt("munder",[wi(e.base,t),r]);return i.setAttribute("accentunder","true"),i}});mk=e=>{var t=new wt("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Nt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:i,funcName:n}=e;return{type:"xArrow",mode:i.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,i=t.havingStyle(r.sup()),n=nm(ni(e.body,i,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(a+"-arrow-pad");var s;e.below&&(i=t.havingStyle(r.sub()),s=nm(ni(e.below,i,t),t),s.classes.push(a+"-arrow-pad"));var o=Mk(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,u=-t.fontMetrics().axisHeight-.5*o.height-.111;(n.depth>.25||e.label==="\\xleftequilibrium")&&(u-=n.depth);var h;if(s){var f=-t.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=ii({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:s,shift:f}]})}else h=ii({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return xt(["mrel","x-arrow"],[h],t)},mathmlBuilder(e,t){var r=Nk(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var i;if(e.body){var n=mk(wi(e.body,t));if(e.below){var a=mk(wi(e.below,t));i=new wt("munderover",[r,a,n])}else i=new wt("mover",[r,n])}else if(e.below){var s=mk(wi(e.below,t));i=new wt("munder",[r,s])}else i=mk(),i=new wt("mover",[r,i]);return i}});Nt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+i.slice(5),body:kn(n),isCharacterBox:Fu(n)}},htmlBuilder:uH,mathmlBuilder:hH});Bk=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Bk(t[0]),body:kn(t[1]),isCharacterBox:Fu(t[1])}}});Nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:i}=e,n=t[1],a=t[0],s;i!=="\\stackrel"?s=Bk(n):s="mrel";var o={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:i!=="\\stackrel",body:kn(n)},l={type:"supsub",mode:a.mode,base:o,sup:i==="\\underset"?null:a,sub:i==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:Fu(l)}},htmlBuilder:uH,mathmlBuilder:hH});Nt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Bk(t[0]),body:kn(t[0])}},htmlBuilder(e,t){var r=On(e.body,t,!0),i=xt([e.mclass],r,t);return i.style.textShadow="0.02em 0.01em 0.04px",i},mathmlBuilder(e,t){var r=io(e.body,t),i=new wt("mstyle",r);return i.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),i}});d9e={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},SU=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),EU=e=>e.type==="textord"&&e.text==="@",p9e=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;Nt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:i}=e;return{type:"cdlabel",mode:r.mode,side:i.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),i=nm(ni(e.label,r,t),t);return i.classes.push("cd-label-"+e.side),i.style.bottom=St(.8-i.depth),i.height=0,i.depth=0,i},mathmlBuilder(e,t){var r=new wt("mrow",[wi(e.label,t)]);return r=new wt("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new wt("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Nt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=nm(ni(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new wt("mrow",[wi(e.fragment,t)])}});Nt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,i=Rr(t[0],"ordgroup"),n=i.body,a="",s=0;s=1114111)throw new kt("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});fH=(e,t)=>{var r=On(e.body,t.withColor(e.color),!1);return zu(r)},dH=(e,t)=>{var r=io(e.body,t.withColor(e.color)),i=new wt("mstyle",r);return i.setAttribute("mathcolor",e.color),i};Nt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,i=Rr(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:i,body:kn(n)}},htmlBuilder:fH,mathmlBuilder:dH});Nt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:i}=e,n=Rr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var a=r.parseExpression(!0,i);return{type:"color",mode:r.mode,color:n,body:a}},htmlBuilder:fH,mathmlBuilder:dH});Nt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:i}=e,n=i.gullet.future().text==="["?i.parseSizeGroup(!0):null,a=!i.settings.displayMode||!i.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:i.mode,newLine:a,size:n&&Rr(n,"size").value}},htmlBuilder(e,t){var r=xt(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=St(ji(e.size,t)))),r},mathmlBuilder(e,t){var r=new wt("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",St(ji(e.size,t)))),r}});I8={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},pH=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new kt("Expected a control sequence",e);return t},y9e=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},gH=(e,t,r,i)=>{var n=e.gullet.macros.get(r.text);n==null&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,i)};Nt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var i=t.fetch();if(I8[i.text])return(r==="\\global"||r==="\\\\globallong")&&(i.text=I8[i.text]),Rr(t.parseFunction(),"internal");throw new kt("Invalid token after macro prefix",i)}});Nt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,i=t.gullet.popToken(),n=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new kt("Expected a control sequence",i);for(var a=0,s,o=[[]];t.gullet.future().text!=="{";)if(i=t.gullet.popToken(),i.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),o[a].push("{");break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new kt('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==a+1)throw new kt('Argument number "'+i.text+'" out of order');a++,o.push([])}else{if(i.text==="EOF")throw new kt("Expected a macro definition");o[a].push(i.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(n,{tokens:l,numArgs:a,delimiters:o},r===I8[r]),{type:"internal",mode:t.mode}}});Nt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,i=pH(t.gullet.popToken());t.gullet.consumeSpaces();var n=y9e(t);return gH(t,i,n,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});Nt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,i=pH(t.gullet.popToken()),n=t.gullet.popToken(),a=t.gullet.popToken();return gH(t,i,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});Iv=function(t,r,i){var n=Fi.math[t]&&Fi.math[t].replace,a=z8(n||t,r,i);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},H8=function(t,r,i,n){var a=i.havingBaseStyle(r),s=xt(n.concat(a.sizingClasses(i)),[t],i),o=a.sizeMultiplier/i.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},mH=function(t,r,i){var n=r.havingBaseStyle(i),a=(1-r.sizeMultiplier/n.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=St(a),t.height-=a,t.depth+=a},v9e=function(t,r,i,n,a,s){var o=Ua(t,"Main-Regular",a,n),l=H8(o,r,n,s);return i&&mH(l,n,r),l},b9e=function(t,r,i,n){return Ua(t,"Size"+r+"-Regular",i,n)},yH=function(t,r,i,n,a,s){var o=b9e(t,r,a,n),l=H8(xt(["delimsizing","size"+r],[o],n),Sr.TEXT,n,s);return i&&mH(l,n,Sr.TEXT),l},l8=function(t,r,i){var n;r==="Size1-Regular"?n="delim-size1":n="delim-size4";var a=xt(["delimsizinginner",n],[xt([],[Ua(t,r,i)])]);return{type:"elem",elem:a}},c8=function(t,r,i){var n=fc["Size4-Regular"][t.charCodeAt(0)]?fc["Size4-Regular"][t.charCodeAt(0)][4]:fc["Size1-Regular"][t.charCodeAt(0)][4],a=new dc("inner",RDe(t,Math.round(1e3*r))),s=new ml([a],{width:St(n),height:St(r),style:"width:"+St(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=ff([],[s],i);return o.height=r,o.style.height=St(r),o.style.width=St(n),{type:"elem",elem:o}},D8=.008,yk={type:"kern",size:-1*D8},x9e=new Set(["|","\\lvert","\\rvert","\\vert"]),T9e=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),vH=function(t,r,i,n,a,s){var o,l,u,h,f="",d=0;o=u=h=t,l=null;var p="Size1-Regular";t==="\\uparrow"?u=h="\u23D0":t==="\\Uparrow"?u=h="\u2016":t==="\\downarrow"?o=u="\u23D0":t==="\\Downarrow"?o=u="\u2016":t==="\\updownarrow"?(o="\\uparrow",u="\u23D0",h="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",u="\u2016",h="\\Downarrow"):x9e.has(t)?(u="\u2223",f="vert",d=333):T9e.has(t)?(u="\u2225",f="doublevert",d=556):t==="["||t==="\\lbrack"?(o="\u23A1",u="\u23A2",h="\u23A3",p="Size4-Regular",f="lbrack",d=667):t==="]"||t==="\\rbrack"?(o="\u23A4",u="\u23A5",h="\u23A6",p="Size4-Regular",f="rbrack",d=667):t==="\\lfloor"||t==="\u230A"?(u=o="\u23A2",h="\u23A3",p="Size4-Regular",f="lfloor",d=667):t==="\\lceil"||t==="\u2308"?(o="\u23A1",u=h="\u23A2",p="Size4-Regular",f="lceil",d=667):t==="\\rfloor"||t==="\u230B"?(u=o="\u23A5",h="\u23A6",p="Size4-Regular",f="rfloor",d=667):t==="\\rceil"||t==="\u2309"?(o="\u23A4",u=h="\u23A5",p="Size4-Regular",f="rceil",d=667):t==="("||t==="\\lparen"?(o="\u239B",u="\u239C",h="\u239D",p="Size4-Regular",f="lparen",d=875):t===")"||t==="\\rparen"?(o="\u239E",u="\u239F",h="\u23A0",p="Size4-Regular",f="rparen",d=875):t==="\\{"||t==="\\lbrace"?(o="\u23A7",l="\u23A8",h="\u23A9",u="\u23AA",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="\u23AB",l="\u23AC",h="\u23AD",u="\u23AA",p="Size4-Regular"):t==="\\lgroup"||t==="\u27EE"?(o="\u23A7",h="\u23A9",u="\u23AA",p="Size4-Regular"):t==="\\rgroup"||t==="\u27EF"?(o="\u23AB",h="\u23AD",u="\u23AA",p="Size4-Regular"):t==="\\lmoustache"||t==="\u23B0"?(o="\u23A7",h="\u23AD",u="\u23AA",p="Size4-Regular"):(t==="\\rmoustache"||t==="\u23B1")&&(o="\u23AB",h="\u23A9",u="\u23AA",p="Size4-Regular");var g=Iv(o,p,a),m=g.height+g.depth,y=Iv(u,p,a),v=y.height+y.depth,x=Iv(h,p,a),T=x.height+x.depth,C=0,w=1;if(l!==null){var k=Iv(l,p,a);C=k.height+k.depth,w=2}var E=m+T+C,A=Math.max(0,Math.ceil((r-E)/(w*v))),N=E+A*w*v,P=n.fontMetrics().axisHeight;i&&(P*=n.sizeMultiplier);var O=N/2-P,L=[];if(f.length>0){var _=N-m-T,R=Math.round(N*1e3),D=IDe(f,Math.round(_*1e3)),I=new dc(f,D),B=St(d/1e3),M=St(R/1e3),F=new ml([I],{width:B,height:M,viewBox:"0 0 "+d+" "+R}),z=ff([],[F],n);z.height=R/1e3,z.style.width=B,z.style.height=M,L.push({type:"elem",elem:z})}else{if(L.push(l8(h,p,a)),L.push(yk),l===null){var $=N-m-T+2*D8;L.push(c8(u,$,n))}else{var G=(N-m-T-C)/2+2*D8;L.push(c8(u,G,n)),L.push(yk),L.push(l8(l,p,a)),L.push(yk),L.push(c8(u,G,n))}L.push(yk),L.push(l8(o,p,a))}var U=n.havingBaseStyle(Sr.TEXT),j=ii({positionType:"bottom",positionData:O,children:L});return H8(xt(["delimsizing","mult"],[j],U),Sr.TEXT,n,s)},u8=80,h8=.08,f8=function(t,r,i,n,a){var s=LDe(t,n,i),o=new dc(t,s),l=new ml([o],{width:"400em",height:St(r),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return ff(["hide-tail"],[l],a)},w9e=function(t,r){var i=r.havingBaseSizing(),n=kH("\\surd",t*i.sizeMultiplier,wH,i),a=i.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l,u,h,f;return n.type==="small"?(h=1e3+1e3*s+u8,t<1?a=1:t<1.4&&(a=.7),l=(1+s+h8)/a,u=(1+s)/a,o=f8("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/a):n.type==="large"?(h=(1e3+u8)*Dv[n.size],u=(Dv[n.size]+s)/a,l=(Dv[n.size]+s+h8)/a,o=f8("sqrtSize"+n.size,l,h,s,r),o.style.minWidth="1.02em",f=1/a):(l=t+s+h8,u=t+s,h=Math.floor(1e3*t+s)+u8,o=f8("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=St(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},bH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),k9e=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),xH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Dv=[0,1.2,1.8,2.4,3],TH=function(t,r,i,n,a){if(t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle"),bH.has(t)||xH.has(t))return yH(t,r,!1,i,n,a);if(k9e.has(t))return vH(t,Dv[r],!1,i,n,a);throw new kt("Illegal delimiter: '"+t+"'")},C9e=[{type:"small",style:Sr.SCRIPTSCRIPT},{type:"small",style:Sr.SCRIPT},{type:"small",style:Sr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],S9e=[{type:"small",style:Sr.SCRIPTSCRIPT},{type:"small",style:Sr.SCRIPT},{type:"small",style:Sr.TEXT},{type:"stack"}],wH=[{type:"small",style:Sr.SCRIPTSCRIPT},{type:"small",style:Sr.SCRIPT},{type:"small",style:Sr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],E9e=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},kH=function(t,r,i,n){for(var a=Math.min(2,3-n.style.size),s=a;sr)return o}return i[i.length-1]},N8=function(t,r,i,n,a,s){t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle");var o;xH.has(t)?o=C9e:bH.has(t)?o=wH:o=S9e;var l=kH(t,r,o,n);return l.type==="small"?v9e(t,l.style,i,n,a,s):l.type==="large"?yH(t,l.size,i,n,a,s):vH(t,r,i,n,a,s)},d8=function(t,r,i,n,a,s){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,l=901,u=5/n.fontMetrics().ptPerEm,h=Math.max(r-o,i+o),f=Math.max(h/500*l,2*h-u);return N8(t,f,!0,n,a,s)},AU={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},A9e=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);Nt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Fk(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:AU[e.funcName].size,mclass:AU[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?xt([e.mclass]):TH(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Ro(e.delim,e.mode));var r=new wt("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var i=St(Dv[e.size]);return r.setAttribute("minsize",i),r.setAttribute("maxsize",i),r}});Nt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new kt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Fk(t[0],e).text,color:r}}});Nt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Fk(t[0],e),i=e.parser;++i.leftrightDepth;var n=i.parseExpression(!1);--i.leftrightDepth,i.expect("\\right",!1);var a=Rr(i.parseFunction(),"leftright-right");return{type:"leftright",mode:i.mode,body:n,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{LU(e);for(var r=On(e.body,t,!0,["mopen","mclose"]),i=0,n=0,a=!1,s=0;s{LU(e);var r=io(e.body,t);if(e.left!=="."){var i=new wt("mo",[Ro(e.left,e.mode)]);i.setAttribute("fence","true"),r.unshift(i)}if(e.right!=="."){var n=new wt("mo",[Ro(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return V8(r)}});Nt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Fk(t[0],e);if(!e.parser.leftrightDepth)throw new kt("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;return e.delim==="."?r=Pv(t,[]):(r=TH(e.delim,1,t,e.mode,[]),r.isMiddle={delim:e.delim,options:t}),r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Ro("|","text"):Ro(e.delim,e.mode),i=new wt("mo",[r]);return i.setAttribute("fence","true"),i.setAttribute("lspace","0.05em"),i.setAttribute("rspace","0.05em"),i}});$k=(e,t)=>{var r=nm(ni(e.body,t),t),i=e.label.slice(1),n=t.sizeMultiplier,a,s,o=Fu(e.body);if(i==="sout")a=xt(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/n,s=-.5*t.fontMetrics().xHeight;else if(i==="phase"){var l=ji({number:.6,unit:"pt"},t),u=ji({number:.35,unit:"ex"},t),h=t.havingBaseSizing();n=n/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=St(f/2+l);var d=Math.floor(1e3*f*n),p=ADe(d),g=new ml([new dc("phase",p)],{width:"400em",height:St(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=ff(["hide-tail"],[g],t),a.style.height=St(f),s=r.depth+l+u}else{/cancel/.test(i)?o||r.classes.push("cancel-pad"):i==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m,y,v=0;/box/.test(i)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(i==="colorbox"?0:v),y=m):i==="angl"?(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*v,y=Math.max(0,.25-r.depth)):(m=o?.2:0,y=m),a=l9e(r,i,m,y,t),/fbox|boxed|fcolorbox/.test(i)?(a.style.borderStyle="solid",a.style.borderWidth=St(v)):i==="angl"&&v!==.049&&(a.style.borderTopWidth=St(v),a.style.borderRightWidth=St(v)),s=r.depth+y,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=ii({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]});else{var T=/cancel|phase/.test(i)?["svg-align"]:[];x=ii({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:T}]})}return/cancel/.test(i)&&(x.height=r.height,x.depth=r.depth),/cancel/.test(i)&&!o?xt(["mord","cancel-lap"],[x],t):xt(["mord"],[x],t)},zk=(e,t)=>{var r,i=new wt(e.label.includes("colorbox")?"mpadded":"menclose",[wi(e.body,t)]);switch(e.label){case"\\cancel":i.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":i.setAttribute("notation","downdiagonalstrike");break;case"\\phase":i.setAttribute("notation","phasorangle");break;case"\\sout":i.setAttribute("notation","horizontalstrike");break;case"\\fbox":i.setAttribute("notation","box");break;case"\\angl":i.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,i.setAttribute("width","+"+2*r+"pt"),i.setAttribute("height","+"+2*r+"pt"),i.setAttribute("lspace",r+"pt"),i.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);i.setAttribute("style","border: "+St(n)+" solid "+e.borderColor)}break;case"\\xcancel":i.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&i.setAttribute("mathbackground",e.backgroundColor),i};Nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,r){var{parser:i,funcName:n}=e,a=Rr(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:i.mode,label:n,backgroundColor:a,body:s}},htmlBuilder:$k,mathmlBuilder:zk});Nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,r){var{parser:i,funcName:n}=e,a=Rr(t[0],"color-token").color,s=Rr(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:i.mode,label:n,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:$k,mathmlBuilder:zk});Nt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});Nt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];return{type:"enclose",mode:r.mode,label:i,body:n}},htmlBuilder:$k,mathmlBuilder:zk});Nt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:i}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var n=t[0];return{type:"enclose",mode:r.mode,label:i,body:n}},htmlBuilder:$k,mathmlBuilder:zk});Nt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});CH={};SH={};Cs=class e{constructor(t,r,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=i}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new e(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},to=class e{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new e(r,Cs.range(this,t))}};Gk=e=>{var t=e.parser.settings;if(!t.displayMode)throw new kt("{"+e.envName+"} can be used only in display mode.")},_9e=new Set(["gather","gather*"]);gc=function(t,r){var i,n,a=t.body.length,s=t.hLinesBeforeRow,o=0,l=new Array(a),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var p=r.havingStyle(Sr.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var g=t.colSeparationType==="CD"?ji({number:3,unit:"ex"},r):12*f,m=3*f,y=t.arraystretch*g,v=.7*y,x=.3*y,T=0;function C(Ue){for(var ge=0;ge0&&(T+=.25),u.push({pos:T,isDashed:Ue[ge]})}for(C(s[0]),i=0;i0&&(O+=x,EUe))for(i=0;i=o)){var J=void 0;if(n>0||t.hskipBeforeAndAfter){var re,ie;J=(re=(ie=U)==null?void 0:ie.pregap)!=null?re:d,J!==0&&(D=xt(["arraycolsep"],[]),D.style.width=St(J),R.push(D))}var te=[];for(i=0;i0){for(var pe=im("hline",r,h),Je=im("hdashline",r,h),Te=[{type:"elem",elem:Pe,shift:0}];u.length>0;){var Be=u.pop(),He=Be.pos-L;Be.isDashed?Te.push({type:"elem",elem:Je,shift:He}):Te.push({type:"elem",elem:pe,shift:He})}Pe=ii({positionType:"individualShift",children:Te})}if(B.length===0)return xt(["mord"],[Pe],r);var nt=ii({positionType:"individualShift",children:B}),qe=xt(["tag"],[nt],r);return zu([Pe,qe])},L9e={c:"center ",l:"left ",r:"right "},mc=function(t,r){for(var i=[],n=new wt("mtd",[],["mtr-glue"]),a=new wt("mtd",[],["mml-eqn-num"]),s=0;s0){var g=t.cols,m="",y=!1,v=0,x=g.length;g[0].type==="separator"&&(d+="top ",v=1),g[g.length-1].type==="separator"&&(d+="bottom ",x-=1);for(var T=v;T0?"left ":"",d+=N[N.length-1].length>0?"right ":"";for(var P=1;P0&&p&&(y=1),i[g]={type:"align",align:m,pregap:y,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};pc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=Pk(t[0]),i=r?[t[0]]:Rr(t[0],"ordgroup").body,n=i.map(function(s){var o=Ok(s),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new kt("Unknown column alignment: "+l,s)}),a={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return pf(e.parser,a,j8(e.envName))},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var n=e.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,!"lcr".includes(r))throw new kt("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),i.cols=[{type:"align",align:r}]}}var a=pf(e.parser,i,j8(e.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=pf(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=Pk(t[0]),i=r?[t[0]]:Rr(t[0],"ordgroup").body,n=i.map(function(o){var l=Ok(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new kt("Unknown column alignment: "+u,o)});if(n.length>1)throw new kt("{subarray} can contain only one column");var a={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},s=pf(e.parser,a,"script");if(s.body.length>0&&s.body[0].length>1)throw new kt("{subarray} can contain only one column");return s},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=pf(e.parser,t,j8(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:EH,htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){_9e.has(e.envName)&&Gk(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Y8(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return pf(e.parser,t,"display")},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:EH,htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Gk(e);var t={autoTag:Y8(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return pf(e.parser,t,"display")},htmlBuilder:gc,mathmlBuilder:mc});pc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Gk(e),m9e(e.parser)},htmlBuilder:gc,mathmlBuilder:mc});de("\\nonumber","\\gdef\\@eqnsw{0}");de("\\notag","\\nonumber");Nt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new kt(e.funcName+" valid only within array environment")}});IU=CH;Nt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];if(n.type!=="ordgroup")throw new kt("Invalid environment name",n);for(var a="",s=0;s{var r=e.font,i=t.withFont(r);return ni(e.body,i)},_H=(e,t)=>{var r=e.font,i=t.withFont(r);return wi(e.body,i)},DU={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Nt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=Ek(t[0]),a=i;return a in DU&&(a=DU[a]),{type:"font",mode:r.mode,font:a.slice(1),body:n}},htmlBuilder:AH,mathmlBuilder:_H});Nt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:Bk(i),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:i}],isCharacterBox:Fu(i)}}});Nt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:i,breakOnTokenText:n}=e,{mode:a}=r,s=r.parseExpression(!0,n);return{type:"font",mode:a,font:"math"+i.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:AH,mathmlBuilder:_H});R9e=(e,t)=>{var r=t.style,i=r.fracNum(),n=r.fracDen(),a;a=t.havingStyle(i);var s=ni(e.numer,a,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?g=3*d:g=7*d,m=t.fontMetrics().denom1):(f>0?(p=t.fontMetrics().num2,g=d):(p=t.fontMetrics().num3,g=3*d),m=t.fontMetrics().denom2);var y;if(h){var x=t.fontMetrics().axisHeight;p-s.depth-(x+.5*f){var r=new wt("mfrac",[wi(e.numer,t),wi(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var i=ji(e.barSize,t);r.setAttribute("linethickness",St(i))}if(e.leftDelim!=null||e.rightDelim!=null){var n=[];if(e.leftDelim!=null){var a=new wt("mo",[new tn(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),n.push(a)}if(n.push(r),e.rightDelim!=null){var s=new wt("mo",[new tn(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),n.push(s)}return V8(n)}return r},LH=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};Nt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=t[0],a=t[1],s,o=null,l=null;switch(i){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=i==="\\cfrac",h=null;return u||i.startsWith("\\d")?h="display":i.startsWith("\\t")&&(h="text"),LH({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:u,hasBarLine:s,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:R9e,mathmlBuilder:I9e});Nt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:i}=e,n;switch(r){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:n,token:i}}});NU=["display","text","script","scriptscript"],MU=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};Nt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,i=t[4],n=t[5],a=Ek(t[0]),s=a.type==="atom"&&a.family==="open"?MU(a.text):null,o=Ek(t[1]),l=o.type==="atom"&&o.family==="close"?MU(o.text):null,u=Rr(t[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d=null,p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var g=Rr(p.body[0],"textord");d=NU[Number(g.text)]}}else p=Rr(p,"textord"),d=NU[Number(p.text)];return LH({type:"genfrac",mode:r.mode,numer:i,denom:n,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l},d)}});Nt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:i,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Rr(t[0],"size").value,token:n}}});Nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=t[0],a=Rr(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});RH=(e,t)=>{var r=t.style,i,n;e.type==="supsub"?(i=e.sup?ni(e.sup,t.havingStyle(r.sup()),t):ni(e.sub,t.havingStyle(r.sub()),t),n=Rr(e.base,"horizBrace")):n=Rr(e,"horizBrace");var a=ni(n.base,t.havingBaseStyle(Sr.DISPLAY)),s=Mk(n,t),o;if(n.isOver?o=ii({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):o=ii({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),i){var l=xt(["minner",n.isOver?"mover":"munder"],[o],t);n.isOver?o=ii({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]}):o=ii({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]})}return xt(["minner",n.isOver?"mover":"munder"],[o],t)},D9e=(e,t)=>{var r=Nk(e.label);return new wt(e.isOver?"mover":"munder",[wi(e.base,t),r])};Nt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:i}=e;return{type:"horizBrace",mode:r.mode,label:i,isOver:i.includes("\\over"),base:t[0]}},htmlBuilder:RH,mathmlBuilder:D9e});Nt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,i=t[1],n=Rr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:kn(i)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=On(e.body,t,!1);return UDe(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=df(e.body,t);return r instanceof wt||(r=new wt("mrow",[r])),r.setAttribute("href",e.href),r}});Nt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,i=Rr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:i}))return r.formatUnsupportedCmd("\\url");for(var n=[],a=0;a{var{parser:r,funcName:i,token:n}=e,a=Rr(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(i){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),h=0;h{var r=On(e.body,t,!1),i=["enclosing"];e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/));var n=xt(i,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&n.setAttribute(a,e.attributes[a]);return n},mathmlBuilder:(e,t)=>df(e.body,t)});Nt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:kn(t[0]),mathml:kn(t[1])}},htmlBuilder:(e,t)=>{var r=On(e.html,t,!1);return zu(r)},mathmlBuilder:(e,t)=>df(e.mathml,t)});p8=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new kt("Invalid size: '"+t+"' in \\includegraphics");var i={number:+(r[1]+r[2]),unit:r[3]};if(!YU(i))throw new kt("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};Nt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:i}=e,n={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=Rr(r[0],"raw").string,u=l.split(","),h=0;h{var r=ji(e.height,t),i=0;e.totalheight.number>0&&(i=ji(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=ji(e.width,t));var a={height:St(r+i)};n>0&&(a.width=St(n)),i>0&&(a.verticalAlign=St(-i));var s=new x8(e.src,e.alt,a);return s.height=r,s.depth=i,s},mathmlBuilder:(e,t)=>{var r=new wt("mglyph",[]);r.setAttribute("alt",e.alt);var i=ji(e.height,t),n=0;if(e.totalheight.number>0&&(n=ji(e.totalheight,t)-i,r.setAttribute("valign",St(-n))),r.setAttribute("height",St(i+n)),e.width.number>0){var a=ji(e.width,t);r.setAttribute("width",St(a))}return r.setAttribute("src",e.src),r}});Nt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:i}=e,n=Rr(t[0],"size");if(r.settings.strict){var a=i[1]==="m",s=n.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, "+("not "+n.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder(e,t){return eH(e.dimension,t)},mathmlBuilder(e,t){var r=ji(e.dimension,t);return new Ak(r)}});Nt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:i.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=xt([],[ni(e.body,t)]),r=xt(["inner"],[r],t)):r=xt(["inner"],[ni(e.body,t)]);var i=xt(["fix"],[]),n=xt([e.alignment],[r,i],t),a=xt(["strut"]);return a.style.height=St(n.height+n.depth),n.depth&&(a.style.verticalAlign=St(-n.depth)),n.children.unshift(a),n=xt(["thinbox"],[n],t),xt(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new wt("mpadded",[wi(e.body,t)]);if(e.alignment!=="rlap"){var i=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",i+"width")}return r.setAttribute("width","0px"),r}});Nt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:i}=e,n=i.mode;i.switchMode("math");var a=r==="\\("?"\\)":"$",s=i.parseExpression(!1,a);return i.expect(a),i.switchMode(n),{type:"styling",mode:i.mode,style:"text",resetFont:!0,body:s}}});Nt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new kt("Mismatched "+e.funcName)}});OU=(e,t)=>{switch(t.style.size){case Sr.DISPLAY.size:return e.display;case Sr.TEXT.size:return e.text;case Sr.SCRIPT.size:return e.script;case Sr.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Nt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:kn(t[0]),text:kn(t[1]),script:kn(t[2]),scriptscript:kn(t[3])}},htmlBuilder:(e,t)=>{var r=OU(e,t),i=On(r,t,!1);return zu(i)},mathmlBuilder:(e,t)=>{var r=OU(e,t);return df(r,t)}});IH=(e,t,r,i,n,a,s)=>{e=xt([],[e]);var o=r&&Fu(r),l,u;if(t){var h=ni(t,i.havingStyle(n.sup()),i);u={elem:h,kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=ni(r,i.havingStyle(n.sub()),i);l={elem:f,kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s;d=ii({positionType:"bottom",positionData:p,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:St(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:St(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]})}else if(l){var g=e.height-s;d=ii({positionType:"top",positionData:g,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:St(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var m=e.depth+s;d=ii({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:St(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]})}else return e;var y=[d];if(l&&a!==0&&!o){var v=xt(["mspace"],[],i);v.style.marginRight=St(a),y.unshift(v)}return xt(["mop","op-limits"],y,i)},DH=new Set(["\\smallint"]),sm=(e,t)=>{var r,i,n=!1,a;e.type==="supsub"?(r=e.sup,i=e.sub,a=Rr(e.base,"op"),n=!0):a=Rr(e,"op");var s=t.style,o=!1;s.size===Sr.DISPLAY.size&&a.symbol&&!DH.has(a.name)&&(o=!0);var l,u;if(a.symbol){var h=o?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),l=Ua(a.name,h,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,f.length>0){var d=rH(f+"Size"+(o?"2":"1"),t);l=ii({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]}),a.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(a.body){var p=On(a.body,t,!0);p.length===1&&p[0]instanceof Ya?(l=p[0],l.classes[0]="mop"):l=xt(["mop"],p,t)}else{for(var g=[],m=1;m{var r;if(e.symbol)r=new wt("mo",[Ro(e.name,e.mode)]),DH.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new wt("mo",io(e.body,t));else{r=new wt("mi",[new tn(e.name.slice(1))]);var i=new wt("mo",[Ro("\u2061","text")]);e.parentIsSupSub?r=new wt("mrow",[r,i]):r=aH([r,i])}return r},N9e={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Nt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=i;return n.length===1&&(n=N9e[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:sm,mathmlBuilder:Fv});Nt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,i=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:kn(i)}},htmlBuilder:sm,mathmlBuilder:Fv});M9e={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Nt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:sm,mathmlBuilder:Fv});Nt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:sm,mathmlBuilder:Fv});Nt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,i=r;return i.length===1&&(i=M9e[i]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:sm,mathmlBuilder:Fv});NH=(e,t)=>{var r,i,n=!1,a;e.type==="supsub"?(r=e.sup,i=e.sub,a=Rr(e.base,"operatorname"),n=!0):a=Rr(e,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(f=>{var d="text"in f?f.text:void 0;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=On(o,t.withFont("mathrm"),!0),u=0;u{for(var r=io(e.body,t.withFont("mathrm")),i=!0,n=0;nh.toText()).join("");r=[new tn(o)]}var l=new wt("mi",r);l.setAttribute("mathvariant","normal");var u=new wt("mo",[Ro("\u2061","text")]);return e.parentIsSupSub?new wt("mrow",[l,u]):aH([l,u])};Nt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:i}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:kn(n),alwaysHandleSupSub:i==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:NH,mathmlBuilder:O9e});de("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");gp({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?zu(On(e.body,t,!1)):xt(["mord"],On(e.body,t,!0),t)},mathmlBuilder(e,t){return df(e.body,t,!0)}});Nt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,i=t[0];return{type:"overline",mode:r.mode,body:i}},htmlBuilder(e,t){var r=ni(e.body,t.havingCrampedStyle()),i=im("overline-line",t),n=t.fontMetrics().defaultRuleThickness,a=ii({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:i},{type:"kern",size:n}]});return xt(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new wt("mo",[new tn("\u203E")]);r.setAttribute("stretchy","true");var i=new wt("mover",[wi(e.body,t),r]);return i.setAttribute("accent","true"),i}});Nt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,i=t[0];return{type:"phantom",mode:r.mode,body:kn(i)}},htmlBuilder:(e,t)=>{var r=On(e.body,t.withPhantom(),!1);return zu(r)},mathmlBuilder:(e,t)=>{var r=io(e.body,t);return new wt("mphantom",r)}});de("\\hphantom","\\smash{\\phantom{#1}}");Nt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,i=t[0];return{type:"vphantom",mode:r.mode,body:i}},htmlBuilder:(e,t)=>{var r=xt(["inner"],[ni(e.body,t.withPhantom())]),i=xt(["fix"],[]);return xt(["mord","rlap"],[r,i],t)},mathmlBuilder:(e,t)=>{var r=io(kn(e.body),t),i=new wt("mphantom",r),n=new wt("mpadded",[i]);return n.setAttribute("width","0px"),n}});Nt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,i=Rr(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:i,body:n}},htmlBuilder(e,t){var r=ni(e.body,t),i=ji(e.dy,t);return ii({positionType:"shift",positionData:-i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new wt("mpadded",[wi(e.body,t)]),i=e.dy.number+e.dy.unit;return r.setAttribute("voffset",i),r}});Nt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Nt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:i}=e,n=r[0],a=Rr(t[0],"size"),s=Rr(t[1],"size");return{type:"rule",mode:i.mode,shift:n&&Rr(n,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var r=xt(["mord","rule"],[],t),i=ji(e.width,t),n=ji(e.height,t),a=e.shift?ji(e.shift,t):0;return r.style.borderRightWidth=St(i),r.style.borderTopWidth=St(n),r.style.bottom=St(a),r.width=i,r.height=n+a,r.depth=-a,r.maxFontSize=n*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=ji(e.width,t),i=ji(e.height,t),n=e.shift?ji(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new wt("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",St(r)),s.setAttribute("height",St(i));var o=new wt("mpadded",[s]);return n>=0?o.setAttribute("height",St(n)):(o.setAttribute("height",St(n)),o.setAttribute("depth",St(-n))),o.setAttribute("voffset",St(n)),o}});PU=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],P9e=(e,t)=>{var r=t.havingSize(e.size);return MH(e.body,r,t)};Nt({type:"sizing",names:PU,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:i,parser:n}=e,a=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:PU.indexOf(i)+1,body:a}},htmlBuilder:P9e,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),i=io(e.body,r),n=new wt("mstyle",i);return n.setAttribute("mathsize",St(r.sizeMultiplier)),n}});Nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:i}=e,n=!1,a=!1,s=r[0]&&Rr(r[0],"ordgroup");if(s)for(var o,l=0;l{var r=xt([],[ni(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return xt(["mord","smash"],[r],t);if(r.children)for(var i=0;i{var r=new wt("mpadded",[wi(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});Nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:i}=e,n=r[0],a=t[0];return{type:"sqrt",mode:i.mode,body:a,index:n}},htmlBuilder(e,t){var r=ni(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=nm(r,t);var i=t.fontMetrics(),n=i.defaultRuleThickness,a=n;t.style.idr.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=St(h);var p=ii({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var g=t.havingStyle(Sr.SCRIPTSCRIPT),m=ni(e.index,g,t),y=.6*(p.height-p.depth),v=ii({positionType:"shift",positionData:-y,children:[{type:"elem",elem:m}]}),x=xt(["root"],[v]);return xt(["mord","sqrt"],[x,p],t)}else return xt(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:i}=e;return i?new wt("mroot",[wi(r,t),wi(i,t)]):new wt("msqrt",[wi(r,t)])}});M8={display:Sr.DISPLAY,text:Sr.TEXT,script:Sr.SCRIPT,scriptscript:Sr.SCRIPTSCRIPT};Nt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:i,parser:n}=e,a=n.parseExpression(!0,r),s=i.slice(1,i.length-5);if(!B9e(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:n.mode,style:s,body:a}},htmlBuilder(e,t){var r=M8[e.style],i=t.havingStyle(r);return e.resetFont&&(i=i.withFont("")),MH(e.body,i,t)},mathmlBuilder(e,t){var r=M8[e.style],i=t.havingStyle(r);e.resetFont&&(i=i.withFont(""));var n=io(e.body,i),a=new wt("mstyle",n),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});F9e=function(t,r){var i=t.base;if(i)if(i.type==="op"){var n=i.limits&&(r.style.size===Sr.DISPLAY.size||i.alwaysHandleSupSub);return n?sm:null}else if(i.type==="operatorname"){var a=i.alwaysHandleSupSub&&(r.style.size===Sr.DISPLAY.size||i.limits);return a?NH:null}else{if(i.type==="accent")return Fu(i.base)?U8:null;if(i.type==="horizBrace"){var s=!t.sub;return s===i.isOver?RH:null}else return null}else return null};gp({type:"supsub",htmlBuilder(e,t){var r=F9e(e,t);if(r)return r(e,t);var{base:i,sup:n,sub:a}=e,s=ni(i,t),o,l,u=t.fontMetrics(),h=0,f=0,d=i&&Fu(i);if(n){var p=t.havingStyle(t.style.sup());o=ni(n,p,t),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var g=t.havingStyle(t.style.sub());l=ni(a,g,t),d||(f=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}var m;t.style===Sr.DISPLAY?m=u.sup1:t.style.cramped?m=u.sup3:m=u.sup2;var y=t.sizeMultiplier,v=St(.5/u.ptPerEm/y),x=null;if(l){var T=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(s instanceof Ya||T){var C;x=St(-((C=s.italic)!=null?C:0))}}var w;if(o&&l){h=Math.max(h,m,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var k=u.defaultRuleThickness,E=4*k;if(h-o.depth-(l.height-f)0&&(h+=A,f-=A)}var N=[{type:"elem",elem:l,shift:f,marginRight:v,marginLeft:x},{type:"elem",elem:o,shift:-h,marginRight:v}];w=ii({positionType:"individualShift",children:N})}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var P=[{type:"elem",elem:l,marginLeft:x,marginRight:v}];w=ii({positionType:"shift",positionData:f,children:P})}else if(o)h=Math.max(h,m,o.depth+.25*u.xHeight),w=ii({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var O=L8(s,"right")||"mord";return xt([O],[s,xt(["msupsub"],[w])],t)},mathmlBuilder(e,t){var r=!1,i,n;e.base&&e.base.type==="horizBrace"&&(n=!!e.sup,n===e.base.isOver&&(r=!0,i=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[wi(e.base,t)];e.sub&&a.push(wi(e.sub,t)),e.sup&&a.push(wi(e.sup,t));var s;if(r)s=i?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Sr.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Sr.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Sr.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Sr.DISPLAY)?s="munder":s="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Sr.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Sr.DISPLAY)?s="mover":s="msup"}return new wt(s,a)}});gp({type:"atom",htmlBuilder(e,t){return G8(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new wt("mo",[Ro(e.text,e.mode)]);if(e.family==="bin"){var i=W8(e,t);i==="bold-italic"&&r.setAttribute("mathvariant",i)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});OH={mi:"italic",mn:"normal",mtext:"normal"};gp({type:"mathord",htmlBuilder(e,t){return Dk(e,t,"mathord")},mathmlBuilder(e,t){var r=new wt("mi",[Ro(e.text,e.mode,t)]),i=W8(e,t)||"italic";return i!==OH[r.type]&&r.setAttribute("mathvariant",i),r}});gp({type:"textord",htmlBuilder(e,t){return Dk(e,t,"textord")},mathmlBuilder(e,t){var r=Ro(e.text,e.mode,t),i=W8(e,t)||"normal",n;return e.mode==="text"?n=new wt("mtext",[r]):/[0-9]/.test(e.text)?n=new wt("mn",[r]):e.text==="\\prime"?n=new wt("mo",[r]):n=new wt("mi",[r]),i!==OH[n.type]&&n.setAttribute("mathvariant",i),n}});g8={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},m8={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};gp({type:"spacing",htmlBuilder(e,t){if(m8.hasOwnProperty(e.text)){var r=m8[e.text].className||"";if(e.mode==="text"){var i=Dk(e,t,"textord");return i.classes.push(r),i}else return xt(["mspace",r],[G8(e.text,e.mode,t)],t)}else{if(g8.hasOwnProperty(e.text))return xt(["mspace",g8[e.text]],[],t);throw new kt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(m8.hasOwnProperty(e.text))r=new wt("mtext",[new tn("\xA0")]);else{if(g8.hasOwnProperty(e.text))return new wt("mspace");throw new kt('Unknown type of space "'+e.text+'"')}return r}});BU=()=>{var e=new wt("mtd",[]);return e.setAttribute("width","50%"),e};gp({type:"tag",mathmlBuilder(e,t){var r=new wt("mtable",[new wt("mtr",[BU(),new wt("mtd",[df(e.body,t)]),BU(),new wt("mtd",[df(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});FU={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$U={"\\textbf":"textbf","\\textmd":"textmd"},$9e={"\\textit":"textit","\\textup":"textup"},zU=(e,t)=>{var r=e.font;if(r){if(FU[r])return t.withTextFontFamily(FU[r]);if($U[r])return t.withTextFontWeight($U[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape($9e[r])};Nt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];return{type:"text",mode:r.mode,body:kn(n),font:i}},htmlBuilder(e,t){var r=zU(e,t),i=On(e.body,r,!0);return xt(["mord","text"],i,r)},mathmlBuilder(e,t){var r=zU(e,t);return df(e.body,r)}});Nt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=ni(e.body,t),i=im("underline-line",t),n=t.fontMetrics().defaultRuleThickness,a=ii({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:i},{type:"kern",size:3*n},{type:"elem",elem:r}]});return xt(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new wt("mo",[new tn("\u203E")]);r.setAttribute("stretchy","true");var i=new wt("munder",[wi(e.body,t),r]);return i.setAttribute("accentunder","true"),i}});Nt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=ni(e.body,t),i=t.fontMetrics().axisHeight,n=.5*(r.height-i-(r.depth+i));return ii({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new wt("mpadded",[wi(e.body,t)],["vcenter"]);return new wt("mrow",[r])}});Nt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new kt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=GU(e),i=[],n=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"\u2423":"\xA0"),lf=iH,PH=`[ \r - ]`,z9e="\\\\[a-zA-Z@]+",G9e="\\\\[^\uD800-\uDFFF]",q9e="("+z9e+")"+PH+"*",V9e=`\\\\( +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};Xf=class{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r{if(S$e(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}},a8={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},E$e={ex:!0,em:!0,mu:!0},pK=function(t){return typeof t!="string"&&(t=t.unit),t in a8||t in E$e||t==="ex"},Ti=function(t,r){var n;if(t.unit in a8)n=a8[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new Lt("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},Mt=function(t){return+t.toFixed(4)+"em"},jf=function(t){return t.filter(r=>r).join(" ")},S8=function(t){var r="";for(var n of Object.keys(t)){var i=t[n];i!==void 0&&(r+=e$e(n)+":"+i+";")}return r},gK=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},mK=function(t){var r=document.createElement(t);r.className=jf(this.classes),Object.assign(r.style,this.style);for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i/=\x00-\x1f]/,yK=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+hs(jf(this.classes))+'"');var n=S8(this.style);n&&(r+=' style="'+hs(n)+'"');for(var i of Object.keys(this.attributes)){if(A$e.test(i))throw new Lt("Invalid attribute name '"+i+"'");r+=" "+i+'="'+hs(this.attributes[i])+'"'}r+=">";for(var a=0;a",r},Kf=class{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,gK.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return mK.call(this,"span")}toMarkup(){return yK.call(this,"span")}},oy=class{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,gK.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return mK.call(this,"a")}toMarkup(){return yK.call(this,"a")}},s8=class{constructor(t,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t=''+hs(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=Mt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=jf(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="0&&(n+="margin-right:"+Mt(this.italic)+";"),n+=S8(this.style),n&&(t=!0,r+=' style="'+hs(n)+'"');var i=hs(this.text);return t?(r+=">",r+=i,r+="",r):i}},Kl=class{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}},rb=class{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="e instanceof Kf||e instanceof oy||e instanceof Xf,Uc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ok={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Dj={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};WL={};li={math:{},text:{}};ie="math",wt="text",ye="main",qe="ams",ci="accent-token",Ut="bin",Ns="close",uy="inner",mr="mathord",Zi="op-token",qo="open",ib="punct",Ve="rel",wh="spacing",Ye="textord";J(ie,ye,Ve,"\u2261","\\equiv",!0);J(ie,ye,Ve,"\u227A","\\prec",!0);J(ie,ye,Ve,"\u227B","\\succ",!0);J(ie,ye,Ve,"\u223C","\\sim",!0);J(ie,ye,Ve,"\u22A5","\\perp");J(ie,ye,Ve,"\u2AAF","\\preceq",!0);J(ie,ye,Ve,"\u2AB0","\\succeq",!0);J(ie,ye,Ve,"\u2243","\\simeq",!0);J(ie,ye,Ve,"\u2223","\\mid",!0);J(ie,ye,Ve,"\u226A","\\ll",!0);J(ie,ye,Ve,"\u226B","\\gg",!0);J(ie,ye,Ve,"\u224D","\\asymp",!0);J(ie,ye,Ve,"\u2225","\\parallel");J(ie,ye,Ve,"\u22C8","\\bowtie",!0);J(ie,ye,Ve,"\u2323","\\smile",!0);J(ie,ye,Ve,"\u2291","\\sqsubseteq",!0);J(ie,ye,Ve,"\u2292","\\sqsupseteq",!0);J(ie,ye,Ve,"\u2250","\\doteq",!0);J(ie,ye,Ve,"\u2322","\\frown",!0);J(ie,ye,Ve,"\u220B","\\ni",!0);J(ie,ye,Ve,"\u221D","\\propto",!0);J(ie,ye,Ve,"\u22A2","\\vdash",!0);J(ie,ye,Ve,"\u22A3","\\dashv",!0);J(ie,ye,Ve,"\u220B","\\owns");J(ie,ye,ib,".","\\ldotp");J(ie,ye,ib,"\u22C5","\\cdotp");J(ie,ye,ib,"\u22C5","\xB7");J(wt,ye,Ye,"\u22C5","\xB7");J(ie,ye,Ye,"#","\\#");J(wt,ye,Ye,"#","\\#");J(ie,ye,Ye,"&","\\&");J(wt,ye,Ye,"&","\\&");J(ie,ye,Ye,"\u2135","\\aleph",!0);J(ie,ye,Ye,"\u2200","\\forall",!0);J(ie,ye,Ye,"\u210F","\\hbar",!0);J(ie,ye,Ye,"\u2203","\\exists",!0);J(ie,ye,Ye,"\u2207","\\nabla",!0);J(ie,ye,Ye,"\u266D","\\flat",!0);J(ie,ye,Ye,"\u2113","\\ell",!0);J(ie,ye,Ye,"\u266E","\\natural",!0);J(ie,ye,Ye,"\u2663","\\clubsuit",!0);J(ie,ye,Ye,"\u2118","\\wp",!0);J(ie,ye,Ye,"\u266F","\\sharp",!0);J(ie,ye,Ye,"\u2662","\\diamondsuit",!0);J(ie,ye,Ye,"\u211C","\\Re",!0);J(ie,ye,Ye,"\u2661","\\heartsuit",!0);J(ie,ye,Ye,"\u2111","\\Im",!0);J(ie,ye,Ye,"\u2660","\\spadesuit",!0);J(ie,ye,Ye,"\xA7","\\S",!0);J(wt,ye,Ye,"\xA7","\\S");J(ie,ye,Ye,"\xB6","\\P",!0);J(wt,ye,Ye,"\xB6","\\P");J(ie,ye,Ye,"\u2020","\\dag");J(wt,ye,Ye,"\u2020","\\dag");J(wt,ye,Ye,"\u2020","\\textdagger");J(ie,ye,Ye,"\u2021","\\ddag");J(wt,ye,Ye,"\u2021","\\ddag");J(wt,ye,Ye,"\u2021","\\textdaggerdbl");J(ie,ye,Ns,"\u23B1","\\rmoustache",!0);J(ie,ye,qo,"\u23B0","\\lmoustache",!0);J(ie,ye,Ns,"\u27EF","\\rgroup",!0);J(ie,ye,qo,"\u27EE","\\lgroup",!0);J(ie,ye,Ut,"\u2213","\\mp",!0);J(ie,ye,Ut,"\u2296","\\ominus",!0);J(ie,ye,Ut,"\u228E","\\uplus",!0);J(ie,ye,Ut,"\u2293","\\sqcap",!0);J(ie,ye,Ut,"\u2217","\\ast");J(ie,ye,Ut,"\u2294","\\sqcup",!0);J(ie,ye,Ut,"\u25EF","\\bigcirc",!0);J(ie,ye,Ut,"\u2219","\\bullet",!0);J(ie,ye,Ut,"\u2021","\\ddagger");J(ie,ye,Ut,"\u2240","\\wr",!0);J(ie,ye,Ut,"\u2A3F","\\amalg");J(ie,ye,Ut,"&","\\And");J(ie,ye,Ve,"\u27F5","\\longleftarrow",!0);J(ie,ye,Ve,"\u21D0","\\Leftarrow",!0);J(ie,ye,Ve,"\u27F8","\\Longleftarrow",!0);J(ie,ye,Ve,"\u27F6","\\longrightarrow",!0);J(ie,ye,Ve,"\u21D2","\\Rightarrow",!0);J(ie,ye,Ve,"\u27F9","\\Longrightarrow",!0);J(ie,ye,Ve,"\u2194","\\leftrightarrow",!0);J(ie,ye,Ve,"\u27F7","\\longleftrightarrow",!0);J(ie,ye,Ve,"\u21D4","\\Leftrightarrow",!0);J(ie,ye,Ve,"\u27FA","\\Longleftrightarrow",!0);J(ie,ye,Ve,"\u21A6","\\mapsto",!0);J(ie,ye,Ve,"\u27FC","\\longmapsto",!0);J(ie,ye,Ve,"\u2197","\\nearrow",!0);J(ie,ye,Ve,"\u21A9","\\hookleftarrow",!0);J(ie,ye,Ve,"\u21AA","\\hookrightarrow",!0);J(ie,ye,Ve,"\u2198","\\searrow",!0);J(ie,ye,Ve,"\u21BC","\\leftharpoonup",!0);J(ie,ye,Ve,"\u21C0","\\rightharpoonup",!0);J(ie,ye,Ve,"\u2199","\\swarrow",!0);J(ie,ye,Ve,"\u21BD","\\leftharpoondown",!0);J(ie,ye,Ve,"\u21C1","\\rightharpoondown",!0);J(ie,ye,Ve,"\u2196","\\nwarrow",!0);J(ie,ye,Ve,"\u21CC","\\rightleftharpoons",!0);J(ie,qe,Ve,"\u226E","\\nless",!0);J(ie,qe,Ve,"\uE010","\\@nleqslant");J(ie,qe,Ve,"\uE011","\\@nleqq");J(ie,qe,Ve,"\u2A87","\\lneq",!0);J(ie,qe,Ve,"\u2268","\\lneqq",!0);J(ie,qe,Ve,"\uE00C","\\@lvertneqq");J(ie,qe,Ve,"\u22E6","\\lnsim",!0);J(ie,qe,Ve,"\u2A89","\\lnapprox",!0);J(ie,qe,Ve,"\u2280","\\nprec",!0);J(ie,qe,Ve,"\u22E0","\\npreceq",!0);J(ie,qe,Ve,"\u22E8","\\precnsim",!0);J(ie,qe,Ve,"\u2AB9","\\precnapprox",!0);J(ie,qe,Ve,"\u2241","\\nsim",!0);J(ie,qe,Ve,"\uE006","\\@nshortmid");J(ie,qe,Ve,"\u2224","\\nmid",!0);J(ie,qe,Ve,"\u22AC","\\nvdash",!0);J(ie,qe,Ve,"\u22AD","\\nvDash",!0);J(ie,qe,Ve,"\u22EA","\\ntriangleleft");J(ie,qe,Ve,"\u22EC","\\ntrianglelefteq",!0);J(ie,qe,Ve,"\u228A","\\subsetneq",!0);J(ie,qe,Ve,"\uE01A","\\@varsubsetneq");J(ie,qe,Ve,"\u2ACB","\\subsetneqq",!0);J(ie,qe,Ve,"\uE017","\\@varsubsetneqq");J(ie,qe,Ve,"\u226F","\\ngtr",!0);J(ie,qe,Ve,"\uE00F","\\@ngeqslant");J(ie,qe,Ve,"\uE00E","\\@ngeqq");J(ie,qe,Ve,"\u2A88","\\gneq",!0);J(ie,qe,Ve,"\u2269","\\gneqq",!0);J(ie,qe,Ve,"\uE00D","\\@gvertneqq");J(ie,qe,Ve,"\u22E7","\\gnsim",!0);J(ie,qe,Ve,"\u2A8A","\\gnapprox",!0);J(ie,qe,Ve,"\u2281","\\nsucc",!0);J(ie,qe,Ve,"\u22E1","\\nsucceq",!0);J(ie,qe,Ve,"\u22E9","\\succnsim",!0);J(ie,qe,Ve,"\u2ABA","\\succnapprox",!0);J(ie,qe,Ve,"\u2246","\\ncong",!0);J(ie,qe,Ve,"\uE007","\\@nshortparallel");J(ie,qe,Ve,"\u2226","\\nparallel",!0);J(ie,qe,Ve,"\u22AF","\\nVDash",!0);J(ie,qe,Ve,"\u22EB","\\ntriangleright");J(ie,qe,Ve,"\u22ED","\\ntrianglerighteq",!0);J(ie,qe,Ve,"\uE018","\\@nsupseteqq");J(ie,qe,Ve,"\u228B","\\supsetneq",!0);J(ie,qe,Ve,"\uE01B","\\@varsupsetneq");J(ie,qe,Ve,"\u2ACC","\\supsetneqq",!0);J(ie,qe,Ve,"\uE019","\\@varsupsetneqq");J(ie,qe,Ve,"\u22AE","\\nVdash",!0);J(ie,qe,Ve,"\u2AB5","\\precneqq",!0);J(ie,qe,Ve,"\u2AB6","\\succneqq",!0);J(ie,qe,Ve,"\uE016","\\@nsubseteqq");J(ie,qe,Ut,"\u22B4","\\unlhd");J(ie,qe,Ut,"\u22B5","\\unrhd");J(ie,qe,Ve,"\u219A","\\nleftarrow",!0);J(ie,qe,Ve,"\u219B","\\nrightarrow",!0);J(ie,qe,Ve,"\u21CD","\\nLeftarrow",!0);J(ie,qe,Ve,"\u21CF","\\nRightarrow",!0);J(ie,qe,Ve,"\u21AE","\\nleftrightarrow",!0);J(ie,qe,Ve,"\u21CE","\\nLeftrightarrow",!0);J(ie,qe,Ve,"\u25B3","\\vartriangle");J(ie,qe,Ye,"\u210F","\\hslash");J(ie,qe,Ye,"\u25BD","\\triangledown");J(ie,qe,Ye,"\u25CA","\\lozenge");J(ie,qe,Ye,"\u24C8","\\circledS");J(ie,qe,Ye,"\xAE","\\circledR");J(wt,qe,Ye,"\xAE","\\circledR");J(ie,qe,Ye,"\u2221","\\measuredangle",!0);J(ie,qe,Ye,"\u2204","\\nexists");J(ie,qe,Ye,"\u2127","\\mho");J(ie,qe,Ye,"\u2132","\\Finv",!0);J(ie,qe,Ye,"\u2141","\\Game",!0);J(ie,qe,Ye,"\u2035","\\backprime");J(ie,qe,Ye,"\u25B2","\\blacktriangle");J(ie,qe,Ye,"\u25BC","\\blacktriangledown");J(ie,qe,Ye,"\u25A0","\\blacksquare");J(ie,qe,Ye,"\u29EB","\\blacklozenge");J(ie,qe,Ye,"\u2605","\\bigstar");J(ie,qe,Ye,"\u2222","\\sphericalangle",!0);J(ie,qe,Ye,"\u2201","\\complement",!0);J(ie,qe,Ye,"\xF0","\\eth",!0);J(wt,ye,Ye,"\xF0","\xF0");J(ie,qe,Ye,"\u2571","\\diagup");J(ie,qe,Ye,"\u2572","\\diagdown");J(ie,qe,Ye,"\u25A1","\\square");J(ie,qe,Ye,"\u25A1","\\Box");J(ie,qe,Ye,"\u25CA","\\Diamond");J(ie,qe,Ye,"\xA5","\\yen",!0);J(wt,qe,Ye,"\xA5","\\yen",!0);J(ie,qe,Ye,"\u2713","\\checkmark",!0);J(wt,qe,Ye,"\u2713","\\checkmark");J(ie,qe,Ye,"\u2136","\\beth",!0);J(ie,qe,Ye,"\u2138","\\daleth",!0);J(ie,qe,Ye,"\u2137","\\gimel",!0);J(ie,qe,Ye,"\u03DD","\\digamma",!0);J(ie,qe,Ye,"\u03F0","\\varkappa");J(ie,qe,qo,"\u250C","\\@ulcorner",!0);J(ie,qe,Ns,"\u2510","\\@urcorner",!0);J(ie,qe,qo,"\u2514","\\@llcorner",!0);J(ie,qe,Ns,"\u2518","\\@lrcorner",!0);J(ie,qe,Ve,"\u2266","\\leqq",!0);J(ie,qe,Ve,"\u2A7D","\\leqslant",!0);J(ie,qe,Ve,"\u2A95","\\eqslantless",!0);J(ie,qe,Ve,"\u2272","\\lesssim",!0);J(ie,qe,Ve,"\u2A85","\\lessapprox",!0);J(ie,qe,Ve,"\u224A","\\approxeq",!0);J(ie,qe,Ut,"\u22D6","\\lessdot");J(ie,qe,Ve,"\u22D8","\\lll",!0);J(ie,qe,Ve,"\u2276","\\lessgtr",!0);J(ie,qe,Ve,"\u22DA","\\lesseqgtr",!0);J(ie,qe,Ve,"\u2A8B","\\lesseqqgtr",!0);J(ie,qe,Ve,"\u2251","\\doteqdot");J(ie,qe,Ve,"\u2253","\\risingdotseq",!0);J(ie,qe,Ve,"\u2252","\\fallingdotseq",!0);J(ie,qe,Ve,"\u223D","\\backsim",!0);J(ie,qe,Ve,"\u22CD","\\backsimeq",!0);J(ie,qe,Ve,"\u2AC5","\\subseteqq",!0);J(ie,qe,Ve,"\u22D0","\\Subset",!0);J(ie,qe,Ve,"\u228F","\\sqsubset",!0);J(ie,qe,Ve,"\u227C","\\preccurlyeq",!0);J(ie,qe,Ve,"\u22DE","\\curlyeqprec",!0);J(ie,qe,Ve,"\u227E","\\precsim",!0);J(ie,qe,Ve,"\u2AB7","\\precapprox",!0);J(ie,qe,Ve,"\u22B2","\\vartriangleleft");J(ie,qe,Ve,"\u22B4","\\trianglelefteq");J(ie,qe,Ve,"\u22A8","\\vDash",!0);J(ie,qe,Ve,"\u22AA","\\Vvdash",!0);J(ie,qe,Ve,"\u2323","\\smallsmile");J(ie,qe,Ve,"\u2322","\\smallfrown");J(ie,qe,Ve,"\u224F","\\bumpeq",!0);J(ie,qe,Ve,"\u224E","\\Bumpeq",!0);J(ie,qe,Ve,"\u2267","\\geqq",!0);J(ie,qe,Ve,"\u2A7E","\\geqslant",!0);J(ie,qe,Ve,"\u2A96","\\eqslantgtr",!0);J(ie,qe,Ve,"\u2273","\\gtrsim",!0);J(ie,qe,Ve,"\u2A86","\\gtrapprox",!0);J(ie,qe,Ut,"\u22D7","\\gtrdot");J(ie,qe,Ve,"\u22D9","\\ggg",!0);J(ie,qe,Ve,"\u2277","\\gtrless",!0);J(ie,qe,Ve,"\u22DB","\\gtreqless",!0);J(ie,qe,Ve,"\u2A8C","\\gtreqqless",!0);J(ie,qe,Ve,"\u2256","\\eqcirc",!0);J(ie,qe,Ve,"\u2257","\\circeq",!0);J(ie,qe,Ve,"\u225C","\\triangleq",!0);J(ie,qe,Ve,"\u223C","\\thicksim");J(ie,qe,Ve,"\u2248","\\thickapprox");J(ie,qe,Ve,"\u2AC6","\\supseteqq",!0);J(ie,qe,Ve,"\u22D1","\\Supset",!0);J(ie,qe,Ve,"\u2290","\\sqsupset",!0);J(ie,qe,Ve,"\u227D","\\succcurlyeq",!0);J(ie,qe,Ve,"\u22DF","\\curlyeqsucc",!0);J(ie,qe,Ve,"\u227F","\\succsim",!0);J(ie,qe,Ve,"\u2AB8","\\succapprox",!0);J(ie,qe,Ve,"\u22B3","\\vartriangleright");J(ie,qe,Ve,"\u22B5","\\trianglerighteq");J(ie,qe,Ve,"\u22A9","\\Vdash",!0);J(ie,qe,Ve,"\u2223","\\shortmid");J(ie,qe,Ve,"\u2225","\\shortparallel");J(ie,qe,Ve,"\u226C","\\between",!0);J(ie,qe,Ve,"\u22D4","\\pitchfork",!0);J(ie,qe,Ve,"\u221D","\\varpropto");J(ie,qe,Ve,"\u25C0","\\blacktriangleleft");J(ie,qe,Ve,"\u2234","\\therefore",!0);J(ie,qe,Ve,"\u220D","\\backepsilon");J(ie,qe,Ve,"\u25B6","\\blacktriangleright");J(ie,qe,Ve,"\u2235","\\because",!0);J(ie,qe,Ve,"\u22D8","\\llless");J(ie,qe,Ve,"\u22D9","\\gggtr");J(ie,qe,Ut,"\u22B2","\\lhd");J(ie,qe,Ut,"\u22B3","\\rhd");J(ie,qe,Ve,"\u2242","\\eqsim",!0);J(ie,ye,Ve,"\u22C8","\\Join");J(ie,qe,Ve,"\u2251","\\Doteq",!0);J(ie,qe,Ut,"\u2214","\\dotplus",!0);J(ie,qe,Ut,"\u2216","\\smallsetminus");J(ie,qe,Ut,"\u22D2","\\Cap",!0);J(ie,qe,Ut,"\u22D3","\\Cup",!0);J(ie,qe,Ut,"\u2A5E","\\doublebarwedge",!0);J(ie,qe,Ut,"\u229F","\\boxminus",!0);J(ie,qe,Ut,"\u229E","\\boxplus",!0);J(ie,qe,Ut,"\u22C7","\\divideontimes",!0);J(ie,qe,Ut,"\u22C9","\\ltimes",!0);J(ie,qe,Ut,"\u22CA","\\rtimes",!0);J(ie,qe,Ut,"\u22CB","\\leftthreetimes",!0);J(ie,qe,Ut,"\u22CC","\\rightthreetimes",!0);J(ie,qe,Ut,"\u22CF","\\curlywedge",!0);J(ie,qe,Ut,"\u22CE","\\curlyvee",!0);J(ie,qe,Ut,"\u229D","\\circleddash",!0);J(ie,qe,Ut,"\u229B","\\circledast",!0);J(ie,qe,Ut,"\u22C5","\\centerdot");J(ie,qe,Ut,"\u22BA","\\intercal",!0);J(ie,qe,Ut,"\u22D2","\\doublecap");J(ie,qe,Ut,"\u22D3","\\doublecup");J(ie,qe,Ut,"\u22A0","\\boxtimes",!0);J(ie,qe,Ve,"\u21E2","\\dashrightarrow",!0);J(ie,qe,Ve,"\u21E0","\\dashleftarrow",!0);J(ie,qe,Ve,"\u21C7","\\leftleftarrows",!0);J(ie,qe,Ve,"\u21C6","\\leftrightarrows",!0);J(ie,qe,Ve,"\u21DA","\\Lleftarrow",!0);J(ie,qe,Ve,"\u219E","\\twoheadleftarrow",!0);J(ie,qe,Ve,"\u21A2","\\leftarrowtail",!0);J(ie,qe,Ve,"\u21AB","\\looparrowleft",!0);J(ie,qe,Ve,"\u21CB","\\leftrightharpoons",!0);J(ie,qe,Ve,"\u21B6","\\curvearrowleft",!0);J(ie,qe,Ve,"\u21BA","\\circlearrowleft",!0);J(ie,qe,Ve,"\u21B0","\\Lsh",!0);J(ie,qe,Ve,"\u21C8","\\upuparrows",!0);J(ie,qe,Ve,"\u21BF","\\upharpoonleft",!0);J(ie,qe,Ve,"\u21C3","\\downharpoonleft",!0);J(ie,ye,Ve,"\u22B6","\\origof",!0);J(ie,ye,Ve,"\u22B7","\\imageof",!0);J(ie,qe,Ve,"\u22B8","\\multimap",!0);J(ie,qe,Ve,"\u21AD","\\leftrightsquigarrow",!0);J(ie,qe,Ve,"\u21C9","\\rightrightarrows",!0);J(ie,qe,Ve,"\u21C4","\\rightleftarrows",!0);J(ie,qe,Ve,"\u21A0","\\twoheadrightarrow",!0);J(ie,qe,Ve,"\u21A3","\\rightarrowtail",!0);J(ie,qe,Ve,"\u21AC","\\looparrowright",!0);J(ie,qe,Ve,"\u21B7","\\curvearrowright",!0);J(ie,qe,Ve,"\u21BB","\\circlearrowright",!0);J(ie,qe,Ve,"\u21B1","\\Rsh",!0);J(ie,qe,Ve,"\u21CA","\\downdownarrows",!0);J(ie,qe,Ve,"\u21BE","\\upharpoonright",!0);J(ie,qe,Ve,"\u21C2","\\downharpoonright",!0);J(ie,qe,Ve,"\u21DD","\\rightsquigarrow",!0);J(ie,qe,Ve,"\u21DD","\\leadsto");J(ie,qe,Ve,"\u21DB","\\Rrightarrow",!0);J(ie,qe,Ve,"\u21BE","\\restriction");J(ie,ye,Ye,"\u2018","`");J(ie,ye,Ye,"$","\\$");J(wt,ye,Ye,"$","\\$");J(wt,ye,Ye,"$","\\textdollar");J(ie,ye,Ye,"%","\\%");J(wt,ye,Ye,"%","\\%");J(ie,ye,Ye,"_","\\_");J(wt,ye,Ye,"_","\\_");J(wt,ye,Ye,"_","\\textunderscore");J(ie,ye,Ye,"\u2220","\\angle",!0);J(ie,ye,Ye,"\u221E","\\infty",!0);J(ie,ye,Ye,"\u2032","\\prime");J(ie,ye,Ye,"\u25B3","\\triangle");J(ie,ye,Ye,"\u0393","\\Gamma",!0);J(ie,ye,Ye,"\u0394","\\Delta",!0);J(ie,ye,Ye,"\u0398","\\Theta",!0);J(ie,ye,Ye,"\u039B","\\Lambda",!0);J(ie,ye,Ye,"\u039E","\\Xi",!0);J(ie,ye,Ye,"\u03A0","\\Pi",!0);J(ie,ye,Ye,"\u03A3","\\Sigma",!0);J(ie,ye,Ye,"\u03A5","\\Upsilon",!0);J(ie,ye,Ye,"\u03A6","\\Phi",!0);J(ie,ye,Ye,"\u03A8","\\Psi",!0);J(ie,ye,Ye,"\u03A9","\\Omega",!0);J(ie,ye,Ye,"A","\u0391");J(ie,ye,Ye,"B","\u0392");J(ie,ye,Ye,"E","\u0395");J(ie,ye,Ye,"Z","\u0396");J(ie,ye,Ye,"H","\u0397");J(ie,ye,Ye,"I","\u0399");J(ie,ye,Ye,"K","\u039A");J(ie,ye,Ye,"M","\u039C");J(ie,ye,Ye,"N","\u039D");J(ie,ye,Ye,"O","\u039F");J(ie,ye,Ye,"P","\u03A1");J(ie,ye,Ye,"T","\u03A4");J(ie,ye,Ye,"X","\u03A7");J(ie,ye,Ye,"\xAC","\\neg",!0);J(ie,ye,Ye,"\xAC","\\lnot");J(ie,ye,Ye,"\u22A4","\\top");J(ie,ye,Ye,"\u22A5","\\bot");J(ie,ye,Ye,"\u2205","\\emptyset");J(ie,qe,Ye,"\u2205","\\varnothing");J(ie,ye,mr,"\u03B1","\\alpha",!0);J(ie,ye,mr,"\u03B2","\\beta",!0);J(ie,ye,mr,"\u03B3","\\gamma",!0);J(ie,ye,mr,"\u03B4","\\delta",!0);J(ie,ye,mr,"\u03F5","\\epsilon",!0);J(ie,ye,mr,"\u03B6","\\zeta",!0);J(ie,ye,mr,"\u03B7","\\eta",!0);J(ie,ye,mr,"\u03B8","\\theta",!0);J(ie,ye,mr,"\u03B9","\\iota",!0);J(ie,ye,mr,"\u03BA","\\kappa",!0);J(ie,ye,mr,"\u03BB","\\lambda",!0);J(ie,ye,mr,"\u03BC","\\mu",!0);J(ie,ye,mr,"\u03BD","\\nu",!0);J(ie,ye,mr,"\u03BE","\\xi",!0);J(ie,ye,mr,"\u03BF","\\omicron",!0);J(ie,ye,mr,"\u03C0","\\pi",!0);J(ie,ye,mr,"\u03C1","\\rho",!0);J(ie,ye,mr,"\u03C3","\\sigma",!0);J(ie,ye,mr,"\u03C4","\\tau",!0);J(ie,ye,mr,"\u03C5","\\upsilon",!0);J(ie,ye,mr,"\u03D5","\\phi",!0);J(ie,ye,mr,"\u03C7","\\chi",!0);J(ie,ye,mr,"\u03C8","\\psi",!0);J(ie,ye,mr,"\u03C9","\\omega",!0);J(ie,ye,mr,"\u03B5","\\varepsilon",!0);J(ie,ye,mr,"\u03D1","\\vartheta",!0);J(ie,ye,mr,"\u03D6","\\varpi",!0);J(ie,ye,mr,"\u03F1","\\varrho",!0);J(ie,ye,mr,"\u03C2","\\varsigma",!0);J(ie,ye,mr,"\u03C6","\\varphi",!0);J(ie,ye,Ut,"\u2217","*",!0);J(ie,ye,Ut,"+","+");J(ie,ye,Ut,"\u2212","-",!0);J(ie,ye,Ut,"\u22C5","\\cdot",!0);J(ie,ye,Ut,"\u2218","\\circ",!0);J(ie,ye,Ut,"\xF7","\\div",!0);J(ie,ye,Ut,"\xB1","\\pm",!0);J(ie,ye,Ut,"\xD7","\\times",!0);J(ie,ye,Ut,"\u2229","\\cap",!0);J(ie,ye,Ut,"\u222A","\\cup",!0);J(ie,ye,Ut,"\u2216","\\setminus",!0);J(ie,ye,Ut,"\u2227","\\land");J(ie,ye,Ut,"\u2228","\\lor");J(ie,ye,Ut,"\u2227","\\wedge",!0);J(ie,ye,Ut,"\u2228","\\vee",!0);J(ie,ye,Ye,"\u221A","\\surd");J(ie,ye,qo,"\u27E8","\\langle",!0);J(ie,ye,qo,"\u2223","\\lvert");J(ie,ye,qo,"\u2225","\\lVert");J(ie,ye,Ns,"?","?");J(ie,ye,Ns,"!","!");J(ie,ye,Ns,"\u27E9","\\rangle",!0);J(ie,ye,Ns,"\u2223","\\rvert");J(ie,ye,Ns,"\u2225","\\rVert");J(ie,ye,Ve,"=","=");J(ie,ye,Ve,":",":");J(ie,ye,Ve,"\u2248","\\approx",!0);J(ie,ye,Ve,"\u2245","\\cong",!0);J(ie,ye,Ve,"\u2265","\\ge");J(ie,ye,Ve,"\u2265","\\geq",!0);J(ie,ye,Ve,"\u2190","\\gets");J(ie,ye,Ve,">","\\gt",!0);J(ie,ye,Ve,"\u2208","\\in",!0);J(ie,ye,Ve,"\uE020","\\@not");J(ie,ye,Ve,"\u2282","\\subset",!0);J(ie,ye,Ve,"\u2283","\\supset",!0);J(ie,ye,Ve,"\u2286","\\subseteq",!0);J(ie,ye,Ve,"\u2287","\\supseteq",!0);J(ie,qe,Ve,"\u2288","\\nsubseteq",!0);J(ie,qe,Ve,"\u2289","\\nsupseteq",!0);J(ie,ye,Ve,"\u22A8","\\models");J(ie,ye,Ve,"\u2190","\\leftarrow",!0);J(ie,ye,Ve,"\u2264","\\le");J(ie,ye,Ve,"\u2264","\\leq",!0);J(ie,ye,Ve,"<","\\lt",!0);J(ie,ye,Ve,"\u2192","\\rightarrow",!0);J(ie,ye,Ve,"\u2192","\\to");J(ie,qe,Ve,"\u2271","\\ngeq",!0);J(ie,qe,Ve,"\u2270","\\nleq",!0);J(ie,ye,wh,"\xA0","\\ ");J(ie,ye,wh,"\xA0","\\space");J(ie,ye,wh,"\xA0","\\nobreakspace");J(wt,ye,wh,"\xA0","\\ ");J(wt,ye,wh,"\xA0"," ");J(wt,ye,wh,"\xA0","\\space");J(wt,ye,wh,"\xA0","\\nobreakspace");J(ie,ye,wh,"","\\nobreak");J(ie,ye,wh,"","\\allowbreak");J(ie,ye,ib,",",",");J(ie,ye,ib,";",";");J(ie,qe,Ut,"\u22BC","\\barwedge",!0);J(ie,qe,Ut,"\u22BB","\\veebar",!0);J(ie,ye,Ut,"\u2299","\\odot",!0);J(ie,ye,Ut,"\u2295","\\oplus",!0);J(ie,ye,Ut,"\u2297","\\otimes",!0);J(ie,ye,Ye,"\u2202","\\partial",!0);J(ie,ye,Ut,"\u2298","\\oslash",!0);J(ie,qe,Ut,"\u229A","\\circledcirc",!0);J(ie,qe,Ut,"\u22A1","\\boxdot",!0);J(ie,ye,Ut,"\u25B3","\\bigtriangleup");J(ie,ye,Ut,"\u25BD","\\bigtriangledown");J(ie,ye,Ut,"\u2020","\\dagger");J(ie,ye,Ut,"\u22C4","\\diamond");J(ie,ye,Ut,"\u22C6","\\star");J(ie,ye,Ut,"\u25C3","\\triangleleft");J(ie,ye,Ut,"\u25B9","\\triangleright");J(ie,ye,qo,"{","\\{");J(wt,ye,Ye,"{","\\{");J(wt,ye,Ye,"{","\\textbraceleft");J(ie,ye,Ns,"}","\\}");J(wt,ye,Ye,"}","\\}");J(wt,ye,Ye,"}","\\textbraceright");J(ie,ye,qo,"{","\\lbrace");J(ie,ye,Ns,"}","\\rbrace");J(ie,ye,qo,"[","\\lbrack",!0);J(wt,ye,Ye,"[","\\lbrack",!0);J(ie,ye,Ns,"]","\\rbrack",!0);J(wt,ye,Ye,"]","\\rbrack",!0);J(ie,ye,qo,"(","\\lparen",!0);J(ie,ye,Ns,")","\\rparen",!0);J(wt,ye,Ye,"<","\\textless",!0);J(wt,ye,Ye,">","\\textgreater",!0);J(ie,ye,qo,"\u230A","\\lfloor",!0);J(ie,ye,Ns,"\u230B","\\rfloor",!0);J(ie,ye,qo,"\u2308","\\lceil",!0);J(ie,ye,Ns,"\u2309","\\rceil",!0);J(ie,ye,Ye,"\\","\\backslash");J(ie,ye,Ye,"\u2223","|");J(ie,ye,Ye,"\u2223","\\vert");J(wt,ye,Ye,"|","\\textbar",!0);J(ie,ye,Ye,"\u2225","\\|");J(ie,ye,Ye,"\u2225","\\Vert");J(wt,ye,Ye,"\u2225","\\textbardbl");J(wt,ye,Ye,"~","\\textasciitilde");J(wt,ye,Ye,"\\","\\textbackslash");J(wt,ye,Ye,"^","\\textasciicircum");J(ie,ye,Ve,"\u2191","\\uparrow",!0);J(ie,ye,Ve,"\u21D1","\\Uparrow",!0);J(ie,ye,Ve,"\u2193","\\downarrow",!0);J(ie,ye,Ve,"\u21D3","\\Downarrow",!0);J(ie,ye,Ve,"\u2195","\\updownarrow",!0);J(ie,ye,Ve,"\u21D5","\\Updownarrow",!0);J(ie,ye,Zi,"\u2210","\\coprod");J(ie,ye,Zi,"\u22C1","\\bigvee");J(ie,ye,Zi,"\u22C0","\\bigwedge");J(ie,ye,Zi,"\u2A04","\\biguplus");J(ie,ye,Zi,"\u22C2","\\bigcap");J(ie,ye,Zi,"\u22C3","\\bigcup");J(ie,ye,Zi,"\u222B","\\int");J(ie,ye,Zi,"\u222B","\\intop");J(ie,ye,Zi,"\u222C","\\iint");J(ie,ye,Zi,"\u222D","\\iiint");J(ie,ye,Zi,"\u220F","\\prod");J(ie,ye,Zi,"\u2211","\\sum");J(ie,ye,Zi,"\u2A02","\\bigotimes");J(ie,ye,Zi,"\u2A01","\\bigoplus");J(ie,ye,Zi,"\u2A00","\\bigodot");J(ie,ye,Zi,"\u222E","\\oint");J(ie,ye,Zi,"\u222F","\\oiint");J(ie,ye,Zi,"\u2230","\\oiiint");J(ie,ye,Zi,"\u2A06","\\bigsqcup");J(ie,ye,Zi,"\u222B","\\smallint");J(wt,ye,uy,"\u2026","\\textellipsis");J(ie,ye,uy,"\u2026","\\mathellipsis");J(wt,ye,uy,"\u2026","\\ldots",!0);J(ie,ye,uy,"\u2026","\\ldots",!0);J(ie,ye,uy,"\u22EF","\\@cdots",!0);J(ie,ye,uy,"\u22F1","\\ddots",!0);J(ie,ye,Ye,"\u22EE","\\varvdots");J(wt,ye,Ye,"\u22EE","\\varvdots");J(ie,ye,ci,"\u02CA","\\acute");J(ie,ye,ci,"\u02CB","\\grave");J(ie,ye,ci,"\xA8","\\ddot");J(ie,ye,ci,"~","\\tilde");J(ie,ye,ci,"\u02C9","\\bar");J(ie,ye,ci,"\u02D8","\\breve");J(ie,ye,ci,"\u02C7","\\check");J(ie,ye,ci,"^","\\hat");J(ie,ye,ci,"\u20D7","\\vec");J(ie,ye,ci,"\u02D9","\\dot");J(ie,ye,ci,"\u02DA","\\mathring");J(ie,ye,mr,"\uE131","\\@imath");J(ie,ye,mr,"\uE237","\\@jmath");J(ie,ye,Ye,"\u0131","\u0131");J(ie,ye,Ye,"\u0237","\u0237");J(wt,ye,Ye,"\u0131","\\i",!0);J(wt,ye,Ye,"\u0237","\\j",!0);J(wt,ye,Ye,"\xDF","\\ss",!0);J(wt,ye,Ye,"\xE6","\\ae",!0);J(wt,ye,Ye,"\u0153","\\oe",!0);J(wt,ye,Ye,"\xF8","\\o",!0);J(wt,ye,Ye,"\xC6","\\AE",!0);J(wt,ye,Ye,"\u0152","\\OE",!0);J(wt,ye,Ye,"\xD8","\\O",!0);J(wt,ye,ci,"\u02CA","\\'");J(wt,ye,ci,"\u02CB","\\`");J(wt,ye,ci,"\u02C6","\\^");J(wt,ye,ci,"\u02DC","\\~");J(wt,ye,ci,"\u02C9","\\=");J(wt,ye,ci,"\u02D8","\\u");J(wt,ye,ci,"\u02D9","\\.");J(wt,ye,ci,"\xB8","\\c");J(wt,ye,ci,"\u02DA","\\r");J(wt,ye,ci,"\u02C7","\\v");J(wt,ye,ci,"\xA8",'\\"');J(wt,ye,ci,"\u02DD","\\H");J(wt,ye,ci,"\u25EF","\\textcircled");xK={"--":!0,"---":!0,"``":!0,"''":!0};J(wt,ye,Ye,"\u2013","--",!0);J(wt,ye,Ye,"\u2013","\\textendash");J(wt,ye,Ye,"\u2014","---",!0);J(wt,ye,Ye,"\u2014","\\textemdash");J(wt,ye,Ye,"\u2018","`",!0);J(wt,ye,Ye,"\u2018","\\textquoteleft");J(wt,ye,Ye,"\u2019","'",!0);J(wt,ye,Ye,"\u2019","\\textquoteright");J(wt,ye,Ye,"\u201C","``",!0);J(wt,ye,Ye,"\u201C","\\textquotedblleft");J(wt,ye,Ye,"\u201D","''",!0);J(wt,ye,Ye,"\u201D","\\textquotedblright");J(ie,ye,Ye,"\xB0","\\degree",!0);J(wt,ye,Ye,"\xB0","\\degree");J(wt,ye,Ye,"\xB0","\\textdegree",!0);J(ie,ye,Ye,"\xA3","\\pounds");J(ie,ye,Ye,"\xA3","\\mathsterling",!0);J(wt,ye,Ye,"\xA3","\\pounds");J(wt,ye,Ye,"\xA3","\\textsterling",!0);J(ie,qe,Ye,"\u2720","\\maltese");J(wt,qe,Ye,"\u2720","\\maltese");Nj='0123456789/@."';for(Pk=0;Pk{var t=e.charCodeAt(0),r=e.charCodeAt(1),n=(t-55296)*1024+(r-56320)+65536;if(119808<=n&&n<120484){var i=Math.floor((n-119808)/26);return qj[i]}else if(120782<=n&&n<=120831){var a=Math.floor((n-120782)/10);return N$e[a]}else{if(n===120485||n===120486)return qj[0];if(120486{if(jf(e.classes)!==jf(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},bK=e=>{for(var t=0;tr&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},St=function(t,r,n,i){var a=new Kf(t,r,n,i);return _8(a),a},Zf=(e,t,r,n)=>new Kf(e,t,r,n),ly=function(t,r,n){var i=St([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=Mt(i.height),i.maxFontSize=1,i},$$e=function(t,r,n,i){var a=new oy(t,r,n,i);return _8(a),a},Ch=function(t){var r=new Xf(t);return _8(r),r},cy=function(t,r){return t instanceof Xf?St([],[t],r):t},F$e=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s{var r=St(["mspace"],[],t),n=Ti(e,t);return r.style.marginRight=Mt(n),r},zk=(e,t,r)=>{var n,i;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return t==="textbf"&&r==="textit"?i="BoldItalic":t==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",n+"-"+i},f8={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},wK={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},CK=function(t,r){var[n,i,a]=wK[t],s=new Hc(n),o=new Kl([s],{width:Mt(i),height:Mt(a),style:"width:"+Mt(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Zf(["overlay"],[o],r);return l.height=a,l.style.height=Mt(a),l.style.width=Mt(i),l},bi={number:3,unit:"mu"},c0={number:4,unit:"mu"},xh={number:5,unit:"mu"},z$e={mord:{mop:bi,mbin:c0,mrel:xh,minner:bi},mop:{mord:bi,mop:bi,mrel:xh,minner:bi},mbin:{mord:c0,mop:c0,mopen:c0,minner:c0},mrel:{mord:xh,mop:xh,mopen:xh,minner:xh},mopen:{},mclose:{mop:bi,mbin:c0,mrel:xh,minner:bi},mpunct:{mord:bi,mop:bi,mrel:xh,mopen:bi,mclose:bi,mpunct:bi,minner:bi},minner:{mord:bi,mop:bi,mbin:c0,mrel:xh,mopen:bi,mpunct:bi,minner:bi}},G$e={mord:{mop:bi},mop:{mord:bi,mop:bi},mbin:{},mrel:{},mopen:{},mclose:{mop:bi},mpunct:{},minner:{mop:bi}},kK={},Kk={},Zk={};Qk=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Ki=function(t){return t.type==="ordgroup"?t.body:[t]},q$e=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),V$e=new Set(["rightmost","mrel","mclose","mpunct"]),W$e={display:Fr.DISPLAY,text:Fr.TEXT,script:Fr.SCRIPT,scriptscript:Fr.SCRIPTSCRIPT},U$e={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ca=function(t,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s{var y=m.classes[0],x=g.classes[0];y==="mbin"&&V$e.has(x)?m.classes[0]="mord":x==="mbin"&&q$e.has(y)&&(g.classes[0]="mord")},{node:f},d,p),d8(a,(g,m)=>{var y,x,b=g8(m),T=g8(g),k=b&&T?g.hasClass("mtight")?(y=G$e[b])==null?void 0:y[T]:(x=z$e[b])==null?void 0:x[T]:null;if(k)return TK(k,u)},{node:f},d,p),a},d8=function(t,r,n,i,a){i&&t.push(i);for(var s=0;sd=>{t.splice(f+1,0,d),s++})(s)}i&&t.pop()},SK=function(t){return t instanceof Xf||t instanceof oy||t instanceof Kf&&t.hasClass("enclosing")?t:null},p8=function(t,r){var n=SK(t);if(n){var i=n.children;if(i.length){if(r==="right")return p8(i[i.length-1],"right");if(r==="left")return p8(i[0],"left")}}return t},g8=function(t,r){if(!t)return null;r&&(t=p8(t,r));var n=t.classes[0];return U$e[n]||null},nb=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return St(r.concat(n))},En=function(t,r,n){if(!t)return St();if(Kk[t.type]){var i=Kk[t.type](t,r);if(n&&r.size!==n.size){i=St(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new Lt("Got group of unknown type: '"+t.type+"'")};Rt=class{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=jf(this.classes));for(var n=0;n0&&(t+=' class ="'+hs(jf(this.classes))+'"'),t+=">";for(var n=0;n",t}toText(){return this.children.map(t=>t.toText()).join("")}},Ai=class{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return hs(this.toText())}toText(){return this.text}},Jk=class{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character="\u200A":t>=.1666&&t<=.1667?this.character="\u2009":t>=.2222&&t<=.2223?this.character="\u2005":t>=.2777&&t<=.2778?this.character="\u2005\u200A":t>=-.05556&&t<=-.05555?this.character="\u200A\u2063":t>=-.1667&&t<=-.1666?this.character="\u2009\u2063":t>=-.2223&&t<=-.2222?this.character="\u205F\u2063":t>=-.2778&&t<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Mt(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},H$e=new Set(["\\imath","\\jmath"]),Y$e=new Set(["mrow","mtable"]),xl=function(t,r,n){return li[r][t]&&li[r][t].replace&&t.charCodeAt(0)!==55349&&!(xK.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=li[r][t].replace),new Ai(t)},R8=function(t){return t.length===1?t[0]:new Rt("mrow",t)},X$e={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},L8=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var r=t.font;if(!r||r==="mathnormal")return null;var n=e.mode,i=X$e[r];if(i)return typeof i=="function"?i(e):i;var a=e.text;if(H$e.has(a))return null;if(li[n][a]){var s=li[n][a].replace;s&&(a=s)}var o=f8[r].fontName;return E8(a,o,n)?f8[r].variant:null};Vo=function(t,r,n){if(t.length===1){var i=Hn(t[0],r);return n&&i instanceof Rt&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o=1&&(s.type==="mn"||YL(s))){var u=l.children[0];u instanceof Rt&&u.type==="mn"&&(u.children=[...s.children,...u.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var h=s.children[0];if(h instanceof Ai&&h.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof Ai&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(l),s=l}return a},Qf=function(t,r,n){return R8(Vo(t,r,n))},Hn=function(t,r){if(!t)return new Rt("mrow");if(Zk[t.type])return Zk[t.type](t,r);throw new Lt("Got group of unknown type: '"+t.type+"'")};j$e=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Wj=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Uj=function(t,r){return r.size<2?t:j$e[t-1][r.size-1]},eS=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Wj[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,t),new e(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Uj(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Wj[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=Uj(e.BASESIZE,t);return this.size===r&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=M$e(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};eS.BASESIZE=6;AK=function(t){return new eS({style:t.displayMode?Fr.DISPLAY:Fr.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},_K=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=St(n,[t])}return t},K$e=function(t,r,n){var i=AK(n),a;if(n.output==="mathml")return Vj(t,r,i,n.displayMode,!0);if(n.output==="html"){var s=m8(t,i);a=St(["katex"],[s])}else{var o=Vj(t,r,i,n.displayMode,!1),l=m8(t,i);a=St(["katex"],[o,l])}return _K(a,n)},Z$e=function(t,r,n){var i=AK(n),a=m8(t,i),s=St(["katex"],[a]);return _K(s,n)},Q$e={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},aS=function(t){var r=new Rt("mo",[new Ai(Q$e[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},J$e={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},eFe=new Set(["widehat","widecheck","widetilde","utilde"]),sS=function(t,r){function n(){var o=4e5,l=t.label.slice(1);if(eFe.has(l)&&"base"in t){var u=t.base.type==="ordgroup"?t.base.body.length:1,h,f,d;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,d=.42,f=l+"4"):(h=312,o=2340,d=.34,f="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],d=[0,.24,.3,.3,.36,.42][p],f=l+p):(o=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],d=[0,.26,.286,.3,.306,.34][p],f="tilde"+p)}var g=new Hc(f),m=new Kl([g],{width:"100%",height:Mt(d),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Zf([],[m],r),minWidth:0,height:d}}else{var y=[],x=J$e[l];if(!x)throw new Error('No SVG data for "'+l+'".');var[b,T,k]=x,w=k/1e3,C=b.length,S,E;if(C===1){if(x.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');S=["hide-tail"],E=[x[3]]}else if(C===2)S=["halfarrow-left","halfarrow-right"],E=["xMinYMin","xMaxYMin"];else if(C===3)S=["brace-left","brace-center","brace-right"],E=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+C+" children.");for(var L=0;L0&&(i.style.minWidth=Mt(a)),i},tFe=function(t,r,n,i,a){var s,o=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=St(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new rb({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new rb({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new Kl(u,{width:"100%",height:Mt(o)});s=Zf([],[h],a)}return s.height=o,s.style.height=Mt(o),s},rFe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},nFe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};RK=e=>{if(e instanceof Ds)return e;if(I$e(e)&&e.children.length===1)return RK(e.children[0])},I8=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=Wr(e.base,"accent"),r=n.base,e.base=r,i=L$e(En(e,t)),e.base=n):(n=Wr(e,"accent"),r=n.base);var a=En(r,t.havingCrampedStyle()),s=n.isShifty&&Th(r),o=0;if(s){var l,u;o=(l=(u=RK(a))==null?void 0:u.skew)!=null?l:0}var h=n.label==="\\c",f=h?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),d;if(n.isStretchy)d=sS(n,t),d=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Mt(2*o)+")",marginLeft:Mt(2*o)}:void 0}]});else{var p,g;n.label==="\\vec"?(p=CK("vec",t),g=wK.vec[1]):(p=iS({type:"textord",mode:n.mode,text:n.label},t,"textord"),p=R$e(p),p.italic=0,g=p.width,h&&(f+=p.depth)),d=St(["accent-body"],[p]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),f=a.height);var y=o;m||(y-=g/2),d.style.left=Mt(y),n.label==="\\textcircled"&&(d.style.top=".2em"),d=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:d}]})}var x=St(["mord","accent"],[d],t);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x},LK=(e,t)=>{var r=e.isStretchy?aS(e.label):new Rt("mo",[xl(e.label,e.mode)]),n=new Rt("mover",[Hn(e.base,t),r]);return n.setAttribute("accent","true"),n},aFe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));qt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=Qk(t[0]),n=!aFe.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:I8,mathmlBuilder:LK});qt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:I8,mathmlBuilder:LK});qt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=En(e.base,t),n=sS(e,t),i=e.label==="\\utilde"?.12:0,a=Sn({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return St(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=aS(e.label),n=new Rt("munder",[Hn(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});qk=e=>{var t=new Rt("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};qt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=cy(En(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;e.below&&(n=t.havingStyle(r.sub()),s=cy(En(e.below,n,t),t),s.classes.push(a+"-arrow-pad"));var o=sS(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,u=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var h;if(s){var f=-t.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=Sn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:s,shift:f}]})}else h=Sn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return St(["mrel","x-arrow"],[h],t)},mathmlBuilder(e,t){var r=aS(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=qk(Hn(e.body,t));if(e.below){var a=qk(Hn(e.below,t));n=new Rt("munderover",[r,a,i])}else n=new Rt("mover",[r,i])}else if(e.below){var s=qk(Hn(e.below,t));n=new Rt("munder",[r,s])}else n=qk(),n=new Rt("mover",[r,n]);return n}});qt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ki(i),isCharacterBox:Th(i)}},htmlBuilder:IK,mathmlBuilder:MK});cS=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};qt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:cS(t[0]),body:Ki(t[1]),isCharacterBox:Th(t[1])}}});qt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],s;n!=="\\stackrel"?s=cS(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ki(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:Th(l)}},htmlBuilder:IK,mathmlBuilder:MK});qt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:cS(t[0]),body:Ki(t[0])}},htmlBuilder(e,t){var r=ca(e.body,t,!0),n=St([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=Vo(e.body,t),n=new Rt("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});sFe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Hj=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Yj=e=>e.type==="textord"&&e.text==="@",oFe=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;qt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=cy(En(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Mt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new Rt("mrow",[Hn(e.label,t)]);return r=new Rt("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Rt("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});qt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=cy(En(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Rt("mrow",[Hn(e.fragment,t)])}});qt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Wr(t[0],"ordgroup"),i=n.body,a="",s=0;s=1114111)throw new Lt("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});DK=(e,t)=>{var r=ca(e.body,t.withColor(e.color),!1);return Ch(r)},NK=(e,t)=>{var r=Vo(e.body,t.withColor(e.color)),n=new Rt("mstyle",r);return n.setAttribute("mathcolor",e.color),n};qt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=Wr(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:Ki(i)}},htmlBuilder:DK,mathmlBuilder:NK});qt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=Wr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:DK,mathmlBuilder:NK});qt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Wr(i,"size").value}},htmlBuilder(e,t){var r=St(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Mt(Ti(e.size,t)))),r},mathmlBuilder(e,t){var r=new Rt("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Mt(Ti(e.size,t)))),r}});y8={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},OK=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Lt("Expected a control sequence",e);return t},uFe=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},PK=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};qt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(y8[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=y8[n.text]),Wr(t.parseFunction(),"internal");throw new Lt("Invalid token after macro prefix",n)}});qt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Lt("Expected a control sequence",n);for(var a=0,s,o=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),o[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Lt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Lt('Argument number "'+n.text+'" out of order');a++,o.push([])}else{if(n.text==="EOF")throw new Lt("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===y8[r]),{type:"internal",mode:t.mode}}});qt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=OK(t.gullet.popToken());t.gullet.consumeSpaces();var i=uFe(t);return PK(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});qt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=OK(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return PK(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});Qx=function(t,r,n){var i=li.math[t]&&li.math[t].replace,a=E8(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},M8=function(t,r,n,i){var a=n.havingBaseStyle(r),s=St(i.concat(a.sizingClasses(n)),[t],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},BK=function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Mt(a),t.height-=a,t.depth+=a},hFe=function(t,r,n,i,a,s){var o=Is(t,"Main-Regular",a,i),l=M8(o,r,i,s);return n&&BK(l,i,r),l},fFe=function(t,r,n,i){return Is(t,"Size"+r+"-Regular",n,i)},$K=function(t,r,n,i,a,s){var o=fFe(t,r,a,i),l=M8(St(["delimsizing","size"+r],[o],i),Fr.TEXT,i,s);return n&&BK(l,i,Fr.TEXT),l},XL=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=St(["delimsizinginner",i],[St([],[Is(t,r,n)])]);return{type:"elem",elem:a}},jL=function(t,r,n){var i=Uc["Size4-Regular"][t.charCodeAt(0)]?Uc["Size4-Regular"][t.charCodeAt(0)][4]:Uc["Size1-Regular"][t.charCodeAt(0)][4],a=new Hc("inner",C$e(t,Math.round(1e3*r))),s=new Kl([a],{width:Mt(i),height:Mt(r),style:"width:"+Mt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=Zf([],[s],n);return o.height=r,o.style.height=Mt(r),o.style.width=Mt(i),{type:"elem",elem:o}},v8=.008,Vk={type:"kern",size:-1*v8},dFe=new Set(["|","\\lvert","\\rvert","\\vert"]),pFe=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),FK=function(t,r,n,i,a,s){var o,l,u,h,f="",d=0;o=u=h=t,l=null;var p="Size1-Regular";t==="\\uparrow"?u=h="\u23D0":t==="\\Uparrow"?u=h="\u2016":t==="\\downarrow"?o=u="\u23D0":t==="\\Downarrow"?o=u="\u2016":t==="\\updownarrow"?(o="\\uparrow",u="\u23D0",h="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",u="\u2016",h="\\Downarrow"):dFe.has(t)?(u="\u2223",f="vert",d=333):pFe.has(t)?(u="\u2225",f="doublevert",d=556):t==="["||t==="\\lbrack"?(o="\u23A1",u="\u23A2",h="\u23A3",p="Size4-Regular",f="lbrack",d=667):t==="]"||t==="\\rbrack"?(o="\u23A4",u="\u23A5",h="\u23A6",p="Size4-Regular",f="rbrack",d=667):t==="\\lfloor"||t==="\u230A"?(u=o="\u23A2",h="\u23A3",p="Size4-Regular",f="lfloor",d=667):t==="\\lceil"||t==="\u2308"?(o="\u23A1",u=h="\u23A2",p="Size4-Regular",f="lceil",d=667):t==="\\rfloor"||t==="\u230B"?(u=o="\u23A5",h="\u23A6",p="Size4-Regular",f="rfloor",d=667):t==="\\rceil"||t==="\u2309"?(o="\u23A4",u=h="\u23A5",p="Size4-Regular",f="rceil",d=667):t==="("||t==="\\lparen"?(o="\u239B",u="\u239C",h="\u239D",p="Size4-Regular",f="lparen",d=875):t===")"||t==="\\rparen"?(o="\u239E",u="\u239F",h="\u23A0",p="Size4-Regular",f="rparen",d=875):t==="\\{"||t==="\\lbrace"?(o="\u23A7",l="\u23A8",h="\u23A9",u="\u23AA",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="\u23AB",l="\u23AC",h="\u23AD",u="\u23AA",p="Size4-Regular"):t==="\\lgroup"||t==="\u27EE"?(o="\u23A7",h="\u23A9",u="\u23AA",p="Size4-Regular"):t==="\\rgroup"||t==="\u27EF"?(o="\u23AB",h="\u23AD",u="\u23AA",p="Size4-Regular"):t==="\\lmoustache"||t==="\u23B0"?(o="\u23A7",h="\u23AD",u="\u23AA",p="Size4-Regular"):(t==="\\rmoustache"||t==="\u23B1")&&(o="\u23AB",h="\u23A9",u="\u23AA",p="Size4-Regular");var g=Qx(o,p,a),m=g.height+g.depth,y=Qx(u,p,a),x=y.height+y.depth,b=Qx(h,p,a),T=b.height+b.depth,k=0,w=1;if(l!==null){var C=Qx(l,p,a);k=C.height+C.depth,w=2}var S=m+T+k,E=Math.max(0,Math.ceil((r-S)/(w*x))),L=S+E*w*x,N=i.fontMetrics().axisHeight;n&&(N*=i.sizeMultiplier);var O=L/2-N,R=[];if(f.length>0){var _=L-m-T,D=Math.round(L*1e3),I=k$e(f,Math.round(_*1e3)),M=new Hc(f,I),B=Mt(d/1e3),P=Mt(D/1e3),$=new Kl([M],{width:B,height:P,viewBox:"0 0 "+d+" "+D}),G=Zf([],[$],i);G.height=D/1e3,G.style.width=B,G.style.height=P,R.push({type:"elem",elem:G})}else{if(R.push(XL(h,p,a)),R.push(Vk),l===null){var q=L-m-T+2*v8;R.push(jL(u,q,i))}else{var z=(L-m-T-k)/2+2*v8;R.push(jL(u,z,i)),R.push(Vk),R.push(XL(l,p,a)),R.push(Vk),R.push(jL(u,z,i))}R.push(Vk),R.push(XL(o,p,a))}var V=i.havingBaseStyle(Fr.TEXT),j=Sn({positionType:"bottom",positionData:O,children:R});return M8(St(["delimsizing","mult"],[j],V),Fr.TEXT,i,s)},KL=80,ZL=.08,QL=function(t,r,n,i,a){var s=w$e(t,i,n),o=new Hc(t,s),l=new Kl([o],{width:"400em",height:Mt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Zf(["hide-tail"],[l],a)},gFe=function(t,r){var n=r.havingBaseSizing(),i=WK("\\surd",t*n.sizeMultiplier,VK,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l,u,h,f;return i.type==="small"?(h=1e3+1e3*s+KL,t<1?a=1:t<1.4&&(a=.7),l=(1+s+ZL)/a,u=(1+s)/a,o=QL("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/a):i.type==="large"?(h=(1e3+KL)*Jx[i.size],u=(Jx[i.size]+s)/a,l=(Jx[i.size]+s+ZL)/a,o=QL("sqrtSize"+i.size,l,h,s,r),o.style.minWidth="1.02em",f=1/a):(l=t+s+ZL,u=t+s,h=Math.floor(1e3*t+s)+KL,o=QL("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=Mt(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},zK=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),mFe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),GK=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Jx=[0,1.2,1.8,2.4,3],qK=function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle"),zK.has(t)||GK.has(t))return $K(t,r,!1,n,i,a);if(mFe.has(t))return FK(t,Jx[r],!1,n,i,a);throw new Lt("Illegal delimiter: '"+t+"'")},yFe=[{type:"small",style:Fr.SCRIPTSCRIPT},{type:"small",style:Fr.SCRIPT},{type:"small",style:Fr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],vFe=[{type:"small",style:Fr.SCRIPTSCRIPT},{type:"small",style:Fr.SCRIPT},{type:"small",style:Fr.TEXT},{type:"stack"}],VK=[{type:"small",style:Fr.SCRIPTSCRIPT},{type:"small",style:Fr.SCRIPT},{type:"small",style:Fr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],xFe=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},WK=function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;sr)return o}return n[n.length-1]},x8=function(t,r,n,i,a,s){t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle");var o;GK.has(t)?o=yFe:zK.has(t)?o=VK:o=vFe;var l=WK(t,r,o,i);return l.type==="small"?hFe(t,l.style,n,i,a,s):l.type==="large"?$K(t,l.size,n,i,a,s):FK(t,r,n,i,a,s)},JL=function(t,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,h=Math.max(r-o,n+o),f=Math.max(h/500*l,2*h-u);return x8(t,f,!0,i,a,s)},Xj={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},bFe=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);qt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=uS(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Xj[e.funcName].size,mclass:Xj[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?St([e.mclass]):qK(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(xl(e.delim,e.mode));var r=new Rt("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Mt(Jx[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});qt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Lt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:uS(t[0],e).text,color:r}}});qt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=uS(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Wr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Kj(e);for(var r=ca(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s{Kj(e);var r=Vo(e.body,t);if(e.left!=="."){var n=new Rt("mo",[xl(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new Rt("mo",[xl(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return R8(r)}});qt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=uS(t[0],e);if(!e.parser.leftrightDepth)throw new Lt("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;return e.delim==="."?r=nb(t,[]):(r=qK(e.delim,1,t,e.mode,[]),r.isMiddle={delim:e.delim,options:t}),r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?xl("|","text"):xl(e.delim,e.mode),n=new Rt("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});hS=(e,t)=>{var r=cy(En(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,s,o=Th(e.body);if(n==="sout")a=St(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var l=Ti({number:.6,unit:"pt"},t),u=Ti({number:.35,unit:"ex"},t),h=t.havingBaseSizing();i=i/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=Mt(f/2+l);var d=Math.floor(1e3*f*i),p=b$e(d),g=new Kl([new Hc("phase",p)],{width:"400em",height:Mt(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=Zf(["hide-tail"],[g],t),a.style.height=Mt(f),s=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m,y,x=0;/box/.test(n)?(x=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(n==="colorbox"?0:x),y=m):n==="angl"?(x=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*x,y=Math.max(0,.25-r.depth)):(m=o?.2:0,y=m),a=tFe(r,n,m,y,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=Mt(x)):n==="angl"&&x!==.049&&(a.style.borderTopWidth=Mt(x),a.style.borderRightWidth=Mt(x)),s=r.depth+y,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var b;if(e.backgroundColor)b=Sn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]});else{var T=/cancel|phase/.test(n)?["svg-align"]:[];b=Sn({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:T}]})}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!o?St(["mord","cancel-lap"],[b],t):St(["mord"],[b],t)},fS=(e,t)=>{var r,n=new Rt(e.label.includes("colorbox")?"mpadded":"menclose",[Hn(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+Mt(i)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};qt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=Wr(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:hS,mathmlBuilder:fS});qt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=Wr(t[0],"color-token").color,s=Wr(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:hS,mathmlBuilder:fS});qt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});qt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:hS,mathmlBuilder:fS});qt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:hS,mathmlBuilder:fS});qt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});UK={};HK={};oo=class e{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new e(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},Go=class e{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new e(r,oo.range(this,t))}};dS=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Lt("{"+e.envName+"} can be used only in display mode.")},TFe=new Set(["gather","gather*"]);Xc=function(t,r){var n,i,a=t.body.length,s=t.hLinesBeforeRow,o=0,l=new Array(a),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var p=r.havingStyle(Fr.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var g=t.colSeparationType==="CD"?Ti({number:3,unit:"ex"},r):12*f,m=3*f,y=t.arraystretch*g,x=.7*y,b=.3*y,T=0;function k(F){for(var H=0;H0&&(T+=.25),u.push({pos:T,isDashed:F[H]})}for(k(s[0]),n=0;n0&&(O+=b,SF))for(n=0;n=o)){var te=void 0;if(i>0||t.hskipBeforeAndAfter){var de,ce;te=(de=(ce=V)==null?void 0:ce.pregap)!=null?de:d,te!==0&&(I=St(["arraycolsep"],[]),I.style.width=Mt(te),D.push(I))}var ue=[];for(n=0;n0){for(var Me=ly("hline",r,h),re=ly("hdashline",r,h),le=[{type:"elem",elem:Ie,shift:0}];u.length>0;){var oe=u.pop(),he=oe.pos-R;oe.isDashed?le.push({type:"elem",elem:re,shift:he}):le.push({type:"elem",elem:Me,shift:he})}Ie=Sn({positionType:"individualShift",children:le})}if(B.length===0)return St(["mord"],[Ie],r);var xe=Sn({positionType:"individualShift",children:B}),se=St(["tag"],[xe],r);return Ch([Ie,se])},wFe={c:"center ",l:"left ",r:"right "},jc=function(t,r){for(var n=[],i=new Rt("mtd",[],["mtr-glue"]),a=new Rt("mtd",[],["mml-eqn-num"]),s=0;s0){var g=t.cols,m="",y=!1,x=0,b=g.length;g[0].type==="separator"&&(d+="top ",x=1),g[g.length-1].type==="separator"&&(d+="bottom ",b-=1);for(var T=x;T0?"left ":"",d+=L[L.length-1].length>0?"right ":"";for(var N=1;N0&&p&&(y=1),n[g]={type:"align",align:m,pregap:y,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Yc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=lS(t[0]),n=r?[t[0]]:Wr(t[0],"ordgroup").body,i=n.map(function(s){var o=oS(s),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Lt("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Jf(e.parser,a,N8(e.envName))},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new Lt("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=Jf(e.parser,n,N8(e.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=Jf(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=lS(t[0]),n=r?[t[0]]:Wr(t[0],"ordgroup").body,i=n.map(function(o){var l=oS(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new Lt("Unknown column alignment: "+u,o)});if(i.length>1)throw new Lt("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},s=Jf(e.parser,a,"script");if(s.body.length>0&&s.body[0].length>1)throw new Lt("{subarray} can contain only one column");return s},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Jf(e.parser,t,N8(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:YK,htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){TFe.has(e.envName)&&dS(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:D8(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Jf(e.parser,t,"display")},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:YK,htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){dS(e);var t={autoTag:D8(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Jf(e.parser,t,"display")},htmlBuilder:Xc,mathmlBuilder:jc});Yc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return dS(e),cFe(e.parser)},htmlBuilder:Xc,mathmlBuilder:jc});Ee("\\nonumber","\\gdef\\@eqnsw{0}");Ee("\\notag","\\nonumber");qt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Lt(e.funcName+" valid only within array environment")}});Qj=UK;qt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new Lt("Invalid environment name",i);for(var a="",s=0;s{var r=e.font,n=t.withFont(r);return En(e.body,n)},jK=(e,t)=>{var r=e.font,n=t.withFont(r);return Hn(e.body,n)},Jj={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};qt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=Qk(t[0]),a=n;return a in Jj&&(a=Jj[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:XK,mathmlBuilder:jK});qt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:cS(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:Th(n)}}});qt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,s=r.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:XK,mathmlBuilder:jK});CFe=(e,t)=>{var r=t.style,n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var s=En(e.numer,a,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?g=3*d:g=7*d,m=t.fontMetrics().denom1):(f>0?(p=t.fontMetrics().num2,g=d):(p=t.fontMetrics().num3,g=3*d),m=t.fontMetrics().denom2);var y;if(h){var b=t.fontMetrics().axisHeight;p-s.depth-(b+.5*f){var r=new Rt("mfrac",[Hn(e.numer,t),Hn(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=Ti(e.barSize,t);r.setAttribute("linethickness",Mt(n))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Rt("mo",[new Ai(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),e.rightDelim!=null){var s=new Rt("mo",[new Ai(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return R8(i)}return r},KK=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};qt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],s,o=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",h=null;return u||n.startsWith("\\d")?h="display":n.startsWith("\\t")&&(h="text"),KK({type:"genfrac",mode:r.mode,numer:i,denom:a,continued:u,hasBarLine:s,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:CFe,mathmlBuilder:kFe});qt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});eK=["display","text","script","scriptscript"],tK=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};qt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=Qk(t[0]),s=a.type==="atom"&&a.family==="open"?tK(a.text):null,o=Qk(t[1]),l=o.type==="atom"&&o.family==="close"?tK(o.text):null,u=Wr(t[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d=null,p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var g=Wr(p.body[0],"textord");d=eK[Number(g.text)]}}else p=Wr(p,"textord"),d=eK[Number(p.text)];return KK({type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l},d)}});qt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Wr(t[0],"size").value,token:i}}});qt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=Wr(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});ZK=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?En(e.sup,t.havingStyle(r.sup()),t):En(e.sub,t.havingStyle(r.sub()),t),i=Wr(e.base,"horizBrace")):i=Wr(e,"horizBrace");var a=En(i.base,t.havingBaseStyle(Fr.DISPLAY)),s=sS(i,t),o;if(i.isOver?o=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):o=Sn({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),n){var l=St(["minner",i.isOver?"mover":"munder"],[o],t);i.isOver?o=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=Sn({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return St(["minner",i.isOver?"mover":"munder"],[o],t)},SFe=(e,t)=>{var r=aS(e.label);return new Rt(e.isOver?"mover":"munder",[Hn(e.base,t),r])};qt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:ZK,mathmlBuilder:SFe});qt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=Wr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Ki(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=ca(e.body,t,!1);return $$e(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Qf(e.body,t);return r instanceof Rt||(r=new Rt("mrow",[r])),r.setAttribute("href",e.href),r}});qt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=Wr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=e,a=Wr(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),h=0;h{var r=ca(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=St(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Qf(e.body,t)});qt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Ki(t[0]),mathml:Ki(t[1])}},htmlBuilder:(e,t)=>{var r=ca(e.html,t,!1);return Ch(r)},mathmlBuilder:(e,t)=>Qf(e.mathml,t)});e8=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new Lt("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!pK(n))throw new Lt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};qt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=Wr(r[0],"raw").string,u=l.split(","),h=0;h{var r=Ti(e.height,t),n=0;e.totalheight.number>0&&(n=Ti(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=Ti(e.width,t));var a={height:Mt(r+n)};i>0&&(a.width=Mt(i)),n>0&&(a.verticalAlign=Mt(-n));var s=new s8(e.src,e.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(e,t)=>{var r=new Rt("mglyph",[]);r.setAttribute("alt",e.alt);var n=Ti(e.height,t),i=0;if(e.totalheight.number>0&&(i=Ti(e.totalheight,t)-n,r.setAttribute("valign",Mt(-i))),r.setAttribute("height",Mt(n+i)),e.width.number>0){var a=Ti(e.width,t);r.setAttribute("width",Mt(a))}return r.setAttribute("src",e.src),r}});qt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=Wr(t[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return TK(e.dimension,t)},mathmlBuilder(e,t){var r=Ti(e.dimension,t);return new Jk(r)}});qt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=St([],[En(e.body,t)]),r=St(["inner"],[r],t)):r=St(["inner"],[En(e.body,t)]);var n=St(["fix"],[]),i=St([e.alignment],[r,n],t),a=St(["strut"]);return a.style.height=Mt(i.height+i.depth),i.depth&&(a.style.verticalAlign=Mt(-i.depth)),i.children.unshift(a),i=St(["thinbox"],[i],t),St(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Rt("mpadded",[Hn(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});qt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:s}}});qt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Lt("Mismatched "+e.funcName)}});rK=(e,t)=>{switch(t.style.size){case Fr.DISPLAY.size:return e.display;case Fr.TEXT.size:return e.text;case Fr.SCRIPT.size:return e.script;case Fr.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};qt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Ki(t[0]),text:Ki(t[1]),script:Ki(t[2]),scriptscript:Ki(t[3])}},htmlBuilder:(e,t)=>{var r=rK(e,t),n=ca(r,t,!1);return Ch(n)},mathmlBuilder:(e,t)=>{var r=rK(e,t);return Qf(r,t)}});QK=(e,t,r,n,i,a,s)=>{e=St([],[e]);var o=r&&Th(r),l,u;if(t){var h=En(t,n.havingStyle(i.sup()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=En(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s;d=Sn({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Mt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Mt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var g=e.height-s;d=Sn({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Mt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var m=e.depth+s;d=Sn({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Mt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var y=[d];if(l&&a!==0&&!o){var x=St(["mspace"],[],n);x.style.marginRight=Mt(a),y.unshift(x)}return St(["mop","op-limits"],y,n)},JK=new Set(["\\smallint"]),hy=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=Wr(e.base,"op"),i=!0):a=Wr(e,"op");var s=t.style,o=!1;s.size===Fr.DISPLAY.size&&a.symbol&&!JK.has(a.name)&&(o=!0);var l,u;if(a.symbol){var h=o?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),l=Is(a.name,h,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,f.length>0){var d=CK(f+"Size"+(o?"2":"1"),t);l=Sn({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]}),a.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(a.body){var p=ca(a.body,t,!0);p.length===1&&p[0]instanceof Ds?(l=p[0],l.classes[0]="mop"):l=St(["mop"],p,t)}else{for(var g=[],m=1;m{var r;if(e.symbol)r=new Rt("mo",[xl(e.name,e.mode)]),JK.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Rt("mo",Vo(e.body,t));else{r=new Rt("mi",[new Ai(e.name.slice(1))]);var n=new Rt("mo",[xl("\u2061","text")]);e.parentIsSupSub?r=new Rt("mrow",[r,n]):r=EK([r,n])}return r},EFe={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};qt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=EFe[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:hy,mathmlBuilder:ab});qt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ki(n)}},htmlBuilder:hy,mathmlBuilder:ab});AFe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};qt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:hy,mathmlBuilder:ab});qt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:hy,mathmlBuilder:ab});qt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=AFe[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:hy,mathmlBuilder:ab});eZ=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=Wr(e.base,"operatorname"),i=!0):a=Wr(e,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(f=>{var d="text"in f?f.text:void 0;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=ca(o,t.withFont("mathrm"),!0),u=0;u{for(var r=Vo(e.body,t.withFont("mathrm")),n=!0,i=0;ih.toText()).join("");r=[new Ai(o)]}var l=new Rt("mi",r);l.setAttribute("mathvariant","normal");var u=new Rt("mo",[xl("\u2061","text")]);return e.parentIsSupSub?new Rt("mrow",[l,u]):EK([l,u])};qt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:Ki(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:eZ,mathmlBuilder:_Fe});Ee("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");h0({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ch(ca(e.body,t,!1)):St(["mord"],ca(e.body,t,!0),t)},mathmlBuilder(e,t){return Qf(e.body,t,!0)}});qt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=En(e.body,t.havingCrampedStyle()),n=ly("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return St(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new Rt("mo",[new Ai("\u203E")]);r.setAttribute("stretchy","true");var n=new Rt("mover",[Hn(e.body,t),r]);return n.setAttribute("accent","true"),n}});qt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Ki(n)}},htmlBuilder:(e,t)=>{var r=ca(e.body,t.withPhantom(),!1);return Ch(r)},mathmlBuilder:(e,t)=>{var r=Vo(e.body,t);return new Rt("mphantom",r)}});Ee("\\hphantom","\\smash{\\phantom{#1}}");qt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=St(["inner"],[En(e.body,t.withPhantom())]),n=St(["fix"],[]);return St(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=Vo(Ki(e.body),t),n=new Rt("mphantom",r),i=new Rt("mpadded",[n]);return i.setAttribute("width","0px"),i}});qt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=Wr(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=En(e.body,t),n=Ti(e.dy,t);return Sn({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Rt("mpadded",[Hn(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});qt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});qt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=Wr(t[0],"size"),s=Wr(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&Wr(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var r=St(["mord","rule"],[],t),n=Ti(e.width,t),i=Ti(e.height,t),a=e.shift?Ti(e.shift,t):0;return r.style.borderRightWidth=Mt(n),r.style.borderTopWidth=Mt(i),r.style.bottom=Mt(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Ti(e.width,t),n=Ti(e.height,t),i=e.shift?Ti(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new Rt("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Mt(r)),s.setAttribute("height",Mt(n));var o=new Rt("mpadded",[s]);return i>=0?o.setAttribute("height",Mt(i)):(o.setAttribute("height",Mt(i)),o.setAttribute("depth",Mt(-i))),o.setAttribute("voffset",Mt(i)),o}});nK=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],RFe=(e,t)=>{var r=t.havingSize(e.size);return tZ(e.body,r,t)};qt({type:"sizing",names:nK,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:nK.indexOf(n)+1,body:a}},htmlBuilder:RFe,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=Vo(e.body,r),i=new Rt("mstyle",n);return i.setAttribute("mathsize",Mt(r.sizeMultiplier)),i}});qt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,a=!1,s=r[0]&&Wr(r[0],"ordgroup");if(s)for(var o,l=0;l{var r=St([],[En(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return St(["mord","smash"],[r],t);if(r.children)for(var n=0;n{var r=new Rt("mpadded",[Hn(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});qt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=En(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=cy(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.idr.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=Mt(h);var p=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var g=t.havingStyle(Fr.SCRIPTSCRIPT),m=En(e.index,g,t),y=.6*(p.height-p.depth),x=Sn({positionType:"shift",positionData:-y,children:[{type:"elem",elem:m}]}),b=St(["root"],[x]);return St(["mord","sqrt"],[b,p],t)}else return St(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new Rt("mroot",[Hn(r,t),Hn(n,t)]):new Rt("msqrt",[Hn(r,t)])}});b8={display:Fr.DISPLAY,text:Fr.TEXT,script:Fr.SCRIPT,scriptscript:Fr.SCRIPTSCRIPT};qt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);if(!LFe(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var r=b8[e.style],n=t.havingStyle(r);return e.resetFont&&(n=n.withFont("")),tZ(e.body,n,t)},mathmlBuilder(e,t){var r=b8[e.style],n=t.havingStyle(r);e.resetFont&&(n=n.withFont(""));var i=Vo(e.body,n),a=new Rt("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});IFe=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Fr.DISPLAY.size||n.alwaysHandleSupSub);return i?hy:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Fr.DISPLAY.size||n.limits);return a?eZ:null}else{if(n.type==="accent")return Th(n.base)?I8:null;if(n.type==="horizBrace"){var s=!t.sub;return s===n.isOver?ZK:null}else return null}else return null};h0({type:"supsub",htmlBuilder(e,t){var r=IFe(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,s=En(n,t),o,l,u=t.fontMetrics(),h=0,f=0,d=n&&Th(n);if(i){var p=t.havingStyle(t.style.sup());o=En(i,p,t),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var g=t.havingStyle(t.style.sub());l=En(a,g,t),d||(f=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}var m;t.style===Fr.DISPLAY?m=u.sup1:t.style.cramped?m=u.sup3:m=u.sup2;var y=t.sizeMultiplier,x=Mt(.5/u.ptPerEm/y),b=null;if(l){var T=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(s instanceof Ds||T){var k;b=Mt(-((k=s.italic)!=null?k:0))}}var w;if(o&&l){h=Math.max(h,m,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var C=u.defaultRuleThickness,S=4*C;if(h-o.depth-(l.height-f)0&&(h+=E,f-=E)}var L=[{type:"elem",elem:l,shift:f,marginRight:x,marginLeft:b},{type:"elem",elem:o,shift:-h,marginRight:x}];w=Sn({positionType:"individualShift",children:L})}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var N=[{type:"elem",elem:l,marginLeft:b,marginRight:x}];w=Sn({positionType:"shift",positionData:f,children:N})}else if(o)h=Math.max(h,m,o.depth+.25*u.xHeight),w=Sn({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:x}]});else throw new Error("supsub must have either sup or sub.");var O=g8(s,"right")||"mord";return St([O],[s,St(["msupsub"],[w])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[Hn(e.base,t)];e.sub&&a.push(Hn(e.sub,t)),e.sup&&a.push(Hn(e.sup,t));var s;if(r)s=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Fr.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Fr.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Fr.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Fr.DISPLAY)?s="munder":s="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Fr.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Fr.DISPLAY)?s="mover":s="msup"}return new Rt(s,a)}});h0({type:"atom",htmlBuilder(e,t){return A8(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Rt("mo",[xl(e.text,e.mode)]);if(e.family==="bin"){var n=L8(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});rZ={mi:"italic",mn:"normal",mtext:"normal"};h0({type:"mathord",htmlBuilder(e,t){return iS(e,t,"mathord")},mathmlBuilder(e,t){var r=new Rt("mi",[xl(e.text,e.mode,t)]),n=L8(e,t)||"italic";return n!==rZ[r.type]&&r.setAttribute("mathvariant",n),r}});h0({type:"textord",htmlBuilder(e,t){return iS(e,t,"textord")},mathmlBuilder(e,t){var r=xl(e.text,e.mode,t),n=L8(e,t)||"normal",i;return e.mode==="text"?i=new Rt("mtext",[r]):/[0-9]/.test(e.text)?i=new Rt("mn",[r]):e.text==="\\prime"?i=new Rt("mo",[r]):i=new Rt("mi",[r]),n!==rZ[i.type]&&i.setAttribute("mathvariant",n),i}});t8={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},r8={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};h0({type:"spacing",htmlBuilder(e,t){if(r8.hasOwnProperty(e.text)){var r=r8[e.text].className||"";if(e.mode==="text"){var n=iS(e,t,"textord");return n.classes.push(r),n}else return St(["mspace",r],[A8(e.text,e.mode,t)],t)}else{if(t8.hasOwnProperty(e.text))return St(["mspace",t8[e.text]],[],t);throw new Lt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(r8.hasOwnProperty(e.text))r=new Rt("mtext",[new Ai("\xA0")]);else{if(t8.hasOwnProperty(e.text))return new Rt("mspace");throw new Lt('Unknown type of space "'+e.text+'"')}return r}});iK=()=>{var e=new Rt("mtd",[]);return e.setAttribute("width","50%"),e};h0({type:"tag",mathmlBuilder(e,t){var r=new Rt("mtable",[new Rt("mtr",[iK(),new Rt("mtd",[Qf(e.body,t)]),iK(),new Rt("mtd",[Qf(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});aK={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},sK={"\\textbf":"textbf","\\textmd":"textmd"},MFe={"\\textit":"textit","\\textup":"textup"},oK=(e,t)=>{var r=e.font;if(r){if(aK[r])return t.withTextFontFamily(aK[r]);if(sK[r])return t.withTextFontWeight(sK[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(MFe[r])};qt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:Ki(i),font:n}},htmlBuilder(e,t){var r=oK(e,t),n=ca(e.body,r,!0);return St(["mord","text"],n,r)},mathmlBuilder(e,t){var r=oK(e,t);return Qf(e.body,r)}});qt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=En(e.body,t),n=ly("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=Sn({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return St(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new Rt("mo",[new Ai("\u203E")]);r.setAttribute("stretchy","true");var n=new Rt("munder",[Hn(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});qt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=En(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Sn({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Rt("mpadded",[Hn(e.body,t)],["vcenter"]);return new Rt("mrow",[r])}});qt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new Lt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=lK(e),n=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"\u2423":"\xA0"),Yf=kK,nZ=`[ \r + ]`,DFe="\\\\[a-zA-Z@]+",NFe="\\\\[^\uD800-\uDFFF]",OFe="("+DFe+")"+nZ+"*",PFe=`\\\\( |[ \r ]+ -?)[ \r ]*`,O8="[\u0300-\u036F]",W9e=new RegExp(O8+"+$"),U9e="("+PH+"+)|"+(V9e+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(O8+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(O8+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+q9e)+("|"+G9e+")"),Lk=class{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(U9e,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new to("EOF",new Cs(this,r,r));var i=this.tokenRegex.exec(t);if(i===null||i.index!==r)throw new kt("Unexpected character: '"+t[r]+"'",new to(t[r],new Cs(this,r,r+1)));var n=i[6]||i[3]||(i[2]?"\\ ":" ");if(this.catcodes[n]===14){var a=t.indexOf(` -`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new to(n,new Cs(this,r,this.tokenRegex.lastIndex))}},P8=class{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new kt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,i){if(i===void 0&&(i=!1),i){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}},H9e=SH;de("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});de("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});de("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});de("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});de("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});de("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");de("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});qU={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};de("\\char",function(e){var t=e.popToken(),r,i=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")i=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new kt("\\char` missing argument");i=t.text.charCodeAt(0)}else r=10;if(r){if(i=qU[t.text],i==null||i>=r)throw new kt("Invalid base-"+r+" digit "+t.text);for(var n;(n=qU[e.future().text])!=null&&n{var n=e.consumeArg().tokens;if(n.length!==1)throw new kt("\\newcommand's first argument must be a macro name");var a=n[0].text,s=e.isDefined(a);if(s&&!t)throw new kt("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new kt("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(n=e.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new kt("Invalid number of arguments: "+l);o=parseInt(l),n=e.consumeArg().tokens}return s&&i||e.macros.set(a,{tokens:n,numArgs:o}),""};de("\\newcommand",e=>X8(e,!1,!0,!1));de("\\renewcommand",e=>X8(e,!0,!1,!1));de("\\providecommand",e=>X8(e,!0,!0,!0));de("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});de("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});de("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),lf[r],Fi.math[r],Fi.text[r]),""});de("\\bgroup","{");de("\\egroup","}");de("~","\\nobreakspace");de("\\lq","`");de("\\rq","'");de("\\aa","\\r a");de("\\AA","\\r A");de("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");de("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");de("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");de("\u212C","\\mathscr{B}");de("\u2130","\\mathscr{E}");de("\u2131","\\mathscr{F}");de("\u210B","\\mathscr{H}");de("\u2110","\\mathscr{I}");de("\u2112","\\mathscr{L}");de("\u2133","\\mathscr{M}");de("\u211B","\\mathscr{R}");de("\u212D","\\mathfrak{C}");de("\u210C","\\mathfrak{H}");de("\u2128","\\mathfrak{Z}");de("\\Bbbk","\\Bbb{k}");de("\\llap","\\mathllap{\\textrm{#1}}");de("\\rlap","\\mathrlap{\\textrm{#1}}");de("\\clap","\\mathclap{\\textrm{#1}}");de("\\mathstrut","\\vphantom{(}");de("\\underbar","\\underline{\\text{#1}}");de("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');de("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");de("\\ne","\\neq");de("\u2260","\\neq");de("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");de("\u2209","\\notin");de("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");de("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");de("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");de("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");de("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");de("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");de("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");de("\u27C2","\\perp");de("\u203C","\\mathclose{!\\mkern-0.8mu!}");de("\u220C","\\notni");de("\u231C","\\ulcorner");de("\u231D","\\urcorner");de("\u231E","\\llcorner");de("\u231F","\\lrcorner");de("\xA9","\\copyright");de("\xAE","\\textregistered");de("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');de("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');de("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');de("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');de("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");de("\u22EE","\\vdots");de("\\varGamma","\\mathit{\\Gamma}");de("\\varDelta","\\mathit{\\Delta}");de("\\varTheta","\\mathit{\\Theta}");de("\\varLambda","\\mathit{\\Lambda}");de("\\varXi","\\mathit{\\Xi}");de("\\varPi","\\mathit{\\Pi}");de("\\varSigma","\\mathit{\\Sigma}");de("\\varUpsilon","\\mathit{\\Upsilon}");de("\\varPhi","\\mathit{\\Phi}");de("\\varPsi","\\mathit{\\Psi}");de("\\varOmega","\\mathit{\\Omega}");de("\\substack","\\begin{subarray}{c}#1\\end{subarray}");de("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");de("\\boxed","\\fbox{$\\displaystyle{#1}$}");de("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");de("\\implies","\\DOTSB\\;\\Longrightarrow\\;");de("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");de("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");de("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");VU={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Y9e=new Set(["bin","rel"]);de("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in VU?t=VU[r]:(r.slice(0,4)==="\\not"||r in Fi.math&&Y9e.has(Fi.math[r].group))&&(t="\\dotsb"),t});K8={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};de("\\dotso",function(e){var t=e.future().text;return t in K8?"\\ldots\\,":"\\ldots"});de("\\dotsc",function(e){var t=e.future().text;return t in K8&&t!==","?"\\ldots\\,":"\\ldots"});de("\\cdots",function(e){var t=e.future().text;return t in K8?"\\@cdots\\,":"\\@cdots"});de("\\dotsb","\\cdots");de("\\dotsm","\\cdots");de("\\dotsi","\\!\\cdots");de("\\dotsx","\\ldots\\,");de("\\DOTSI","\\relax");de("\\DOTSB","\\relax");de("\\DOTSX","\\relax");de("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");de("\\,","\\tmspace+{3mu}{.1667em}");de("\\thinspace","\\,");de("\\>","\\mskip{4mu}");de("\\:","\\tmspace+{4mu}{.2222em}");de("\\medspace","\\:");de("\\;","\\tmspace+{5mu}{.2777em}");de("\\thickspace","\\;");de("\\!","\\tmspace-{3mu}{.1667em}");de("\\negthinspace","\\!");de("\\negmedspace","\\tmspace-{4mu}{.2222em}");de("\\negthickspace","\\tmspace-{5mu}{.277em}");de("\\enspace","\\kern.5em ");de("\\enskip","\\hskip.5em\\relax");de("\\quad","\\hskip1em\\relax");de("\\qquad","\\hskip2em\\relax");de("\\tag","\\@ifstar\\tag@literal\\tag@paren");de("\\tag@paren","\\tag@literal{({#1})}");de("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new kt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});de("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");de("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");de("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");de("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");de("\\newline","\\\\\\relax");de("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");BH=St(fc["Main-Regular"][84][1]-.7*fc["Main-Regular"][65][1]);de("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+BH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");de("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+BH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");de("\\hspace","\\@ifstar\\@hspacer\\@hspace");de("\\@hspace","\\hskip #1\\relax");de("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");de("\\ordinarycolon",":");de("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");de("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');de("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');de("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');de("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');de("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');de("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');de("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');de("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');de("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');de("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');de("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');de("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');de("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');de("\u2237","\\dblcolon");de("\u2239","\\eqcolon");de("\u2254","\\coloneqq");de("\u2255","\\eqqcolon");de("\u2A74","\\Coloneqq");de("\\ratio","\\vcentcolon");de("\\coloncolon","\\dblcolon");de("\\colonequals","\\coloneqq");de("\\coloncolonequals","\\Coloneqq");de("\\equalscolon","\\eqqcolon");de("\\equalscoloncolon","\\Eqqcolon");de("\\colonminus","\\coloneq");de("\\coloncolonminus","\\Coloneq");de("\\minuscolon","\\eqcolon");de("\\minuscoloncolon","\\Eqcolon");de("\\coloncolonapprox","\\Colonapprox");de("\\coloncolonsim","\\Colonsim");de("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");de("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");de("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");de("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");de("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");de("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");de("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");de("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");de("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");de("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");de("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");de("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");de("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");de("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");de("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");de("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");de("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");de("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");de("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");de("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");de("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");de("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");de("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");de("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");de("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");de("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");de("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");de("\\imath","\\html@mathml{\\@imath}{\u0131}");de("\\jmath","\\html@mathml{\\@jmath}{\u0237}");de("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");de("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");de("\u27E6","\\llbracket");de("\u27E7","\\rrbracket");de("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");de("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");de("\u2983","\\lBrace");de("\u2984","\\rBrace");de("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");de("\u29B5","\\minuso");de("\\darr","\\downarrow");de("\\dArr","\\Downarrow");de("\\Darr","\\Downarrow");de("\\lang","\\langle");de("\\rang","\\rangle");de("\\uarr","\\uparrow");de("\\uArr","\\Uparrow");de("\\Uarr","\\Uparrow");de("\\N","\\mathbb{N}");de("\\R","\\mathbb{R}");de("\\Z","\\mathbb{Z}");de("\\alef","\\aleph");de("\\alefsym","\\aleph");de("\\Alpha","\\mathrm{A}");de("\\Beta","\\mathrm{B}");de("\\bull","\\bullet");de("\\Chi","\\mathrm{X}");de("\\clubs","\\clubsuit");de("\\cnums","\\mathbb{C}");de("\\Complex","\\mathbb{C}");de("\\Dagger","\\ddagger");de("\\diamonds","\\diamondsuit");de("\\empty","\\emptyset");de("\\Epsilon","\\mathrm{E}");de("\\Eta","\\mathrm{H}");de("\\exist","\\exists");de("\\harr","\\leftrightarrow");de("\\hArr","\\Leftrightarrow");de("\\Harr","\\Leftrightarrow");de("\\hearts","\\heartsuit");de("\\image","\\Im");de("\\infin","\\infty");de("\\Iota","\\mathrm{I}");de("\\isin","\\in");de("\\Kappa","\\mathrm{K}");de("\\larr","\\leftarrow");de("\\lArr","\\Leftarrow");de("\\Larr","\\Leftarrow");de("\\lrarr","\\leftrightarrow");de("\\lrArr","\\Leftrightarrow");de("\\Lrarr","\\Leftrightarrow");de("\\Mu","\\mathrm{M}");de("\\natnums","\\mathbb{N}");de("\\Nu","\\mathrm{N}");de("\\Omicron","\\mathrm{O}");de("\\plusmn","\\pm");de("\\rarr","\\rightarrow");de("\\rArr","\\Rightarrow");de("\\Rarr","\\Rightarrow");de("\\real","\\Re");de("\\reals","\\mathbb{R}");de("\\Reals","\\mathbb{R}");de("\\Rho","\\mathrm{P}");de("\\sdot","\\cdot");de("\\sect","\\S");de("\\spades","\\spadesuit");de("\\sub","\\subset");de("\\sube","\\subseteq");de("\\supe","\\supseteq");de("\\Tau","\\mathrm{T}");de("\\thetasym","\\vartheta");de("\\weierp","\\wp");de("\\Zeta","\\mathrm{Z}");de("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");de("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");de("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");de("\\bra","\\mathinner{\\langle{#1}|}");de("\\ket","\\mathinner{|{#1}\\rangle}");de("\\braket","\\mathinner{\\langle{#1}\\rangle}");de("\\Bra","\\left\\langle#1\\right|");de("\\Ket","\\left|#1\\right\\rangle");FH=e=>t=>{var r=t.consumeArg().tokens,i=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=f=>d=>{e&&(d.macros.set("|",s),n.length&&d.macros.set("\\|",o));var p=f;if(!f&&n.length){var g=d.future();g.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?n:i,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,h=t.expandTokens([...a,...u,...r]);return t.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};de("\\bra@ket",FH(!1));de("\\bra@set",FH(!0));de("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");de("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");de("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");de("\\angln","{\\angl n}");de("\\blue","\\textcolor{##6495ed}{#1}");de("\\orange","\\textcolor{##ffa500}{#1}");de("\\pink","\\textcolor{##ff00af}{#1}");de("\\red","\\textcolor{##df0030}{#1}");de("\\green","\\textcolor{##28ae7b}{#1}");de("\\gray","\\textcolor{gray}{#1}");de("\\purple","\\textcolor{##9d38bd}{#1}");de("\\blueA","\\textcolor{##ccfaff}{#1}");de("\\blueB","\\textcolor{##80f6ff}{#1}");de("\\blueC","\\textcolor{##63d9ea}{#1}");de("\\blueD","\\textcolor{##11accd}{#1}");de("\\blueE","\\textcolor{##0c7f99}{#1}");de("\\tealA","\\textcolor{##94fff5}{#1}");de("\\tealB","\\textcolor{##26edd5}{#1}");de("\\tealC","\\textcolor{##01d1c1}{#1}");de("\\tealD","\\textcolor{##01a995}{#1}");de("\\tealE","\\textcolor{##208170}{#1}");de("\\greenA","\\textcolor{##b6ffb0}{#1}");de("\\greenB","\\textcolor{##8af281}{#1}");de("\\greenC","\\textcolor{##74cf70}{#1}");de("\\greenD","\\textcolor{##1fab54}{#1}");de("\\greenE","\\textcolor{##0d923f}{#1}");de("\\goldA","\\textcolor{##ffd0a9}{#1}");de("\\goldB","\\textcolor{##ffbb71}{#1}");de("\\goldC","\\textcolor{##ff9c39}{#1}");de("\\goldD","\\textcolor{##e07d10}{#1}");de("\\goldE","\\textcolor{##a75a05}{#1}");de("\\redA","\\textcolor{##fca9a9}{#1}");de("\\redB","\\textcolor{##ff8482}{#1}");de("\\redC","\\textcolor{##f9685d}{#1}");de("\\redD","\\textcolor{##e84d39}{#1}");de("\\redE","\\textcolor{##bc2612}{#1}");de("\\maroonA","\\textcolor{##ffbde0}{#1}");de("\\maroonB","\\textcolor{##ff92c6}{#1}");de("\\maroonC","\\textcolor{##ed5fa6}{#1}");de("\\maroonD","\\textcolor{##ca337c}{#1}");de("\\maroonE","\\textcolor{##9e034e}{#1}");de("\\purpleA","\\textcolor{##ddd7ff}{#1}");de("\\purpleB","\\textcolor{##c6b9fc}{#1}");de("\\purpleC","\\textcolor{##aa87ff}{#1}");de("\\purpleD","\\textcolor{##7854ab}{#1}");de("\\purpleE","\\textcolor{##543b78}{#1}");de("\\mintA","\\textcolor{##f5f9e8}{#1}");de("\\mintB","\\textcolor{##edf2df}{#1}");de("\\mintC","\\textcolor{##e0e5cc}{#1}");de("\\grayA","\\textcolor{##f6f7f7}{#1}");de("\\grayB","\\textcolor{##f0f1f2}{#1}");de("\\grayC","\\textcolor{##e3e5e6}{#1}");de("\\grayD","\\textcolor{##d6d8da}{#1}");de("\\grayE","\\textcolor{##babec2}{#1}");de("\\grayF","\\textcolor{##888d93}{#1}");de("\\grayG","\\textcolor{##626569}{#1}");de("\\grayH","\\textcolor{##3b3e40}{#1}");de("\\grayI","\\textcolor{##21242c}{#1}");de("\\kaBlue","\\textcolor{##314453}{#1}");de("\\kaGreen","\\textcolor{##71B307}{#1}");$H={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},B8=class{constructor(t,r,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new P8(H9e,r.macros),this.mode=i,this.stack=[]}feed(t){this.lexer=new Lk(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,i,n;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:n,end:i}=this.consumeArg(["]"])}else({tokens:n,start:r,end:i}=this.consumeArg());return this.pushToken(new to("EOF",i.loc)),this.pushTokens(n),new to("",Cs.range(r,i))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],i=t&&t.length>0;i||this.consumeSpaces();var n=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new kt("Extra }",a)}else if(a.text==="EOF")throw new kt("Unexpected end of input in a macro argument, expected '"+(t&&i?t[o]:"}")+"'",a);if(t&&i)if((s===0||s===1&&t[o]==="{")&&a.text===t[o]){if(++o,o===t.length){r.splice(-o,o);break}}else o=0}while(s!==0||i);return n.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:n,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new kt("The length of delimiters doesn't match the number of args!");for(var i=r[0],n=0;nthis.settings.maxExpand)throw new kt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),i=r.text,n=r.noexpand?null:this._getExpansion(i);if(n==null||t&&n.unexpandable){if(t&&n==null&&i[0]==="\\"&&!this.isDefined(i))throw new kt("Undefined control sequence: "+i);return this.pushToken(r),!1}this.countExpansion(1);var a=n.tokens,s=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new kt("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new kt("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new to(t)]):void 0}expandTokens(t){var r=[],i=this.stack.length;for(this.pushTokens(t);this.stack.length>i;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),r.push(n)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(i=>i.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var i=this.lexer.catcodes[t];if(i!=null&&i!==13)return}var n=typeof r=="function"?r(this):r;if(typeof n=="string"){var a=0;if(n.includes("#"))for(var s=n.replace(/##/g,"");s.includes("#"+(a+1));)++a;for(var o=new Lk(n,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:a};return h}return n}isDefined(t){return this.macros.has(t)||lf.hasOwnProperty(t)||Fi.math.hasOwnProperty(t)||Fi.text.hasOwnProperty(t)||$H.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:lf.hasOwnProperty(t)&&!lf[t].primitive}},WU=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,vk=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),y8={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},UU={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Rk=class e{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new B8(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new kt("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new to("}")),this.gullet.pushTokens(t);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,i}parseExpression(t,r){for(var i=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(e.endOfExpression.has(n.text)||r&&n.text===r||t&&lf[n.text]&&lf[n.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;i.push(a)}return this.mode==="text"&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(t){for(var r=-1,i,n=0;n=128)this.settings.strict&&(HU(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),s={type:"textord",mode:"text",loc:Cs.range(t),text:r};else return null;if(this.consume(),a)for(var h=0;h{(function(e,t){typeof tL=="object"&&typeof rL<"u"?rL.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(tL,(function(){"use strict";var e=1e3,t=6e4,r=36e5,i="millisecond",n="second",a="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var _=["th","st","nd","rd"],R=L%100;return"["+L+(_[(R-20)%10]||_[R]||_[0])+"]"}},v=function(L,_,R){var D=String(L);return!D||D.length>=_?L:""+Array(_+1-D.length).join(R)+L},x={s:v,z:function(L){var _=-L.utcOffset(),R=Math.abs(_),D=Math.floor(R/60),I=R%60;return(_<=0?"+":"-")+v(D,2,"0")+":"+v(I,2,"0")},m:function L(_,R){if(_.date()1)return L(M[0])}else{var F=_.name;C[F]=_,I=F}return!D&&I&&(T=I),I||!D&&T},A=function(L,_){if(k(L))return L.clone();var R=typeof _=="object"?_:{};return R.date=L,R.args=arguments,new P(R)},N=x;N.l=E,N.i=k,N.w=function(L,_){return A(L,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var P=(function(){function L(R){this.$L=E(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[w]=!0}var _=L.prototype;return _.parse=function(R){this.$d=(function(D){var I=D.date,B=D.utc;if(I===null)return new Date(NaN);if(N.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var M=I.match(g);if(M){var F=M[2]-1||0,z=(M[7]||"0").substring(0,3);return B?new Date(Date.UTC(M[1],F,M[3]||1,M[4]||0,M[5]||0,M[6]||0,z)):new Date(M[1],F,M[3]||1,M[4]||0,M[5]||0,M[6]||0,z)}}return new Date(I)})(R),this.init()},_.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},_.$utils=function(){return N},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(R,D){var I=A(R);return this.startOf(D)<=I&&I<=this.endOf(D)},_.isAfter=function(R,D){return A(R){jH=ks(Vk(),1),YH=Object.defineProperty,b=(e,t)=>YH(e,"name",{value:t,configurable:!0}),gf=(e,t)=>{for(var r in t)YH(e,r,{get:t[r],enumerable:!0})},Gu={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ee={trace:b((...e)=>{},"trace"),debug:b((...e)=>{},"debug"),info:b((...e)=>{},"info"),warn:b((...e)=>{},"warn"),error:b((...e)=>{},"error"),fatal:b((...e)=>{},"fatal")},$v=b(function(e="fatal"){let t=Gu.fatal;typeof e=="string"?e.toLowerCase()in Gu&&(t=Gu[e]):typeof e=="number"&&(t=e),ee.trace=()=>{},ee.debug=()=>{},ee.info=()=>{},ee.warn=()=>{},ee.error=()=>{},ee.fatal=()=>{},t<=Gu.fatal&&(ee.fatal=console.error?console.error.bind(console,Io("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Io("FATAL"))),t<=Gu.error&&(ee.error=console.error?console.error.bind(console,Io("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Io("ERROR"))),t<=Gu.warn&&(ee.warn=console.warn?console.warn.bind(console,Io("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Io("WARN"))),t<=Gu.info&&(ee.info=console.info?console.info.bind(console,Io("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Io("INFO"))),t<=Gu.debug&&(ee.debug=console.debug?console.debug.bind(console,Io("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Io("DEBUG"))),t<=Gu.trace&&(ee.trace=console.debug?console.debug.bind(console,Io("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Io("TRACE")))},"setLogLevel"),Io=b(e=>`%c${(0,jH.default)().format("ss.SSS")} : ${e} : `,"format")});var Wk,XH,KH=q(()=>{Wk={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Wk.hue2rgb(a,n,e+.3333333333333333)*255;case"g":return Wk.hue2rgb(a,n,e)*255;case"b":return Wk.hue2rgb(a,n,e-.3333333333333333)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;let n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;let o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t{j9e={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},ZH=j9e});var X9e,JH,eY=q(()=>{X9e={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},JH=X9e});var K9e,Xt,yc=q(()=>{KH();QH();eY();K9e={channel:XH,lang:ZH,unit:JH},Xt=K9e});var qu,Pn,zv=q(()=>{yc();qu={};for(let e=0;e<=255;e++)qu[e]=Xt.unit.dec2hex(e);Pn={ALL:0,RGB:1,HSL:2}});var iL,tY,rY=q(()=>{zv();iL=class{constructor(){this.type=Pn.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Pn.ALL}is(t){return this.type===t}},tY=iL});var nL,iY,nY=q(()=>{yc();rY();zv();nL=class{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new tY}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Pn.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=Xt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Xt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=Xt.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=Xt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Xt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=Xt.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is(Pn.HSL)&&r!==void 0?r:(this._ensureHSL(),Xt.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is(Pn.HSL)&&r!==void 0?r:(this._ensureHSL(),Xt.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is(Pn.HSL)&&r!==void 0?r:(this._ensureHSL(),Xt.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is(Pn.RGB)&&r!==void 0?r:(this._ensureRGB(),Xt.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is(Pn.RGB)&&r!==void 0?r:(this._ensureRGB(),Xt.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is(Pn.RGB)&&r!==void 0?r:(this._ensureRGB(),Xt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Pn.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Pn.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Pn.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Pn.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Pn.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Pn.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},iY=nL});var Z9e,mf,Gv=q(()=>{nY();Z9e=new iY({r:0,g:0,b:0,a:0},"transparent"),mf=Z9e});var aY,mp,aL=q(()=>{Gv();zv();aY={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(aY.re);if(!t)return;let r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return mf.set({r:(i>>l*(u+3)&h)*o,g:(i>>l*(u+2)&h)*o,b:(i>>l*(u+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{let{r:t,g:r,b:i,a:n}=e;return n<1?`#${qu[Math.round(t)]}${qu[Math.round(r)]}${qu[Math.round(i)]}${qu[Math.round(n*255)]}`:`#${qu[Math.round(t)]}${qu[Math.round(r)]}${qu[Math.round(i)]}`}},mp=aY});var Uk,qv,sY=q(()=>{yc();Gv();Uk={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(Uk.hueRe);if(t){let[,r,i]=t;switch(i){case"grad":return Xt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Xt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Xt.channel.clamp.h(parseFloat(r)*360)}}return Xt.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(Uk.re);if(!r)return;let[,i,n,a,s,o]=r;return mf.set({h:Uk._hue2deg(i),s:Xt.channel.clamp.s(parseFloat(n)),l:Xt.channel.clamp.l(parseFloat(a)),a:s?Xt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{let{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${Xt.lang.round(t)}, ${Xt.lang.round(r)}%, ${Xt.lang.round(i)}%, ${n})`:`hsl(${Xt.lang.round(t)}, ${Xt.lang.round(r)}%, ${Xt.lang.round(i)}%)`}},qv=Uk});var Hk,sL,oY=q(()=>{aL();Hk={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();let t=Hk.colors[e];if(t)return mp.parse(t)},stringify:e=>{let t=mp.stringify(e);for(let r in Hk.colors)if(Hk.colors[r]===t)return r}},sL=Hk});var lY,Vv,cY=q(()=>{yc();Gv();lY={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(lY.re);if(!r)return;let[,i,n,a,s,o,l,u,h]=r;return mf.set({r:Xt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Xt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:Xt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?Xt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${Xt.lang.round(t)}, ${Xt.lang.round(r)}, ${Xt.lang.round(i)}, ${Xt.lang.round(n)})`:`rgb(${Xt.lang.round(t)}, ${Xt.lang.round(r)}, ${Xt.lang.round(i)})`}},Vv=lY});var Q9e,Bn,Vu=q(()=>{aL();sY();oY();cY();zv();Q9e={format:{keyword:sL,hex:mp,rgb:Vv,rgba:Vv,hsl:qv,hsla:qv},parse:e=>{if(typeof e!="string")return e;let t=mp.parse(e)||Vv.parse(e)||qv.parse(e)||sL.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Pn.HSL)||e.data.r===void 0?qv.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Vv.stringify(e):mp.stringify(e)},Bn=Q9e});var J9e,Yk,oL=q(()=>{yc();Vu();J9e=(e,t)=>{let r=Bn.parse(e);for(let i in t)r[i]=Xt.channel.clamp[i](t[i]);return Bn.stringify(r)},Yk=J9e});var eNe,gn,lL=q(()=>{yc();Gv();Vu();oL();eNe=(e,t,r=0,i=1)=>{if(typeof e!="number")return Yk(e,{a:t});let n=mf.set({r:Xt.channel.clamp.r(e),g:Xt.channel.clamp.g(t),b:Xt.channel.clamp.b(r),a:Xt.channel.clamp.a(i)});return Bn.stringify(n)},gn=eNe});var tNe,yp,uY=q(()=>{yc();Vu();tNe=(e,t)=>Xt.lang.round(Bn.parse(e)[t]),yp=tNe});var rNe,hY,fY=q(()=>{yc();Vu();rNe=e=>{let{r:t,g:r,b:i}=Bn.parse(e),n=.2126*Xt.channel.toLinear(t)+.7152*Xt.channel.toLinear(r)+.0722*Xt.channel.toLinear(i);return Xt.lang.round(n)},hY=rNe});var iNe,dY,pY=q(()=>{fY();iNe=e=>hY(e)>=.5,dY=iNe});var nNe,ai,gY=q(()=>{pY();nNe=e=>!dY(e),ai=nNe});var aNe,om,jk=q(()=>{yc();Vu();aNe=(e,t,r)=>{let i=Bn.parse(e),n=i[t],a=Xt.channel.clamp[t](n+r);return n!==a&&(i[t]=a),Bn.stringify(i)},om=aNe});var sNe,je,mY=q(()=>{jk();sNe=(e,t)=>om(e,"l",t),je=sNe});var oNe,Xe,yY=q(()=>{jk();oNe=(e,t)=>om(e,"l",-t),Xe=oNe});var lNe,Xk,vY=q(()=>{jk();lNe=(e,t)=>om(e,"a",-t),Xk=lNe});var cNe,ne,bY=q(()=>{Vu();oL();cNe=(e,t)=>{let r=Bn.parse(e),i={};for(let n in t)t[n]&&(i[n]=r[n]+t[n]);return Yk(e,i)},ne=cNe});var uNe,xY,TY=q(()=>{Vu();lL();uNe=(e,t,r=50)=>{let{r:i,g:n,b:a,a:s}=Bn.parse(e),{r:o,g:l,b:u,a:h}=Bn.parse(t),f=r/100,d=f*2-1,p=s-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,y=1-m,v=i*m+o*y,x=n*m+l*y,T=a*m+u*y,C=s*f+h*(1-f);return gn(v,x,T,C)},xY=uNe});var hNe,ze,wY=q(()=>{Vu();TY();hNe=(e,t=100)=>{let r=Bn.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,xY(r,e,t)},ze=hNe});var kY=q(()=>{lL();uY();gY();mY();yY();vY();bY();wY()});var Sn=q(()=>{kY()});function CY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:Uv;if(SY&&SY(e,null),!Xa(t))return e;let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){let a=r(n);a!==n&&(yNe(t)||(t[i]=a),n=a)}e[n]=!0}return e}function ENe(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:zNe(),t=Ct=>$Y(Ct);if(t.version="3.4.3",t.removed=[],!e||!e.document||e.document.nodeType!==hm.document||!e.Element)return t.isSupported=!1,t;let r=e.document,i=r,n=i.currentScript,a=e.DocumentFragment,s=e.HTMLTemplateElement,o=e.Node,l=e.Element,u=e.NodeFilter,h=e.NamedNodeMap,f=h===void 0?e.NamedNodeMap||e.MozNamedAttrMap:h,d=e.HTMLFormElement,p=e.DOMParser,g=e.trustedTypes,m=l.prototype,y=dm(m,"cloneNode"),v=dm(m,"remove"),x=dm(m,"nextSibling"),T=dm(m,"childNodes"),C=dm(m,"parentNode");if(typeof s=="function"){let Ct=r.createElement("template");Ct.content&&Ct.content.ownerDocument&&(r=Ct.content.ownerDocument)}let w,k="",E=r,A=E.implementation,N=E.createNodeIterator,P=E.createDocumentFragment,O=E.getElementsByTagName,L=i.importNode,_=PY();t.isSupported=typeof BY=="function"&&typeof C=="function"&&A&&A.createHTMLDocument!==void 0;let R=INe,D=DNe,I=NNe,B=MNe,M=ONe,F=PNe,z=BNe,$=$Ne,G=OY,U=null,j=Ir({},[...IY,...hL,...fL,...dL,...DY]),H=null,Q=Ir({},[...NY,...pL,...MY,...Zk]),Y=Object.seal(fm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,J=null,re=Object.seal(fm(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ie=!0,te=!0,xe=!1,fe=!0,Se=!1,Me=!0,ke=!1,Ce=!1,Ie=!1,Pe=!1,pe=!1,Je=!1,Te=!0,Be=!1,He="user-content-",nt=!0,qe=!1,Ue={},ge=null,ce=Ir({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),V=null,le=Ir({},["audio","video","img","source","image","track"]),X=null,he=Ir({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Z="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml",Oe=ve,Ae=!1,Fe=null,Re=Ir({},[Z,Ve,ve],uL),We=Ir({},["mi","mo","mn","ms","mtext"]),De=Ir({},["annotation-xml"]),Ye=Ir({},["title","style","font","a","script"]),ue=null,Tt=["application/xhtml+xml","text/html"],be="text/html",it=null,ft=null,Dt=r.createElement("form"),mt=function(Ee){return Ee instanceof RegExp||Ee instanceof Function},vt=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ft&&ft===Ee)return;(!Ee||typeof Ee!="object")&&(Ee={}),Ee=Ss(Ee),ue=Tt.indexOf(Ee.PARSER_MEDIA_TYPE)===-1?be:Ee.PARSER_MEDIA_TYPE,it=ue==="application/xhtml+xml"?uL:Uv,U=rn(Ee,"ALLOWED_TAGS")&&Xa(Ee.ALLOWED_TAGS)?Ir({},Ee.ALLOWED_TAGS,it):j,H=rn(Ee,"ALLOWED_ATTR")&&Xa(Ee.ALLOWED_ATTR)?Ir({},Ee.ALLOWED_ATTR,it):Q,Fe=rn(Ee,"ALLOWED_NAMESPACES")&&Xa(Ee.ALLOWED_NAMESPACES)?Ir({},Ee.ALLOWED_NAMESPACES,uL):Re,X=rn(Ee,"ADD_URI_SAFE_ATTR")&&Xa(Ee.ADD_URI_SAFE_ATTR)?Ir(Ss(he),Ee.ADD_URI_SAFE_ATTR,it):he,V=rn(Ee,"ADD_DATA_URI_TAGS")&&Xa(Ee.ADD_DATA_URI_TAGS)?Ir(Ss(le),Ee.ADD_DATA_URI_TAGS,it):le,ge=rn(Ee,"FORBID_CONTENTS")&&Xa(Ee.FORBID_CONTENTS)?Ir({},Ee.FORBID_CONTENTS,it):ce,se=rn(Ee,"FORBID_TAGS")&&Xa(Ee.FORBID_TAGS)?Ir({},Ee.FORBID_TAGS,it):Ss({}),J=rn(Ee,"FORBID_ATTR")&&Xa(Ee.FORBID_ATTR)?Ir({},Ee.FORBID_ATTR,it):Ss({}),Ue=rn(Ee,"USE_PROFILES")?Ee.USE_PROFILES&&typeof Ee.USE_PROFILES=="object"?Ss(Ee.USE_PROFILES):Ee.USE_PROFILES:!1,ie=Ee.ALLOW_ARIA_ATTR!==!1,te=Ee.ALLOW_DATA_ATTR!==!1,xe=Ee.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=Ee.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=Ee.SAFE_FOR_TEMPLATES||!1,Me=Ee.SAFE_FOR_XML!==!1,ke=Ee.WHOLE_DOCUMENT||!1,Pe=Ee.RETURN_DOM||!1,pe=Ee.RETURN_DOM_FRAGMENT||!1,Je=Ee.RETURN_TRUSTED_TYPE||!1,Ie=Ee.FORCE_BODY||!1,Te=Ee.SANITIZE_DOM!==!1,Be=Ee.SANITIZE_NAMED_PROPS||!1,nt=Ee.KEEP_CONTENT!==!1,qe=Ee.IN_PLACE||!1,G=_Ne(Ee.ALLOWED_URI_REGEXP)?Ee.ALLOWED_URI_REGEXP:OY,Oe=typeof Ee.NAMESPACE=="string"?Ee.NAMESPACE:ve,We=rn(Ee,"MATHML_TEXT_INTEGRATION_POINTS")&&Ee.MATHML_TEXT_INTEGRATION_POINTS&&typeof Ee.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ss(Ee.MATHML_TEXT_INTEGRATION_POINTS):Ir({},["mi","mo","mn","ms","mtext"]),De=rn(Ee,"HTML_INTEGRATION_POINTS")&&Ee.HTML_INTEGRATION_POINTS&&typeof Ee.HTML_INTEGRATION_POINTS=="object"?Ss(Ee.HTML_INTEGRATION_POINTS):Ir({},["annotation-xml"]);let lt=rn(Ee,"CUSTOM_ELEMENT_HANDLING")&&Ee.CUSTOM_ELEMENT_HANDLING&&typeof Ee.CUSTOM_ELEMENT_HANDLING=="object"?Ss(Ee.CUSTOM_ELEMENT_HANDLING):fm(null);if(Y=fm(null),rn(lt,"tagNameCheck")&&mt(lt.tagNameCheck)&&(Y.tagNameCheck=lt.tagNameCheck),rn(lt,"attributeNameCheck")&&mt(lt.attributeNameCheck)&&(Y.attributeNameCheck=lt.attributeNameCheck),rn(lt,"allowCustomizedBuiltInElements")&&typeof lt.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=lt.allowCustomizedBuiltInElements),Se&&(te=!1),pe&&(Pe=!0),Ue&&(U=Ir({},DY),H=fm(null),Ue.html===!0&&(Ir(U,IY),Ir(H,NY)),Ue.svg===!0&&(Ir(U,hL),Ir(H,pL),Ir(H,Zk)),Ue.svgFilters===!0&&(Ir(U,fL),Ir(H,pL),Ir(H,Zk)),Ue.mathMl===!0&&(Ir(U,dL),Ir(H,MY),Ir(H,Zk))),re.tagCheck=null,re.attributeCheck=null,rn(Ee,"ADD_TAGS")&&(typeof Ee.ADD_TAGS=="function"?re.tagCheck=Ee.ADD_TAGS:Xa(Ee.ADD_TAGS)&&(U===j&&(U=Ss(U)),Ir(U,Ee.ADD_TAGS,it))),rn(Ee,"ADD_ATTR")&&(typeof Ee.ADD_ATTR=="function"?re.attributeCheck=Ee.ADD_ATTR:Xa(Ee.ADD_ATTR)&&(H===Q&&(H=Ss(H)),Ir(H,Ee.ADD_ATTR,it))),rn(Ee,"ADD_URI_SAFE_ATTR")&&Xa(Ee.ADD_URI_SAFE_ATTR)&&Ir(X,Ee.ADD_URI_SAFE_ATTR,it),rn(Ee,"FORBID_CONTENTS")&&Xa(Ee.FORBID_CONTENTS)&&(ge===ce&&(ge=Ss(ge)),Ir(ge,Ee.FORBID_CONTENTS,it)),rn(Ee,"ADD_FORBID_CONTENTS")&&Xa(Ee.ADD_FORBID_CONTENTS)&&(ge===ce&&(ge=Ss(ge)),Ir(ge,Ee.ADD_FORBID_CONTENTS,it)),nt&&(U["#text"]=!0),ke&&Ir(U,["html","head","body"]),U.table&&(Ir(U,["tbody"]),delete se.tbody),Ee.TRUSTED_TYPES_POLICY){if(typeof Ee.TRUSTED_TYPES_POLICY.createHTML!="function")throw Kk('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ee.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Kk('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=Ee.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else w===void 0&&(w=GNe(g,n)),w!==null&&typeof k=="string"&&(k=w.createHTML(""));Ka&&Ka(Ee),ft=Ee},ut=Ir({},[...hL,...fL,...LNe]),oe=Ir({},[...dL,...RNe]),ot=function(Ee){let lt=C(Ee);(!lt||!lt.tagName)&&(lt={namespaceURI:Oe,tagName:"template"});let bt=Uv(Ee.tagName),Cr=Uv(lt.tagName);return Fe[Ee.namespaceURI]?Ee.namespaceURI===Ve?lt.namespaceURI===ve?bt==="svg":lt.namespaceURI===Z?bt==="svg"&&(Cr==="annotation-xml"||We[Cr]):!!ut[bt]:Ee.namespaceURI===Z?lt.namespaceURI===ve?bt==="math":lt.namespaceURI===Ve?bt==="math"&&De[Cr]:!!oe[bt]:Ee.namespaceURI===ve?lt.namespaceURI===Ve&&!De[Cr]||lt.namespaceURI===Z&&!We[Cr]?!1:!oe[bt]&&(Ye[bt]||!ut[bt]):!!(ue==="application/xhtml+xml"&&Fe[Ee.namespaceURI]):!1},ct=function(Ee){cm(t.removed,{element:Ee});try{C(Ee).removeChild(Ee)}catch{v(Ee)}},et=function(Ee,lt){try{cm(t.removed,{attribute:lt.getAttributeNode(Ee),from:lt})}catch{cm(t.removed,{attribute:null,from:lt})}if(lt.removeAttribute(Ee),Ee==="is")if(Pe||pe)try{ct(lt)}catch{}else try{lt.setAttribute(Ee,"")}catch{}},me=function(Ee){let lt=null,bt=null;if(Ie)Ee=""+Ee;else{let wr=AY(Ee,/^[\r\n\t ]+/);bt=wr&&wr[0]}ue==="application/xhtml+xml"&&Oe===ve&&(Ee=''+Ee+"");let Cr=w?w.createHTML(Ee):Ee;if(Oe===ve)try{lt=new p().parseFromString(Cr,ue)}catch{}if(!lt||!lt.documentElement){lt=A.createDocument(Oe,"template",null);try{lt.documentElement.innerHTML=Ae?k:Cr}catch{}}let mi=lt.body||lt.documentElement;return Ee&&bt&&mi.insertBefore(r.createTextNode(bt),mi.childNodes[0]||null),Oe===ve?O.call(lt,ke?"html":"body")[0]:ke?lt.documentElement:mi},Ze=function(Ee){return N.call(Ee.ownerDocument||Ee,Ee,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},rt=function(Ee){return Ee instanceof d&&(typeof Ee.nodeName!="string"||typeof Ee.textContent!="string"||typeof Ee.removeChild!="function"||!(Ee.attributes instanceof f)||typeof Ee.removeAttribute!="function"||typeof Ee.setAttribute!="function"||typeof Ee.namespaceURI!="string"||typeof Ee.insertBefore!="function"||typeof Ee.hasChildNodes!="function")},at=function(Ee){return typeof o=="function"&&Ee instanceof o};function _t(Ct,Ee,lt){lm(Ct,bt=>{bt.call(t,Ee,lt,ft)})}let At=function(Ee){let lt=null;if(_t(_.beforeSanitizeElements,Ee,null),rt(Ee))return ct(Ee),!0;let bt=it(Ee.nodeName);if(_t(_.uponSanitizeElement,Ee,{tagName:bt,allowedTags:U}),Me&&Ee.hasChildNodes()&&!at(Ee.firstElementChild)&&ua(/<[/\w!]/g,Ee.innerHTML)&&ua(/<[/\w!]/g,Ee.textContent)||Me&&Ee.namespaceURI===ve&&bt==="style"&&at(Ee.firstElementChild)||Ee.nodeType===hm.progressingInstruction||Me&&Ee.nodeType===hm.comment&&ua(/<[/\w]/g,Ee.data))return ct(Ee),!0;if(se[bt]||!(re.tagCheck instanceof Function&&re.tagCheck(bt))&&!U[bt]){if(!se[bt]&&Yt(bt)&&(Y.tagNameCheck instanceof RegExp&&ua(Y.tagNameCheck,bt)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(bt)))return!1;if(nt&&!ge[bt]){let Cr=C(Ee)||Ee.parentNode,mi=T(Ee)||Ee.childNodes;if(mi&&Cr){let wr=mi.length;for(let Ft=wr-1;Ft>=0;--Ft){let yt=y(mi[Ft],!0);Cr.insertBefore(yt,x(Ee))}}}return ct(Ee),!0}return Ee instanceof l&&!ot(Ee)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&ua(/<\/no(script|embed|frames)/i,Ee.innerHTML)?(ct(Ee),!0):(Se&&Ee.nodeType===hm.text&&(lt=Ee.textContent,lm([R,D,I],Cr=>{lt=um(lt,Cr," ")}),Ee.textContent!==lt&&(cm(t.removed,{element:Ee.cloneNode()}),Ee.textContent=lt)),_t(_.afterSanitizeElements,Ee,null),!1)},Mt=function(Ee,lt,bt){if(J[lt]||Te&&(lt==="id"||lt==="name")&&(bt in r||bt in Dt))return!1;let Cr=H[lt]||re.attributeCheck instanceof Function&&re.attributeCheck(lt,Ee);if(!(te&&!J[lt]&&ua(B,lt))){if(!(ie&&ua(M,lt))){if(!Cr||J[lt]){if(!(Yt(Ee)&&(Y.tagNameCheck instanceof RegExp&&ua(Y.tagNameCheck,Ee)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Ee))&&(Y.attributeNameCheck instanceof RegExp&&ua(Y.attributeNameCheck,lt)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(lt,Ee))||lt==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&ua(Y.tagNameCheck,bt)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(bt))))return!1}else if(!X[lt]){if(!ua(G,um(bt,z,""))){if(!((lt==="src"||lt==="xlink:href"||lt==="href")&&Ee!=="script"&&_Y(bt,"data:")===0&&V[Ee])){if(!(xe&&!ua(F,um(bt,z,"")))){if(bt)return!1}}}}}}return!0},ur=Ir({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Yt=function(Ee){return!ur[Uv(Ee)]&&ua($,Ee)},Vt=function(Ee){_t(_.beforeSanitizeAttributes,Ee,null);let lt=Ee.attributes;if(!lt||rt(Ee))return;let bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0},Cr=lt.length;for(;Cr--;){let mi=lt[Cr],wr=mi.name,Ft=mi.namespaceURI,yt=mi.value,Et=it(wr),$t=yt,dt=wr==="value"?$t:wNe($t);if(bt.attrName=Et,bt.attrValue=dt,bt.keepAttr=!0,bt.forceKeepAttr=void 0,_t(_.uponSanitizeAttribute,Ee,bt),dt=bt.attrValue,Be&&(Et==="id"||Et==="name")&&_Y(dt,He)!==0&&(et(wr,Ee),dt=He+dt),Me&&ua(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,dt)){et(wr,Ee);continue}if(Et==="attributename"&&AY(dt,"href")){et(wr,Ee);continue}if(bt.forceKeepAttr)continue;if(!bt.keepAttr){et(wr,Ee);continue}if(!fe&&ua(/\/>/i,dt)){et(wr,Ee);continue}Se&&lm([R,D,I],ye=>{dt=um(dt,ye," ")});let qr=it(Ee.nodeName);if(!Mt(qr,Et,dt)){et(wr,Ee);continue}if(w&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Ft)switch(g.getAttributeType(qr,Et)){case"TrustedHTML":{dt=w.createHTML(dt);break}case"TrustedScriptURL":{dt=w.createScriptURL(dt);break}}if(dt!==$t)try{Ft?Ee.setAttributeNS(Ft,wr,dt):Ee.setAttribute(wr,dt),rt(Ee)?ct(Ee):EY(t.removed)}catch{et(wr,Ee)}}_t(_.afterSanitizeAttributes,Ee,null)},Jt=function(Ee){let lt=null,bt=Ze(Ee);for(_t(_.beforeSanitizeShadowDOM,Ee,null);lt=bt.nextNode();)_t(_.uponSanitizeShadowNode,lt,null),At(lt),Vt(lt),lt.content instanceof a&&Jt(lt.content);_t(_.afterSanitizeShadowDOM,Ee,null)},cr=function(Ee){if(Ee.nodeType===hm.element&&Ee.shadowRoot instanceof a){let Cr=Ee.shadowRoot;cr(Cr),Jt(Cr)}let lt=Ee.childNodes;if(!lt)return;let bt=[];lm(lt,Cr=>{cm(bt,Cr)});for(let Cr of bt)cr(Cr)};return t.sanitize=function(Ct){let Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=null,bt=null,Cr=null,mi=null;if(Ae=!Ct,Ae&&(Ct=""),typeof Ct!="string"&&!at(Ct)&&(Ct=ANe(Ct),typeof Ct!="string"))throw Kk("dirty is not a string, aborting");if(!t.isSupported)return Ct;if(Ce||vt(Ee),t.removed=[],typeof Ct=="string"&&(qe=!1),qe){let yt=Ct.nodeName;if(typeof yt=="string"){let Et=it(yt);if(!U[Et]||se[Et])throw Kk("root node is forbidden and cannot be sanitized in-place")}cr(Ct)}else if(Ct instanceof o)lt=me(""),bt=lt.ownerDocument.importNode(Ct,!0),bt.nodeType===hm.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?lt=bt:lt.appendChild(bt),cr(bt);else{if(!Pe&&!Se&&!ke&&Ct.indexOf("<")===-1)return w&&Je?w.createHTML(Ct):Ct;if(lt=me(Ct),!lt)return Pe?null:Je?k:""}lt&&Ie&&ct(lt.firstChild);let wr=Ze(qe?Ct:lt);for(;Cr=wr.nextNode();)At(Cr),Vt(Cr),Cr.content instanceof a&&Jt(Cr.content);if(qe)return Ct;if(Pe){if(Se){lt.normalize();let yt=lt.innerHTML;lm([R,D,I],Et=>{yt=um(yt,Et," ")}),lt.innerHTML=yt}if(pe)for(mi=P.call(lt.ownerDocument);lt.firstChild;)mi.appendChild(lt.firstChild);else mi=lt;return(H.shadowroot||H.shadowrootmode)&&(mi=L.call(i,mi,!0)),mi}let Ft=ke?lt.outerHTML:lt.innerHTML;return ke&&U["!doctype"]&<.ownerDocument&<.ownerDocument.doctype&<.ownerDocument.doctype.name&&ua(FNe,lt.ownerDocument.doctype.name)&&(Ft=" -`+Ft),Se&&lm([R,D,I],yt=>{Ft=um(Ft,yt," ")}),w&&Je?w.createHTML(Ft):Ft},t.setConfig=function(){let Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vt(Ct),Ce=!0},t.clearConfig=function(){ft=null,Ce=!1},t.isValidAttribute=function(Ct,Ee,lt){ft||vt({});let bt=it(Ct),Cr=it(Ee);return Mt(bt,Cr,lt)},t.addHook=function(Ct,Ee){typeof Ee=="function"&&cm(_[Ct],Ee)},t.removeHook=function(Ct,Ee){if(Ee!==void 0){let lt=xNe(_[Ct],Ee);return lt===-1?void 0:TNe(_[Ct],lt,1)[0]}return EY(_[Ct])},t.removeHooks=function(Ct){_[Ct]=[]},t.removeAllHooks=function(){_=PY()},t}var BY,SY,yNe,vNe,bNe,Ka,Do,fm,FY,gL,mL,lm,xNe,EY,cm,TNe,Xa,Uv,uL,AY,um,_Y,wNe,kNe,CNe,LY,RY,rn,Wv,ua,Kk,IY,hL,fL,LNe,dL,RNe,DY,NY,pL,MY,Zk,INe,DNe,NNe,MNe,ONe,OY,PNe,BNe,FNe,$Ne,hm,zNe,GNe,PY,No,Hv=q(()=>{BY=Object.entries,SY=Object.setPrototypeOf,yNe=Object.isFrozen,vNe=Object.getPrototypeOf,bNe=Object.getOwnPropertyDescriptor,Ka=Object.freeze,Do=Object.seal,fm=Object.create,FY=typeof Reflect<"u"&&Reflect,gL=FY.apply,mL=FY.construct;Ka||(Ka=function(t){return t});Do||(Do=function(t){return t});gL||(gL=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a1?r-1:0),n=1;n"u"?null:En(BigInt.prototype.toString),RY=typeof Symbol>"u"?null:En(Symbol.prototype.toString),rn=En(Object.prototype.hasOwnProperty),Wv=En(Object.prototype.toString),ua=En(RegExp.prototype.test),Kk=SNe(TypeError);IY=Ka(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hL=Ka(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fL=Ka(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),LNe=Ka(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dL=Ka(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),RNe=Ka(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),DY=Ka(["#text"]),NY=Ka(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pL=Ka(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),MY=Ka(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zk=Ka(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),INe=Do(/{{[\w\W]*|^[\w\W]*}}/g),DNe=Do(/<%[\w\W]*|^[\w\W]*%>/g),NNe=Do(/\${[\w\W]*/g),MNe=Do(/^data-[\-\w.\u00B7-\uFFFF]+$/),ONe=Do(/^aria-[\-\w]+$/),OY=Do(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PNe=Do(/^(?:\w+script|data):/i),BNe=Do(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),FNe=Do(/^html$/i),$Ne=Do(/^[a-z][.\w]*(-[.\w]+)+$/i),hm={element:1,text:3,progressingInstruction:7,comment:8,document:9},zNe=function(){return typeof window>"u"?null:window},GNe=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));let a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},PY=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};No=$Y()});function rj(){let e="data-temp-href-target";No.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),No.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}function n4(e){return[...e.cssRules].map(t=>t.cssText).join(` -`)}var bL,pm,qNe,xL,yf,Xv,r4,WY,UY,yL,Di,bc,xc,hr,VNe,WNe,UNe,HNe,YNe,yl,jNe,XNe,KNe,ZNe,QNe,JNe,eMe,tMe,rMe,iMe,nMe,aMe,sMe,oMe,lMe,cMe,vc,Za,HY,YY,uMe,rr,jv,TL,bp,vl,Es,e4,vp,Yv,i4,jY,XY,KY,wL,kL,It,ZY,QY,Kv,hMe,zY,JY,ej,tj,Hr,xp,fMe,dMe,ij,GY,mr,pMe,gMe,mMe,yMe,nj,Tp,vMe,bMe,Tc,vL,xMe,TMe,qY,Qk,zi,gm,wMe,mm,ht,kMe,CMe,Mr,wc,Jk,SMe,EMe,aj,a4,CL,SL,EL,AL,fr,yr,vr,br,xr,kr,Tr,VY,AMe,we,Zv,s4,o4,Qv,_Me,t4,Jv,l4,LMe,Er=q(()=>{er();Sn();Sn();Sn();Sn();Sn();Sn();Sn();Sn();Sn();Sn();Sn();Sn();Hv();bL=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,pm=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,qNe=/\s*%%.*\n/gm,xL=class extends Error{static{b(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},yf={},Xv=b(function(e,t){e=e.replace(bL,"").replace(pm,"").replace(qNe,` -`);for(let[r,{detector:i}]of Object.entries(yf))if(i(e,t))return r;throw new xL(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),r4=b((...e)=>{for(let{id:t,detector:r,loader:i}of e)WY(t,r,i)},"registerLazyLoadedDiagrams"),WY=b((e,t,r)=>{yf[e]&&ee.warn(`Detector with key ${e} already exists. Overwriting.`),yf[e]={detector:t,loader:r},ee.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),UY=b(e=>yf[e].loader,"getDiagramLoader"),yL=b((e,t,{depth:r=2,clobber:i=!1}={})=>{let n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>yL(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=yL(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Di=yL,bc="#ffffff",xc="#f2f2f2",hr=b((e,t)=>t?ne(e,{s:-40,l:10}):ne(e,{s:-40,l:-10}),"mkBorder"),VNe=class{static{b(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||je(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Xe(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Xe(this.mainBkg,10)):(this.rowOdd=this.rowOdd||je(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||je(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ne(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ne(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},WNe=b(e=>{let t=new VNe;return t.calculate(e),t},"getThemeVariables"),UNe=class{static{b(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=je(this.primaryColor,16),this.tertiaryColor=ne(this.primaryColor,{h:-160}),this.primaryBorderColor=ze(this.background),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.tertiaryColor),this.lineColor=ze(this.background),this.textColor=ze(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=je(ze("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=gn(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=Xe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Xe(this.sectionBkgColor,10),this.taskBorderColor=gn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=gn(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||je(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Xe(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=je(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=je(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=je(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=ze(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ne(this.primaryColor,{h:64}),this.fillType3=ne(this.secondaryColor,{h:64}),this.fillType4=ne(this.primaryColor,{h:-64}),this.fillType5=ne(this.secondaryColor,{h:-64}),this.fillType6=ne(this.primaryColor,{h:128}),this.fillType7=ne(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ne(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ne(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},HNe=b(e=>{let t=new UNe;return t.calculate(e),t},"getThemeVariables"),YNe=class{static{b(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ne(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ne(this.primaryColor,{h:-160}),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.tertiaryColor),this.lineColor=ze(this.background),this.textColor=ze(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=gn(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ne(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ne(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Xe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Xe(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}let t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},yl=b(e=>{let t=new YNe;return t.calculate(e),t},"getThemeVariables"),jNe=class{static{b(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=je("#cde498",10),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.primaryColor),this.lineColor=ze(this.background),this.textColor=ze(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=Xe(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ne(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ne(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Xe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Xe(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},XNe=b(e=>{let t=new jNe;return t.calculate(e),t},"getThemeVariables"),KNe=class{static{b(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=je(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ne(this.primaryColor,{h:-160}),this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.tertiaryColor),this.lineColor=ze(this.background),this.textColor=ze(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||je(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=je(this.contrast,55),this.border2=this.contrast,this.actorBorder=je(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},ZNe=b(e=>{let t=new KNe;return t.calculate(e),t},"getThemeVariables"),QNe=class{static{b(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor);let e="#ECECFE",t="#E9E9F1",r=ne(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||je(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||ne(e,{h:30}),this.cScale4=this.cScale4||ne(e,{h:60}),this.cScale5=this.cScale5||ne(e,{h:90}),this.cScale6=this.cScale6||ne(e,{h:120}),this.cScale7=this.cScale7||ne(e,{h:150}),this.cScale8=this.cScale8||ne(e,{h:210,l:150}),this.cScale9=this.cScale9||ne(e,{h:270}),this.cScale10=this.cScale10||ne(e,{h:300}),this.cScale11=this.cScale11||ne(e,{h:330}),this.darkMode)for(let n=0;n{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},JNe=b(e=>{let t=new QNe;return t.calculate(e),t},"getThemeVariables"),eMe=class{static{b(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=je(this.primaryColor,16),this.tertiaryColor=ne(this.primaryColor,{h:-160}),this.primaryBorderColor=ze(this.background),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=je(ze("#323D47"),10),this.border1="#ccc",this.border2=gn(255,255,255,.25),this.arrowheadColor=ze(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||je(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ne(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ne(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},tMe=b(e=>{let t=new eMe;return t.calculate(e),t},"getThemeVariables"),rMe=class{static{b(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=hr("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor);let e="#ECECFE",t="#E9E9F1",r=ne(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||je(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let n=0;n{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},iMe=b(e=>{let t=new rMe;return t.calculate(e),t},"getThemeVariables"),nMe=class{static{b(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=je(this.primaryColor,16),this.tertiaryColor=ne(this.primaryColor,{h:-160}),this.primaryBorderColor=ze(this.background),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=je(ze("#323D47"),10),this.border1="#ccc",this.border2=gn(255,255,255,.25),this.arrowheadColor=ze(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||je(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ne(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ne(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},aMe=b(e=>{let t=new nMe;return t.calculate(e),t},"getThemeVariables"),sMe=class{static{b(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=hr(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor);let e="#ECECFE",t="#E9E9F1",r=ne(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||je(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let n=0;n{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},oMe=b(e=>{let t=new sMe;return t.calculate(e),t},"getThemeVariables"),lMe=class{static{b(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=je(this.primaryColor,16),this.tertiaryColor=ne(this.primaryColor,{h:-160}),this.primaryBorderColor=ze(this.background),this.secondaryBorderColor=hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=hr(this.tertiaryColor,this.darkMode),this.primaryTextColor=ze(this.primaryColor),this.secondaryTextColor=ze(this.secondaryColor),this.tertiaryTextColor=ze(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=je(ze("#323D47"),10),this.border1="#ccc",this.border2=gn(255,255,255,.25),this.arrowheadColor=ze(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||hr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||hr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||hr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||hr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||ze(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ze(this.tertiaryColor),this.lineColor=this.lineColor||ze(this.background),this.arrowheadColor=this.arrowheadColor||ze(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Xe(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Xe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ze(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||je(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},cMe=b(e=>{let t=new lMe;return t.calculate(e),t},"getThemeVariables"),vc={base:{getThemeVariables:WNe},dark:{getThemeVariables:HNe},default:{getThemeVariables:yl},forest:{getThemeVariables:XNe},neutral:{getThemeVariables:ZNe},neo:{getThemeVariables:JNe},"neo-dark":{getThemeVariables:tMe},redux:{getThemeVariables:iMe},"redux-dark":{getThemeVariables:aMe},"redux-color":{getThemeVariables:oMe},"redux-dark-color":{getThemeVariables:cMe}},Za={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},HY={...Za,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:vc.default.getThemeVariables(),sequence:{...Za.sequence,messageFont:b(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:b(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:b(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Za.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Za.c4,useWidth:void 0,personFont:b(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Za.flowchart,inheritDir:!1},external_personFont:b(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:b(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:b(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:b(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:b(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:b(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:b(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:b(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:b(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:b(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:b(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:b(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:b(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:b(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:b(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:b(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:b(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:b(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:b(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:b(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:b(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Za.pie,useWidth:984},xyChart:{...Za.xyChart,useWidth:void 0},requirement:{...Za.requirement,useWidth:void 0},packet:{...Za.packet},eventmodeling:{...Za.eventmodeling},treeView:{...Za.treeView,useWidth:void 0},radar:{...Za.radar},ishikawa:{...Za.ishikawa},sankey:{...Za.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Za.venn}},YY=b((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...YY(e[i],"")]:[...r,t+i],[]),"keyify"),uMe=new Set(YY(HY,"")),rr=HY,jv=b(e=>{if(ee.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>jv(t));return}for(let t of Object.keys(e)){if(ee.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!uMe.has(t)||e[t]==null){ee.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){let i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(let n of Object.keys(e[t]))(typeof e[t][n]!="string"||!i.test(e[t][n]))&&(ee.debug("sanitize deleting invalid color:",n,e[t][n]),delete e[t][n])}else ee.debug("sanitizing object",t),jv(e[t]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)t.includes(i)&&(ee.debug("sanitizing css option",t),e[t]=TL(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}ee.debug("After sanitization",e)}},"sanitizeDirective"),TL=b(e=>{let t=0,r=0;for(let i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Es=Di({},bp),vp=[],Yv=Di({},bp),i4=b((e,t)=>{let r=Di({},e),i={};for(let n of t)ZY(n),i=Di(i,n);if(r=Di(r,i),i.theme&&i.theme in vc){let n=Di({},e4),a=Di(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in vc&&(r.themeVariables=vc[r.theme].getThemeVariables(a))}return Yv=r,ej(Yv),Yv},"updateCurrentConfig"),jY=b(e=>(Es=Di({},bp),Es=Di(Es,e),e.theme&&vc[e.theme]&&(Es.themeVariables=vc[e.theme].getThemeVariables(e.themeVariables)),i4(Es,vp),Es),"setSiteConfig"),XY=b(e=>{e4=Di({},e)},"saveConfigFromInitialize"),KY=b(e=>(Es=Di(Es,e),i4(Es,vp),Es),"updateSiteConfig"),wL=b(()=>Di({},Es),"getSiteConfig"),kL=b(e=>(ej(e),Di(Yv,e),It()),"setConfig"),It=b(()=>Di({},Yv),"getConfig"),ZY=b(e=>{e&&(["secure",...Es.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(ee.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&ZY(e[t])}))},"sanitize"),QY=b(e=>{jv(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),vp.push(e),i4(Es,vp)},"addDirective"),Kv=b((e=Es)=>{vp=[],i4(e,vp)},"reset"),hMe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},zY={},JY=b(e=>{zY[e]||(ee.warn(hMe[e]),zY[e]=!0)},"issueWarning"),ej=b(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&JY("LAZY_LOAD_DEPRECATED")},"checkConfig"),tj=b(()=>{let e={};e4&&(e=Di(e,e4));for(let t of vp)e=Di(e,t);return e},"getUserDefinedConfig"),Hr=b(e=>(e.flowchart?.htmlLabels!=null&&JY("FLOWCHART_HTML_LABELS_DEPRECATED"),vl(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),xp=//gi,fMe=b(e=>e?nj(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),dMe=(()=>{let e=!1;return()=>{e||(rj(),e=!0)}})();b(rj,"setupDompurifyHooks");ij=b(e=>(dMe(),No.sanitize(e)),"removeScript"),GY=b((e,t)=>{if(Hr(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=ij(e):r!=="loose"&&(e=nj(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=yMe(e))}return e},"sanitizeMore"),mr=b((e,t)=>e&&(t.dompurifyConfig?e=No.sanitize(GY(e,t),t.dompurifyConfig).toString():e=No.sanitize(GY(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),pMe=b((e,t)=>typeof e=="string"?mr(e,t):e.flat().map(r=>mr(r,t)),"sanitizeTextOrArray"),gMe=b(e=>xp.test(e),"hasBreaks"),mMe=b(e=>e.split(xp),"splitBreaks"),yMe=b(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),nj=b(e=>e.replace(xp,"#br#"),"breakToPlaceholder"),Tp=b(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),vMe=b(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),bMe=b(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Tc=b(function(e){let t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),xMe=b((e,t)=>{let r=vL(e,"~"),i=vL(t,"~");return r===1&&i===1},"shouldCombineSets"),TMe=b(e=>{let t=vL(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let i=[...e],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),qY=b(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Qk=/\$\$(.*)\$\$/g,zi=b(e=>(e.match(Qk)?.length??0)>0,"hasKatex"),gm=b(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await mm(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),wMe=b(async(e,t)=>{if(!zi(e))return e;if(!(qY()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Qk,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(eL(),HH)),i=t.forceLegacyMathML||!qY()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(xp).map(n=>zi(n)?`
${n}
`:`
${n}
`).join("").replace(Qk,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}return e.replace(Qk,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),mm=b(async(e,t)=>mr(await wMe(e,t),t),"renderKatexSanitized"),ht={getRows:fMe,sanitizeText:mr,sanitizeTextOrArray:pMe,hasBreaks:gMe,splitBreaks:mMe,lineBreakRegex:xp,removeScript:ij,getUrl:Tp,evaluate:vl,getMax:vMe,getMin:bMe},kMe=b(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),CMe=b(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Mr=b(function(e,t,r,i){let n=CMe(t,r,i);kMe(e,n)},"configureSvgSize"),wc=b(function(e,t,r,i){let n=t.node().getBBox(),a=n.width,s=n.height;ee.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;ee.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,ee.info(`Calculated bounds: ${o}x${l}`),Mr(t,l,o,i);let u=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",u)},"setupGraphViewbox"),Jk={};b(n4,"cssStyleSheetToString");SMe=b((e,t,r,i)=>{let n="";return e in Jk&&Jk[e]?n=Jk[e]({...r,svgId:i}):ee.warn(`No theme found for ${e}`),` & { +?)[ \r ]*`,T8="[\u0300-\u036F]",BFe=new RegExp(T8+"+$"),$Fe="("+nZ+"+)|"+(PFe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(T8+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(T8+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+OFe)+("|"+NFe+")"),tS=class{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp($Fe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Go("EOF",new oo(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new Lt("Unexpected character: '"+t[r]+"'",new Go(t[r],new oo(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new Go(i,new oo(this,r,this.tokenRegex.lastIndex))}},w8=class{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Lt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}},FFe=HK;Ee("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});Ee("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});Ee("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});Ee("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});Ee("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});Ee("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Ee("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});cK={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Ee("\\char",function(e){var t=e.popToken(),r,n=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Lt("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=cK[t.text],n==null||n>=r)throw new Lt("Invalid base-"+r+" digit "+t.text);for(var i;(i=cK[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new Lt("\\newcommand's first argument must be a macro name");var a=i[0].text,s=e.isDefined(a);if(s&&!t)throw new Lt("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new Lt("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Lt("Invalid number of arguments: "+l);o=parseInt(l),i=e.consumeArg().tokens}return s&&n||e.macros.set(a,{tokens:i,numArgs:o}),""};Ee("\\newcommand",e=>O8(e,!1,!0,!1));Ee("\\renewcommand",e=>O8(e,!0,!1,!1));Ee("\\providecommand",e=>O8(e,!0,!0,!0));Ee("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});Ee("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});Ee("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Yf[r],li.math[r],li.text[r]),""});Ee("\\bgroup","{");Ee("\\egroup","}");Ee("~","\\nobreakspace");Ee("\\lq","`");Ee("\\rq","'");Ee("\\aa","\\r a");Ee("\\AA","\\r A");Ee("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");Ee("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Ee("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");Ee("\u212C","\\mathscr{B}");Ee("\u2130","\\mathscr{E}");Ee("\u2131","\\mathscr{F}");Ee("\u210B","\\mathscr{H}");Ee("\u2110","\\mathscr{I}");Ee("\u2112","\\mathscr{L}");Ee("\u2133","\\mathscr{M}");Ee("\u211B","\\mathscr{R}");Ee("\u212D","\\mathfrak{C}");Ee("\u210C","\\mathfrak{H}");Ee("\u2128","\\mathfrak{Z}");Ee("\\Bbbk","\\Bbb{k}");Ee("\\llap","\\mathllap{\\textrm{#1}}");Ee("\\rlap","\\mathrlap{\\textrm{#1}}");Ee("\\clap","\\mathclap{\\textrm{#1}}");Ee("\\mathstrut","\\vphantom{(}");Ee("\\underbar","\\underline{\\text{#1}}");Ee("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');Ee("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");Ee("\\ne","\\neq");Ee("\u2260","\\neq");Ee("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");Ee("\u2209","\\notin");Ee("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");Ee("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");Ee("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");Ee("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");Ee("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");Ee("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");Ee("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");Ee("\u27C2","\\perp");Ee("\u203C","\\mathclose{!\\mkern-0.8mu!}");Ee("\u220C","\\notni");Ee("\u231C","\\ulcorner");Ee("\u231D","\\urcorner");Ee("\u231E","\\llcorner");Ee("\u231F","\\lrcorner");Ee("\xA9","\\copyright");Ee("\xAE","\\textregistered");Ee("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Ee("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Ee("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Ee("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Ee("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Ee("\u22EE","\\vdots");Ee("\\varGamma","\\mathit{\\Gamma}");Ee("\\varDelta","\\mathit{\\Delta}");Ee("\\varTheta","\\mathit{\\Theta}");Ee("\\varLambda","\\mathit{\\Lambda}");Ee("\\varXi","\\mathit{\\Xi}");Ee("\\varPi","\\mathit{\\Pi}");Ee("\\varSigma","\\mathit{\\Sigma}");Ee("\\varUpsilon","\\mathit{\\Upsilon}");Ee("\\varPhi","\\mathit{\\Phi}");Ee("\\varPsi","\\mathit{\\Psi}");Ee("\\varOmega","\\mathit{\\Omega}");Ee("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Ee("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Ee("\\boxed","\\fbox{$\\displaystyle{#1}$}");Ee("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Ee("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Ee("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Ee("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Ee("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");uK={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},zFe=new Set(["bin","rel"]);Ee("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in uK?t=uK[r]:(r.slice(0,4)==="\\not"||r in li.math&&zFe.has(li.math[r].group))&&(t="\\dotsb"),t});P8={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Ee("\\dotso",function(e){var t=e.future().text;return t in P8?"\\ldots\\,":"\\ldots"});Ee("\\dotsc",function(e){var t=e.future().text;return t in P8&&t!==","?"\\ldots\\,":"\\ldots"});Ee("\\cdots",function(e){var t=e.future().text;return t in P8?"\\@cdots\\,":"\\@cdots"});Ee("\\dotsb","\\cdots");Ee("\\dotsm","\\cdots");Ee("\\dotsi","\\!\\cdots");Ee("\\dotsx","\\ldots\\,");Ee("\\DOTSI","\\relax");Ee("\\DOTSB","\\relax");Ee("\\DOTSX","\\relax");Ee("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Ee("\\,","\\tmspace+{3mu}{.1667em}");Ee("\\thinspace","\\,");Ee("\\>","\\mskip{4mu}");Ee("\\:","\\tmspace+{4mu}{.2222em}");Ee("\\medspace","\\:");Ee("\\;","\\tmspace+{5mu}{.2777em}");Ee("\\thickspace","\\;");Ee("\\!","\\tmspace-{3mu}{.1667em}");Ee("\\negthinspace","\\!");Ee("\\negmedspace","\\tmspace-{4mu}{.2222em}");Ee("\\negthickspace","\\tmspace-{5mu}{.277em}");Ee("\\enspace","\\kern.5em ");Ee("\\enskip","\\hskip.5em\\relax");Ee("\\quad","\\hskip1em\\relax");Ee("\\qquad","\\hskip2em\\relax");Ee("\\tag","\\@ifstar\\tag@literal\\tag@paren");Ee("\\tag@paren","\\tag@literal{({#1})}");Ee("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Lt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Ee("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Ee("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Ee("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Ee("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Ee("\\newline","\\\\\\relax");Ee("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");iZ=Mt(Uc["Main-Regular"][84][1]-.7*Uc["Main-Regular"][65][1]);Ee("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+iZ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Ee("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+iZ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Ee("\\hspace","\\@ifstar\\@hspacer\\@hspace");Ee("\\@hspace","\\hskip #1\\relax");Ee("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Ee("\\ordinarycolon",":");Ee("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Ee("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Ee("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Ee("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Ee("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Ee("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Ee("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Ee("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Ee("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Ee("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Ee("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Ee("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Ee("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Ee("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Ee("\u2237","\\dblcolon");Ee("\u2239","\\eqcolon");Ee("\u2254","\\coloneqq");Ee("\u2255","\\eqqcolon");Ee("\u2A74","\\Coloneqq");Ee("\\ratio","\\vcentcolon");Ee("\\coloncolon","\\dblcolon");Ee("\\colonequals","\\coloneqq");Ee("\\coloncolonequals","\\Coloneqq");Ee("\\equalscolon","\\eqqcolon");Ee("\\equalscoloncolon","\\Eqqcolon");Ee("\\colonminus","\\coloneq");Ee("\\coloncolonminus","\\Coloneq");Ee("\\minuscolon","\\eqcolon");Ee("\\minuscoloncolon","\\Eqcolon");Ee("\\coloncolonapprox","\\Colonapprox");Ee("\\coloncolonsim","\\Colonsim");Ee("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Ee("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Ee("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Ee("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Ee("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");Ee("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Ee("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Ee("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Ee("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Ee("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Ee("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Ee("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Ee("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Ee("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");Ee("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");Ee("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");Ee("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");Ee("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");Ee("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");Ee("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");Ee("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");Ee("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");Ee("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");Ee("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");Ee("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");Ee("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");Ee("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");Ee("\\imath","\\html@mathml{\\@imath}{\u0131}");Ee("\\jmath","\\html@mathml{\\@jmath}{\u0237}");Ee("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");Ee("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");Ee("\u27E6","\\llbracket");Ee("\u27E7","\\rrbracket");Ee("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");Ee("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");Ee("\u2983","\\lBrace");Ee("\u2984","\\rBrace");Ee("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");Ee("\u29B5","\\minuso");Ee("\\darr","\\downarrow");Ee("\\dArr","\\Downarrow");Ee("\\Darr","\\Downarrow");Ee("\\lang","\\langle");Ee("\\rang","\\rangle");Ee("\\uarr","\\uparrow");Ee("\\uArr","\\Uparrow");Ee("\\Uarr","\\Uparrow");Ee("\\N","\\mathbb{N}");Ee("\\R","\\mathbb{R}");Ee("\\Z","\\mathbb{Z}");Ee("\\alef","\\aleph");Ee("\\alefsym","\\aleph");Ee("\\Alpha","\\mathrm{A}");Ee("\\Beta","\\mathrm{B}");Ee("\\bull","\\bullet");Ee("\\Chi","\\mathrm{X}");Ee("\\clubs","\\clubsuit");Ee("\\cnums","\\mathbb{C}");Ee("\\Complex","\\mathbb{C}");Ee("\\Dagger","\\ddagger");Ee("\\diamonds","\\diamondsuit");Ee("\\empty","\\emptyset");Ee("\\Epsilon","\\mathrm{E}");Ee("\\Eta","\\mathrm{H}");Ee("\\exist","\\exists");Ee("\\harr","\\leftrightarrow");Ee("\\hArr","\\Leftrightarrow");Ee("\\Harr","\\Leftrightarrow");Ee("\\hearts","\\heartsuit");Ee("\\image","\\Im");Ee("\\infin","\\infty");Ee("\\Iota","\\mathrm{I}");Ee("\\isin","\\in");Ee("\\Kappa","\\mathrm{K}");Ee("\\larr","\\leftarrow");Ee("\\lArr","\\Leftarrow");Ee("\\Larr","\\Leftarrow");Ee("\\lrarr","\\leftrightarrow");Ee("\\lrArr","\\Leftrightarrow");Ee("\\Lrarr","\\Leftrightarrow");Ee("\\Mu","\\mathrm{M}");Ee("\\natnums","\\mathbb{N}");Ee("\\Nu","\\mathrm{N}");Ee("\\Omicron","\\mathrm{O}");Ee("\\plusmn","\\pm");Ee("\\rarr","\\rightarrow");Ee("\\rArr","\\Rightarrow");Ee("\\Rarr","\\Rightarrow");Ee("\\real","\\Re");Ee("\\reals","\\mathbb{R}");Ee("\\Reals","\\mathbb{R}");Ee("\\Rho","\\mathrm{P}");Ee("\\sdot","\\cdot");Ee("\\sect","\\S");Ee("\\spades","\\spadesuit");Ee("\\sub","\\subset");Ee("\\sube","\\subseteq");Ee("\\supe","\\supseteq");Ee("\\Tau","\\mathrm{T}");Ee("\\thetasym","\\vartheta");Ee("\\weierp","\\wp");Ee("\\Zeta","\\mathrm{Z}");Ee("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Ee("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Ee("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Ee("\\bra","\\mathinner{\\langle{#1}|}");Ee("\\ket","\\mathinner{|{#1}\\rangle}");Ee("\\braket","\\mathinner{\\langle{#1}\\rangle}");Ee("\\Bra","\\left\\langle#1\\right|");Ee("\\Ket","\\left|#1\\right\\rangle");aZ=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=f=>d=>{e&&(d.macros.set("|",s),i.length&&d.macros.set("\\|",o));var p=f;if(!f&&i.length){var g=d.future();g.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,h=t.expandTokens([...a,...u,...r]);return t.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};Ee("\\bra@ket",aZ(!1));Ee("\\bra@set",aZ(!0));Ee("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Ee("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Ee("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Ee("\\angln","{\\angl n}");Ee("\\blue","\\textcolor{##6495ed}{#1}");Ee("\\orange","\\textcolor{##ffa500}{#1}");Ee("\\pink","\\textcolor{##ff00af}{#1}");Ee("\\red","\\textcolor{##df0030}{#1}");Ee("\\green","\\textcolor{##28ae7b}{#1}");Ee("\\gray","\\textcolor{gray}{#1}");Ee("\\purple","\\textcolor{##9d38bd}{#1}");Ee("\\blueA","\\textcolor{##ccfaff}{#1}");Ee("\\blueB","\\textcolor{##80f6ff}{#1}");Ee("\\blueC","\\textcolor{##63d9ea}{#1}");Ee("\\blueD","\\textcolor{##11accd}{#1}");Ee("\\blueE","\\textcolor{##0c7f99}{#1}");Ee("\\tealA","\\textcolor{##94fff5}{#1}");Ee("\\tealB","\\textcolor{##26edd5}{#1}");Ee("\\tealC","\\textcolor{##01d1c1}{#1}");Ee("\\tealD","\\textcolor{##01a995}{#1}");Ee("\\tealE","\\textcolor{##208170}{#1}");Ee("\\greenA","\\textcolor{##b6ffb0}{#1}");Ee("\\greenB","\\textcolor{##8af281}{#1}");Ee("\\greenC","\\textcolor{##74cf70}{#1}");Ee("\\greenD","\\textcolor{##1fab54}{#1}");Ee("\\greenE","\\textcolor{##0d923f}{#1}");Ee("\\goldA","\\textcolor{##ffd0a9}{#1}");Ee("\\goldB","\\textcolor{##ffbb71}{#1}");Ee("\\goldC","\\textcolor{##ff9c39}{#1}");Ee("\\goldD","\\textcolor{##e07d10}{#1}");Ee("\\goldE","\\textcolor{##a75a05}{#1}");Ee("\\redA","\\textcolor{##fca9a9}{#1}");Ee("\\redB","\\textcolor{##ff8482}{#1}");Ee("\\redC","\\textcolor{##f9685d}{#1}");Ee("\\redD","\\textcolor{##e84d39}{#1}");Ee("\\redE","\\textcolor{##bc2612}{#1}");Ee("\\maroonA","\\textcolor{##ffbde0}{#1}");Ee("\\maroonB","\\textcolor{##ff92c6}{#1}");Ee("\\maroonC","\\textcolor{##ed5fa6}{#1}");Ee("\\maroonD","\\textcolor{##ca337c}{#1}");Ee("\\maroonE","\\textcolor{##9e034e}{#1}");Ee("\\purpleA","\\textcolor{##ddd7ff}{#1}");Ee("\\purpleB","\\textcolor{##c6b9fc}{#1}");Ee("\\purpleC","\\textcolor{##aa87ff}{#1}");Ee("\\purpleD","\\textcolor{##7854ab}{#1}");Ee("\\purpleE","\\textcolor{##543b78}{#1}");Ee("\\mintA","\\textcolor{##f5f9e8}{#1}");Ee("\\mintB","\\textcolor{##edf2df}{#1}");Ee("\\mintC","\\textcolor{##e0e5cc}{#1}");Ee("\\grayA","\\textcolor{##f6f7f7}{#1}");Ee("\\grayB","\\textcolor{##f0f1f2}{#1}");Ee("\\grayC","\\textcolor{##e3e5e6}{#1}");Ee("\\grayD","\\textcolor{##d6d8da}{#1}");Ee("\\grayE","\\textcolor{##babec2}{#1}");Ee("\\grayF","\\textcolor{##888d93}{#1}");Ee("\\grayG","\\textcolor{##626569}{#1}");Ee("\\grayH","\\textcolor{##3b3e40}{#1}");Ee("\\grayI","\\textcolor{##21242c}{#1}");Ee("\\kaBlue","\\textcolor{##314453}{#1}");Ee("\\kaGreen","\\textcolor{##71B307}{#1}");sZ={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},C8=class{constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new w8(FFe,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new tS(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Go("EOF",n.loc)),this.pushTokens(i),new Go("",oo.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new Lt("Extra }",a)}else if(a.text==="EOF")throw new Lt("Unexpected end of input in a macro argument, expected '"+(t&&n?t[o]:"}")+"'",a);if(t&&n)if((s===0||s===1&&t[o]==="{")&&a.text===t[o]){if(++o,o===t.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new Lt("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new Lt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new Lt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new Lt("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new Lt("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Go(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.includes("#"))for(var s=i.replace(/##/g,"");s.includes("#"+(a+1));)++a;for(var o=new tS(i,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:a};return h}return i}isDefined(t){return this.macros.has(t)||Yf.hasOwnProperty(t)||li.math.hasOwnProperty(t)||li.text.hasOwnProperty(t)||sZ.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Yf.hasOwnProperty(t)&&!Yf[t].primitive}},hK=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Wk=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),n8={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},fK={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},rS=class e{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new C8(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new Lt("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Go("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||r&&i.text===r||t&&Yf[i.text]&&Yf[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i=128)this.settings.strict&&(dK(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),s={type:"textord",mode:"text",loc:oo.range(t),text:r};else return null;if(this.consume(),a)for(var h=0;h{pZ=Object.defineProperty,v=(e,t)=>pZ(e,"name",{value:t,configurable:!0}),ed=(e,t)=>{for(var r in t)pZ(e,r,{get:t[r],enumerable:!0})}});var gS=Rs((G8,q8)=>{(function(e,t){typeof G8=="object"&&typeof q8<"u"?q8.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(G8,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var _=["th","st","nd","rd"],D=R%100;return"["+R+(_[(D-20)%10]||_[D]||_[0])+"]"}},x=function(R,_,D){var I=String(R);return!I||I.length>=_?R:""+Array(_+1-I.length).join(D)+R},b={s:x,z:function(R){var _=-R.utcOffset(),D=Math.abs(_),I=Math.floor(D/60),M=D%60;return(_<=0?"+":"-")+x(I,2,"0")+":"+x(M,2,"0")},m:function R(_,D){if(_.date()1)return R(P[0])}else{var $=_.name;k[$]=_,M=$}return!I&&M&&(T=M),M||!I&&T},E=function(R,_){if(C(R))return R.clone();var D=typeof _=="object"?_:{};return D.date=R,D.args=arguments,new N(D)},L=b;L.l=S,L.i=C,L.w=function(R,_){return E(R,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var N=(function(){function R(D){this.$L=S(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[w]=!0}var _=R.prototype;return _.parse=function(D){this.$d=(function(I){var M=I.date,B=I.utc;if(M===null)return new Date(NaN);if(L.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var P=M.match(g);if(P){var $=P[2]-1||0,G=(P[7]||"0").substring(0,3);return B?new Date(Date.UTC(P[1],$,P[3]||1,P[4]||0,P[5]||0,P[6]||0,G)):new Date(P[1],$,P[3]||1,P[4]||0,P[5]||0,P[6]||0,G)}}return new Date(M)})(D),this.init()},_.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},_.$utils=function(){return L},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(D,I){var M=E(D);return this.startOf(I)<=M&&M<=this.endOf(I)},_.isAfter=function(D,I){return E(D){Yt();gZ=Ls(gS(),1),kh={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},fe={trace:v((...e)=>{},"trace"),debug:v((...e)=>{},"debug"),info:v((...e)=>{},"info"),warn:v((...e)=>{},"warn"),error:v((...e)=>{},"error"),fatal:v((...e)=>{},"fatal")},sb=v(function(e="fatal"){let t=kh.fatal;typeof e=="string"?e.toLowerCase()in kh&&(t=kh[e]):typeof e=="number"&&(t=e),fe.trace=()=>{},fe.debug=()=>{},fe.info=()=>{},fe.warn=()=>{},fe.error=()=>{},fe.fatal=()=>{},t<=kh.fatal&&(fe.fatal=console.error?console.error.bind(console,bl("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",bl("FATAL"))),t<=kh.error&&(fe.error=console.error?console.error.bind(console,bl("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",bl("ERROR"))),t<=kh.warn&&(fe.warn=console.warn?console.warn.bind(console,bl("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",bl("WARN"))),t<=kh.info&&(fe.info=console.info?console.info.bind(console,bl("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",bl("INFO"))),t<=kh.debug&&(fe.debug=console.debug?console.debug.bind(console,bl("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",bl("DEBUG"))),t<=kh.trace&&(fe.trace=console.debug?console.debug.bind(console,bl("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",bl("TRACE")))},"setLogLevel"),bl=v(e=>`%c${(0,gZ.default)().format("ss.SSS")} : ${e} : `,"format")});var mS,mZ,yZ=X(()=>{mS={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),hsl2rgb:({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let i=r<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return mS.hue2rgb(a,i,e+.3333333333333333)*255;case"g":return mS.hue2rgb(a,i,e)*255;case"b":return mS.hue2rgb(a,i,e-.3333333333333333)*255}},rgb2hsl:({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;let i=Math.max(e,t,r),a=Math.min(e,t,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case e:return((t-r)/o+(t{GFe={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},vZ=GFe});var qFe,bZ,TZ=X(()=>{qFe={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},bZ=qFe});var VFe,sr,Kc=X(()=>{yZ();xZ();TZ();VFe={channel:mZ,lang:vZ,unit:bZ},sr=VFe});var Sh,ua,ob=X(()=>{Kc();Sh={};for(let e=0;e<=255;e++)Sh[e]=sr.unit.dec2hex(e);ua={ALL:0,RGB:1,HSL:2}});var V8,wZ,CZ=X(()=>{ob();V8=class{constructor(){this.type=ua.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ua.ALL}is(t){return this.type===t}},wZ=V8});var W8,kZ,SZ=X(()=>{Kc();CZ();ob();W8=class{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new wZ}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ua.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=sr.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=sr.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=sr.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=sr.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=sr.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=sr.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is(ua.HSL)&&r!==void 0?r:(this._ensureHSL(),sr.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is(ua.HSL)&&r!==void 0?r:(this._ensureHSL(),sr.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is(ua.HSL)&&r!==void 0?r:(this._ensureHSL(),sr.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is(ua.RGB)&&r!==void 0?r:(this._ensureRGB(),sr.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is(ua.RGB)&&r!==void 0?r:(this._ensureRGB(),sr.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is(ua.RGB)&&r!==void 0?r:(this._ensureRGB(),sr.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ua.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ua.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ua.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ua.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ua.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ua.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},kZ=W8});var WFe,td,lb=X(()=>{SZ();WFe=new kZ({r:0,g:0,b:0,a:0},"transparent"),td=WFe});var EZ,f0,U8=X(()=>{lb();ob();EZ={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(EZ.re);if(!t)return;let r=t[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return td.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:a?(n&h)*o/255:1},e)},stringify:e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`#${Sh[Math.round(t)]}${Sh[Math.round(r)]}${Sh[Math.round(n)]}${Sh[Math.round(i*255)]}`:`#${Sh[Math.round(t)]}${Sh[Math.round(r)]}${Sh[Math.round(n)]}`}},f0=EZ});var yS,cb,AZ=X(()=>{Kc();lb();yS={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(yS.hueRe);if(t){let[,r,n]=t;switch(n){case"grad":return sr.channel.clamp.h(parseFloat(r)*.9);case"rad":return sr.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return sr.channel.clamp.h(parseFloat(r)*360)}}return sr.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(yS.re);if(!r)return;let[,n,i,a,s,o]=r;return td.set({h:yS._hue2deg(n),s:sr.channel.clamp.s(parseFloat(i)),l:sr.channel.clamp.l(parseFloat(a)),a:s?sr.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{let{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${sr.lang.round(t)}, ${sr.lang.round(r)}%, ${sr.lang.round(n)}%, ${i})`:`hsl(${sr.lang.round(t)}, ${sr.lang.round(r)}%, ${sr.lang.round(n)}%)`}},cb=yS});var vS,H8,_Z=X(()=>{U8();vS={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();let t=vS.colors[e];if(t)return f0.parse(t)},stringify:e=>{let t=f0.stringify(e);for(let r in vS.colors)if(vS.colors[r]===t)return r}},H8=vS});var RZ,ub,LZ=X(()=>{Kc();lb();RZ={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(RZ.re);if(!r)return;let[,n,i,a,s,o,l,u,h]=r;return td.set({r:sr.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:sr.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:sr.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?sr.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${sr.lang.round(t)}, ${sr.lang.round(r)}, ${sr.lang.round(n)}, ${sr.lang.round(i)})`:`rgb(${sr.lang.round(t)}, ${sr.lang.round(r)}, ${sr.lang.round(n)})`}},ub=RZ});var UFe,ha,Eh=X(()=>{U8();AZ();_Z();LZ();ob();UFe={format:{keyword:H8,hex:f0,rgb:ub,rgba:ub,hsl:cb,hsla:cb},parse:e=>{if(typeof e!="string")return e;let t=f0.parse(e)||ub.parse(e)||cb.parse(e)||H8.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ua.HSL)||e.data.r===void 0?cb.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ub.stringify(e):f0.stringify(e)},ha=UFe});var HFe,xS,Y8=X(()=>{Kc();Eh();HFe=(e,t)=>{let r=ha.parse(e);for(let n in t)r[n]=sr.channel.clamp[n](t[n]);return ha.stringify(r)},xS=HFe});var YFe,Gi,X8=X(()=>{Kc();lb();Eh();Y8();YFe=(e,t,r=0,n=1)=>{if(typeof e!="number")return xS(e,{a:t});let i=td.set({r:sr.channel.clamp.r(e),g:sr.channel.clamp.g(t),b:sr.channel.clamp.b(r),a:sr.channel.clamp.a(n)});return ha.stringify(i)},Gi=YFe});var XFe,d0,IZ=X(()=>{Kc();Eh();XFe=(e,t)=>sr.lang.round(ha.parse(e)[t]),d0=XFe});var jFe,MZ,DZ=X(()=>{Kc();Eh();jFe=e=>{let{r:t,g:r,b:n}=ha.parse(e),i=.2126*sr.channel.toLinear(t)+.7152*sr.channel.toLinear(r)+.0722*sr.channel.toLinear(n);return sr.lang.round(i)},MZ=jFe});var KFe,NZ,OZ=X(()=>{DZ();KFe=e=>MZ(e)>=.5,NZ=KFe});var ZFe,An,PZ=X(()=>{OZ();ZFe=e=>!NZ(e),An=ZFe});var QFe,fy,bS=X(()=>{Kc();Eh();QFe=(e,t,r)=>{let n=ha.parse(e),i=n[t],a=sr.channel.clamp[t](i+r);return i!==a&&(n[t]=a),ha.stringify(n)},fy=QFe});var JFe,et,BZ=X(()=>{bS();JFe=(e,t)=>fy(e,"l",t),et=JFe});var eze,tt,$Z=X(()=>{bS();eze=(e,t)=>fy(e,"l",-t),tt=eze});var tze,TS,FZ=X(()=>{bS();tze=(e,t)=>fy(e,"a",-t),TS=tze});var rze,ge,zZ=X(()=>{Eh();Y8();rze=(e,t)=>{let r=ha.parse(e),n={};for(let i in t)t[i]&&(n[i]=r[i]+t[i]);return xS(e,n)},ge=rze});var nze,GZ,qZ=X(()=>{Eh();X8();nze=(e,t,r=50)=>{let{r:n,g:i,b:a,a:s}=ha.parse(e),{r:o,g:l,b:u,a:h}=ha.parse(t),f=r/100,d=f*2-1,p=s-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,y=1-m,x=n*m+o*y,b=i*m+l*y,T=a*m+u*y,k=s*f+h*(1-f);return Gi(x,b,T,k)},GZ=nze});var ize,Xe,VZ=X(()=>{Eh();qZ();ize=(e,t=100)=>{let r=ha.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,GZ(r,e,t)},Xe=ize});var WZ=X(()=>{X8();IZ();PZ();BZ();$Z();FZ();zZ();VZ()});var Qi=X(()=>{WZ()});function UZ(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:pb;if(HZ&&HZ(e,null),!py(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let a=r(i);a!==i&&(uze(t)||(t[n]=a),i=a)}e[i]=!0}return e}function xze(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:Bze(),t=_t=>cQ(_t);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Wo.document||!e.Element)return t.isSupported=!1,t;let r=e.document,n=r,i=n.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,s=e.Node,o=e.Element,l=e.NodeFilter,u=e.NamedNodeMap;u===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let h=e.DOMParser,f=e.trustedTypes,d=o.prototype,p=Zl(d,"cloneNode"),g=Zl(d,"remove"),m=Zl(d,"nextSibling"),y=Zl(d,"childNodes"),x=Zl(d,"parentNode"),b=Zl(d,"shadowRoot"),T=Zl(d,"attributes"),k=s&&s.prototype?Zl(s.prototype,"nodeType"):null,w=s&&s.prototype?Zl(s.prototype,"nodeName"):null,C=s&&s.prototype?Zl(s.prototype,"ownerDocument"):null,S=function(Oe){return k?k(Oe):Oe.nodeType},E=function(Oe){return w?w(Oe):Oe.nodeName};if(typeof a=="function"){let _t=r.createElement("template");_t.content&&_t.content.ownerDocument&&(r=_t.content.ownerDocument)}let L,N="",O,R=!1,_=0,D=function(){if(_>0)throw p0('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},I=function(Oe){D(),_++;try{return L.createHTML(Oe)}finally{_--}},M=function(Oe){D(),_++;try{return L.createScriptURL(Oe)}finally{_--}},B=function(){return R||(O=$ze(f,i),R=!0),O},P=r,$=P.implementation,G=P.createNodeIterator,q=P.createDocumentFragment,z=P.getElementsByTagName,V=n.importNode,j=aQ();t.isSupported=typeof sQ=="function"&&typeof x=="function"&&$&&$.createHTMLDocument!==void 0;let ee=kze,ne=Sze,Q=Eze,pe=Aze,te=_ze,de=Rze,ce=Lze,ue=Mze,Re=rQ,ve=null,Ge=un({},[...QZ,...Z8,...Q8,...J8,...JZ]),He=null,Ue=un({},[...eQ,...eI,...tQ,...wS]),me=Object.seal(dy(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Ie=null,Me=Object.seal(dy(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),re=!0,le=!0,oe=!1,he=!0,xe=!1,se=!0,F=!1,H=!1,W=null,U=null,ae=!1,K=!1,Y=!1,Z=!1,Ce=!0,we=!1,ke="user-content-",Se=!0,Ne=!1,Ae={},Fe=null,Pe=un({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),We=null,be=un({},["audio","video","img","source","image","track"]),lt=null,$e=un({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),at="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",Et="http://www.w3.org/1999/xhtml",pt=Et,Ct=!1,ht=null,Te=un({},[at,bt,Et],K8),ot=fa(["mi","mo","mn","ms","mtext"]),gt=un({},ot),Qe=fa(["annotation-xml"]),_e=un({},Qe),Ze=un({},["title","style","font","a","script"]),nt=null,ft=["application/xhtml+xml","text/html"],jt="text/html",yt=null,Ht=null,Er=r.createElement("form"),rr=function(Oe){return Oe instanceof RegExp||Oe instanceof Function},Ot=function(){let Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ht&&Ht===Oe)return;(!Oe||typeof Oe!="object")&&(Oe={}),Oe=Uo(Oe),nt=ft.indexOf(Oe.PARSER_MEDIA_TYPE)===-1?jt:Oe.PARSER_MEDIA_TYPE,yt=nt==="application/xhtml+xml"?K8:pb,ve=rd(Oe,"ALLOWED_TAGS",Ge,{transform:yt}),He=rd(Oe,"ALLOWED_ATTR",Ue,{transform:yt}),ht=rd(Oe,"ALLOWED_NAMESPACES",Te,{transform:K8}),lt=rd(Oe,"ADD_URI_SAFE_ATTR",$e,{transform:yt,base:$e}),We=rd(Oe,"ADD_DATA_URI_TAGS",be,{transform:yt,base:be}),Fe=rd(Oe,"FORBID_CONTENTS",Pe,{transform:yt}),De=rd(Oe,"FORBID_TAGS",Uo({}),{transform:yt}),Ie=rd(Oe,"FORBID_ATTR",Uo({}),{transform:yt}),Ae=lo(Oe,"USE_PROFILES")?Oe.USE_PROFILES&&typeof Oe.USE_PROFILES=="object"?Uo(Oe.USE_PROFILES):Oe.USE_PROFILES:!1,re=Oe.ALLOW_ARIA_ATTR!==!1,le=Oe.ALLOW_DATA_ATTR!==!1,oe=Oe.ALLOW_UNKNOWN_PROTOCOLS||!1,he=Oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xe=Oe.SAFE_FOR_TEMPLATES||!1,se=Oe.SAFE_FOR_XML!==!1,F=Oe.WHOLE_DOCUMENT||!1,K=Oe.RETURN_DOM||!1,Y=Oe.RETURN_DOM_FRAGMENT||!1,Z=Oe.RETURN_TRUSTED_TYPE||!1,ae=Oe.FORCE_BODY||!1,Ce=Oe.SANITIZE_DOM!==!1,we=Oe.SANITIZE_NAMED_PROPS||!1,Se=Oe.KEEP_CONTENT!==!1,Ne=Oe.IN_PLACE||!1,Re=Tze(Oe.ALLOWED_URI_REGEXP)?Oe.ALLOWED_URI_REGEXP:rQ,pt=typeof Oe.NAMESPACE=="string"?Oe.NAMESPACE:Et,gt=tI(Oe,"MATHML_TEXT_INTEGRATION_POINTS",()=>un({},ot)),_e=tI(Oe,"HTML_INTEGRATION_POINTS",()=>un({},Qe));let Ke=tI(Oe,"CUSTOM_ELEMENT_HANDLING",()=>dy(null));if(me=dy(null),lo(Ke,"tagNameCheck")&&rr(Ke.tagNameCheck)&&(me.tagNameCheck=Ke.tagNameCheck),lo(Ke,"attributeNameCheck")&&rr(Ke.attributeNameCheck)&&(me.attributeNameCheck=Ke.attributeNameCheck),lo(Ke,"allowCustomizedBuiltInElements")&&typeof Ke.allowCustomizedBuiltInElements=="boolean"&&(me.allowCustomizedBuiltInElements=Ke.allowCustomizedBuiltInElements),Sa(me),xe&&(le=!1),Y&&(K=!0),Ae&&(ve=un({},JZ),He=dy(null),Ae.html===!0&&(un(ve,QZ),un(He,eQ)),Ae.svg===!0&&(un(ve,Z8),un(He,eI),un(He,wS)),Ae.svgFilters===!0&&(un(ve,Q8),un(He,eI),un(He,wS)),Ae.mathMl===!0&&(un(ve,J8),un(He,tQ),un(He,wS))),Me.tagCheck=null,Me.attributeCheck=null,lo(Oe,"ADD_TAGS")&&(typeof Oe.ADD_TAGS=="function"?Me.tagCheck=Oe.ADD_TAGS:py(Oe.ADD_TAGS)&&(ve===Ge&&(ve=Uo(ve)),un(ve,Oe.ADD_TAGS,yt))),lo(Oe,"ADD_ATTR")&&(typeof Oe.ADD_ATTR=="function"?Me.attributeCheck=Oe.ADD_ATTR:py(Oe.ADD_ATTR)&&(He===Ue&&(He=Uo(He)),un(He,Oe.ADD_ATTR,yt))),lo(Oe,"ADD_FORBID_CONTENTS")&&py(Oe.ADD_FORBID_CONTENTS)&&(Fe===Pe&&(Fe=Uo(Fe)),un(Fe,Oe.ADD_FORBID_CONTENTS,yt)),Se&&(ve["#text"]=!0),F&&un(ve,["html","head","body"]),ve.table&&(un(ve,["tbody"]),delete De.tbody),Oe.TRUSTED_TYPES_POLICY){if(typeof Oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw p0('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw p0('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let mt=L;L=Oe.TRUSTED_TYPES_POLICY;try{N=I("")}catch(Gt){throw L=mt,Gt}}else Oe.TRUSTED_TYPES_POLICY===null?(L=void 0,N=""):(L===void 0&&(L=B()),L&&typeof N=="string"&&(N=I("")));fa&&fa(Oe),Ht=Oe},Zt=un({},[...Z8,...Q8,...wze]),Je=un({},[...J8,...Cze]),ut=function(Oe,Ke,mt){return Ke.namespaceURI===Et?Oe==="svg":Ke.namespaceURI===at?Oe==="svg"&&(mt==="annotation-xml"||gt[mt]):!!Zt[Oe]},kt=function(Oe,Ke,mt){return Ke.namespaceURI===Et?Oe==="math":Ke.namespaceURI===bt?Oe==="math"&&_e[mt]:!!Je[Oe]},lr=function(Oe,Ke,mt){return Ke.namespaceURI===bt&&!_e[mt]||Ke.namespaceURI===at&&!gt[mt]?!1:!Je[Oe]&&(Ze[Oe]||!Zt[Oe])},ir=function(Oe){let Ke=x(Oe);(!Ke||!Ke.tagName)&&(Ke={namespaceURI:pt,tagName:"template"});let mt=pb(Oe.tagName),Gt=pb(Ke.tagName);return ht[Oe.namespaceURI]?Oe.namespaceURI===bt?ut(mt,Ke,Gt):Oe.namespaceURI===at?kt(mt,Ke,Gt):Oe.namespaceURI===Et?lr(mt,Ke,Gt):!!(nt==="application/xhtml+xml"&&ht[Oe.namespaceURI]):!1},xr=function(Oe){hb(t.removed,{element:Oe});try{x(Oe).removeChild(Oe)}catch{if(g(Oe),!x(Oe))throw p0("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},cn=function(Oe,Ke,mt){try{Oe.removeAttributeNode(Ke)}catch{try{Oe.removeAttribute(mt)}catch{}}},br=function(Oe){Nt(Oe);let Ke=y(Oe);if(Ke){let Gt=[];g0(Ke,Qt=>{hb(Gt,Qt)}),g0(Gt,Qt=>{try{g(Qt)}catch{}})}let mt=T(Oe);if(mt)for(let Gt=mt.length-1;Gt>=0;--Gt){let Qt=mt[Gt],wr=Qt&&Qt.name;typeof wr=="string"&&cn(Oe,Qt,wr)}},At=function(Oe,Ke,mt){if(!mt)try{mt=Ke.getAttributeNode(Oe)}catch{mt=null}hb(t.removed,{attribute:mt||null,from:Ke});try{mt?Ke.removeAttributeNode(mt):Ke.removeAttribute(Oe)}catch{try{Ke.removeAttribute(Oe)}catch{}}if(Oe==="is")if(K||Y)try{xr(Ke)}catch{}else try{Ke.setAttribute(Oe,"")}catch{}},dt=function(Oe){let Ke=T(Oe);if(Ke)for(let mt=Ke.length-1;mt>=0;--mt){let Gt=Ke[mt],Qt=Gt&&Gt.name;typeof Qt!="string"||He[yt(Qt)]||cn(Oe,Gt,Qt)}},Nt=function(Oe){let Ke=[Oe];for(;Ke.length>0;){let mt=Ke.pop();S(mt)===Wo.element&&dt(mt);let Qt=y(mt);if(Qt)for(let wr=Qt.length-1;wr>=0;--wr)Ke.push(Qt[wr])}},Dt=function(Oe,Ke){return se?Oe==="patchsrc"?!0:Oe==="for"&&Ke!=="label"&&Ke!=="output":!1},xt=function(Oe){if(!se)return;let Ke=[Oe];for(;Ke.length>0;){let mt=Ke.pop(),Gt=S(mt);if(Gt===Wo.processingInstruction||Gt===Wo.comment&&fs(iQ,mt.data)){try{g(mt)}catch{}continue}if(Gt===Wo.element){let wr=mt,jr=yt(E(mt));try{wr.hasAttribute&&wr.hasAttribute("patchsrc")&&wr.removeAttribute("patchsrc"),wr.hasAttribute&&wr.hasAttribute("for")&&Dt("for",jr)&&wr.removeAttribute("for")}catch{}}let Qt=y(mt);if(Qt)for(let wr=Qt.length-1;wr>=0;--wr)Ke.push(Qt[wr])}},Jt=function(Oe){let Ke=null,mt=null;if(ae)Oe=""+Oe;else{let wr=XZ(Oe,/^[\r\n\t ]+/);mt=wr&&wr[0]}nt==="application/xhtml+xml"&&pt===Et&&(Oe=''+Oe+"");let Gt=L?I(Oe):Oe;if(pt===Et)try{Ke=new h().parseFromString(Gt,nt)}catch{}if(!Ke||!Ke.documentElement){Ke=$.createDocument(pt,"template",null);try{Ke.documentElement.innerHTML=Ct?N:Gt}catch{}}let Qt=Ke.body||Ke.documentElement;return Oe&&mt&&Qt.insertBefore(r.createTextNode(mt),Qt.childNodes[0]||null),pt===Et?z.call(Ke,F?"html":"body")[0]:F?Ke.documentElement:Qt},Le=function(Oe){let Ke=C?C(Oe):Oe.ownerDocument;return G.call(Ke||Oe,Oe,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Pn=function(Oe){return Oe=fb(Oe,ee," "),Oe=fb(Oe,ne," "),Oe=fb(Oe,Q," "),Oe},Be=function(Oe){var Ke;Oe.normalize();let mt=C?C(Oe):Oe.ownerDocument,Gt=G.call(mt||Oe,Oe,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),Qt=Gt.nextNode();for(;Qt;)Qt.data=Pn(Qt.data),Qt=Gt.nextNode();let wr=(Ke=Oe.querySelectorAll)===null||Ke===void 0?void 0:Ke.call(Oe,"template");wr&&g0(wr,jr=>{oi(jr.content)&&Be(jr.content)})},Tr=function(Oe){let Ke=w?w(Oe):null;return typeof Ke!="string"||yt(Ke)!=="form"?!1:typeof Oe.nodeName!="string"||typeof Oe.textContent!="string"||typeof Oe.removeChild!="function"||Oe.attributes!==T(Oe)||typeof Oe.removeAttribute!="function"||typeof Oe.setAttribute!="function"||typeof Oe.namespaceURI!="string"||typeof Oe.insertBefore!="function"||typeof Oe.hasChildNodes!="function"||Oe.nodeType!==k(Oe)||Oe.childNodes!==y(Oe)},oi=function(Oe){if(!k||typeof Oe!="object"||Oe===null)return!1;try{return k(Oe)===Wo.documentFragment}catch{return!1}},As=function(Oe){if(!k||typeof Oe!="object"||Oe===null)return!1;try{return typeof k(Oe)=="number"}catch{return!1}};function Ga(_t,Oe,Ke){_t.length!==0&&g0(_t,mt=>{mt.call(t,Oe,Ke,Ht)})}let Wf=function(Oe,Ke){return!!(se&&Oe.hasChildNodes()&&!As(Oe.firstElementChild)&&fs(nQ,Oe.textContent)&&fs(nQ,Oe.innerHTML)||se&&Oe.namespaceURI===Et&&Oze[Ke]&&(As(Oe.firstElementChild)||typeof Oe.textContent=="string"&&fs(Pze[Ke],Oe.textContent))||Oe.nodeType===Wo.processingInstruction||se&&Oe.nodeType===Wo.comment&&fs(iQ,Oe.data))},yh=function(Oe,Ke){if(Oe instanceof RegExp)return fs(Oe,Ke);if(Oe instanceof Function){for(var mt=arguments.length,Gt=new Array(mt>2?mt-2:0),Qt=2;Qt=0;--jr){let yi=Oe===mt?p(Qt[jr],!0):Qt[jr];Gt.insertBefore(yi,m(Oe))}}}return xr(Oe),!0},zo=function(Oe,Ke,mt,Gt){return Oe.length===0?Ke:Ke===mt||Ke===Gt?Uo(Ke):Ke},Uf=function(Oe,Ke){return Oe===Ke||x(Oe)!==null?!1:(Ne&&Nt(Oe),!0)},jl=function(Oe,Ke){if(Ga(j.beforeSanitizeElements,Oe,null),Uf(Oe,Ke))return!0;if(Tr(Oe))return xr(Oe),!0;let mt=yt(E(Oe));if(ve=zo(j.uponSanitizeElement,ve,Ge,W),Ga(j.uponSanitizeElement,Oe,{tagName:mt,allowedTags:ve}),Uf(Oe,Ke))return!0;if(Wf(Oe,mt))return xr(Oe),!0;if(De[mt]||!(Me.tagCheck instanceof Function&&Me.tagCheck(mt))&&!ve[mt]){let Qt=mi(Oe,mt,Ke);return Qt===!1&&Ga(j.afterSanitizeElements,Oe,null),Qt}if(S(Oe)===Wo.element&&!ir(Oe)||(mt==="noscript"||mt==="noembed"||mt==="noframes")&&fs(Dze,Oe.innerHTML))return xr(Oe),!0;if(xe&&Oe.nodeType===Wo.text){let Qt=Pn(Oe.textContent);Oe.textContent!==Qt&&(hb(t.removed,{element:Oe.cloneNode()}),Oe.textContent=Qt)}return Ga(j.afterSanitizeElements,Oe,null),!1},o0=function(Oe,Ke,mt){if(Ie[Ke]||Dt(Ke,Oe)||Ce&&(Ke==="id"||Ke==="name")&&(mt in r||mt in Er))return!1;let Gt=He[Ke]||Me.attributeCheck instanceof Function&&Me.attributeCheck(Ke,Oe);return le&&fs(pe,Ke)||re&&fs(te,Ke)?!0:Gt?lt[Ke]||fs(Re,fb(mt,ce,""))||(Ke==="src"||Ke==="xlink:href"||Ke==="href")&&Oe!=="script"&&jZ(mt,"data:")===0&&We[Oe]||oe&&!fs(de,fb(mt,ce,""))?!0:!mt:l0(Oe)&&yh(me.tagNameCheck,Oe)&&yh(me.attributeNameCheck,Ke,Oe)||Ke==="is"&&me.allowCustomizedBuiltInElements&&yh(me.tagNameCheck,mt)},qa=un({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),l0=function(Oe){return!qa[pb(Oe)]&&fs(ue,Oe)},Va=function(Oe,Ke,mt,Gt){if(L&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!mt)switch(f.getAttributeType(Oe,Ke)){case"TrustedHTML":return I(Gt);case"TrustedScriptURL":return M(Gt)}return Gt},jx=function(Oe,Ke,mt,Gt){try{mt?Oe.setAttributeNS(mt,Ke,Gt):Oe.setAttribute(Ke,Gt),Tr(Oe)?xr(Oe):YZ(t.removed)}catch{At(Ke,Oe)}},qc=function(Oe){Ga(j.beforeSanitizeAttributes,Oe,null);let Ke=Oe.attributes;if(!Ke||Tr(Oe))return;He=zo(j.uponSanitizeAttribute,He,Ue,U);let mt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:He,forceKeepAttr:void 0},Gt=Ke.length,Qt=yt(Oe.nodeName);for(;Gt--;){let wr=Ke[Gt],jr=wr.name,yi=wr.namespaceURI,ao=wr.value,so=yt(jr),qL=ao,_s=jr==="value"?qL:gze(qL);if(mt.attrName=so,mt.attrValue=_s,mt.keepAttr=!0,mt.forceKeepAttr=void 0,Ga(j.uponSanitizeAttribute,Oe,mt),_s=mt.attrValue,we&&(so==="id"||so==="name")&&jZ(_s,ke)!==0&&(At(jr,Oe,wr),_s=ke+_s),se&&fs(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_s)){At(jr,Oe,wr);continue}if(so==="attributename"&&XZ(_s,"href")){At(jr,Oe,wr);continue}if(!mt.forceKeepAttr){if(!mt.keepAttr){At(jr,Oe,wr);continue}if(!he&&fs(Nze,_s)){At(jr,Oe,wr);continue}if(xe&&(_s=Pn(_s)),!o0(Qt,so,_s)){At(jr,Oe,wr);continue}_s=Va(Qt,so,yi,_s),_s!==qL&&jx(Oe,jr,yi,_s)}}Ga(j.afterSanitizeAttributes,Oe,null)},Wa=function(Oe){let Ke=null,mt=Le(Oe);for(Ga(j.beforeSanitizeShadowDOM,Oe,null);Ke=mt.nextNode();)if(Ga(j.uponSanitizeShadowNode,Ke,null),jl(Ke,Oe),qc(Ke),oi(Ke.content)&&Wa(Ke.content),S(Ke)===Wo.element){let Gt=b(Ke);oi(Gt)&&(Nk(Gt),Wa(Gt))}Ga(j.afterSanitizeShadowDOM,Oe,null)},Nk=function(Oe){let Ke=[{node:Oe,shadow:null}];for(;Ke.length>0;){let mt=Ke.pop();if(mt.shadow){Wa(mt.shadow);continue}let Gt=mt.node,wr=S(Gt)===Wo.element,jr=y(Gt);if(jr)for(let yi=jr.length-1;yi>=0;--yi)Ke.push({node:jr[yi],shadow:null});if(wr){let yi=w?w(Gt):null;if(typeof yi=="string"&&yt(yi)==="template"){let ao=Gt.content;oi(ao)&&Ke.push({node:ao,shadow:null})}}if(wr){let yi=b(Gt);oi(yi)&&Ke.push({node:null,shadow:yi},{node:yi,shadow:null})}}};return t.sanitize=function(_t){let Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ke=null,mt=null,Gt=null,Qt=null;if(Ct=!_t,Ct&&(_t=""),typeof _t!="string"&&!As(_t)&&(_t=bze(_t),typeof _t!="string"))throw p0("dirty is not a string, aborting");if(!t.isSupported)return _t;H?(ve=W,He=U):Ot(Oe),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(ve=Uo(ve)),j.uponSanitizeAttribute.length>0&&(He=Uo(He)),t.removed=[];let wr=Ne&&typeof _t!="string"&&As(_t);if(wr){xt(_t);let ao=E(_t);if(typeof ao=="string"){let so=yt(ao);if(!ve[so]||De[so])throw br(_t),p0("root node is forbidden and cannot be sanitized in-place")}if(Tr(_t))throw br(_t),p0("root node is clobbered and cannot be sanitized in-place");try{Nk(_t)}catch(so){throw br(_t),so}}else if(As(_t))Ke=Jt(""),mt=Ke.ownerDocument.importNode(_t,!0),mt.nodeType===Wo.element&&mt.nodeName==="BODY"||mt.nodeName==="HTML"?Ke=mt:Ke.appendChild(mt),Nk(mt);else{if(!K&&!xe&&!F&&_t.indexOf("<")===-1)return L&&Z?I(_t):_t;if(Ke=Jt(_t),!Ke)return K?null:Z?N:""}Ke&&ae&&xr(Ke.firstChild);let jr=wr?_t:Ke;try{let ao=Le(jr);for(;Gt=ao.nextNode();)jl(Gt,jr),qc(Gt),oi(Gt.content)&&Wa(Gt.content)}catch(ao){throw wr&&(br(_t),g0(t.removed,so=>{so.element&&Nt(so.element)})),ao}if(wr)return g0(t.removed,ao=>{ao.element&&Nt(ao.element)}),xe&&Be(_t),_t;if(K){if(xe&&Be(Ke),Y)for(Qt=q.call(Ke.ownerDocument);Ke.firstChild;)Qt.appendChild(Ke.firstChild);else Qt=Ke;return(He.shadowroot||He.shadowrootmode)&&(Qt=V.call(n,Qt,!0)),Qt}let yi=F?Ke.outerHTML:Ke.innerHTML;return F&&ve["!doctype"]&&Ke.ownerDocument&&Ke.ownerDocument.doctype&&Ke.ownerDocument.doctype.name&&fs(Ize,Ke.ownerDocument.doctype.name)&&(yi=" +`+yi),xe&&(yi=Pn(yi)),L&&Z?I(yi):yi},t.setConfig=function(){let _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ot(_t),H=!0,W=ve,U=He},t.clearConfig=function(){Ht=null,H=!1,W=null,U=null,L=O,N=""},t.isValidAttribute=function(_t,Oe,Ke){Ht||Ot({});let mt=yt(_t),Gt=yt(Oe);return o0(mt,Gt,Ke)},t.addHook=function(_t,Oe){typeof Oe=="function"&&lo(j,_t)&&hb(j[_t],Oe)},t.removeHook=function(_t,Oe){if(lo(j,_t)){if(Oe!==void 0){let Ke=dze(j[_t],Oe);return Ke===-1?void 0:pze(j[_t],Ke,1)[0]}return YZ(j[_t])}},t.removeHooks=function(_t){lo(j,_t)&&(j[_t]=[])},t.removeAllHooks=function(){j=aQ()},t}var sQ,HZ,uze,hze,fze,fa,Sa,dy,oQ,rI,nI,g0,dze,YZ,hb,pze,py,pb,K8,XZ,fb,jZ,gze,mze,yze,KZ,ZZ,lo,db,fs,p0,QZ,Z8,Q8,wze,J8,Cze,JZ,eQ,eI,tQ,wS,kze,Sze,Eze,Aze,_ze,rQ,Rze,Lze,Ize,Mze,nQ,iQ,Dze,Nze,Wo,lQ,Oze,Pze,Bze,$ze,aQ,rd,tI,co,gy=X(()=>{sQ=Object.entries,HZ=Object.setPrototypeOf,uze=Object.isFrozen,hze=Object.getPrototypeOf,fze=Object.getOwnPropertyDescriptor,fa=Object.freeze,Sa=Object.seal,dy=Object.create,oQ=typeof Reflect<"u"&&Reflect,rI=oQ.apply,nI=oQ.construct;fa||(fa=function(t){return t});Sa||(Sa=function(t){return t});rI||(rI=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a1?r-1:0),i=1;i"u"?null:Ji(BigInt.prototype.toString),ZZ=typeof Symbol>"u"?null:Ji(Symbol.prototype.toString),lo=Ji(Object.prototype.hasOwnProperty),db=Ji(Object.prototype.toString),fs=Ji(RegExp.prototype.test),p0=vze(TypeError);QZ=fa(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Z8=fa(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Q8=fa(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wze=fa(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),J8=fa(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Cze=fa(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),JZ=fa(["#text"]),eQ=fa(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eI=fa(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),tQ=fa(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wS=fa(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kze=Sa(/{{[\w\W]*|^[\w\W]*}}/g),Sze=Sa(/<%[\w\W]*|^[\w\W]*%>/g),Eze=Sa(/\${[\w\W]*/g),Aze=Sa(/^data-[\-\w.\u00B7-\uFFFF]+$/),_ze=Sa(/^aria-[\-\w]+$/),rQ=Sa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rze=Sa(/^(?:\w+script|data):/i),Lze=Sa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ize=Sa(/^html$/i),Mze=Sa(/^[a-z][.\w]*(-[.\w]+)+$/i),nQ=Sa(/<[/\w!]/g),iQ=Sa(/<[/\w]/g),Dze=Sa(/<\/no(script|embed|frames)/i),Nze=Sa(/\/>/i),Wo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lQ=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Oze=fa(un({},lQ)),Pze=(function(){let e={};return g0(lQ,t=>{e[t]=Sa(new RegExp("])","i"))}),fa(e)})(),Bze=function(){return typeof window>"u"?null:window},$ze=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},aQ=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rd=function(t,r,n,i){return lo(t,r)&&py(t[r])?un(i.base?Uo(i.base):{},t[r],i.transform):n},tI=function(t,r,n){let i=lo(t,r)?t[r]:void 0;return i&&typeof i=="object"?Uo(i):n()};co=cQ()});function kQ(){let e="data-temp-href-target";co.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),co.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}function RS(e){return[...e.cssRules].map(t=>t.cssText).join(` +`)}var iI,ui,Qc,Jc,Rr,Fze,zze,Gze,qze,Vze,ds,Wze,Uze,Hze,Yze,Xze,jze,Kze,Zze,Qze,Jze,eGe,tGe,rGe,nGe,iGe,aGe,Zc,Ua,pQ,gQ,sGe,dr,oGe,lGe,mb,sI,y0,Ho,uo,SS,m0,gb,yb,mQ,yQ,vQ,oI,lI,It,xQ,bQ,vb,cGe,uQ,TQ,uGe,AS,ea,cI,my,hGe,uI,nd,xb,_S,wQ,CQ,v0,fGe,dGe,SQ,hQ,Cr,pGe,gGe,mGe,yGe,EQ,bb,vGe,xGe,eu,aI,bGe,TGe,fQ,CS,hi,yy,wGe,vy,vt,CGe,kGe,Vr,tu,kS,SGe,EGe,AQ,LS,hI,fI,dI,pI,pr,Ar,Lr,Ir,Mr,$r,Dr,dQ,AGe,ze,Tb,IS,MS,wb,_Ge,ES,Cb,DS,RGe,hr=X(()=>{ur();Yt();Qi();Qi();Qi();Qi();Qi();Qi();Qi();Qi();Qi();Qi();Qi();Qi();gy();iI=v((e,t,{depth:r=2}={})=>{let n={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(i=>iI(e,i,n)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(i=>{e.includes(i)||e.push(i)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){let i=e;Object.entries(t).forEach(([a,s])=>{if(typeof s=="object"){if(s===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),i[a]===void 0&&(i[a]=Array.isArray(s)?[]:{}),typeof i[a]=="object"&&(i[a]=iI(i[a],s,{depth:r-1}))}else typeof i[a]!="object"&&(Object.hasOwn(e,a)?i[a]=s:Object.defineProperty(e,a,{value:s,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ui=iI,Qc="#ffffff",Jc="#f2f2f2",Rr=v((e,t)=>t?ge(e,{s:-40,l:10}):ge(e,{s:-40,l:-10}),"mkBorder"),Fze=class{static{v(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||et(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||tt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||et(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},zze=v(e=>{let t=new Fze;return t.calculate(e),t},"getThemeVariables"),Gze=class{static{v(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=et(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=et(Xe("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Gi(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=tt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=tt(this.sectionBkgColor,10),this.taskBorderColor=Gi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Gi(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=et(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=et(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=et(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=Xe(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},qze=v(e=>{let t=new Gze;return t.calculate(e),t},"getThemeVariables"),Vze=class{static{v(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ge(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Rr(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Gi(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tt(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}let t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},ds=v(e=>{let t=new Vze;return t.calculate(e),t},"getThemeVariables"),Wze=class{static{v(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=et("#cde498",10),this.primaryBorderColor=Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.primaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=tt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tt(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Uze=v(e=>{let t=new Wze;return t.calculate(e),t},"getThemeVariables"),Hze=class{static{v(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=et(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||et(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=et(this.contrast,55),this.border2=this.contrast,this.actorBorder=et(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Yze=v(e=>{let t=new Hze;return t.calculate(e),t},"getThemeVariables"),Xze=class{static{v(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Rr(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e="#ECECFE",t="#E9E9F1",r=ge(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||et(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||ge(e,{h:30}),this.cScale4=this.cScale4||ge(e,{h:60}),this.cScale5=this.cScale5||ge(e,{h:90}),this.cScale6=this.cScale6||ge(e,{h:120}),this.cScale7=this.cScale7||ge(e,{h:150}),this.cScale8=this.cScale8||ge(e,{h:210,l:150}),this.cScale9=this.cScale9||ge(e,{h:270}),this.cScale10=this.cScale10||ge(e,{h:300}),this.cScale11=this.cScale11||ge(e,{h:330}),this.darkMode)for(let i=0;i{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},jze=v(e=>{let t=new Xze;return t.calculate(e),t},"getThemeVariables"),Kze=class{static{v(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=et(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=et(Xe("#323D47"),10),this.border1="#ccc",this.border2=Gi(255,255,255,.25),this.arrowheadColor=Xe(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||et(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Zze=v(e=>{let t=new Kze;return t.calculate(e),t},"getThemeVariables"),Qze=class{static{v(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Rr("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e="#ECECFE",t="#E9E9F1",r=ge(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||et(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let i=0;i{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Jze=v(e=>{let t=new Qze;return t.calculate(e),t},"getThemeVariables"),eGe=class{static{v(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=et(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=et(Xe("#323D47"),10),this.border1="#ccc",this.border2=Gi(255,255,255,.25),this.arrowheadColor=Xe(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||et(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},tGe=v(e=>{let t=new eGe;return t.calculate(e),t},"getThemeVariables"),rGe=class{static{v(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Rr(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e="#ECECFE",t="#E9E9F1",r=ge(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||et(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let i=0;i{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},nGe=v(e=>{let t=new rGe;return t.calculate(e),t},"getThemeVariables"),iGe=class{static{v(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=et(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=et(Xe("#323D47"),10),this.border1="#ccc",this.border2=Gi(255,255,255,.25),this.arrowheadColor=Xe(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||et(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},aGe=v(e=>{let t=new iGe;return t.calculate(e),t},"getThemeVariables"),Zc={base:{getThemeVariables:zze},dark:{getThemeVariables:qze},default:{getThemeVariables:ds},forest:{getThemeVariables:Uze},neutral:{getThemeVariables:Yze},neo:{getThemeVariables:jze},"neo-dark":{getThemeVariables:Zze},redux:{getThemeVariables:Jze},"redux-dark":{getThemeVariables:tGe},"redux-color":{getThemeVariables:nGe},"redux-dark-color":{getThemeVariables:aGe}},Ua={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},pQ={...Ua,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Zc.default.getThemeVariables(),sequence:{...Ua.sequence,messageFont:v(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:v(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:v(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ua.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ua.c4,useWidth:void 0,personFont:v(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ua.flowchart,inheritDir:!1},external_personFont:v(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:v(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:v(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:v(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:v(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:v(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:v(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:v(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:v(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:v(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:v(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:v(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:v(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:v(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:v(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:v(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:v(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:v(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:v(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:v(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:v(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ua.pie,useWidth:984},xyChart:{...Ua.xyChart,useWidth:void 0},requirement:{...Ua.requirement,useWidth:void 0},packet:{...Ua.packet},eventmodeling:{...Ua.eventmodeling},treeView:{...Ua.treeView,useWidth:void 0},radar:{...Ua.radar},railroad:{...Ua.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Ua.ishikawa},sankey:{...Ua.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Ua.venn},cynefin:{...Ua.cynefin}},gQ=v((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...gQ(e[n],"")]:[...r,t+n],[]),"keyify"),sGe=new Set(gQ(pQ,"")),dr=pQ,oGe={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},lGe=v((e,t)=>{for(let r of Object.keys(e)){let n=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof n!="string"||!t.test(n))&&(fe.debug("sanitize deleting dictionary entry:",r,n),delete e[r])}},"sanitizeDictionaryConfig"),mb=v(e=>{if(fe.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>mb(t));return}for(let t of Object.keys(e)){if(fe.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!sGe.has(t)||e[t]==null){fe.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){let n=oGe[t];n?lGe(e[t],n):(fe.debug("sanitizing object",t),mb(e[t]));continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)t.includes(n)&&(fe.debug("sanitizing css option",t),e[t]=sI(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}fe.debug("After sanitization",e)}},"sanitizeDirective"),sI=v(e=>{let t=0,r=0;for(let n of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),uo=ui({},y0),m0=[],gb=ui({},y0),yb=v((e,t)=>{let r=ui({},e),n={};for(let i of t)xQ(i),n=ui(n,i);if(r=ui(r,n),n.theme&&n.theme in Zc){let i=ui({},SS),a=ui(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Zc&&(r.themeVariables=Zc[r.theme].getThemeVariables(a))}return gb=r,uGe(gb),gb},"updateCurrentConfig"),mQ=v(e=>(uo=ui({},y0),uo=ui(uo,e),e.theme&&Zc[e.theme]&&(uo.themeVariables=Zc[e.theme].getThemeVariables(e.themeVariables)),yb(uo,m0),uo),"setSiteConfig"),yQ=v(e=>{SS=ui({},e)},"saveConfigFromInitialize"),vQ=v(e=>(uo=ui(uo,e),yb(uo,m0),uo),"updateSiteConfig"),oI=v(()=>ui({},uo),"getSiteConfig"),lI=v(e=>(yb(gb,[e]),It()),"setConfig"),It=v(()=>ui({},gb),"getConfig"),xQ=v(e=>{e&&(["secure",...uo.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(fe.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&xQ(e[t])}))},"sanitize"),bQ=v(e=>{mb(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),m0.push(e),yb(uo,m0)},"addDirective"),vb=v((e=uo)=>{m0=[],yb(e,m0)},"reset"),cGe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},uQ={},TQ=v(e=>{uQ[e]||(fe.warn(cGe[e]),uQ[e]=!0)},"issueWarning"),uGe=v(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&TQ("LAZY_LOAD_DEPRECATED")},"checkConfig"),AS=v(()=>{let e={};SS&&(e=ui(e,SS));for(let t of m0)e=ui(e,t);return e},"getUserDefinedConfig"),ea=v(e=>(e.flowchart?.htmlLabels!=null&&TQ("FLOWCHART_HTML_LABELS_DEPRECATED"),Ho(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),cI=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,my=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,hGe=/\s*%%.*\n/gm,uI=class extends Error{static{v(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},nd={},xb=v(function(e,t){e=e.replace(cI,"").replace(my,"").replace(hGe,` +`);for(let[r,{detector:n}]of Object.entries(nd))if(n(e,t))return r;throw new uI(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),_S=v((...e)=>{for(let{id:t,detector:r,loader:n}of e)wQ(t,r,n)},"registerLazyLoadedDiagrams"),wQ=v((e,t,r)=>{nd[e]&&fe.warn(`Detector with key ${e} already exists. Overwriting.`),nd[e]={detector:t,loader:r},fe.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),CQ=v(e=>nd[e].loader,"getDiagramLoader"),v0=//gi,fGe=v(e=>e?EQ(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),dGe=(()=>{let e=!1;return()=>{e||(kQ(),e=!0)}})();v(kQ,"setupDompurifyHooks");SQ=v(e=>(dGe(),co.sanitize(e)),"removeScript"),hQ=v((e,t)=>{if(ea(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=SQ(e):r!=="loose"&&(e=EQ(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=yGe(e))}return e},"sanitizeMore"),Cr=v((e,t)=>e&&(t.dompurifyConfig?e=co.sanitize(hQ(e,t),t.dompurifyConfig).toString():e=co.sanitize(hQ(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),pGe=v((e,t)=>typeof e=="string"?Cr(e,t):e.flat().map(r=>Cr(r,t)),"sanitizeTextOrArray"),gGe=v(e=>v0.test(e),"hasBreaks"),mGe=v(e=>e.split(v0),"splitBreaks"),yGe=v(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),EQ=v(e=>e.replace(v0,"#br#"),"breakToPlaceholder"),bb=v(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),vGe=v(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),xGe=v(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),eu=v(function(e){let t=e.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,e.split(t).length-1),"countOccurrence"),bGe=v((e,t)=>{let r=aI(e,"~"),n=aI(t,"~");return r===1&&n===1},"shouldCombineSets"),TGe=v(e=>{let t=aI(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),fQ=v(()=>window.MathMLElement!==void 0,"isMathMLSupported"),CS=/\$\$(.*?)\$\$/g,hi=v(e=>(e.match(CS)?.length??0)>0,"hasKatex"),yy=v(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await vy(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),wGe=v(async(e,t)=>{if(!hi(e))return e;if(!(fQ()||t.legacyMathML||t.forceLegacyMathML))return e.replace(CS,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(z8(),dZ)),n=t.forceLegacyMathML||!fQ()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(v0).map(i=>hi(i)?`
${i}
`:`
${i}
`).join("").replace(CS,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}return e.replace(CS,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),vy=v(async(e,t)=>Cr(await wGe(e,t),t),"renderKatexSanitized"),vt={getRows:fGe,sanitizeText:Cr,sanitizeTextOrArray:pGe,hasBreaks:gGe,splitBreaks:mGe,lineBreakRegex:v0,removeScript:SQ,getUrl:bb,evaluate:Ho,getMax:vGe,getMin:xGe},CGe=v(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),kGe=v(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),Vr=v(function(e,t,r,n){let i=kGe(t,r,n);CGe(e,i)},"configureSvgSize"),tu=v(function(e,t,r,n){let i=t.node().getBBox(),a=i.width,s=i.height;fe.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;fe.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,fe.info(`Calculated bounds: ${o}x${l}`),Vr(t,l,o,n);let u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",u)},"setupGraphViewbox"),kS={};v(RS,"cssStyleSheetToString");SGe=v((e,t,r,n)=>{let i="";return e in kS&&kS[e]?i=kS[e]({...r,svgId:n}):fe.warn(`No theme found for ${e}`),`& { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} @@ -332,24 +332,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho margin: 0 } - ${n} + ${i} .node .neo-node { stroke: ${r.nodeBorder}; } [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { - stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + [data-look="neo"].swimlane.cluster rect { + filter: none; } [data-look="neo"].node path { - stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; stroke-width: ${r.strokeWidth??1}px; } [data-look="neo"].node .outer-path { - filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; } [data-look="neo"].node .neo-line path { @@ -358,8 +361,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } [data-look="neo"].node circle{ - stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; } [data-look="neo"].node circle .state-start{ @@ -367,122 +370,93 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } [data-look="neo"].icon-shape .icon { - fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; } [data-look="neo"].icon-shape .icon-neo path { - stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; } ${t} -`},"getStyles"),EMe=b((e,t)=>{t!==void 0&&(Jk[e]=t)},"addStylesForDiagram"),aj=SMe,a4={};gf(a4,{clear:()=>fr,getAccDescription:()=>xr,getAccTitle:()=>vr,getDiagramTitle:()=>Tr,setAccDescription:()=>br,setAccTitle:()=>yr,setDiagramTitle:()=>kr});CL="",SL="",EL="",AL=b(e=>mr(e,It()),"sanitizeText"),fr=b(()=>{CL="",EL="",SL=""},"clear"),yr=b(e=>{CL=AL(e).replace(/^\s+/g,"")},"setAccTitle"),vr=b(()=>CL,"getAccTitle"),br=b(e=>{EL=AL(e).replace(/\n\s+/g,` -`)},"setAccDescription"),xr=b(()=>EL,"getAccDescription"),kr=b(e=>{SL=AL(e)},"setDiagramTitle"),Tr=b(()=>SL,"getDiagramTitle"),VY=ee,AMe=$v,we=It,Zv=kL,s4=bp,o4=b(e=>mr(e,we()),"sanitizeText"),Qv=wc,_Me=b(()=>a4,"getCommonDb"),t4={},Jv=b((e,t,r)=>{t4[e]&&VY.warn(`Diagram with id ${e} already registered. Overwriting.`),t4[e]=t,r&&WY(e,r),EMe(e,t.styles),t.injectUtils?.(VY,AMe,we,o4,Qv,_Me(),()=>{})},"registerDiagram"),l4=b(e=>{if(e in t4)return t4[e];throw new LMe(e)},"getDiagram"),LMe=class extends Error{static{b(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}});function wp(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var _L=q(()=>{});function LL(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var sj=q(()=>{});function kp(e){let t,r,i;e.length!==2?(t=wp,r=(o,l)=>wp(e(o),l),i=(o,l)=>e(o)-l):(t=e===wp||e===LL?e:RMe,r=e,i=e);function n(o,l,u=0,h=o.length){if(u>>1;r(o[f],l)<0?u=f+1:h=f}while(u>>1;r(o[f],l)<=0?u=f+1:h=f}while(uu&&i(o[f-1],l)>-i(o[f],l)?f-1:f}return{left:n,center:s,right:a}}function RMe(){return 0}var RL=q(()=>{_L();sj()});function IL(e){return e===null?NaN:+e}var oj=q(()=>{});var lj,cj,IMe,DMe,DL,uj=q(()=>{_L();RL();oj();lj=kp(wp),cj=lj.right,IMe=lj.left,DMe=kp(IL).center,DL=cj});function hj({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function NMe({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function MMe({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function OMe(e){return e!==null&&typeof e=="object"?e.valueOf():e}var ym,fj=q(()=>{ym=class extends Map{constructor(t,r=OMe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[i,n]of t)this.set(i,n)}get(t){return super.get(hj(this,t))}has(t){return super.has(hj(this,t))}set(t,r){return super.set(NMe(this,t),r)}delete(t){return super.delete(MMe(this,t))}}});function c4(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=a>=PMe?10:a>=BMe?5:a>=FMe?2:1,o,l,u;return n<0?(u=Math.pow(10,-n)/s,o=Math.round(e*u),l=Math.round(t*u),o/ut&&--l,u=-u):(u=Math.pow(10,n)*s,o=Math.round(e/u),l=Math.round(t/u),o*ut&&--l),l0))return[];if(e===t)return[e];let i=t=n))return[];let o=a-n+1,l=new Array(o);if(i)if(s<0)for(let u=0;u{PMe=Math.sqrt(50),BMe=Math.sqrt(10),FMe=Math.sqrt(2)});function h4(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}var pj=q(()=>{});function f4(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}var gj=q(()=>{});function d4(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++i{});var vf=q(()=>{uj();RL();pj();gj();mj();dj();fj()});function yj(e){return e}var vj=q(()=>{});function $Me(e){return"translate("+e+",0)"}function zMe(e){return"translate(0,"+e+")"}function GMe(e){return t=>+e(t)}function qMe(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function VMe(){return!this.__axis}function xj(e,t){var r=[],i=null,n=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===g4||e===p4?-1:1,h=e===p4||e===NL?"x":"y",f=e===g4||e===ML?$Me:zMe;function d(p){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),m=n??(t.tickFormat?t.tickFormat.apply(t,r):yj),y=Math.max(a,0)+o,v=t.range(),x=+v[0]+l,T=+v[v.length-1]+l,C=(t.bandwidth?qMe:GMe)(t.copy(),l),w=p.selection?p.selection():p,k=w.selectAll(".domain").data([null]),E=w.selectAll(".tick").data(g,t).order(),A=E.exit(),N=E.enter().append("g").attr("class","tick"),P=E.select("line"),O=E.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(N),P=P.merge(N.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),O=O.merge(N.append("text").attr("fill","currentColor").attr(h,u*y).attr("dy",e===g4?"0em":e===ML?"0.71em":"0.32em")),p!==w&&(k=k.transition(p),E=E.transition(p),P=P.transition(p),O=O.transition(p),A=A.transition(p).attr("opacity",bj).attr("transform",function(L){return isFinite(L=C(L))?f(L+l):this.getAttribute("transform")}),N.attr("opacity",bj).attr("transform",function(L){var _=this.parentNode.__axis;return f((_&&isFinite(_=_(L))?_:C(L))+l)})),A.remove(),k.attr("d",e===p4||e===NL?s?"M"+u*s+","+x+"H"+l+"V"+T+"H"+u*s:"M"+l+","+x+"V"+T:s?"M"+x+","+u*s+"V"+l+"H"+T+"V"+u*s:"M"+x+","+l+"H"+T),E.attr("opacity",1).attr("transform",function(L){return f(C(L)+l)}),P.attr(h+"2",u*a),O.attr(h,u*y).text(m),w.filter(VMe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===NL?"start":e===p4?"end":"middle"),w.each(function(){this.__axis=C})}return d.scale=function(p){return arguments.length?(t=p,d):t},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),d):i&&i.slice()},d.tickFormat=function(p){return arguments.length?(n=p,d):n},d.tickSize=function(p){return arguments.length?(a=s=+p,d):a},d.tickSizeInner=function(p){return arguments.length?(a=+p,d):a},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function OL(e){return xj(g4,e)}function PL(e){return xj(ML,e)}var g4,NL,ML,p4,bj,Tj=q(()=>{vj();g4=1,NL=2,ML=3,p4=4,bj=1e-6});var wj=q(()=>{Tj()});function Cj(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}function HMe(e,t){for(var r=0,i=e.length,n;r{WMe={value:()=>{}};m4.prototype=Cj.prototype={constructor:m4,on:function(e,t){var r=this._,i=UMe(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i{Sj()});var y4,$L,zL=q(()=>{y4="http://www.w3.org/1999/xhtml",$L={svg:"http://www.w3.org/2000/svg",xhtml:y4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Wu(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),$L.hasOwnProperty(t)?{space:$L[t],local:e}:e}var v4=q(()=>{zL()});function YMe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===y4&&t.documentElement.namespaceURI===y4?t.createElement(e):t.createElementNS(r,e)}}function jMe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function b4(e){var t=Wu(e);return(t.local?jMe:YMe)(t)}var GL=q(()=>{v4();zL()});function XMe(){}function Cp(e){return e==null?XMe:function(){return this.querySelector(e)}}var x4=q(()=>{});function Ej(e){typeof e!="function"&&(e=Cp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{bl();x4()});function qL(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var _j=q(()=>{});function KMe(){return[]}function t2(e){return e==null?KMe:function(){return this.querySelectorAll(e)}}var VL=q(()=>{});function ZMe(e){return function(){return qL(e.apply(this,arguments))}}function Lj(e){typeof e=="function"?e=ZMe(e):e=t2(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a{bl();_j();VL()});function r2(e){return function(){return this.matches(e)}}function T4(e){return function(t){return t.matches(e)}}var i2=q(()=>{});function JMe(e){return function(){return QMe.call(this.children,e)}}function eOe(){return this.firstElementChild}function Ij(e){return this.select(e==null?eOe:JMe(typeof e=="function"?e:T4(e)))}var QMe,Dj=q(()=>{i2();QMe=Array.prototype.find});function rOe(){return Array.from(this.children)}function iOe(e){return function(){return tOe.call(this.children,e)}}function Nj(e){return this.selectAll(e==null?rOe:iOe(typeof e=="function"?e:T4(e)))}var tOe,Mj=q(()=>{i2();tOe=Array.prototype.filter});function Oj(e){typeof e!="function"&&(e=r2(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{bl();i2()});function w4(e){return new Array(e.length)}var WL=q(()=>{});function Bj(){return new nn(this._enter||this._groups.map(w4),this._parents)}function n2(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var UL=q(()=>{WL();bl();n2.prototype={constructor:n2,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function Fj(e){return function(){return e}}var $j=q(()=>{});function nOe(e,t,r,i,n,a){for(var s=0,o,l=t.length,u=a.length;s=T&&(T=x+1);!(w=y[T])&&++T{bl();UL();$j()});function qj(){return new nn(this._exit||this._groups.map(w4),this._parents)}var Vj=q(()=>{WL();bl()});function Wj(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}var Uj=q(()=>{});function Hj(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l{bl()});function jj(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var Xj=q(()=>{});function Kj(e){e||(e=lOe);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}var Zj=q(()=>{bl()});function Qj(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Jj=q(()=>{});function eX(){return Array.from(this)}var tX=q(()=>{});function rX(){for(var e=this._groups,t=0,r=e.length;t{});function nX(){let e=0;for(let t of this)++e;return e}var aX=q(()=>{});function sX(){return!this.node()}var oX=q(()=>{});function lX(e){for(var t=this._groups,r=0,i=t.length;r{});function cOe(e){return function(){this.removeAttribute(e)}}function uOe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hOe(e,t){return function(){this.setAttribute(e,t)}}function fOe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function dOe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function pOe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function uX(e,t){var r=Wu(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?uOe:cOe:typeof t=="function"?r.local?pOe:dOe:r.local?fOe:hOe)(r,t))}var hX=q(()=>{v4()});function k4(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var HL=q(()=>{});function gOe(e){return function(){this.style.removeProperty(e)}}function mOe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function yOe(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function fX(e,t,r){return arguments.length>1?this.each((t==null?gOe:typeof t=="function"?yOe:mOe)(e,t,r??"")):bf(this.node(),e)}function bf(e,t){return e.style.getPropertyValue(t)||k4(e).getComputedStyle(e,null).getPropertyValue(t)}var YL=q(()=>{HL()});function vOe(e){return function(){delete this[e]}}function bOe(e,t){return function(){this[e]=t}}function xOe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function dX(e,t){return arguments.length>1?this.each((t==null?vOe:typeof t=="function"?xOe:bOe)(e,t)):this.node()[e]}var pX=q(()=>{});function gX(e){return e.trim().split(/^|\s+/)}function jL(e){return e.classList||new mX(e)}function mX(e){this._node=e,this._names=gX(e.getAttribute("class")||"")}function yX(e,t){for(var r=jL(e),i=-1,n=t.length;++i{mX.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function COe(){this.textContent=""}function SOe(e){return function(){this.textContent=e}}function EOe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function TX(e){return arguments.length?this.each(e==null?COe:(typeof e=="function"?EOe:SOe)(e)):this.node().textContent}var wX=q(()=>{});function AOe(){this.innerHTML=""}function _Oe(e){return function(){this.innerHTML=e}}function LOe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function kX(e){return arguments.length?this.each(e==null?AOe:(typeof e=="function"?LOe:_Oe)(e)):this.node().innerHTML}var CX=q(()=>{});function ROe(){this.nextSibling&&this.parentNode.appendChild(this)}function SX(){return this.each(ROe)}var EX=q(()=>{});function IOe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function AX(){return this.each(IOe)}var _X=q(()=>{});function LX(e){var t=typeof e=="function"?e:b4(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var RX=q(()=>{GL()});function DOe(){return null}function IX(e,t){var r=typeof e=="function"?e:b4(e),i=t==null?DOe:typeof t=="function"?t:Cp(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var DX=q(()=>{GL();x4()});function NOe(){var e=this.parentNode;e&&e.removeChild(this)}function NX(){return this.each(NOe)}var MX=q(()=>{});function MOe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function OOe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function OX(e){return this.select(e?OOe:MOe)}var PX=q(()=>{});function BX(e){return arguments.length?this.property("__data__",e):this.node().__data__}var FX=q(()=>{});function POe(e){return function(t){e.call(this,t,this.__data__)}}function BOe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function FOe(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r{});function GX(e,t,r){var i=k4(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function zOe(e,t){return function(){return GX(this,e,t)}}function GOe(e,t){return function(){return GX(this,e,t.apply(this,arguments))}}function qX(e,t){return this.each((typeof t=="function"?GOe:zOe)(e,t))}var VX=q(()=>{HL()});function*WX(){for(var e=this._groups,t=0,r=e.length;t{});function nn(e,t){this._groups=e,this._parents=t}function HX(){return new nn([[document.documentElement]],XL)}function qOe(){return this}var XL,Uu,bl=q(()=>{Aj();Rj();Dj();Mj();Pj();Gj();UL();Vj();Uj();Yj();Xj();Zj();Jj();tX();iX();aX();oX();cX();hX();YL();pX();xX();wX();CX();EX();_X();RX();DX();MX();PX();FX();zX();VX();UX();XL=[null];nn.prototype=HX.prototype={constructor:nn,select:Ej,selectAll:Lj,selectChild:Ij,selectChildren:Nj,filter:Oj,data:zj,enter:Bj,exit:qj,join:Wj,merge:Hj,selection:qOe,order:jj,sort:Kj,call:Qj,nodes:eX,node:rX,size:nX,empty:sX,each:lX,attr:uX,style:fX,property:dX,classed:bX,text:TX,html:kX,raise:SX,lower:AX,append:LX,insert:IX,remove:NX,clone:OX,datum:BX,on:$X,dispatch:qX,[Symbol.iterator]:WX};Uu=HX});function Qe(e){return typeof e=="string"?new nn([[document.querySelector(e)]],[document.documentElement]):new nn([[e]],XL)}var YX=q(()=>{bl()});var xl=q(()=>{i2();v4();YX();bl();x4();VL();YL()});var jX=q(()=>{});function Sp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function bm(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}var KL=q(()=>{});function xf(){}function KX(){return this.rgb().formatHex()}function KOe(){return this.rgb().formatHex8()}function ZOe(){return iK(this).formatHsl()}function ZX(){return this.rgb().formatRgb()}function wl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=VOe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?QX(t):r===3?new ha(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?C4(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?C4(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=WOe.exec(e))?new ha(t[1],t[2],t[3],1):(t=UOe.exec(e))?new ha(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=HOe.exec(e))?C4(t[1],t[2],t[3],t[4]):(t=YOe.exec(e))?C4(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jOe.exec(e))?tK(t[1],t[2]/100,t[3]/100,1):(t=XOe.exec(e))?tK(t[1],t[2]/100,t[3]/100,t[4]):XX.hasOwnProperty(e)?QX(XX[e]):e==="transparent"?new ha(NaN,NaN,NaN,0):null}function QX(e){return new ha(e>>16&255,e>>8&255,e&255,1)}function C4(e,t,r,i){return i<=0&&(e=t=r=NaN),new ha(e,t,r,i)}function QL(e){return e instanceof xf||(e=wl(e)),e?(e=e.rgb(),new ha(e.r,e.g,e.b,e.opacity)):new ha}function Tm(e,t,r,i){return arguments.length===1?QL(e):new ha(e,t,r,i??1)}function ha(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function JX(){return`#${Ep(this.r)}${Ep(this.g)}${Ep(this.b)}`}function QOe(){return`#${Ep(this.r)}${Ep(this.g)}${Ep(this.b)}${Ep((isNaN(this.opacity)?1:this.opacity)*255)}`}function eK(){let e=A4(this.opacity);return`${e===1?"rgb(":"rgba("}${Ap(this.r)}, ${Ap(this.g)}, ${Ap(this.b)}${e===1?")":`, ${e})`}`}function A4(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ap(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ep(e){return e=Ap(e),(e<16?"0":"")+e.toString(16)}function tK(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Tl(e,t,r,i)}function iK(e){if(e instanceof Tl)return new Tl(e.h,e.s,e.l,e.opacity);if(e instanceof xf||(e=wl(e)),!e)return new Tl;if(e instanceof Tl)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r0&&l<1?0:s,new Tl(s,o,l,e.opacity)}function nK(e,t,r,i){return arguments.length===1?iK(e):new Tl(e,t,r,i??1)}function Tl(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function rK(e){return e=(e||0)%360,e<0?e+360:e}function S4(e){return Math.max(0,Math.min(1,e||0))}function ZL(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var a2,E4,xm,s2,kc,VOe,WOe,UOe,HOe,YOe,jOe,XOe,XX,JL=q(()=>{KL();a2=.7,E4=1/a2,xm="\\s*([+-]?\\d+)\\s*",s2="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VOe=/^#([0-9a-f]{3,8})$/,WOe=new RegExp(`^rgb\\(${xm},${xm},${xm}\\)$`),UOe=new RegExp(`^rgb\\(${kc},${kc},${kc}\\)$`),HOe=new RegExp(`^rgba\\(${xm},${xm},${xm},${s2}\\)$`),YOe=new RegExp(`^rgba\\(${kc},${kc},${kc},${s2}\\)$`),jOe=new RegExp(`^hsl\\(${s2},${kc},${kc}\\)$`),XOe=new RegExp(`^hsla\\(${s2},${kc},${kc},${s2}\\)$`),XX={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Sp(xf,wl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KX,formatHex:KX,formatHex8:KOe,formatHsl:ZOe,formatRgb:ZX,toString:ZX});Sp(ha,Tm,bm(xf,{brighter(e){return e=e==null?E4:Math.pow(E4,e),new ha(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?a2:Math.pow(a2,e),new ha(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ha(Ap(this.r),Ap(this.g),Ap(this.b),A4(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JX,formatHex:JX,formatHex8:QOe,formatRgb:eK,toString:eK}));Sp(Tl,nK,bm(xf,{brighter(e){return e=e==null?E4:Math.pow(E4,e),new Tl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?a2:Math.pow(a2,e),new Tl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new ha(ZL(e>=240?e-240:e+120,n,i),ZL(e,n,i),ZL(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Tl(rK(this.h),S4(this.s),S4(this.l),A4(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=A4(this.opacity);return`${e===1?"hsl(":"hsla("}${rK(this.h)}, ${S4(this.s)*100}%, ${S4(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var aK,sK,oK=q(()=>{aK=Math.PI/180,sK=180/Math.PI});function dK(e){if(e instanceof Cc)return new Cc(e.l,e.a,e.b,e.opacity);if(e instanceof Hu)return pK(e);e instanceof ha||(e=QL(e));var t=iR(e.r),r=iR(e.g),i=iR(e.b),n=eR((.2225045*t+.7168786*r+.0606169*i)/cK),a,s;return t===r&&r===i?a=s=n:(a=eR((.4360747*t+.3850649*r+.1430804*i)/lK),s=eR((.0139322*t+.0971045*r+.7141733*i)/uK)),new Cc(116*n-16,500*(a-n),200*(n-s),e.opacity)}function nR(e,t,r,i){return arguments.length===1?dK(e):new Cc(e,t,r,i??1)}function Cc(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function eR(e){return e>JOe?Math.pow(e,1/3):e/fK+hK}function tR(e){return e>wm?e*e*e:fK*(e-hK)}function rR(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function iR(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ePe(e){if(e instanceof Hu)return new Hu(e.h,e.c,e.l,e.opacity);if(e instanceof Cc||(e=dK(e)),e.a===0&&e.b===0)return new Hu(NaN,0{KL();JL();oK();_4=18,lK=.96422,cK=1,uK=.82521,hK=4/29,wm=6/29,fK=3*wm*wm,JOe=wm*wm*wm;Sp(Cc,nR,bm(xf,{brighter(e){return new Cc(this.l+_4*(e??1),this.a,this.b,this.opacity)},darker(e){return new Cc(this.l-_4*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=lK*tR(t),e=cK*tR(e),r=uK*tR(r),new ha(rR(3.1338561*t-1.6168667*e-.4906146*r),rR(-.9787684*t+1.9161415*e+.033454*r),rR(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Sp(Hu,o2,bm(xf,{brighter(e){return new Hu(this.h,this.c,this.l+_4*(e??1),this.opacity)},darker(e){return new Hu(this.h,this.c,this.l-_4*(e??1),this.opacity)},rgb(){return pK(this).rgb()}}))});var km=q(()=>{JL();gK()});function aR(e,t,r,i,n){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*i+s*n)/6}function mK(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],s=i>0?e[i-1]:2*n-a,o=i{});function yK(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),n=e[(i+t-1)%t],a=e[i%t],s=e[(i+1)%t],o=e[(i+2)%t];return aR((r-i/t)*t,n,a,s,o)}}var vK=q(()=>{sR()});var Cm,oR=q(()=>{Cm=e=>()=>e});function bK(e,t){return function(r){return e+r*t}}function tPe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function xK(e,t){var r=t-e;return r?bK(e,r>180||r<-180?r-360*Math.round(r/360):r):Cm(isNaN(e)?t:e)}function TK(e){return(e=+e)==1?Yu:function(t,r){return r-t?tPe(t,r,e):Cm(isNaN(t)?r:t)}}function Yu(e,t){var r=t-e;return r?bK(e,r):Cm(isNaN(e)?t:e)}var lR=q(()=>{oR()});function wK(e){return function(t){var r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),s,o;for(s=0;s{km();sR();vK();lR();_p=(function e(t){var r=TK(t);function i(n,a){var s=r((n=Tm(n)).r,(a=Tm(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),u=Yu(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=u(h),n+""}}return i.gamma=e,i})(1);rPe=wK(mK),iPe=wK(yK)});function kK(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n{});function EK(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),s;for(s=0;s{L4()});function _K(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}var LK=q(()=>{});function fa(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var l2=q(()=>{});function RK(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=Lp(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var IK=q(()=>{L4()});function nPe(e){return function(){return e}}function aPe(e){return function(t){return e(t)+""}}function c2(e,t){var r=hR.lastIndex=uR.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=hR.exec(e))&&(n=uR.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:fa(i,n)})),r=uR.lastIndex;return r{l2();hR=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uR=new RegExp(hR.source,"g")});function Lp(e,t){var r=typeof t,i;return t==null||r==="boolean"?Cm(t):(r==="number"?fa:r==="string"?(i=wl(t))?(t=i,_p):c2:t instanceof wl?_p:t instanceof Date?_K:CK(t)?kK:Array.isArray(t)?EK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?RK:fa)(e,t)}var L4=q(()=>{km();cR();AK();LK();l2();IK();fR();oR();SK()});function dR(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var DK=q(()=>{});function pR(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i{NK=180/Math.PI,R4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function OK(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?R4:pR(t.a,t.b,t.c,t.d,t.e,t.f)}function PK(e){return e==null?R4:(I4||(I4=document.createElementNS("http://www.w3.org/2000/svg","g")),I4.setAttribute("transform",e),(e=I4.transform.baseVal.consolidate())?(e=e.matrix,pR(e.a,e.b,e.c,e.d,e.e,e.f)):R4)}var I4,BK=q(()=>{MK()});function FK(e,t,r,i){function n(u){return u.length?u.pop()+" ":""}function a(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push("translate(",null,t,null,r);g.push({i:m-4,x:fa(u,f)},{i:m-2,x:fa(h,d)})}else(f||d)&&p.push("translate("+f+t+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(n(f)+"rotate(",null,i)-2,x:fa(u,h)})):h&&f.push(n(f)+"rotate("+h+i)}function o(u,h,f,d){u!==h?d.push({i:f.push(n(f)+"skewX(",null,i)-2,x:fa(u,h)}):h&&f.push(n(f)+"skewX("+h+i)}function l(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push(n(p)+"scale(",null,",",null,")");g.push({i:m-4,x:fa(u,f)},{i:m-2,x:fa(h,d)})}else(f!==1||d!==1)&&p.push(n(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=e(u),h=e(h),a(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var g=-1,m=d.length,y;++g{l2();BK();gR=FK(OK,"px, ","px)","deg)"),mR=FK(PK,", ",")",")")});function zK(e){return function(t,r){var i=e((t=o2(t)).h,(r=o2(r)).h),n=Yu(t.c,r.c),a=Yu(t.l,r.l),s=Yu(t.opacity,r.opacity);return function(o){return t.h=i(o),t.c=n(o),t.l=a(o),t.opacity=s(o),t+""}}}var yR,sPe,GK=q(()=>{km();lR();yR=zK(xK),sPe=zK(Yu)});var Sm=q(()=>{L4();l2();DK();fR();$K();cR();GK()});function g2(){return Rp||(WK(oPe),Rp=d2.now()+M4)}function oPe(){Rp=0}function p2(){this._call=this._time=this._next=null}function O4(e,t,r){var i=new p2;return i.restart(e,t,r),i}function UK(){g2(),++Em;for(var e=D4,t;e;)(t=Rp-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Em}function qK(){Rp=(N4=d2.now())+M4,Em=h2=0;try{UK()}finally{Em=0,cPe(),Rp=0}}function lPe(){var e=d2.now(),t=e-N4;t>VK&&(M4-=t,N4=e)}function cPe(){for(var e,t=D4,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:D4=r);f2=e,vR(i)}function vR(e){if(!Em){h2&&(h2=clearTimeout(h2));var t=e-Rp;t>24?(e<1/0&&(h2=setTimeout(qK,e-d2.now()-M4)),u2&&(u2=clearInterval(u2))):(u2||(N4=d2.now(),u2=setInterval(lPe,VK)),Em=1,WK(qK))}}var Em,h2,u2,VK,D4,f2,N4,Rp,M4,d2,WK,bR=q(()=>{Em=0,h2=0,u2=0,VK=1e3,N4=0,Rp=0,M4=0,d2=typeof performance=="object"&&performance.now?performance:Date,WK=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};p2.prototype=O4.prototype={constructor:p2,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?g2():+r)+(t==null?0:+t),!this._next&&f2!==this&&(f2?f2._next=this:D4=this,f2=this),this._call=e,this._time=r,vR()},stop:function(){this._call&&(this._call=null,this._time=1/0,vR())}}});function P4(e,t,r){var i=new p2;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var HK=q(()=>{bR()});var B4=q(()=>{bR();HK()});function Tf(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;fPe(e,r,{name:t,index:i,group:n,on:uPe,tween:hPe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:XK})}function y2(e,t){var r=Fn(e,t);if(r.state>XK)throw new Error("too late; already scheduled");return r}function da(e,t){var r=Fn(e,t);if(r.state>F4)throw new Error("too late; already running");return r}function Fn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function fPe(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=O4(a,0,r.time);function a(u){r.state=YK,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==YK)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===F4)return P4(s);p.state===jK?(p.state=m2,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h{FL();B4();uPe=BL("start","end","cancel","interrupt"),hPe=[],XK=0,YK=1,$4=2,F4=3,jK=4,z4=5,m2=6});function G4(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>$4&&i.state{As()});function ZK(e){return this.each(function(){G4(this,e)})}var QK=q(()=>{KK()});function dPe(e,t){var r,i;return function(){var n=da(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s{As()});function q4(e,t){var r;return(typeof t=="number"?fa:t instanceof wl?_p:(r=wl(t))?(t=r,_p):c2)(e,t)}var xR=q(()=>{km();Sm()});function gPe(e){return function(){this.removeAttribute(e)}}function mPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yPe(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function vPe(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function bPe(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function xPe(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function eZ(e,t){var r=Wu(e),i=r==="transform"?mR:q4;return this.attrTween(e,typeof t=="function"?(r.local?xPe:bPe)(r,i,Am(this,"attr."+e,t)):t==null?(r.local?mPe:gPe)(r):(r.local?vPe:yPe)(r,i,t))}var tZ=q(()=>{Sm();xl();v2();xR()});function TPe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function wPe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function kPe(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&wPe(e,a)),r}return n._value=t,n}function CPe(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&TPe(e,a)),r}return n._value=t,n}function rZ(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Wu(e);return this.tween(r,(i.local?kPe:CPe)(i,t))}var iZ=q(()=>{xl()});function SPe(e,t){return function(){y2(this,e).delay=+t.apply(this,arguments)}}function EPe(e,t){return t=+t,function(){y2(this,e).delay=t}}function nZ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?SPe:EPe)(t,e)):Fn(this.node(),t).delay}var aZ=q(()=>{As()});function APe(e,t){return function(){da(this,e).duration=+t.apply(this,arguments)}}function _Pe(e,t){return t=+t,function(){da(this,e).duration=t}}function sZ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?APe:_Pe)(t,e)):Fn(this.node(),t).duration}var oZ=q(()=>{As()});function LPe(e,t){if(typeof t!="function")throw new Error;return function(){da(this,e).ease=t}}function lZ(e){var t=this._id;return arguments.length?this.each(LPe(t,e)):Fn(this.node(),t).ease}var cZ=q(()=>{As()});function RPe(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;da(this,e).ease=r}}function uZ(e){if(typeof e!="function")throw new Error;return this.each(RPe(this._id,e))}var hZ=q(()=>{As()});function fZ(e){typeof e!="function"&&(e=r2(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{xl();Ip()});function pZ(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o{Ip()});function IPe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function DPe(e,t,r){var i,n,a=IPe(t)?y2:da;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function mZ(e,t){var r=this._id;return arguments.length<2?Fn(this.node(),r).on.on(e):this.each(DPe(r,e,t))}var yZ=q(()=>{As()});function NPe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function vZ(){return this.on("end.remove",NPe(this._id))}var bZ=q(()=>{});function xZ(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Cp(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s{xl();Ip();As()});function wZ(e){var t=this._name,r=this._id;typeof e!="function"&&(e=t2(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o{xl();Ip();As()});function CZ(){return new MPe(this._groups,this._parents)}var MPe,SZ=q(()=>{xl();MPe=Uu.prototype.constructor});function OPe(e,t){var r,i,n;return function(){var a=bf(this,e),s=(this.style.removeProperty(e),bf(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function EZ(e){return function(){this.style.removeProperty(e)}}function PPe(e,t,r){var i,n=r+"",a;return function(){var s=bf(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function BPe(e,t,r){var i,n,a;return function(){var s=bf(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),bf(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function FPe(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=da(this,e),u=l.on,h=l.value[a]==null?o||(o=EZ(t)):void 0;(u!==r||n!==h)&&(i=(r=u).copy()).on(s,n=h),l.on=i}}function AZ(e,t,r){var i=(e+="")=="transform"?gR:q4;return t==null?this.styleTween(e,OPe(e,i)).on("end.style."+e,EZ(e)):typeof t=="function"?this.styleTween(e,BPe(e,i,Am(this,"style."+e,t))).each(FPe(this._id,e)):this.styleTween(e,PPe(e,i,t),r).on("end.style."+e,null)}var _Z=q(()=>{Sm();xl();As();v2();xR()});function $Pe(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function zPe(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&$Pe(e,s,r)),i}return a._value=t,a}function LZ(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,zPe(e,t,r??""))}var RZ=q(()=>{});function GPe(e){return function(){this.textContent=e}}function qPe(e){return function(){var t=e(this);this.textContent=t??""}}function IZ(e){return this.tween("text",typeof e=="function"?qPe(Am(this,"text",e)):GPe(e==null?"":e+""))}var DZ=q(()=>{v2()});function VPe(e){return function(t){this.textContent=e.call(this,t)}}function WPe(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&VPe(n)),t}return i._value=e,i}function NZ(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,WPe(e))}var MZ=q(()=>{});function OZ(){for(var e=this._name,t=this._id,r=V4(),i=this._groups,n=i.length,a=0;a{Ip();As()});function BZ(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var u=da(this,i),h=u.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),u.on=t}),n===0&&a()})}var FZ=q(()=>{As()});function Qa(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function $Z(e){return Uu().transition(e)}function V4(){return++UPe}var UPe,ju,Ip=q(()=>{xl();tZ();iZ();aZ();oZ();cZ();hZ();dZ();gZ();yZ();bZ();TZ();kZ();SZ();_Z();RZ();DZ();MZ();PZ();v2();FZ();UPe=0;ju=Uu.prototype;Qa.prototype=$Z.prototype={constructor:Qa,select:xZ,selectAll:wZ,selectChild:ju.selectChild,selectChildren:ju.selectChildren,filter:fZ,merge:pZ,selection:CZ,transition:OZ,call:ju.call,nodes:ju.nodes,node:ju.node,size:ju.size,empty:ju.empty,each:ju.each,on:mZ,attr:eZ,attrTween:rZ,style:AZ,styleTween:LZ,text:IZ,textTween:NZ,remove:vZ,tween:JK,delay:nZ,duration:sZ,ease:lZ,easeVarying:uZ,end:BZ,[Symbol.iterator]:ju[Symbol.iterator]}});function W4(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var zZ=q(()=>{});var TR=q(()=>{zZ()});function YPe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function GZ(e){var t,r;e instanceof Qa?(t=e._id,e=e._name):(t=V4(),(r=HPe).time=g2(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a{Ip();As();TR();B4();HPe={time:null,delay:0,duration:250,ease:W4}});var VZ=q(()=>{xl();QK();qZ();Uu.prototype.interrupt=ZK;Uu.prototype.transition=GZ});var U4=q(()=>{VZ()});var WZ=q(()=>{});var UZ=q(()=>{});var HZ=q(()=>{});function YZ(e){return[+e[0],+e[1]]}function jPe(e){return[YZ(e[0]),YZ(e[1])]}function wR(e){return{type:e}}var e9t,t9t,r9t,i9t,n9t,a9t,jZ=q(()=>{U4();WZ();UZ();HZ();({abs:e9t,max:t9t,min:r9t}=Math);i9t={name:"x",handles:["w","e"].map(wR),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},n9t={name:"y",handles:["n","s"].map(wR),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},a9t={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(wR),input:function(e){return e==null?null:jPe(e)},output:function(e){return e}}});var XZ=q(()=>{jZ()});function KZ(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return KZ;let r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n{kR=Math.PI,CR=2*kR,Dp=1e-6,XPe=CR-Dp;Np=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?KZ:KPe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,u=n-r,h=s-t,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Dp)if(!(Math.abs(f*l-u*h)>Dp)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-s,g=n-o,m=l*l+u*u,y=p*p+g*g,v=Math.sqrt(m),x=Math.sqrt(d),T=a*Math.tan((kR-Math.acos((m+d-y)/(2*v*x)))/2),C=T/x,w=T/v;Math.abs(C-1)>Dp&&this._append`L${t+C*h},${r+C*f}`,this._append`A${a},${a},0,0,${+(f*p>h*g)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),u=t+o,h=r+l,f=1^s,d=s?n-a:a-n;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>Dp||Math.abs(this._y1-h)>Dp)&&this._append`L${u},${h}`,i&&(d<0&&(d=d%CR+CR),d>XPe?this._append`A${i},${i},0,1,${f},${t-o},${r-l}A${i},${i},0,1,${f},${this._x1=u},${this._y1=h}`:d>Dp&&this._append`A${i},${i},0,${+(d>=kR)},${f},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};ZZ.prototype=Np.prototype});var SR=q(()=>{QZ()});var JZ=q(()=>{});var eQ=q(()=>{});var tQ=q(()=>{});var rQ=q(()=>{});var iQ=q(()=>{});var nQ=q(()=>{});var aQ=q(()=>{});function sQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Mp(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}var b2=q(()=>{});function Sc(e){return e=Mp(Math.abs(e)),e?e[1]:NaN}var x2=q(()=>{b2()});function oQ(e,t){return function(r,i){for(var n=r.length,a=[],s=0,o=e[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),a.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}var lQ=q(()=>{});function cQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var uQ=q(()=>{});function wf(e){if(!(t=ZPe.exec(e)))throw new Error("invalid format: "+e);var t;return new H4({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function H4(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var ZPe,ER=q(()=>{ZPe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;wf.prototype=H4.prototype;H4.prototype.toString=function(){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}});function hQ(e){e:for(var t=e.length,r=1,i=-1,n;r0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var fQ=q(()=>{});function dQ(e,t){var r=Mp(e,t);if(!r)return T2=void 0,e.toPrecision(t);var i=r[0],n=r[1],a=n-(T2=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Mp(e,Math.max(0,t+a-1))[0]}var T2,AR=q(()=>{b2()});function _R(e,t){var r=Mp(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var pQ=q(()=>{b2()});var LR,gQ=q(()=>{b2();AR();pQ();LR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:sQ,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_R(e*100,t),r:_R,s:dQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}});function RR(e){return e}var mQ=q(()=>{});function bQ(e){var t=e.grouping===void 0||e.thousands===void 0?RR:oQ(yQ.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?RR:cQ(yQ.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,d){f=wf(f);var p=f.fill,g=f.align,m=f.sign,y=f.symbol,v=f.zero,x=f.width,T=f.comma,C=f.precision,w=f.trim,k=f.type;k==="n"?(T=!0,k="g"):LR[k]||(C===void 0&&(C=12),w=!0,k="g"),(v||p==="0"&&g==="=")&&(v=!0,p="0",g="=");var E=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():""),A=(y==="$"?i:/[%p]/.test(k)?s:"")+(d&&d.suffix!==void 0?d.suffix:""),N=LR[k],P=/[defgprs%]/.test(k);C=C===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function O(L){var _=E,R=A,D,I,B;if(k==="c")R=N(L)+R,L="";else{L=+L;var M=L<0||1/L<0;if(L=isNaN(L)?l:N(Math.abs(L),C),w&&(L=hQ(L)),M&&+L==0&&m!=="+"&&(M=!1),_=(M?m==="("?m:o:m==="-"||m==="("?"":m)+_,R=(k==="s"&&!isNaN(L)&&T2!==void 0?vQ[8+T2/3]:"")+R+(M&&m==="("?")":""),P){for(D=-1,I=L.length;++DB||B>57){R=(B===46?n+L.slice(D+1):L.slice(D))+R,L=L.slice(0,D);break}}}T&&!v&&(L=t(L,1/0));var F=_.length+L.length+R.length,z=F>1)+_+L+R+z.slice(F);break;default:L=z+_+L+R;break}return a(L)}return O.toString=function(){return f+""},O}function h(f,d){var p=Math.max(-8,Math.min(8,Math.floor(Sc(d)/3)))*3,g=Math.pow(10,-p),m=u((f=wf(f),f.type="f",f),{suffix:vQ[8+p/3]});return function(y){return m(g*y)}}return{format:u,formatPrefix:h}}var yQ,vQ,xQ=q(()=>{x2();lQ();uQ();ER();fQ();gQ();AR();mQ();yQ=Array.prototype.map,vQ=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function IR(e){return Y4=bQ(e),Ec=Y4.format,j4=Y4.formatPrefix,Y4}var Y4,Ec,j4,TQ=q(()=>{xQ();IR({thousands:",",grouping:[3],currency:["$",""]})});function DR(e){return Math.max(0,-Sc(Math.abs(e)))}var wQ=q(()=>{x2()});function NR(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sc(t)/3)))*3-Sc(Math.abs(e)))}var kQ=q(()=>{x2()});function MR(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sc(t)-Sc(e))+1}var CQ=q(()=>{x2()});var OR=q(()=>{TQ();ER();wQ();kQ();CQ()});var SQ=q(()=>{});function QPe(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function EQ(){return this.eachAfter(QPe)}var AQ=q(()=>{});function _Q(e,t){let r=-1;for(let i of this)e.call(t,i,++r,this);return this}var LQ=q(()=>{});function RQ(e,t){for(var r=this,i=[r],n,a,s=-1;r=i.pop();)if(e.call(t,r,++s,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}var IQ=q(()=>{});function DQ(e,t){for(var r=this,i=[r],n=[],a,s,o,l=-1;r=i.pop();)if(n.push(r),a=r.children)for(s=0,o=a.length;s{});function MQ(e,t){let r=-1;for(let i of this)if(e.call(t,i,++r,this))return i}var OQ=q(()=>{});function PQ(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})}var BQ=q(()=>{});function FQ(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var $Q=q(()=>{});function zQ(e){for(var t=this,r=JPe(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function JPe(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}var GQ=q(()=>{});function qQ(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var VQ=q(()=>{});function WQ(){return Array.from(this)}var UQ=q(()=>{});function HQ(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var YQ=q(()=>{});function jQ(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var XQ=q(()=>{});function*KQ(){var e=this,t,r=[e],i,n,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n{});function _m(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=rBe)):t===void 0&&(t=tBe);for(var r=new w2(e),i,n=[r],a,s,o,l;i=n.pop();)if((s=t(i.data))&&(l=(s=Array.from(s)).length))for(i.children=s,o=l-1;o>=0;--o)n.push(a=s[o]=new w2(s[o])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(nBe)}function eBe(){return _m(this).eachBefore(iBe)}function tBe(e){return e.children}function rBe(e){return Array.isArray(e)?e[1]:null}function iBe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function nBe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function w2(e){this.data=e,this.depth=this.height=0,this.parent=null}var QQ=q(()=>{AQ();LQ();IQ();NQ();OQ();BQ();$Q();GQ();VQ();UQ();YQ();XQ();ZQ();w2.prototype=_m.prototype={constructor:w2,count:EQ,each:_Q,eachAfter:DQ,eachBefore:RQ,find:MQ,sum:PQ,sort:FQ,path:zQ,ancestors:qQ,descendants:WQ,leaves:HQ,links:jQ,copy:eBe,[Symbol.iterator]:KQ}});function JQ(e){if(typeof e!="function")throw new Error;return e}var eJ=q(()=>{});function Lm(){return 0}function Rm(e){return function(){return e}}var tJ=q(()=>{});function rJ(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var iJ=q(()=>{});function nJ(e,t,r,i,n){for(var a=e.children,s,o=-1,l=a.length,u=e.value&&(i-t)/e.value;++o{});function sJ(e,t,r,i,n){for(var a=e.children,s,o=-1,l=a.length,u=e.value&&(n-r)/e.value;++o{});function sBe(e,t,r,i,n,a){for(var s=[],o=t.children,l,u,h=0,f=0,d=o.length,p,g,m=t.value,y,v,x,T,C,w,k;hx&&(x=u),k=y*y*w,T=Math.max(x/k,k/v),T>C){y-=u;break}C=T}s.push(l={value:y,dice:p{aJ();oJ();aBe=(1+Math.sqrt(5))/2;lJ=(function e(t){function r(i,n,a,s,o){sBe(t,i,n,a,s,o)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(aBe)});function PR(){var e=lJ,t=!1,r=1,i=1,n=[0],a=Lm,s=Lm,o=Lm,l=Lm,u=Lm;function h(d){return d.x0=d.y0=0,d.x1=r,d.y1=i,d.eachBefore(f),n=[0],t&&d.eachBefore(rJ),d}function f(d){var p=n[d.depth],g=d.x0+p,m=d.y0+p,y=d.x1-p,v=d.y1-p;y{iJ();cJ();eJ();tJ()});var hJ=q(()=>{QQ();uJ()});var fJ=q(()=>{});var dJ=q(()=>{});function kf(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var k2=q(()=>{});function no(){var e=new ym,t=[],r=[],i=BR;function n(a){let s=e.get(a);if(s===void 0){if(i!==BR)return i;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return n.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new ym;for(let s of a)e.has(s)||e.set(s,t.push(s)-1);return n},n.range=function(a){return arguments.length?(r=Array.from(a),n):r.slice()},n.unknown=function(a){return arguments.length?(i=a,n):i},n.copy=function(){return no(t,r).unknown(i)},kf.apply(n,arguments),n}var BR,FR=q(()=>{vf();k2();BR=Symbol("implicit")});function Im(){var e=no().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,a,s,o=!1,l=0,u=0,h=.5;delete e.unknown;function f(){var d=t().length,p=n{vf();k2();FR()});function $R(e){return function(){return e}}var gJ=q(()=>{});function zR(e){return+e}var mJ=q(()=>{});function Dm(e){return e}function GR(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:$R(isNaN(t)?NaN:.5)}function oBe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function lBe(e,t,r){var i=e[0],n=e[1],a=t[0],s=t[1];return n2?cBe:lBe,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=o(e.map(i),t,r)))(i(s(d)))}return f.invert=function(d){return s(n((u||(u=o(t,e.map(i),fa)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,zR),h()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),h()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=dR,h()},f.clamp=function(d){return arguments.length?(s=d?!0:Dm,h()):s!==Dm},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return i=d,n=p,h()}}function C2(){return uBe()(Dm,Dm)}var yJ,qR=q(()=>{vf();Sm();gJ();mJ();yJ=[0,1]});function VR(e,t,r,i){var n=vm(e,t,r),a;switch(i=wf(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=NR(n,s))&&(i.precision=a),j4(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=MR(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=DR(n))&&(i.precision=a-(i.type==="%")*2);break}}return Ec(i)}var vJ=q(()=>{vf();OR()});function hBe(e){var t=e.domain;return e.ticks=function(r){var i=t();return u4(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return VR(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,a=i.length-1,s=i[n],o=i[a],l,u,h=10;for(o0;){if(u=e2(s,o,r),u===l)return i[n]=s,i[a]=o,t(i);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function kl(){var e=C2();return e.copy=function(){return X4(e,kl())},kf.apply(e,arguments),hBe(e)}var bJ=q(()=>{vf();qR();k2();vJ()});function WR(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],a=e[i],s;return a{});function ki(e,t,r,i){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{let s=n(a),o=n.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),n.range=(a,s,o)=>{let l=[];if(a=n.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,o),e(a);while(uki(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(n.count=(a,s)=>(UR.setTime(+a),HR.setTime(+s),e(UR),e(HR),Math.floor(r(UR,HR))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(i?s=>i(s)%a===0:s=>n.count(0,s)%a===0):n)),n}var UR,HR,Xu=q(()=>{UR=new Date,HR=new Date});var Ac,TJ,YR=q(()=>{Xu();Ac=ki(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ac.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ki(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ac);TJ=Ac.range});var ao,wJ,jR=q(()=>{Xu();ao=ki(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),wJ=ao.range});var Ku,fBe,K4,dBe,XR=q(()=>{Xu();Ku=ki(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),fBe=Ku.range,K4=ki(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),dBe=K4.range});var Zu,pBe,Z4,gBe,KR=q(()=>{Xu();Zu=ki(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),pBe=Zu.range,Z4=ki(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),gBe=Z4.range});var Mo,mBe,E2,yBe,Q4,vBe,ZR=q(()=>{Xu();Mo=ki(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),mBe=Mo.range,E2=ki(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),yBe=E2.range,Q4=ki(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),vBe=Q4.range});function Bp(e){return ki(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}function Fp(e){return ki(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var Cl,Cf,J4,eC,Lc,tC,rC,CJ,bBe,xBe,TBe,wBe,kBe,CBe,$p,Nm,SJ,EJ,Sf,AJ,_J,LJ,SBe,EBe,ABe,_Be,LBe,RBe,QR=q(()=>{Xu();Cl=Bp(0),Cf=Bp(1),J4=Bp(2),eC=Bp(3),Lc=Bp(4),tC=Bp(5),rC=Bp(6),CJ=Cl.range,bBe=Cf.range,xBe=J4.range,TBe=eC.range,wBe=Lc.range,kBe=tC.range,CBe=rC.range;$p=Fp(0),Nm=Fp(1),SJ=Fp(2),EJ=Fp(3),Sf=Fp(4),AJ=Fp(5),_J=Fp(6),LJ=$p.range,SBe=Nm.range,EBe=SJ.range,ABe=EJ.range,_Be=Sf.range,LBe=AJ.range,RBe=_J.range});var Qu,IBe,iC,DBe,JR=q(()=>{Xu();Qu=ki(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),IBe=Qu.range,iC=ki(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),DBe=iC.range});var so,NBe,Sl,MBe,eI=q(()=>{Xu();so=ki(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());so.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ki(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});NBe=so.range,Sl=ki(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Sl.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ki(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});MBe=Sl.range});function IJ(e,t,r,i,n,a){let s=[[ao,1,1e3],[ao,5,5*1e3],[ao,15,15*1e3],[ao,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[n,1,36e5],[n,3,3*36e5],[n,6,6*36e5],[n,12,12*36e5],[i,1,864e5],[i,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function o(u,h,f){let d=hy).right(s,d);if(p===s.length)return e.every(vm(u/31536e6,h/31536e6,f));if(p===0)return Ac.every(Math.max(vm(u,h,f),1));let[g,m]=s[d/s[p-1][2]{vf();YR();jR();XR();KR();ZR();QR();JR();eI();[PBe,BBe]=IJ(Sl,iC,$p,Q4,Z4,K4),[tI,rI]=IJ(so,Qu,Cl,Mo,Zu,Ku)});var nC=q(()=>{YR();jR();XR();KR();ZR();QR();JR();eI();DJ()});function iI(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function nI(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function A2(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function aI(e){var t=e.dateTime,r=e.date,i=e.time,n=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=_2(n),h=L2(n),f=_2(a),d=L2(a),p=_2(s),g=L2(s),m=_2(o),y=L2(o),v=_2(l),x=L2(l),T={a:B,A:M,b:F,B:z,c:null,d:FJ,e:FJ,f:sFe,g:mFe,G:vFe,H:iFe,I:nFe,j:aFe,L:VJ,m:oFe,M:lFe,p:$,q:G,Q:GJ,s:qJ,S:cFe,u:uFe,U:hFe,V:fFe,w:dFe,W:pFe,x:null,X:null,y:gFe,Y:yFe,Z:bFe,"%":zJ},C={a:U,A:j,b:H,B:Q,c:null,d:$J,e:$J,f:kFe,g:NFe,G:OFe,H:xFe,I:TFe,j:wFe,L:UJ,m:CFe,M:SFe,p:Y,q:se,Q:GJ,s:qJ,S:EFe,u:AFe,U:_Fe,V:LFe,w:RFe,W:IFe,x:null,X:null,y:DFe,Y:MFe,Z:PFe,"%":zJ},w={a:P,A:O,b:L,B:_,c:R,d:PJ,e:PJ,f:JBe,g:OJ,G:MJ,H:BJ,I:BJ,j:XBe,L:QBe,m:jBe,M:KBe,p:N,q:YBe,Q:tFe,s:rFe,S:ZBe,u:qBe,U:VBe,V:WBe,w:GBe,W:UBe,x:D,X:I,y:OJ,Y:MJ,Z:HBe,"%":eFe};T.x=k(r,T),T.X=k(i,T),T.c=k(t,T),C.x=k(r,C),C.X=k(i,C),C.c=k(t,C);function k(J,re){return function(ie){var te=[],xe=-1,fe=0,Se=J.length,Me,ke,Ce;for(ie instanceof Date||(ie=new Date(+ie));++xe53)return null;"w"in te||(te.w=1),"Z"in te?(fe=nI(A2(te.y,0,1)),Se=fe.getUTCDay(),fe=Se>4||Se===0?Nm.ceil(fe):Nm(fe),fe=E2.offset(fe,(te.V-1)*7),te.y=fe.getUTCFullYear(),te.m=fe.getUTCMonth(),te.d=fe.getUTCDate()+(te.w+6)%7):(fe=iI(A2(te.y,0,1)),Se=fe.getDay(),fe=Se>4||Se===0?Cf.ceil(fe):Cf(fe),fe=Mo.offset(fe,(te.V-1)*7),te.y=fe.getFullYear(),te.m=fe.getMonth(),te.d=fe.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),Se="Z"in te?nI(A2(te.y,0,1)).getUTCDay():iI(A2(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(Se+5)%7:te.w+te.U*7-(Se+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,nI(te)):iI(te)}}function A(J,re,ie,te){for(var xe=0,fe=re.length,Se=ie.length,Me,ke;xe=Se)return-1;if(Me=re.charCodeAt(xe++),Me===37){if(Me=re.charAt(xe++),ke=w[Me in NJ?re.charAt(xe++):Me],!ke||(te=ke(J,ie,te))<0)return-1}else if(Me!=ie.charCodeAt(te++))return-1}return te}function N(J,re,ie){var te=u.exec(re.slice(ie));return te?(J.p=h.get(te[0].toLowerCase()),ie+te[0].length):-1}function P(J,re,ie){var te=p.exec(re.slice(ie));return te?(J.w=g.get(te[0].toLowerCase()),ie+te[0].length):-1}function O(J,re,ie){var te=f.exec(re.slice(ie));return te?(J.w=d.get(te[0].toLowerCase()),ie+te[0].length):-1}function L(J,re,ie){var te=v.exec(re.slice(ie));return te?(J.m=x.get(te[0].toLowerCase()),ie+te[0].length):-1}function _(J,re,ie){var te=m.exec(re.slice(ie));return te?(J.m=y.get(te[0].toLowerCase()),ie+te[0].length):-1}function R(J,re,ie){return A(J,t,re,ie)}function D(J,re,ie){return A(J,r,re,ie)}function I(J,re,ie){return A(J,i,re,ie)}function B(J){return s[J.getDay()]}function M(J){return a[J.getDay()]}function F(J){return l[J.getMonth()]}function z(J){return o[J.getMonth()]}function $(J){return n[+(J.getHours()>=12)]}function G(J){return 1+~~(J.getMonth()/3)}function U(J){return s[J.getUTCDay()]}function j(J){return a[J.getUTCDay()]}function H(J){return l[J.getUTCMonth()]}function Q(J){return o[J.getUTCMonth()]}function Y(J){return n[+(J.getUTCHours()>=12)]}function se(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var re=k(J+="",T);return re.toString=function(){return J},re},parse:function(J){var re=E(J+="",!1);return re.toString=function(){return J},re},utcFormat:function(J){var re=k(J+="",C);return re.toString=function(){return J},re},utcParse:function(J){var re=E(J+="",!0);return re.toString=function(){return J},re}}}function Qr(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a[t.toLowerCase(),r]))}function GBe(e,t,r){var i=Jn.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function qBe(e,t,r){var i=Jn.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function VBe(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function WBe(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function UBe(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function MJ(e,t,r){var i=Jn.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function OJ(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function HBe(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function YBe(e,t,r){var i=Jn.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function jBe(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function PJ(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function XBe(e,t,r){var i=Jn.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function BJ(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function KBe(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function ZBe(e,t,r){var i=Jn.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function QBe(e,t,r){var i=Jn.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function JBe(e,t,r){var i=Jn.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function eFe(e,t,r){var i=FBe.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function tFe(e,t,r){var i=Jn.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function rFe(e,t,r){var i=Jn.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function FJ(e,t){return Qr(e.getDate(),t,2)}function iFe(e,t){return Qr(e.getHours(),t,2)}function nFe(e,t){return Qr(e.getHours()%12||12,t,2)}function aFe(e,t){return Qr(1+Mo.count(so(e),e),t,3)}function VJ(e,t){return Qr(e.getMilliseconds(),t,3)}function sFe(e,t){return VJ(e,t)+"000"}function oFe(e,t){return Qr(e.getMonth()+1,t,2)}function lFe(e,t){return Qr(e.getMinutes(),t,2)}function cFe(e,t){return Qr(e.getSeconds(),t,2)}function uFe(e){var t=e.getDay();return t===0?7:t}function hFe(e,t){return Qr(Cl.count(so(e)-1,e),t,2)}function WJ(e){var t=e.getDay();return t>=4||t===0?Lc(e):Lc.ceil(e)}function fFe(e,t){return e=WJ(e),Qr(Lc.count(so(e),e)+(so(e).getDay()===4),t,2)}function dFe(e){return e.getDay()}function pFe(e,t){return Qr(Cf.count(so(e)-1,e),t,2)}function gFe(e,t){return Qr(e.getFullYear()%100,t,2)}function mFe(e,t){return e=WJ(e),Qr(e.getFullYear()%100,t,2)}function yFe(e,t){return Qr(e.getFullYear()%1e4,t,4)}function vFe(e,t){var r=e.getDay();return e=r>=4||r===0?Lc(e):Lc.ceil(e),Qr(e.getFullYear()%1e4,t,4)}function bFe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qr(t/60|0,"0",2)+Qr(t%60,"0",2)}function $J(e,t){return Qr(e.getUTCDate(),t,2)}function xFe(e,t){return Qr(e.getUTCHours(),t,2)}function TFe(e,t){return Qr(e.getUTCHours()%12||12,t,2)}function wFe(e,t){return Qr(1+E2.count(Sl(e),e),t,3)}function UJ(e,t){return Qr(e.getUTCMilliseconds(),t,3)}function kFe(e,t){return UJ(e,t)+"000"}function CFe(e,t){return Qr(e.getUTCMonth()+1,t,2)}function SFe(e,t){return Qr(e.getUTCMinutes(),t,2)}function EFe(e,t){return Qr(e.getUTCSeconds(),t,2)}function AFe(e){var t=e.getUTCDay();return t===0?7:t}function _Fe(e,t){return Qr($p.count(Sl(e)-1,e),t,2)}function HJ(e){var t=e.getUTCDay();return t>=4||t===0?Sf(e):Sf.ceil(e)}function LFe(e,t){return e=HJ(e),Qr(Sf.count(Sl(e),e)+(Sl(e).getUTCDay()===4),t,2)}function RFe(e){return e.getUTCDay()}function IFe(e,t){return Qr(Nm.count(Sl(e)-1,e),t,2)}function DFe(e,t){return Qr(e.getUTCFullYear()%100,t,2)}function NFe(e,t){return e=HJ(e),Qr(e.getUTCFullYear()%100,t,2)}function MFe(e,t){return Qr(e.getUTCFullYear()%1e4,t,4)}function OFe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Sf(e):Sf.ceil(e),Qr(e.getUTCFullYear()%1e4,t,4)}function PFe(){return"+0000"}function zJ(){return"%"}function GJ(e){return+e}function qJ(e){return Math.floor(+e/1e3)}var NJ,Jn,FBe,$Be,YJ=q(()=>{nC();NJ={"-":"",_:" ",0:"0"},Jn=/^\s*\d+/,FBe=/^%/,$Be=/[\\^$*+?|[\]().{}]/g});function sI(e){return Mm=aI(e),zp=Mm.format,jJ=Mm.parse,XJ=Mm.utcFormat,KJ=Mm.utcParse,Mm}var Mm,zp,jJ,XJ,KJ,ZJ=q(()=>{YJ();sI({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var oI=q(()=>{ZJ()});function BFe(e){return new Date(e)}function FFe(e){return e instanceof Date?+e:+new Date(+e)}function QJ(e,t,r,i,n,a,s,o,l,u){var h=C2(),f=h.invert,d=h.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),x=u("%b %d"),T=u("%B"),C=u("%Y");function w(k){return(l(k){nC();oI();qR();k2();xJ()});var eee=q(()=>{pJ();bJ();FR();JJ()});function tee(e){for(var t=e.length/6|0,r=new Array(t),i=0;i{});var lI,iee=q(()=>{ree();lI=tee("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var nee=q(()=>{iee()});function Gi(e){return function(){return e}}var sC=q(()=>{});function see(e){return e>1?0:e<-1?Om:Math.acos(e)}function uI(e){return e>=1?R2:e<=-1?-R2:Math.asin(e)}var cI,pa,Ef,aee,oC,El,Gp,ea,Om,R2,Pm,lC=q(()=>{cI=Math.abs,pa=Math.atan2,Ef=Math.cos,aee=Math.max,oC=Math.min,El=Math.sin,Gp=Math.sqrt,ea=1e-12,Om=Math.PI,R2=Om/2,Pm=2*Om});function cC(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Np(t)}var hI=q(()=>{SR()});function $Fe(e){return e.innerRadius}function zFe(e){return e.outerRadius}function GFe(e){return e.startAngle}function qFe(e){return e.endAngle}function VFe(e){return e&&e.padAngle}function WFe(e,t,r,i,n,a,s,o){var l=r-e,u=i-t,h=s-n,f=o-a,d=f*l-h*u;if(!(d*dR*R+D*D&&(A=P,N=O),{cx:A,cy:N,x01:-h,y01:-f,x11:A*(n/w-1),y11:N*(n/w-1)}}function Rc(){var e=$Fe,t=zFe,r=Gi(0),i=null,n=GFe,a=qFe,s=VFe,o=null,l=cC(u);function u(){var h,f,d=+e.apply(this,arguments),p=+t.apply(this,arguments),g=n.apply(this,arguments)-R2,m=a.apply(this,arguments)-R2,y=cI(m-g),v=m>g;if(o||(o=h=l()),pea))o.moveTo(0,0);else if(y>Pm-ea)o.moveTo(p*Ef(g),p*El(g)),o.arc(0,0,p,g,m,!v),d>ea&&(o.moveTo(d*Ef(m),d*El(m)),o.arc(0,0,d,m,g,v));else{var x=g,T=m,C=g,w=m,k=y,E=y,A=s.apply(this,arguments)/2,N=A>ea&&(i?+i.apply(this,arguments):Gp(d*d+p*p)),P=oC(cI(p-d)/2,+r.apply(this,arguments)),O=P,L=P,_,R;if(N>ea){var D=uI(N/d*El(A)),I=uI(N/p*El(A));(k-=D*2)>ea?(D*=v?1:-1,C+=D,w-=D):(k=0,C=w=(g+m)/2),(E-=I*2)>ea?(I*=v?1:-1,x+=I,T-=I):(E=0,x=T=(g+m)/2)}var B=p*Ef(x),M=p*El(x),F=d*Ef(w),z=d*El(w);if(P>ea){var $=p*Ef(T),G=p*El(T),U=d*Ef(C),j=d*El(C),H;if(yea?L>ea?(_=uC(U,j,B,M,p,L,v),R=uC($,G,F,z,p,L,v),o.moveTo(_.cx+_.x01,_.cy+_.y01),Lea)||!(k>ea)?o.lineTo(F,z):O>ea?(_=uC(F,z,$,G,d,-O,v),R=uC(B,M,U,j,d,-O,v),o.lineTo(_.cx+_.x01,_.cy+_.y01),O{sC();lC();hI()});function hC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var $Ot,fI=q(()=>{$Ot=Array.prototype.slice});function lee(e){this._context=e}function Ju(e){return new lee(e)}var dI=q(()=>{lee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}}});function cee(e){return e[0]}function uee(e){return e[1]}var hee=q(()=>{});function Ic(e,t){var r=Gi(!0),i=null,n=Ju,a=null,s=cC(o);e=typeof e=="function"?e:e===void 0?cee:Gi(e),t=typeof t=="function"?t:t===void 0?uee:Gi(t);function o(l){var u,h=(l=hC(l)).length,f,d=!1,p;for(i==null&&(a=n(p=s())),u=0;u<=h;++u)!(u{fI();sC();dI();hI();hee()});function dee(e,t){return te?1:t>=e?0:NaN}var pee=q(()=>{});function gee(e){return e}var mee=q(()=>{});function pI(){var e=gee,t=dee,r=null,i=Gi(0),n=Gi(Pm),a=Gi(0);function s(o){var l,u=(o=hC(o)).length,h,f,d=0,p=new Array(u),g=new Array(u),m=+i.apply(this,arguments),y=Math.min(Pm,Math.max(-Pm,n.apply(this,arguments)-m)),v,x=Math.min(Math.abs(y)/u,a.apply(this,arguments)),T=x*(y<0?-1:1),C;for(l=0;l0&&(d+=C);for(t!=null?p.sort(function(w,k){return t(g[w],g[k])}):r!=null&&p.sort(function(w,k){return r(o[w],o[k])}),l=0,f=d?(y-u*T)/d:0;l0?C*f:0)+T,g[h]={data:o[h],index:l,value:C,startAngle:m,endAngle:v,padAngle:x};return g}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:Gi(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,r=null,s):t},s.sort=function(o){return arguments.length?(r=o,t=null,s):r},s.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Gi(+o),s):i},s.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Gi(+o),s):n},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Gi(+o),s):a},s}var yee=q(()=>{fI();sC();pee();mee();lC()});function I2(e){return new fC(e,!0)}function D2(e){return new fC(e,!1)}var fC,vee=q(()=>{fC=class{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}});function Oo(){}var N2=q(()=>{});function Bm(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function M2(e){this._context=e}function Dc(e){return new M2(e)}var O2=q(()=>{M2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Bm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Bm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function bee(e){this._context=e}function gI(e){return new bee(e)}var xee=q(()=>{N2();O2();bee.prototype={areaStart:Oo,areaEnd:Oo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Bm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function Tee(e){this._context=e}function mI(e){return new Tee(e)}var wee=q(()=>{O2();Tee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Bm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function kee(e,t){this._basis=new M2(e),this._beta=t}var yI,Cee=q(()=>{O2();kee.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};yI=(function e(t){function r(i){return t===1?new M2(i):new kee(i,t)}return r.beta=function(i){return e(+i)},r})(.85)});function Fm(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function dC(e,t){this._context=e,this._k=(1-t)/6}var P2,B2=q(()=>{dC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fm(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Fm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};P2=(function e(t){function r(i){return new dC(i,t)}return r.tension=function(i){return e(+i)},r})(0)});function pC(e,t){this._context=e,this._k=(1-t)/6}var vI,bI=q(()=>{N2();B2();pC.prototype={areaStart:Oo,areaEnd:Oo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Fm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};vI=(function e(t){function r(i){return new pC(i,t)}return r.tension=function(i){return e(+i)},r})(0)});function gC(e,t){this._context=e,this._k=(1-t)/6}var xI,TI=q(()=>{B2();gC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};xI=(function e(t){function r(i){return new gC(i,t)}return r.tension=function(i){return e(+i)},r})(0)});function F2(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>ea){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ea){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*u+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function See(e,t){this._context=e,this._alpha=t}var $2,mC=q(()=>{lC();B2();See.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:F2(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};$2=(function e(t){function r(i){return t?new See(i,t):new dC(i,0)}return r.alpha=function(i){return e(+i)},r})(.5)});function Eee(e,t){this._context=e,this._alpha=t}var wI,Aee=q(()=>{bI();N2();mC();Eee.prototype={areaStart:Oo,areaEnd:Oo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:F2(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};wI=(function e(t){function r(i){return t?new Eee(i,t):new pC(i,0)}return r.alpha=function(i){return e(+i)},r})(.5)});function _ee(e,t){this._context=e,this._alpha=t}var kI,Lee=q(()=>{TI();mC();_ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:F2(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};kI=(function e(t){function r(i){return t?new _ee(i,t):new gC(i,0)}return r.alpha=function(i){return e(+i)},r})(.5)});function Ree(e){this._context=e}function CI(e){return new Ree(e)}var Iee=q(()=>{N2();Ree.prototype={areaStart:Oo,areaEnd:Oo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}});function Dee(e){return e<0?-1:1}function Nee(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(Dee(a)+Dee(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Mee(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function SI(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function yC(e){this._context=e}function Oee(e){this._context=new Pee(e)}function Pee(e){this._context=e}function z2(e){return new yC(e)}function G2(e){return new Oee(e)}var Bee=q(()=>{yC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:SI(this,this._t0,Mee(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,SI(this,Mee(this,r=Nee(this,e,t)),r);break;default:SI(this,this._t0,r=Nee(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};(Oee.prototype=Object.create(yC.prototype)).point=function(e,t){yC.prototype.point.call(this,t,e)};Pee.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}}});function $ee(e){this._context=e}function Fee(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t{$ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Fee(e),n=Fee(t),a=0,s=1;s{vC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}}});var qee=q(()=>{oee();fee();yee();xee();wee();O2();vee();Cee();bI();TI();B2();Aee();Lee();mC();Iee();dI();Bee();zee();Gee()});var Vee=q(()=>{});var Wee=q(()=>{});function Af(e,t,r){this.k=e,this.x=t,this.y=r}function AI(e){for(;!e.__zoom;)if(!(e=e.parentNode))return EI;return e.__zoom}var EI,_I=q(()=>{Af.prototype={constructor:Af,scale:function(e){return e===1?this:new Af(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Af(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};EI=new Af(1,0,0);AI.prototype=Af.prototype});var Uee=q(()=>{});var Hee=q(()=>{U4();Vee();Wee();_I();Uee()});var Yee=q(()=>{Hee();_I()});var Ar=q(()=>{vf();wj();XZ();JZ();km();eQ();tQ();FL();jX();rQ();TR();iQ();aQ();OR();SQ();hJ();Sm();SR();fJ();nQ();dJ();eee();nee();xl();qee();nC();oI();B4();U4();Yee()});var yi,Ja=q(()=>{Er();er();Ar();yi=b(e=>{let{securityLevel:t}=we(),r=Qe("body");if(t==="sandbox"){let a=Qe(`#i${e}`).node()?.contentDocument??document;r=Qe(a.body)}return r.select(`#${e}`)},"selectSvgElement")});function UI(e){return typeof e>"u"||e===null}function Kee(e){return typeof e=="object"&&e!==null}function Zee(e){return Array.isArray(e)?e:UI(e)?[]:[e]}function Qee(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;ro&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+a.length}}function xC(e,t){return $n.repeat(" ",t-e.length)+e}function tte(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,u,h=Math.min(e.line+t.linesAfter,n.length).toString().length,f=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)u=bC(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),f),o=$n.repeat(" ",t.indent)+xC((e.line-l+1).toString(),h)+" | "+u.str+` -`+o;for(u=bC(e.buffer,i[s],n[s],e.position,f),o+=$n.repeat(" ",t.indent)+xC((e.line+1).toString(),h)+" | "+u.str+` -`,o+=$n.repeat("-",t.indent+h+3+u.pos)+`^ -`,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)u=bC(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),f),o+=$n.repeat(" ",t.indent)+xC((e.line+l+1).toString(),h)+" | "+u.str+` -`;return o.replace(/\n$/,"")}function rte(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function ite(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(QFe.indexOf(r)===-1)throw new _s('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=rte(t.styleAliases||null),JFe.indexOf(this.kind)===-1)throw new _s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function RI(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}function nte(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(b(i,"collectType"),t=0,r=arguments.length;t=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function bte(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if($n.isNegativeZero(e))return"-0.0";return r=e.toString(10),c$e.test(r)?r.replace("e",".e"):r}function xte(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||$n.isNegativeZero(e))}function Cte(e){return e===null?!1:wte.exec(e)!==null||kte.exec(e)!==null}function Ste(e){var t,r,i,n,a,s,o,l=0,u=null,h,f,d;if(t=wte.exec(e),t===null&&(t=kte.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],f=+(t[11]||0),u=(h*60+f)*6e4,t[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,i,n,a,s,o,l)),u&&d.setTime(d.getTime()-u),d}function Ete(e){return e.toISOString()}function Ate(e){return e==="<<"||e===null}function _te(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=YI;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}function Lte(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=YI,s=0,o=[];for(t=0;t>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function Rte(e){var t="",r=0,i,n,a=e.length,s=YI;for(i=0;i>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function Ite(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function Dte(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r>10)+55296,(e-65536&1023)+56320)}function jI(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function Xte(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Fte,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function XI(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=ZFe(r),new _s(t,r)}function Kt(e,t){throw XI(e,t)}function H2(e,t){e.onWarning&&e.onWarning.call(null,XI(e,t))}function eh(e,t,r,i){var n,a,s,o;if(t1&&(e.result+=$n.repeat(` -`,t-1))}function Kte(e,t,r){var i,n,a,s,o,l,u,h,f=e.kind,d=e.result,p;if(p=e.input.charCodeAt(e.position),es(p)||Vp(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=e.input.charCodeAt(e.position+1),es(n)||r&&Vp(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;p!==0;){if(p===58){if(n=e.input.charCodeAt(e.position+1),es(n)||r&&Vp(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),es(i))break}else{if(e.position===e.lineStart&&K2(e)||r&&Vp(p))break;if(Al(p))if(l=e.line,u=e.lineStart,h=e.lineIndent,mn(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=u,e.lineIndent=h;break}}o&&(eh(e,a,s,!1),_C(e,e.line-l),a=s=e.position,o=!1),_f(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return eh(e,a,s,!1),e.result?!0:(e.kind=f,e.result=d,!1)}function Zte(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(eh(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Al(r)?(eh(e,i,n,!0),_C(e,mn(e,!1,t)),i=n=e.position):e.position===e.lineStart&&K2(e)?Kt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Kt(e,"unexpected end of the stream within a single quoted scalar")}function Qte(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return eh(e,r,e.position,!0),e.position++,!0;if(o===92){if(eh(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Al(o))mn(e,!1,t);else if(o<256&&Yte[o])e.result+=jte[o],e.position++;else if((s=Wte(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=Vte(o))>=0?a=(a<<4)+s:Kt(e,"expected hexadecimal character");e.result+=Hte(a),e.position++}else Kt(e,"unknown escape sequence");r=i=e.position}else Al(o)?(eh(e,r,i,!0),_C(e,mn(e,!1,t)),r=i=e.position):e.position===e.lineStart&&K2(e)?Kt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Kt(e,"unexpected end of the stream within a double quoted scalar")}function Jte(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,u,h,f,d,p,g=Object.create(null),m,y,v,x;if(x=e.input.charCodeAt(e.position),x===91)h=93,p=!1,o=[];else if(x===123)h=125,p=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),x=e.input.charCodeAt(++e.position);x!==0;){if(mn(e,!0,t),x=e.input.charCodeAt(e.position),x===h)return e.position++,e.tag=s,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=o,!0;r?x===44&&Kt(e,"expected the node content, but found ','"):Kt(e,"missed comma between flow collection entries"),y=m=v=null,f=d=!1,x===63&&(u=e.input.charCodeAt(e.position+1),es(u)&&(f=d=!0,e.position++,mn(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Up(e,t,wC,!1,!0),y=e.tag,m=e.result,mn(e,!0,t),x=e.input.charCodeAt(e.position),(d||e.line===i)&&x===58&&(f=!0,x=e.input.charCodeAt(++e.position),mn(e,!0,t),Up(e,t,wC,!1,!0),v=e.result),p?Wp(e,o,g,y,m,v,i,n,a):f?o.push(Wp(e,null,g,y,m,v,i,n,a)):o.push(m),mn(e,!0,t),x=e.input.charCodeAt(e.position),x===44?(r=!0,x=e.input.charCodeAt(++e.position)):r=!1}Kt(e,"unexpected end of the stream within a flow collection")}function ere(e,t){var r,i,n=LI,a=!1,s=!1,o=t,l=0,u=!1,h,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)LI===n?n=f===43?jee:w$e:Kt(e,"repeat of a chomping mode identifier");else if((h=Ute(f))>=0)h===0?Kt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Kt(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(_f(f)){do f=e.input.charCodeAt(++e.position);while(_f(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!Al(f)&&f!==0)}for(;f!==0;){for(AC(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndento&&(o=e.lineIndent),Al(f)){l++;continue}if(e.lineIndentt)&&l!==0)Kt(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(s=e.line,o=e.lineStart,l=e.position),Up(e,t,kC,!0,n)&&(y?g=e.result:m=e.result),y||(Wp(e,f,d,p,g,m,s,o,l),p=g=m=null),mn(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&x!==0)Kt(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),f=0,d=e.implicitTypes.length;f"),e.result!==null&&g.kind!==e.kind&&Kt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Kt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function are(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(mn(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!es(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Kt(e,"directive name must not be less than one character in length");s!==0;){for(;_f(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Al(s));break}if(Al(s))break;for(r=e.position;s!==0&&!es(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&AC(e),Lf.call(Xee,i)?Xee[i](e,i,n):H2(e,'unknown document directive "'+i+'"')}if(mn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,mn(e,!0,-1)):a&&Kt(e,"directives end mark is expected"),Up(e,e.lineIndent-1,kC,!1,!0),mn(e,!0,-1),e.checkLineBreaks&&C$e.test(e.input.slice(t,e.position))&&H2(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&K2(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,mn(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=KI(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function QI(e){var t=/^\n* /;return t.test(e)}function Sre(e,t,r,i,n,a,s,o){var l,u=0,h=null,f=!1,d=!1,p=i!==-1,g=-1,m=xre(zm(e,0))&&Tre(zm(e,e.length-1));if(t||s)for(l=0;l=65536?l+=2:l++){if(u=zm(e,l),!qm(u))return $m;m=m&&FI(u,h,o),h=u}else{for(l=0;l=65536?l+=2:l++){if(u=zm(e,l),u===Y2)f=!0,p&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!qm(u))return $m;m=m&&FI(u,h,o),h=u}d=d||p&&l-g-1>i&&e[g+1]!==" "}return!f&&!d?m&&!s&&!n(e)?wre:a===j2?$m:$I:r>9&&QI(e)?$m:s?a===j2?$m:$I:d?Cre:kre}function Ere(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===j2?'""':"''";if(!e.noCompatMode&&(W$e.indexOf(t)!==-1||U$e.test(t)))return e.quotingType===j2?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(u){return bre(e,u)}switch(b(l,"testAmbiguity"),Sre(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case wre:return t;case $I:return"'"+t.replace(/'/g,"''")+"'";case kre:return"|"+zI(t,e.indent)+GI(PI(t,a));case Cre:return">"+zI(t,e.indent)+GI(PI(Are(t,s),a));case $m:return'"'+_re(t)+'"';default:throw new _s("impossible error: invalid scalar style")}})()}function zI(e,t){var r=QI(e)?String(t):"",i=e[e.length-1]===` -`,n=i&&(e[e.length-2]===` -`||e===` -`),a=n?"+":i?"":"-";return r+a+` -`}function GI(e){return e[e.length-1]===` -`?e.slice(0,-1):e}function Are(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var u=e.indexOf(` -`);return u=u!==-1?u:e.length,r.lastIndex=u,qI(e.slice(0,u),t)})(),n=e[0]===` -`||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?` -`:"")+qI(l,t),n=a}return i}function qI(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=` -`+e.slice(n,a),n=a+1),s=o;return l+=` -`,e.length-n>t&&s>n?l+=e.slice(n,s)+` -`+e.slice(s+1):l+=e.slice(n),l.slice(1)}function _re(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=zm(e,n),i=Na[r],!i&&qm(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||yre(r);return t}function Lre(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a"u"&&Nc(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function VI(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s"u"&&Nc(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=SC(e,t)),e.dump&&Y2===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}function Rre(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,u,h;for(s=0,o=a.length;s1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Nc(e,t,u,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}function Ire(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,u,h,f,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new _s("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,f&&(e.dump&&Y2===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,f&&(d+=SC(e,t)),Nc(e,t+1,h,!0,f)&&(e.dump&&Y2===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}function WI(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function Nc(e,t,r,i,n,a,s){e.tag=null,e.dump=r,WI(e,r,!1)||WI(e,r,!0);var o=cre.call(e.dump),l=i,u;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",f,d;if(h&&(f=e.duplicates.indexOf(r),d=f!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(h&&d&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Ire(e,t,e.dump,n),d&&(e.dump="&ref_"+f+e.dump)):(Rre(e,t,e.dump),d&&(e.dump="&ref_"+f+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?VI(e,t-1,e.dump,n):VI(e,t,e.dump,n),d&&(e.dump="&ref_"+f+e.dump)):(Lre(e,t,e.dump),d&&(e.dump="&ref_"+f+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Ere(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new _s("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function Dre(e,t){var r=[],i=[],n,a;for(EC(e,r,i),n=0,a=i.length;n{er();b(UI,"isNothing");b(Kee,"isObject");b(Zee,"toArray");b(Qee,"extend");b(Jee,"repeat");b(ete,"isNegativeZero");UFe=UI,HFe=Kee,YFe=Zee,jFe=Jee,XFe=ete,KFe=Qee,$n={isNothing:UFe,isObject:HFe,toArray:YFe,repeat:jFe,isNegativeZero:XFe,extend:KFe};b(HI,"formatError");b(Gm,"YAMLException$1");Gm.prototype=Object.create(Error.prototype);Gm.prototype.constructor=Gm;Gm.prototype.toString=b(function(t){return this.name+": "+HI(this,t)},"toString");_s=Gm;b(bC,"getLine");b(xC,"padStart");b(tte,"makeSnippet");ZFe=tte,QFe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],JFe=["scalar","sequence","mapping"];b(rte,"compileStyleAliases");b(ite,"Type$1");Da=ite;b(RI,"compileList");b(nte,"compileMap");b(TC,"Schema$1");TC.prototype.extend=b(function(t){var r=[],i=[];if(t instanceof Da)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new _s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Da))throw new _s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new _s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new _s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Da))throw new _s("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(TC.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=RI(n,"implicit"),n.compiledExplicit=RI(n,"explicit"),n.compiledTypeMap=nte(n.compiledImplicit,n.compiledExplicit),n},"extend");e$e=TC,t$e=new Da("tag:yaml.org,2002:str",{kind:"scalar",construct:b(function(e){return e!==null?e:""},"construct")}),r$e=new Da("tag:yaml.org,2002:seq",{kind:"sequence",construct:b(function(e){return e!==null?e:[]},"construct")}),i$e=new Da("tag:yaml.org,2002:map",{kind:"mapping",construct:b(function(e){return e!==null?e:{}},"construct")}),n$e=new e$e({explicit:[t$e,r$e,i$e]});b(ate,"resolveYamlNull");b(ste,"constructYamlNull");b(ote,"isNull");a$e=new Da("tag:yaml.org,2002:null",{kind:"scalar",resolve:ate,construct:ste,predicate:ote,represent:{canonical:b(function(){return"~"},"canonical"),lowercase:b(function(){return"null"},"lowercase"),uppercase:b(function(){return"NULL"},"uppercase"),camelcase:b(function(){return"Null"},"camelcase"),empty:b(function(){return""},"empty")},defaultStyle:"lowercase"});b(lte,"resolveYamlBoolean");b(cte,"constructYamlBoolean");b(ute,"isBoolean");s$e=new Da("tag:yaml.org,2002:bool",{kind:"scalar",resolve:lte,construct:cte,predicate:ute,represent:{lowercase:b(function(e){return e?"true":"false"},"lowercase"),uppercase:b(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:b(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});b(hte,"isHexCode");b(fte,"isOctCode");b(dte,"isDecCode");b(pte,"resolveYamlInteger");b(gte,"constructYamlInteger");b(mte,"isInteger");o$e=new Da("tag:yaml.org,2002:int",{kind:"scalar",resolve:pte,construct:gte,predicate:mte,represent:{binary:b(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:b(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:b(function(e){return e.toString(10)},"decimal"),hexadecimal:b(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),l$e=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");b(yte,"resolveYamlFloat");b(vte,"constructYamlFloat");c$e=/^[-+]?[0-9]+e/;b(bte,"representYamlFloat");b(xte,"isFloat");u$e=new Da("tag:yaml.org,2002:float",{kind:"scalar",resolve:yte,construct:vte,predicate:xte,represent:bte,defaultStyle:"lowercase"}),Tte=n$e.extend({implicit:[a$e,s$e,o$e,u$e]}),h$e=Tte,wte=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kte=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");b(Cte,"resolveYamlTimestamp");b(Ste,"constructYamlTimestamp");b(Ete,"representYamlTimestamp");f$e=new Da("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Cte,construct:Ste,instanceOf:Date,represent:Ete});b(Ate,"resolveYamlMerge");d$e=new Da("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ate}),YI=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;b(_te,"resolveYamlBinary");b(Lte,"constructYamlBinary");b(Rte,"representYamlBinary");b(Ite,"isBinary");p$e=new Da("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_te,construct:Lte,predicate:Ite,represent:Rte}),g$e=Object.prototype.hasOwnProperty,m$e=Object.prototype.toString;b(Dte,"resolveYamlOmap");b(Nte,"constructYamlOmap");y$e=new Da("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Dte,construct:Nte}),v$e=Object.prototype.toString;b(Mte,"resolveYamlPairs");b(Ote,"constructYamlPairs");b$e=new Da("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mte,construct:Ote}),x$e=Object.prototype.hasOwnProperty;b(Pte,"resolveYamlSet");b(Bte,"constructYamlSet");T$e=new Da("tag:yaml.org,2002:set",{kind:"mapping",resolve:Pte,construct:Bte}),Fte=h$e.extend({implicit:[f$e,d$e],explicit:[p$e,y$e,b$e,T$e]}),Lf=Object.prototype.hasOwnProperty,wC=1,$te=2,zte=3,kC=4,LI=1,w$e=2,jee=3,k$e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C$e=/[\x85\u2028\u2029]/,S$e=/[,\[\]\{\}]/,Gte=/^(?:!|!!|![a-z\-]+!)$/i,qte=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;b(II,"_class");b(Al,"is_EOL");b(_f,"is_WHITE_SPACE");b(es,"is_WS_OR_EOL");b(Vp,"is_FLOW_INDICATOR");b(Vte,"fromHexCode");b(Wte,"escapedHexLen");b(Ute,"fromDecimalCode");b(DI,"simpleEscapeSequence");b(Hte,"charFromCodepoint");b(jI,"setProperty");Yte=new Array(256),jte=new Array(256);for(qp=0;qp<256;qp++)Yte[qp]=DI(qp)?1:0,jte[qp]=DI(qp);b(Xte,"State$1");b(XI,"generateError");b(Kt,"throwError");b(H2,"throwWarning");Xee={YAML:b(function(t,r,i){var n,a,s;t.version!==null&&Kt(t,"duplication of %YAML directive"),i.length!==1&&Kt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Kt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&Kt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&H2(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:b(function(t,r,i){var n,a;i.length!==2&&Kt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Gte.test(n)||Kt(t,"ill-formed tag handle (first argument) of the TAG directive"),Lf.call(t.tagMap,n)&&Kt(t,'there is a previously declared suffix for "'+n+'" tag handle'),qte.test(a)||Kt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Kt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};b(eh,"captureSegment");b(NI,"mergeMappings");b(Wp,"storeMappingPair");b(AC,"readLineBreak");b(mn,"skipSeparationSpace");b(K2,"testDocumentSeparator");b(_C,"writeFoldedLines");b(Kte,"readPlainScalar");b(Zte,"readSingleQuotedScalar");b(Qte,"readDoubleQuotedScalar");b(Jte,"readFlowCollection");b(ere,"readBlockScalar");b(MI,"readBlockSequence");b(tre,"readBlockMapping");b(rre,"readTagProperty");b(ire,"readAnchorProperty");b(nre,"readAlias");b(Up,"composeNode");b(are,"readDocument");b(KI,"loadDocuments");b(sre,"loadAll$1");b(ore,"load$1");E$e=sre,A$e=ore,lre={loadAll:E$e,load:A$e},cre=Object.prototype.toString,ure=Object.prototype.hasOwnProperty,ZI=65279,_$e=9,Y2=10,L$e=13,R$e=32,I$e=33,D$e=34,OI=35,N$e=37,M$e=38,O$e=39,P$e=42,hre=44,B$e=45,CC=58,F$e=61,$$e=62,z$e=63,G$e=64,fre=91,dre=93,q$e=96,pre=123,V$e=124,gre=125,Na={};Na[0]="\\0";Na[7]="\\a";Na[8]="\\b";Na[9]="\\t";Na[10]="\\n";Na[11]="\\v";Na[12]="\\f";Na[13]="\\r";Na[27]="\\e";Na[34]='\\"';Na[92]="\\\\";Na[133]="\\N";Na[160]="\\_";Na[8232]="\\L";Na[8233]="\\P";W$e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],U$e=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;b(mre,"compileStyleMap");b(yre,"encodeHex");H$e=1,j2=2;b(vre,"State");b(PI,"indentString");b(SC,"generateNextLine");b(bre,"testImplicitResolving");b(X2,"isWhitespace");b(qm,"isPrintable");b(BI,"isNsCharOrWhitespace");b(FI,"isPlainSafe");b(xre,"isPlainSafeFirst");b(Tre,"isPlainSafeLast");b(zm,"codePointAt");b(QI,"needIndentIndicator");wre=1,$I=2,kre=3,Cre=4,$m=5;b(Sre,"chooseScalarStyle");b(Ere,"writeScalar");b(zI,"blockHeader");b(GI,"dropEndingNewline");b(Are,"foldString");b(qI,"foldLine");b(_re,"escapeString");b(Lre,"writeFlowSequence");b(VI,"writeBlockSequence");b(Rre,"writeFlowMapping");b(Ire,"writeBlockMapping");b(WI,"detectType");b(Nc,"writeNode");b(Dre,"getDuplicateReferences");b(EC,"inspectNode");b(Nre,"dump$1");Y$e=Nre,j$e={dump:Y$e};b(LC,"renamed");Rf=Tte,If=lre.load,eFt=lre.loadAll,tFt=j$e.dump,rFt=LC("safeLoad","load"),iFt=LC("safeLoadAll","loadAll"),nFt=LC("safeDump","dump");});function Q2(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=qi(e),t=qi(t);let[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var Po,ga,JI,qi,RC,oo=q(()=>{er();Po=b((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),ga={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},JI={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};b(Q2,"calculateDeltaAndAngle");qi=b(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),RC=b(e=>({x:b(function(t,r,i){let n=0,a=qi(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ga,e.arrowTypeEnd)){let{angle:p,deltaX:g}=Q2(i[i.length-1],i[i.length-2]);n=ga[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}let s=Math.abs(qi(t).x-qi(i[i.length-1]).x),o=Math.abs(qi(t).y-qi(i[i.length-1]).y),l=Math.abs(qi(t).x-qi(i[0]).x),u=Math.abs(qi(t).y-qi(i[0]).y),h=ga[e.arrowTypeStart],f=ga[e.arrowTypeEnd],d=1;if(s0&&o0&&u=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ga,e.arrowTypeEnd)){let{angle:p,deltaY:g}=Q2(i[i.length-1],i[i.length-2]);n=ga[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}let s=Math.abs(qi(t).y-qi(i[i.length-1]).y),o=Math.abs(qi(t).x-qi(i[i.length-1]).x),l=Math.abs(qi(t).y-qi(i[0]).y),u=Math.abs(qi(t).x-qi(i[0]).x),h=ga[e.arrowTypeStart],f=ga[e.arrowTypeEnd],d=1;if(s0&&o0&&u{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.BLANK_URL=ta.relativeFirstCharacters=ta.whitespaceEscapeCharsRegex=ta.urlSchemeRegex=ta.ctrlCharactersRegex=ta.htmlCtrlEntityRegex=ta.htmlEntitiesRegex=ta.invalidProtocolRegex=void 0;ta.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;ta.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;ta.htmlCtrlEntityRegex=/&(newline|tab);/gi;ta.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;ta.urlSchemeRegex=/^.+(:|:)/gim;ta.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;ta.relativeFirstCharacters=[".","/"];ta.BLANK_URL="about:blank"});var Vm=eo(eD=>{"use strict";Object.defineProperty(eD,"__esModule",{value:!0});eD.sanitizeUrl=Q$e;var Ma=Mre();function X$e(e){return Ma.relativeFirstCharacters.indexOf(e[0])>-1}function K$e(e){var t=e.replace(Ma.ctrlCharactersRegex,"");return t.replace(Ma.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function Z$e(e){return URL.canParse(e)}function Ore(e){try{return decodeURIComponent(e)}catch{return e}}function Q$e(e){if(!e)return Ma.BLANK_URL;var t,r=Ore(e.trim());do r=K$e(r).replace(Ma.htmlCtrlEntityRegex,"").replace(Ma.ctrlCharactersRegex,"").replace(Ma.whitespaceEscapeCharsRegex,"").trim(),r=Ore(r),t=r.match(Ma.ctrlCharactersRegex)||r.match(Ma.htmlEntitiesRegex)||r.match(Ma.htmlCtrlEntityRegex)||r.match(Ma.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Ma.BLANK_URL;if(X$e(i))return i;var n=i.trimStart(),a=n.match(Ma.urlSchemeRegex);if(!a)return i;var s=a[0].toLowerCase().trim();if(Ma.invalidProtocolRegex.test(s))return Ma.BLANK_URL;var o=n.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!Z$e(o))return Ma.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}});function Pre(e){return Number.isSafeInteger(e)&&e>=0}var Bre=q(()=>{});function IC(e){return e!=null&&typeof e!="function"&&Pre(e.length)}var tD=q(()=>{Bre()});function Fre(e){return e==="__proto__"}var $re=q(()=>{});function Df(e){return e==null||typeof e!="object"&&typeof e!="function"}var J2=q(()=>{});function DC(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var rD=q(()=>{});function th(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var eb=q(()=>{});var tb,Nf,Hp,Yp,jp,rb,ib,nb,ab,NC,sb,Wm,ob,MC,OC,PC,BC,FC,$C,zC,GC,qC,VC=q(()=>{tb="[object RegExp]",Nf="[object String]",Hp="[object Number]",Yp="[object Boolean]",jp="[object Arguments]",rb="[object Symbol]",ib="[object Date]",nb="[object Map]",ab="[object Set]",NC="[object Array]",sb="[object ArrayBuffer]",Wm="[object Object]",ob="[object DataView]",MC="[object Uint8Array]",OC="[object Uint8ClampedArray]",PC="[object Uint16Array]",BC="[object Uint32Array]",FC="[object Int8Array]",$C="[object Int16Array]",zC="[object Int32Array]",GC="[object Float32Array]",qC="[object Float64Array]"});var iD,zre=q(()=>{iD=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")()});function Um(e){return typeof iD.Buffer<"u"&&iD.Buffer.isBuffer(e)}var WC=q(()=>{zre()});function Hm(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var UC=q(()=>{});function Gre(e,t){return Ym(e,void 0,e,new Map,t)}function Ym(e,t,r,i=new Map,n=void 0){let a=n?.(e,t,r,i);if(a!==void 0)return a;if(Df(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let s=new Array(e.length);i.set(e,s);for(let o=0;o{rD();eb();VC();WC();J2();UC()});function Vre(e,t){return Gre(e,(r,i,n,a)=>{let s=t?.(r,i,n,a);if(s!==void 0)return s;if(typeof e=="object"){if(th(e)===Wm&&typeof e.constructor!="function"){let o={};return a.set(e,o),Bo(o,e,n,a),o}switch(Object.prototype.toString.call(e)){case Hp:case Nf:case Yp:{let o=new e.constructor(e?.valueOf());return Bo(o,e),o}case jp:{let o={};return Bo(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}var Wre=q(()=>{qre();eb();VC()});function nD(e){return Vre(e)}var Ure=q(()=>{Wre()});function lb(e){return e!==null&&typeof e=="object"&&th(e)==="[object Arguments]"}var aD=q(()=>{eb()});function cb(e){return typeof e=="object"&&e!==null}var sD=q(()=>{});function Hre(e){return cb(e)&&IC(e)}var Yre=q(()=>{tD();sD()});function jre(e){return Array.isArray(e)}var Xre=q(()=>{});function Xp(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");let r=function(...n){let a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);let o=e.apply(this,n);return r.cache=s.set(a,o)||s,o},i=Xp.Cache||Map;return r.cache=new i,r}var Kre=q(()=>{Xp.Cache=Map});function Zre(){}var Qre=q(()=>{});function Jre(e){let t=e?.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}var eie=q(()=>{});function Mf(e){return Hm(e)}var HC=q(()=>{UC()});function lD(e){if(Df(e))return e;let t=th(e);if(!eze(e))return{};if(jre(e)){let i=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(i.index=e.index,i.input=e.input),i}if(Mf(e)){let i=e,n=i.constructor;return new n(i.buffer,i.byteOffset,i.length)}if(t===sb)return new ArrayBuffer(e.byteLength);if(t===ob){let i=e,n=i.buffer,a=i.byteOffset,s=i.byteLength,o=new ArrayBuffer(s),l=new Uint8Array(n,a,s);return new Uint8Array(o).set(l),new DataView(o)}if(t===Yp||t===Hp||t===Nf){let i=e.constructor,n=new i(e.valueOf());return t===Nf?rze(n,e):oD(n,e),n}if(t===ib)return new Date(Number(e));if(t===tb){let i=e,n=new RegExp(i.source,i.flags);return n.lastIndex=i.lastIndex,n}if(t===rb)return Object(Symbol.prototype.valueOf.call(e));if(t===nb){let i=e,n=new Map;return i.forEach((a,s)=>{n.set(s,a)}),n}if(t===ab){let i=e,n=new Set;return i.forEach(a=>{n.add(a)}),n}if(t===jp){let i=e,n={};return oD(n,i),n.length=i.length,n[Symbol.iterator]=i[Symbol.iterator],n}let r={};return ize(r,e),oD(r,e),tze(r,e),r}function eze(e){switch(th(e)){case jp:case NC:case sb:case ob:case Yp:case ib:case GC:case qC:case FC:case $C:case zC:case nb:case Hp:case Wm:case tb:case ab:case Nf:case rb:case MC:case OC:case PC:case BC:return!0;default:return!1}}function oD(e,t){for(let r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function tze(e,t){let r=Object.getOwnPropertySymbols(t);for(let i=0;i=r)&&(e[i]=t[i])}function ize(e,t){let r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}var tie=q(()=>{J2();eb();VC();Xre();HC()});function YC(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){let r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var rie=q(()=>{});function iie(e){if(Df(e))return e;if(Array.isArray(e)||Hm(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){let i=Object.create(t);return Object.assign(i,e)}return e}var nie=q(()=>{J2();UC()});function aie(e,...t){let r=t.slice(0,-1),i=t[t.length-1],n=e;for(let a=0;a{Ure();$re();nie();WC();J2();rD();aD();Yre();sD();rie();HC()});function cD(e,...t){return aie(e,...t,Zre)}var oie=q(()=>{sie();Qre()});function XC(e){if(e==null)return!0;if(IC(e))return typeof e.splice!="function"&&typeof e!="string"&&!Um(e)&&!Mf(e)&&!lb(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Jre(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var lie=q(()=>{aD();tD();HC();WC();eie()});var KC=q(()=>{Kre();tie();oie();lie()});function QC(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return nze[r]??t}function pie(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,hie.sanitizeUrl)(r):r}function hD(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function gie(e){let t,r=0;e.forEach(n=>{r+=hD(n,t),t=n});let i=r/2;return fD(e,i)}function mie(e){return e.length===1?e[0]:gie(e)}function yie(e,t,r){let i=structuredClone(r);ee.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();let n=25+e,a=fD(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}function JC(e){let t="",r="";for(let i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}function vie(e){let t="",r="0123456789abcdef",i=r.length;for(let n=0;nMath.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}var hie,uD,nze,aze,sze,fie,die,oze,lze,cie,fD,cze,uie,dD,pD,uze,hze,Kp,fze,hb,dze,ZC,pze,gze,Ls,jt,bie,lo,Mc,$r=q(()=>{Er();er();hie=ks(Vm(),1);Ar();KC();uD="\u200B",nze={curveBasis:Dc,curveBasisClosed:gI,curveBasisOpen:mI,curveBumpX:I2,curveBumpY:D2,curveBundle:yI,curveCardinalClosed:vI,curveCardinalOpen:xI,curveCardinal:P2,curveCatmullRomClosed:wI,curveCatmullRomOpen:kI,curveCatmullRom:$2,curveLinear:Ju,curveLinearClosed:CI,curveMonotoneX:z2,curveMonotoneY:G2,curveNatural:q2,curveStep:V2,curveStepAfter:U2,curveStepBefore:W2},aze=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sze=b(function(e,t){let r=fie(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let s=r.map(o=>o.args);jv(s),i=Di(i,[...s])}else i=r.args;if(!i)return;let n=Xv(e,t),a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),fie=b(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${aze.source})(?=[}][%]{2}).* -`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),ee.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i,n=[];for(;(i=pm.exec(e))!==null;)if(i.index===pm.lastIndex&&pm.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){let a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return ee.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),die=b(function(e){return e.replace(pm,"")},"removeDirectives"),oze=b(function(e,t){for(let[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");b(QC,"interpolateToCurve");b(pie,"formatUrl");lze=b((e,...t)=>{let r=e.split("."),i=r.length-1,n=r[i],a=window;for(let s=0;s{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),fD=b((e,t)=>{let r,i=t;for(let n of e){if(r){let a=hD(n,r);if(a===0)return r;if(a=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:cie((1-s)*r.x+s*n.x,5),y:cie((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),cze=b((e,t,r)=>{ee.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let n=fD(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");b(yie,"calcTerminalLabelPosition");b(JC,"getStylesFromArray");uie=0,dD=b(()=>(uie++,"id-"+Math.random().toString(36).substr(2,12)+"-"+uie),"generateId");b(vie,"makeRandomHex");pD=b(e=>vie(e.length),"random"),uze=b(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),hze=b(function(e,t){let r=t.text.replace(ht.lineBreakRegex," "),[,i]=Ls(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);let a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Kp=Xp((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),ht.lineBreakRegex.test(e)))return e;let i=e.split(" ").filter(Boolean),n=[],a="";return i.forEach((s,o)=>{let l=ma(`${s} `,r),u=ma(a,r);if(l>t){let{hyphenatedStrings:d,remainingWord:p}=fze(s,t,"-",r);n.push(a,...d),a=p}else u+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),fze=Xp((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let n=[...e],a=[],s="";return n.forEach((o,l)=>{let u=`${s}${o}`;if(ma(u,i)>=t){let f=l+1,d=n.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);b(ub,"calculateTextHeight");b(ma,"calculateTextWidth");hb=Xp((e,t)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};let[,a]=Ls(r),s=["sans-serif",i],o=e.split(ht.lineBreakRegex),l=[],u=Qe("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,g={width:0,height:0,lineHeight:0};for(let m of o){let y=uze();y.text=m||uD;let v=hze(h,y).style("font-size",a).style("font-weight",n).style("font-family",d),x=(v._groups||v)[0][0].getBBox();if(x.width===0&&x.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,x.width)),p=Math.round(x.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),dze=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{b(this,"InitIDGenerator")}},pze=b(function(e){return ZC=ZC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ZC.innerHTML=e,unescape(ZC.textContent)},"entityDecode");b(e5,"isDetailedError");gze=b((e,t,r,i)=>{if(!i)return;let n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ls=b(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");b(Yr,"cleanAndMerge");jt={assignWithDepth:Di,wrapLabel:Kp,calculateTextHeight:ub,calculateTextWidth:ma,calculateTextDimensions:hb,cleanAndMerge:Yr,detectInit:sze,detectDirective:fie,isSubstringInArray:oze,interpolateToCurve:QC,calcLabelPosition:mie,calcCardinalityPosition:cze,calcTerminalLabelPosition:yie,formatUrl:pie,getStylesFromArray:JC,generateId:dD,random:pD,runFunc:lze,entityDecode:pze,insertTitle:gze,isLabelCoordinateInPath:xie,parseFontSize:Ls,InitIDGenerator:dze},bie=b(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),lo=b(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Mc=b((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");b(An,"handleUndefinedAttr");b(xie,"isLabelCoordinateInPath")});async function fb(e,t){let r=e.getElementsByTagName("img");if(!r||r.length===0)return;let i=t.replace(/]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(a=>{function s(){if(n.style.display="flex",n.style.flexDirection="column",i){let o=we().fontSize?we().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[u=rr.fontSize]=Ls(o),h=u*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";a(n)}b(s,"setupImage"),setTimeout(()=>{n.complete&&s()}),n.addEventListener("error",s),n.addEventListener("load",s)})))}var rh,ts=q(()=>{$r();Er();er();rh=b(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");b(fb,"configureLabelImages")});var Tie,Zp,mze,db,Ot,Gt,yze,rs=q(()=>{Er();er();Tie=b(e=>{let{handDrawnSeed:t}=we();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Zp=b(e=>{let t=mze([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),mze=b(e=>{let t=new Map;return e.forEach(r=>{let[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),db=b(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Ot=b(e=>{let{stylesArray:t}=Zp(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{let o=s[0];db(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),Gt=b((e,t)=>{let{themeVariables:r,handDrawnSeed:i}=we(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Zp(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:yze(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),yze=b(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let n=isNaN(t[0])?0:t[0];return[n,n]}let r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray")});var vze,jm,gD,wie,t5=q(()=>{vze=Object.freeze({left:0,top:0,width:16,height:16}),jm=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),gD=Object.freeze({...vze,...jm}),wie=Object.freeze({...gD,body:"",hidden:!1})});var bze,kie,Cie=q(()=>{t5();bze=Object.freeze({width:null,height:null}),kie=Object.freeze({...bze,...jm})});var mD,r5,Sie=q(()=>{mD=(e,t,r,i="")=>{let n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){let o=n.pop(),l=n.pop(),u={provider:n.length>0?n[0]:i,prefix:l,name:o};return t&&!r5(u)?null:u}let a=n[0],s=a.split("-");if(s.length>1){let o={provider:i,prefix:s.shift(),name:s.join("-")};return t&&!r5(o)?null:o}if(r&&i===""){let o={provider:i,prefix:"",name:a};return t&&!r5(o,r)?null:o}return null},r5=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1});function Eie(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}var Aie=q(()=>{});function yD(e,t){let r=Eie(e,t);for(let i in wie)i in jm?i in e&&!(i in r)&&(r[i]=jm[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}var _ie=q(()=>{t5();Aie()});function Lie(e,t){let r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;let o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}var Rie=q(()=>{});function Iie(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function s(o){a=yD(i[o]||n[o],a)}return s(t),r.forEach(s),yD(e,a)}function vD(e,t){if(e.icons[t])return Iie(e,t,[]);let r=Lie(e,[t])[t];return r?Iie(e,t,r):null}var Die=q(()=>{_ie();Rie()});function bD(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;let i=e.split(xze);if(i===null||!i.length)return e;let n=[],a=i.shift(),s=Tze.test(a);for(;;){if(s){let o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}var xze,Tze,Nie=q(()=>{xze=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Tze=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function wze(e,t="defs"){let r="",i=e.indexOf("<"+t);for(;i>=0;){let n=e.indexOf(">",i),a=e.indexOf("",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function kze(e,t){return e?""+e+""+t:t}function Mie(e,t,r){let i=wze(e);return kze(i.defs,t+i.content+r)}var Oie=q(()=>{});function xD(e,t){let r={...gD,...e},i={...kie,...t},n={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,i].forEach(m=>{let y=[],v=m.hFlip,x=m.vFlip,T=m.rotate;v?x?T+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):x&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}T%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(a=Mie(a,'',""))});let s=i.width,o=i.height,l=n.width,u=n.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=bD(f,l/u)):(h=s==="auto"?l:s,f=o===null?bD(h,u/l):o==="auto"?u:o);let d={},p=(m,y)=>{Cze(y)||(d[m]=y.toString())};p("width",h),p("height",f);let g=[n.left,n.top,l,u];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}var Cze,Pie=q(()=>{t5();Cie();Nie();Oie();Cze=e=>e==="unset"||e==="undefined"||e==="none"});function Eze(e){e=e.replace(/[0-9]+$/,"")||"a";let t=Bie.get(e)||0;return Bie.set(e,t+1),t?`${e}${t}`:e}function TD(e){let t=[],r;for(;r=Sze.exec(e);)t.push(r[1]);if(!t.length)return e;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{let a=Eze(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}var Sze,Bie,Fie=q(()=>{Sze=/\sid="(\S+)"/g,Bie=new Map});function wD(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var $ie=q(()=>{});var zie=q(()=>{Sie();Die();Pie();Fie();$ie()});function ED(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Yie(e){Jp=e}function Jr(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(is.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}function Oc(e,t){if(t){if(is.escapeTest.test(e))return e.replace(is.escapeReplace,Vie)}else if(is.escapeTestNoEncode.test(e))return e.replace(is.escapeReplaceNoEncode,Vie);return e}function Wie(e){try{e=encodeURI(e).replace(is.percentDecode,"%")}catch{return null}return e}function Uie(e,t){let r=e.replace(is.findPipe,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),i=r.split(is.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0?-2:-1}function Hie(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function lGe(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(` -`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(` -`)}function si(e,t){return Qp.parse(e,t)}var Jp,yb,Aze,is,_ze,Lze,Rze,vb,Ize,AD,jie,Xie,Dze,_D,Nze,LD,Mze,Oze,o5,RD,Pze,Kie,Bze,ID,Gie,Fze,$ze,zze,Gze,Zie,qze,l5,DD,Qie,Vze,Jie,Wze,Uze,Hze,ene,Yze,jze,tne,Xze,Kze,Zze,Qze,Jze,eGe,tGe,n5,rGe,rne,ine,iGe,qie,ND,nGe,kD,aGe,i5,pb,sGe,Vie,a5,_l,s5,MD,Ll,mb,cGe,Qp,yzt,vzt,bzt,xzt,Tzt,wzt,kzt,nne=q(()=>{Jp=ED();yb={exec:()=>null};Aze=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},_ze=/^(?:[ \t]*(?:\n|$))+/,Lze=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Rze=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vb=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ize=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AD=/(?:[*+-]|\d{1,9}[.)])/,jie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xie=Jr(jie).replace(/bull/g,AD).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Dze=Jr(jie).replace(/bull/g,AD).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_D=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Nze=/^[^\n]+/,LD=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Mze=Jr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",LD).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Oze=Jr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AD).getRegex(),o5="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",RD=/|$))/,Pze=Jr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",RD).replace("tag",o5).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kie=Jr(_D).replace("hr",vb).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",o5).getRegex(),Bze=Jr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kie).getRegex(),ID={blockquote:Bze,code:Lze,def:Mze,fences:Rze,heading:Ize,hr:vb,html:Pze,lheading:Xie,list:Oze,newline:_ze,paragraph:Kie,table:yb,text:Nze},Gie=Jr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vb).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",o5).getRegex(),Fze={...ID,lheading:Dze,table:Gie,paragraph:Jr(_D).replace("hr",vb).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Gie).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",o5).getRegex()},$ze={...ID,html:Jr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",RD).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:yb,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jr(_D).replace("hr",vb).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Xie).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zze=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Gze=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Zie=/^( {2,}|\\)\n(?!\s*$)/,qze=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Aze?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ene=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Yze=Jr(ene,"u").replace(/punct/g,l5).getRegex(),jze=Jr(ene,"u").replace(/punct/g,Jie).getRegex(),tne="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xze=Jr(tne,"gu").replace(/notPunctSpace/g,Qie).replace(/punctSpace/g,DD).replace(/punct/g,l5).getRegex(),Kze=Jr(tne,"gu").replace(/notPunctSpace/g,Uze).replace(/punctSpace/g,Wze).replace(/punct/g,Jie).getRegex(),Zze=Jr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qie).replace(/punctSpace/g,DD).replace(/punct/g,l5).getRegex(),Qze=Jr(/\\(punct)/,"gu").replace(/punct/g,l5).getRegex(),Jze=Jr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),eGe=Jr(RD).replace("(?:-->|$)","-->").getRegex(),tGe=Jr("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",eGe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),n5=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,rGe=Jr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",n5).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rne=Jr(/^!?\[(label)\]\[(ref)\]/).replace("label",n5).replace("ref",LD).getRegex(),ine=Jr(/^!?\[(ref)\](?:\[\])?/).replace("ref",LD).getRegex(),iGe=Jr("reflink|nolink(?!\\()","g").replace("reflink",rne).replace("nolink",ine).getRegex(),qie=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ND={_backpedal:yb,anyPunctuation:Qze,autolink:Jze,blockSkip:Hze,br:Zie,code:Gze,del:yb,emStrongLDelim:Yze,emStrongRDelimAst:Xze,emStrongRDelimUnd:Zze,escape:zze,link:rGe,nolink:ine,punctuation:Vze,reflink:rne,reflinkSearch:iGe,tag:tGe,text:qze,url:yb},nGe={...ND,link:Jr(/^!?\[(label)\]\((.*?)\)/).replace("label",n5).getRegex(),reflink:Jr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n5).getRegex()},kD={...ND,emStrongRDelimAst:Kze,emStrongLDelim:jze,url:Jr(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",qie).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Jr(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Vie=e=>sGe[e];a5=class{options;rules;lexer;constructor(e){this.options=e||Jp}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:gb(r,` -`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],i=lGe(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let i=gb(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:gb(t[0],` -`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=gb(t[0],` +`},"getStyles"),EGe=v((e,t)=>{t!==void 0&&(kS[e]=t)},"addStylesForDiagram"),AQ=SGe,LS={};ed(LS,{clear:()=>pr,getAccDescription:()=>Mr,getAccTitle:()=>Lr,getDiagramTitle:()=>Dr,setAccDescription:()=>Ir,setAccTitle:()=>Ar,setDiagramTitle:()=>$r});hI="",fI="",dI="",pI=v(e=>Cr(e,It()),"sanitizeText"),pr=v(()=>{hI="",dI="",fI=""},"clear"),Ar=v(e=>{hI=pI(e).replace(/^\s+/g,"")},"setAccTitle"),Lr=v(()=>hI,"getAccTitle"),Ir=v(e=>{dI=pI(e).replace(/\n\s+/g,` +`)},"setAccDescription"),Mr=v(()=>dI,"getAccDescription"),$r=v(e=>{fI=pI(e)},"setDiagramTitle"),Dr=v(()=>fI,"getDiagramTitle"),dQ=fe,AGe=sb,ze=It,Tb=lI,IS=y0,MS=v(e=>Cr(e,ze()),"sanitizeText"),wb=tu,_Ge=v(()=>LS,"getCommonDb"),ES={},Cb=v((e,t,r)=>{ES[e]&&dQ.warn(`Diagram with id ${e} already registered. Overwriting.`),ES[e]=t,r&&wQ(e,r),EGe(e,t.styles),t.injectUtils?.(dQ,AGe,ze,MS,wb,_Ge(),()=>{})},"registerDiagram"),DS=v(e=>{if(e in ES)return ES[e];throw new RGe(e)},"getDiagram"),RGe=class extends Error{static{v(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}});function x0(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var gI=X(()=>{});function mI(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var _Q=X(()=>{});function b0(e){let t,r,n;e.length!==2?(t=x0,r=(o,l)=>x0(e(o),l),n=(o,l)=>e(o)-l):(t=e===x0||e===mI?e:LGe,r=e,n=e);function i(o,l,u=0,h=o.length){if(u>>1;r(o[f],l)<0?u=f+1:h=f}while(u>>1;r(o[f],l)<=0?u=f+1:h=f}while(uu&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function LGe(){return 0}var yI=X(()=>{gI();_Q()});function vI(e){return e===null?NaN:+e}var RQ=X(()=>{});var LQ,IQ,IGe,MGe,xI,MQ=X(()=>{gI();yI();RQ();LQ=b0(x0),IQ=LQ.right,IGe=LQ.left,MGe=b0(vI).center,xI=IQ});function DQ({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function DGe({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function NGe({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function OGe(e){return e!==null&&typeof e=="object"?e.valueOf():e}var xy,NQ=X(()=>{xy=class extends Map{constructor(t,r=OGe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(DQ(this,t))}has(t){return super.has(DQ(this,t))}set(t,r){return super.set(DGe(this,t),r)}delete(t){return super.delete(NGe(this,t))}}});function NS(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=PGe?10:a>=BGe?5:a>=$Ge?2:1,o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(e*u),l=Math.round(t*u),o/ut&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(e/u),l=Math.round(t/u),o*ut&&--l),l0))return[];if(e===t)return[e];let n=t=i))return[];let o=a-i+1,l=new Array(o);if(n)if(s<0)for(let u=0;u{PGe=Math.sqrt(50),BGe=Math.sqrt(10),$Ge=Math.sqrt(2)});function PS(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var PQ=X(()=>{});function BS(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var BQ=X(()=>{});function $S(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n{});var id=X(()=>{MQ();yI();PQ();BQ();$Q();OQ();NQ()});function FQ(e){return e}var zQ=X(()=>{});function FGe(e){return"translate("+e+",0)"}function zGe(e){return"translate(0,"+e+")"}function GGe(e){return t=>+e(t)}function qGe(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function VGe(){return!this.__axis}function qQ(e,t){var r=[],n=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===zS||e===FS?-1:1,h=e===FS||e===bI?"x":"y",f=e===zS||e===TI?FGe:zGe;function d(p){var g=n??(t.ticks?t.ticks.apply(t,r):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,r):FQ),y=Math.max(a,0)+o,x=t.range(),b=+x[0]+l,T=+x[x.length-1]+l,k=(t.bandwidth?qGe:GGe)(t.copy(),l),w=p.selection?p.selection():p,C=w.selectAll(".domain").data([null]),S=w.selectAll(".tick").data(g,t).order(),E=S.exit(),L=S.enter().append("g").attr("class","tick"),N=S.select("line"),O=S.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(L),N=N.merge(L.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),O=O.merge(L.append("text").attr("fill","currentColor").attr(h,u*y).attr("dy",e===zS?"0em":e===TI?"0.71em":"0.32em")),p!==w&&(C=C.transition(p),S=S.transition(p),N=N.transition(p),O=O.transition(p),E=E.transition(p).attr("opacity",GQ).attr("transform",function(R){return isFinite(R=k(R))?f(R+l):this.getAttribute("transform")}),L.attr("opacity",GQ).attr("transform",function(R){var _=this.parentNode.__axis;return f((_&&isFinite(_=_(R))?_:k(R))+l)})),E.remove(),C.attr("d",e===FS||e===bI?s?"M"+u*s+","+b+"H"+l+"V"+T+"H"+u*s:"M"+l+","+b+"V"+T:s?"M"+b+","+u*s+"V"+l+"H"+T+"V"+u*s:"M"+b+","+l+"H"+T),S.attr("opacity",1).attr("transform",function(R){return f(k(R)+l)}),N.attr(h+"2",u*a),O.attr(h,u*y).text(m),w.filter(VGe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===bI?"start":e===FS?"end":"middle"),w.each(function(){this.__axis=k})}return d.scale=function(p){return arguments.length?(t=p,d):t},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),d):n&&n.slice()},d.tickFormat=function(p){return arguments.length?(i=p,d):i},d.tickSize=function(p){return arguments.length?(a=s=+p,d):a},d.tickSizeInner=function(p){return arguments.length?(a=+p,d):a},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function wI(e){return qQ(zS,e)}function CI(e){return qQ(TI,e)}var zS,bI,TI,FS,GQ,VQ=X(()=>{zQ();zS=1,bI=2,TI=3,FS=4,GQ=1e-6});var WQ=X(()=>{VQ()});function HQ(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function HGe(e,t){for(var r=0,n=e.length,i;r{WGe={value:()=>{}};GS.prototype=HQ.prototype={constructor:GS,on:function(e,t){var r=this._,n=UGe(e+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n{YQ()});var qS,EI,AI=X(()=>{qS="http://www.w3.org/1999/xhtml",EI={svg:"http://www.w3.org/2000/svg",xhtml:qS,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Ah(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),EI.hasOwnProperty(t)?{space:EI[t],local:e}:e}var VS=X(()=>{AI()});function YGe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===qS&&t.documentElement.namespaceURI===qS?t.createElement(e):t.createElementNS(r,e)}}function XGe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function WS(e){var t=Ah(e);return(t.local?XGe:YGe)(t)}var _I=X(()=>{VS();AI()});function jGe(){}function T0(e){return e==null?jGe:function(){return this.querySelector(e)}}var US=X(()=>{});function XQ(e){typeof e!="function"&&(e=T0(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{Ql();US()});function RI(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var KQ=X(()=>{});function KGe(){return[]}function Sb(e){return e==null?KGe:function(){return this.querySelectorAll(e)}}var LI=X(()=>{});function ZGe(e){return function(){return RI(e.apply(this,arguments))}}function ZQ(e){typeof e=="function"?e=ZGe(e):e=Sb(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a{Ql();KQ();LI()});function Eb(e){return function(){return this.matches(e)}}function HS(e){return function(t){return t.matches(e)}}var Ab=X(()=>{});function JGe(e){return function(){return QGe.call(this.children,e)}}function eqe(){return this.firstElementChild}function JQ(e){return this.select(e==null?eqe:JGe(typeof e=="function"?e:HS(e)))}var QGe,eJ=X(()=>{Ab();QGe=Array.prototype.find});function rqe(){return Array.from(this.children)}function nqe(e){return function(){return tqe.call(this.children,e)}}function tJ(e){return this.selectAll(e==null?rqe:nqe(typeof e=="function"?e:HS(e)))}var tqe,rJ=X(()=>{Ab();tqe=Array.prototype.filter});function nJ(e){typeof e!="function"&&(e=Eb(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{Ql();Ab()});function YS(e){return new Array(e.length)}var II=X(()=>{});function aJ(){return new _i(this._enter||this._groups.map(YS),this._parents)}function _b(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var MI=X(()=>{II();Ql();_b.prototype={constructor:_b,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function sJ(e){return function(){return e}}var oJ=X(()=>{});function iqe(e,t,r,n,i,a){for(var s=0,o,l=t.length,u=a.length;s=T&&(T=b+1);!(w=y[T])&&++T{Ql();MI();oJ()});function uJ(){return new _i(this._exit||this._groups.map(YS),this._parents)}var hJ=X(()=>{II();Ql()});function fJ(e,t,r){var n=this.enter(),i=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var dJ=X(()=>{});function pJ(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l{Ql()});function mJ(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var yJ=X(()=>{});function vJ(e){e||(e=lqe);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;at?1:e>=t?0:NaN}var xJ=X(()=>{Ql()});function bJ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var TJ=X(()=>{});function wJ(){return Array.from(this)}var CJ=X(()=>{});function kJ(){for(var e=this._groups,t=0,r=e.length;t{});function EJ(){let e=0;for(let t of this)++e;return e}var AJ=X(()=>{});function _J(){return!this.node()}var RJ=X(()=>{});function LJ(e){for(var t=this._groups,r=0,n=t.length;r{});function cqe(e){return function(){this.removeAttribute(e)}}function uqe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hqe(e,t){return function(){this.setAttribute(e,t)}}function fqe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function dqe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function pqe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function MJ(e,t){var r=Ah(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?uqe:cqe:typeof t=="function"?r.local?pqe:dqe:r.local?fqe:hqe)(r,t))}var DJ=X(()=>{VS()});function XS(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var DI=X(()=>{});function gqe(e){return function(){this.style.removeProperty(e)}}function mqe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function yqe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function NJ(e,t,r){return arguments.length>1?this.each((t==null?gqe:typeof t=="function"?yqe:mqe)(e,t,r??"")):ad(this.node(),e)}function ad(e,t){return e.style.getPropertyValue(t)||XS(e).getComputedStyle(e,null).getPropertyValue(t)}var NI=X(()=>{DI()});function vqe(e){return function(){delete this[e]}}function xqe(e,t){return function(){this[e]=t}}function bqe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function OJ(e,t){return arguments.length>1?this.each((t==null?vqe:typeof t=="function"?bqe:xqe)(e,t)):this.node()[e]}var PJ=X(()=>{});function BJ(e){return e.trim().split(/^|\s+/)}function OI(e){return e.classList||new $J(e)}function $J(e){this._node=e,this._names=BJ(e.getAttribute("class")||"")}function FJ(e,t){for(var r=OI(e),n=-1,i=t.length;++n{$J.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function kqe(){this.textContent=""}function Sqe(e){return function(){this.textContent=e}}function Eqe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function VJ(e){return arguments.length?this.each(e==null?kqe:(typeof e=="function"?Eqe:Sqe)(e)):this.node().textContent}var WJ=X(()=>{});function Aqe(){this.innerHTML=""}function _qe(e){return function(){this.innerHTML=e}}function Rqe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function UJ(e){return arguments.length?this.each(e==null?Aqe:(typeof e=="function"?Rqe:_qe)(e)):this.node().innerHTML}var HJ=X(()=>{});function Lqe(){this.nextSibling&&this.parentNode.appendChild(this)}function YJ(){return this.each(Lqe)}var XJ=X(()=>{});function Iqe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jJ(){return this.each(Iqe)}var KJ=X(()=>{});function ZJ(e){var t=typeof e=="function"?e:WS(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var QJ=X(()=>{_I()});function Mqe(){return null}function JJ(e,t){var r=typeof e=="function"?e:WS(e),n=t==null?Mqe:typeof t=="function"?t:T0(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var eee=X(()=>{_I();US()});function Dqe(){var e=this.parentNode;e&&e.removeChild(this)}function tee(){return this.each(Dqe)}var ree=X(()=>{});function Nqe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Oqe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nee(e){return this.select(e?Oqe:Nqe)}var iee=X(()=>{});function aee(e){return arguments.length?this.property("__data__",e):this.node().__data__}var see=X(()=>{});function Pqe(e){return function(t){e.call(this,t,this.__data__)}}function Bqe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function $qe(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,a;r{});function cee(e,t,r){var n=XS(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function zqe(e,t){return function(){return cee(this,e,t)}}function Gqe(e,t){return function(){return cee(this,e,t.apply(this,arguments))}}function uee(e,t){return this.each((typeof t=="function"?Gqe:zqe)(e,t))}var hee=X(()=>{DI()});function*fee(){for(var e=this._groups,t=0,r=e.length;t{});function _i(e,t){this._groups=e,this._parents=t}function pee(){return new _i([[document.documentElement]],PI)}function qqe(){return this}var PI,_h,Ql=X(()=>{jQ();QQ();eJ();rJ();iJ();cJ();MI();hJ();dJ();gJ();yJ();xJ();TJ();CJ();SJ();AJ();RJ();IJ();DJ();NI();PJ();qJ();WJ();HJ();XJ();KJ();QJ();eee();ree();iee();see();lee();hee();dee();PI=[null];_i.prototype=pee.prototype={constructor:_i,select:XQ,selectAll:ZQ,selectChild:JQ,selectChildren:tJ,filter:nJ,data:lJ,enter:aJ,exit:uJ,join:fJ,merge:pJ,selection:qqe,order:mJ,sort:vJ,call:bJ,nodes:wJ,node:kJ,size:EJ,empty:_J,each:LJ,attr:MJ,style:NJ,property:OJ,classed:GJ,text:VJ,html:UJ,raise:YJ,lower:jJ,append:ZJ,insert:JJ,remove:tee,clone:nee,datum:aee,on:oee,dispatch:uee,[Symbol.iterator]:fee};_h=pee});function ct(e){return typeof e=="string"?new _i([[document.querySelector(e)]],[document.documentElement]):new _i([[e]],PI)}var gee=X(()=>{Ql()});var Jl=X(()=>{Ab();VS();gee();Ql();US();LI();NI()});var mee=X(()=>{});function w0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ty(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var BI=X(()=>{});function sd(){}function vee(){return this.rgb().formatHex()}function Kqe(){return this.rgb().formatHex8()}function Zqe(){return See(this).formatHsl()}function xee(){return this.rgb().formatRgb()}function tc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Vqe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?bee(t):r===3?new Ha(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?jS(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?jS(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wqe.exec(e))?new Ha(t[1],t[2],t[3],1):(t=Uqe.exec(e))?new Ha(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Hqe.exec(e))?jS(t[1],t[2],t[3],t[4]):(t=Yqe.exec(e))?jS(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xqe.exec(e))?Cee(t[1],t[2]/100,t[3]/100,1):(t=jqe.exec(e))?Cee(t[1],t[2]/100,t[3]/100,t[4]):yee.hasOwnProperty(e)?bee(yee[e]):e==="transparent"?new Ha(NaN,NaN,NaN,0):null}function bee(e){return new Ha(e>>16&255,e>>8&255,e&255,1)}function jS(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ha(e,t,r,n)}function FI(e){return e instanceof sd||(e=tc(e)),e?(e=e.rgb(),new Ha(e.r,e.g,e.b,e.opacity)):new Ha}function Cy(e,t,r,n){return arguments.length===1?FI(e):new Ha(e,t,r,n??1)}function Ha(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Tee(){return`#${C0(this.r)}${C0(this.g)}${C0(this.b)}`}function Qqe(){return`#${C0(this.r)}${C0(this.g)}${C0(this.b)}${C0((isNaN(this.opacity)?1:this.opacity)*255)}`}function wee(){let e=QS(this.opacity);return`${e===1?"rgb(":"rgba("}${k0(this.r)}, ${k0(this.g)}, ${k0(this.b)}${e===1?")":`, ${e})`}`}function QS(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function k0(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function C0(e){return e=k0(e),(e<16?"0":"")+e.toString(16)}function Cee(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ec(e,t,r,n)}function See(e){if(e instanceof ec)return new ec(e.h,e.s,e.l,e.opacity);if(e instanceof sd||(e=tc(e)),!e)return new ec;if(e instanceof ec)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(r-n)/o+(r0&&l<1?0:s,new ec(s,o,l,e.opacity)}function Eee(e,t,r,n){return arguments.length===1?See(e):new ec(e,t,r,n??1)}function ec(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function kee(e){return e=(e||0)%360,e<0?e+360:e}function KS(e){return Math.max(0,Math.min(1,e||0))}function $I(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Rb,ZS,wy,Lb,ru,Vqe,Wqe,Uqe,Hqe,Yqe,Xqe,jqe,yee,zI=X(()=>{BI();Rb=.7,ZS=1/Rb,wy="\\s*([+-]?\\d+)\\s*",Lb="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ru="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vqe=/^#([0-9a-f]{3,8})$/,Wqe=new RegExp(`^rgb\\(${wy},${wy},${wy}\\)$`),Uqe=new RegExp(`^rgb\\(${ru},${ru},${ru}\\)$`),Hqe=new RegExp(`^rgba\\(${wy},${wy},${wy},${Lb}\\)$`),Yqe=new RegExp(`^rgba\\(${ru},${ru},${ru},${Lb}\\)$`),Xqe=new RegExp(`^hsl\\(${Lb},${ru},${ru}\\)$`),jqe=new RegExp(`^hsla\\(${Lb},${ru},${ru},${Lb}\\)$`),yee={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};w0(sd,tc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vee,formatHex:vee,formatHex8:Kqe,formatHsl:Zqe,formatRgb:xee,toString:xee});w0(Ha,Cy,Ty(sd,{brighter(e){return e=e==null?ZS:Math.pow(ZS,e),new Ha(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rb:Math.pow(Rb,e),new Ha(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ha(k0(this.r),k0(this.g),k0(this.b),QS(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Tee,formatHex:Tee,formatHex8:Qqe,formatRgb:wee,toString:wee}));w0(ec,Eee,Ty(sd,{brighter(e){return e=e==null?ZS:Math.pow(ZS,e),new ec(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rb:Math.pow(Rb,e),new ec(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ha($I(e>=240?e-240:e+120,i,n),$I(e,i,n),$I(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ec(kee(this.h),KS(this.s),KS(this.l),QS(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=QS(this.opacity);return`${e===1?"hsl(":"hsla("}${kee(this.h)}, ${KS(this.s)*100}%, ${KS(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var Aee,_ee,Ree=X(()=>{Aee=Math.PI/180,_ee=180/Math.PI});function Oee(e){if(e instanceof nu)return new nu(e.l,e.a,e.b,e.opacity);if(e instanceof Rh)return Pee(e);e instanceof Ha||(e=FI(e));var t=WI(e.r),r=WI(e.g),n=WI(e.b),i=GI((.2225045*t+.7168786*r+.0606169*n)/Iee),a,s;return t===r&&r===n?a=s=i:(a=GI((.4360747*t+.3850649*r+.1430804*n)/Lee),s=GI((.0139322*t+.0971045*r+.7141733*n)/Mee)),new nu(116*i-16,500*(a-i),200*(i-s),e.opacity)}function UI(e,t,r,n){return arguments.length===1?Oee(e):new nu(e,t,r,n??1)}function nu(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function GI(e){return e>Jqe?Math.pow(e,1/3):e/Nee+Dee}function qI(e){return e>ky?e*e*e:Nee*(e-Dee)}function VI(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function WI(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function eVe(e){if(e instanceof Rh)return new Rh(e.h,e.c,e.l,e.opacity);if(e instanceof nu||(e=Oee(e)),e.a===0&&e.b===0)return new Rh(NaN,0{BI();zI();Ree();JS=18,Lee=.96422,Iee=1,Mee=.82521,Dee=4/29,ky=6/29,Nee=3*ky*ky,Jqe=ky*ky*ky;w0(nu,UI,Ty(sd,{brighter(e){return new nu(this.l+JS*(e??1),this.a,this.b,this.opacity)},darker(e){return new nu(this.l-JS*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Lee*qI(t),e=Iee*qI(e),r=Mee*qI(r),new Ha(VI(3.1338561*t-1.6168667*e-.4906146*r),VI(-.9787684*t+1.9161415*e+.033454*r),VI(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));w0(Rh,Ib,Ty(sd,{brighter(e){return new Rh(this.h,this.c,this.l+JS*(e??1),this.opacity)},darker(e){return new Rh(this.h,this.c,this.l-JS*(e??1),this.opacity)},rgb(){return Pee(this).rgb()}}))});var Sy=X(()=>{zI();Bee()});function HI(e,t,r,n,i){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*n+s*i)/6}function $ee(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],s=n>0?e[n-1]:2*i-a,o=n{});function Fee(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],s=e[(n+1)%t],o=e[(n+2)%t];return HI((r-n/t)*t,i,a,s,o)}}var zee=X(()=>{YI()});var Ey,XI=X(()=>{Ey=e=>()=>e});function Gee(e,t){return function(r){return e+r*t}}function tVe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function qee(e,t){var r=t-e;return r?Gee(e,r>180||r<-180?r-360*Math.round(r/360):r):Ey(isNaN(e)?t:e)}function Vee(e){return(e=+e)==1?Lh:function(t,r){return r-t?tVe(t,r,e):Ey(isNaN(t)?r:t)}}function Lh(e,t){var r=t-e;return r?Gee(e,r):Ey(isNaN(e)?t:e)}var jI=X(()=>{XI()});function Wee(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),s,o;for(s=0;s{Sy();YI();zee();jI();S0=(function e(t){var r=Vee(t);function n(i,a){var s=r((i=Cy(i)).r,(a=Cy(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=Lh(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=e,n})(1);rVe=Wee($ee),nVe=Wee(Fee)});function Uee(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i{});function Xee(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s{e4()});function Kee(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var Zee=X(()=>{});function Ya(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Mb=X(()=>{});function Qee(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=E0(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Jee=X(()=>{e4()});function iVe(e){return function(){return e}}function aVe(e){return function(t){return e(t)+""}}function Db(e,t){var r=QI.lastIndex=ZI.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(n=QI.exec(e))&&(i=ZI.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Ya(n,i)})),r=ZI.lastIndex;return r{Mb();QI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ZI=new RegExp(QI.source,"g")});function E0(e,t){var r=typeof t,n;return t==null||r==="boolean"?Ey(t):(r==="number"?Ya:r==="string"?(n=tc(t))?(t=n,S0):Db:t instanceof tc?S0:t instanceof Date?Kee:Hee(t)?Uee:Array.isArray(t)?Xee:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Qee:Ya)(e,t)}var e4=X(()=>{Sy();KI();jee();Zee();Mb();Jee();JI();XI();Yee()});function eM(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var ete=X(()=>{});function tM(e,t,r,n,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n{tte=180/Math.PI,t4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function nte(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?t4:tM(t.a,t.b,t.c,t.d,t.e,t.f)}function ite(e){return e==null?t4:(r4||(r4=document.createElementNS("http://www.w3.org/2000/svg","g")),r4.setAttribute("transform",e),(e=r4.transform.baseVal.consolidate())?(e=e.matrix,tM(e.a,e.b,e.c,e.d,e.e,e.f)):t4)}var r4,ate=X(()=>{rte()});function ste(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push("translate(",null,t,null,r);g.push({i:m-4,x:Ya(u,f)},{i:m-2,x:Ya(h,d)})}else(f||d)&&p.push("translate("+f+t+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,n)-2,x:Ya(u,h)})):h&&f.push(i(f)+"rotate("+h+n)}function o(u,h,f,d){u!==h?d.push({i:f.push(i(f)+"skewX(",null,n)-2,x:Ya(u,h)}):h&&f.push(i(f)+"skewX("+h+n)}function l(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push(i(p)+"scale(",null,",",null,")");g.push({i:m-4,x:Ya(u,f)},{i:m-2,x:Ya(h,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=e(u),h=e(h),a(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var g=-1,m=d.length,y;++g{Mb();ate();rM=ste(nte,"px, ","px)","deg)"),nM=ste(ite,", ",")",")")});function lte(e){return function(t,r){var n=e((t=Ib(t)).h,(r=Ib(r)).h),i=Lh(t.c,r.c),a=Lh(t.l,r.l),s=Lh(t.opacity,r.opacity);return function(o){return t.h=n(o),t.c=i(o),t.l=a(o),t.opacity=s(o),t+""}}}var iM,sVe,cte=X(()=>{Sy();jI();iM=lte(qee),sVe=lte(Lh)});var Ay=X(()=>{e4();Mb();ete();JI();ote();KI();cte()});function Fb(){return A0||(fte(oVe),A0=Bb.now()+a4)}function oVe(){A0=0}function $b(){this._call=this._time=this._next=null}function s4(e,t,r){var n=new $b;return n.restart(e,t,r),n}function dte(){Fb(),++_y;for(var e=n4,t;e;)(t=A0-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_y}function ute(){A0=(i4=Bb.now())+a4,_y=Ob=0;try{dte()}finally{_y=0,cVe(),A0=0}}function lVe(){var e=Bb.now(),t=e-i4;t>hte&&(a4-=t,i4=e)}function cVe(){for(var e,t=n4,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:n4=r);Pb=e,aM(n)}function aM(e){if(!_y){Ob&&(Ob=clearTimeout(Ob));var t=e-A0;t>24?(e<1/0&&(Ob=setTimeout(ute,e-Bb.now()-a4)),Nb&&(Nb=clearInterval(Nb))):(Nb||(i4=Bb.now(),Nb=setInterval(lVe,hte)),_y=1,fte(ute))}}var _y,Ob,Nb,hte,n4,Pb,i4,A0,a4,Bb,fte,sM=X(()=>{_y=0,Ob=0,Nb=0,hte=1e3,i4=0,A0=0,a4=0,Bb=typeof performance=="object"&&performance.now?performance:Date,fte=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};$b.prototype=s4.prototype={constructor:$b,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Fb():+r)+(t==null?0:+t),!this._next&&Pb!==this&&(Pb?Pb._next=this:n4=this,Pb=this),this._call=e,this._time=r,aM()},stop:function(){this._call&&(this._call=null,this._time=1/0,aM())}}});function o4(e,t,r){var n=new $b;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var pte=X(()=>{sM()});var l4=X(()=>{sM();pte()});function od(e,t,r,n,i,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;fVe(e,r,{name:t,index:n,group:i,on:uVe,tween:hVe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:yte})}function Gb(e,t){var r=da(e,t);if(r.state>yte)throw new Error("too late; already scheduled");return r}function Xa(e,t){var r=da(e,t);if(r.state>c4)throw new Error("too late; already running");return r}function da(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function fVe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=s4(a,0,r.time);function a(u){r.state=gte,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==gte)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===c4)return o4(s);p.state===mte?(p.state=zb,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[h]):+h{SI();l4();uVe=kI("start","end","cancel","interrupt"),hVe=[],yte=0,gte=1,u4=2,c4=3,mte=4,h4=5,zb=6});function f4(e,t){var r=e.__transition,n,i,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){a=!1;continue}i=n.state>u4&&n.state{ho()});function xte(e){return this.each(function(){f4(this,e)})}var bte=X(()=>{vte()});function dVe(e,t){var r,n;return function(){var i=Xa(this,e),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s{ho()});function d4(e,t){var r;return(typeof t=="number"?Ya:t instanceof tc?S0:(r=tc(t))?(t=r,S0):Db)(e,t)}var oM=X(()=>{Sy();Ay()});function gVe(e){return function(){this.removeAttribute(e)}}function mVe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yVe(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===n?a:a=t(n=s,r)}}function vVe(e,t,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===n?a:a=t(n=s,r)}}function xVe(e,t,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o)))}}function bVe(e,t,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o)))}}function wte(e,t){var r=Ah(e),n=r==="transform"?nM:d4;return this.attrTween(e,typeof t=="function"?(r.local?bVe:xVe)(r,n,Ry(this,"attr."+e,t)):t==null?(r.local?mVe:gVe)(r):(r.local?vVe:yVe)(r,n,t))}var Cte=X(()=>{Ay();Jl();qb();oM()});function TVe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function wVe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function CVe(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&wVe(e,a)),r}return i._value=t,i}function kVe(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&TVe(e,a)),r}return i._value=t,i}function kte(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Ah(e);return this.tween(r,(n.local?CVe:kVe)(n,t))}var Ste=X(()=>{Jl()});function SVe(e,t){return function(){Gb(this,e).delay=+t.apply(this,arguments)}}function EVe(e,t){return t=+t,function(){Gb(this,e).delay=t}}function Ete(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?SVe:EVe)(t,e)):da(this.node(),t).delay}var Ate=X(()=>{ho()});function AVe(e,t){return function(){Xa(this,e).duration=+t.apply(this,arguments)}}function _Ve(e,t){return t=+t,function(){Xa(this,e).duration=t}}function _te(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?AVe:_Ve)(t,e)):da(this.node(),t).duration}var Rte=X(()=>{ho()});function RVe(e,t){if(typeof t!="function")throw new Error;return function(){Xa(this,e).ease=t}}function Lte(e){var t=this._id;return arguments.length?this.each(RVe(t,e)):da(this.node(),t).ease}var Ite=X(()=>{ho()});function LVe(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Xa(this,e).ease=r}}function Mte(e){if(typeof e!="function")throw new Error;return this.each(LVe(this._id,e))}var Dte=X(()=>{ho()});function Nte(e){typeof e!="function"&&(e=Eb(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{Jl();_0()});function Pte(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o{_0()});function IVe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function MVe(e,t,r){var n,i,a=IVe(t)?Gb:Xa;return function(){var s=a(this,e),o=s.on;o!==n&&(i=(n=o).copy()).on(t,r),s.on=i}}function $te(e,t){var r=this._id;return arguments.length<2?da(this.node(),r).on.on(e):this.each(MVe(r,e,t))}var Fte=X(()=>{ho()});function DVe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function zte(){return this.on("end.remove",DVe(this._id))}var Gte=X(()=>{});function qte(e){var t=this._name,r=this._id;typeof e!="function"&&(e=T0(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{Jl();_0();ho()});function Wte(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Sb(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{Jl();_0();ho()});function Hte(){return new NVe(this._groups,this._parents)}var NVe,Yte=X(()=>{Jl();NVe=_h.prototype.constructor});function OVe(e,t){var r,n,i;return function(){var a=ad(this,e),s=(this.style.removeProperty(e),ad(this,e));return a===s?null:a===r&&s===n?i:i=t(r=a,n=s)}}function Xte(e){return function(){this.style.removeProperty(e)}}function PVe(e,t,r){var n,i=r+"",a;return function(){var s=ad(this,e);return s===i?null:s===n?a:a=t(n=s,r)}}function BVe(e,t,r){var n,i,a;return function(){var s=ad(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),ad(this,e))),s===l?null:s===n&&l===i?a:(i=l,a=t(n=s,o))}}function $Ve(e,t){var r,n,i,a="style."+t,s="end."+a,o;return function(){var l=Xa(this,e),u=l.on,h=l.value[a]==null?o||(o=Xte(t)):void 0;(u!==r||i!==h)&&(n=(r=u).copy()).on(s,i=h),l.on=n}}function jte(e,t,r){var n=(e+="")=="transform"?rM:d4;return t==null?this.styleTween(e,OVe(e,n)).on("end.style."+e,Xte(e)):typeof t=="function"?this.styleTween(e,BVe(e,n,Ry(this,"style."+e,t))).each($Ve(this._id,e)):this.styleTween(e,PVe(e,n,t),r).on("end.style."+e,null)}var Kte=X(()=>{Ay();Jl();ho();qb();oM()});function FVe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function zVe(e,t,r){var n,i;function a(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&FVe(e,s,r)),n}return a._value=t,a}function Zte(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,zVe(e,t,r??""))}var Qte=X(()=>{});function GVe(e){return function(){this.textContent=e}}function qVe(e){return function(){var t=e(this);this.textContent=t??""}}function Jte(e){return this.tween("text",typeof e=="function"?qVe(Ry(this,"text",e)):GVe(e==null?"":e+""))}var ere=X(()=>{qb()});function VVe(e){return function(t){this.textContent=e.call(this,t)}}function WVe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&VVe(i)),t}return n._value=e,n}function tre(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,WVe(e))}var rre=X(()=>{});function nre(){for(var e=this._name,t=this._id,r=p4(),n=this._groups,i=n.length,a=0;a{_0();ho()});function are(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var u=Xa(this,n),h=u.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),u.on=t}),i===0&&a()})}var sre=X(()=>{ho()});function Os(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function ore(e){return _h().transition(e)}function p4(){return++UVe}var UVe,Ih,_0=X(()=>{Jl();Cte();Ste();Ate();Rte();Ite();Dte();Ote();Bte();Fte();Gte();Vte();Ute();Yte();Kte();Qte();ere();rre();ire();qb();sre();UVe=0;Ih=_h.prototype;Os.prototype=ore.prototype={constructor:Os,select:qte,selectAll:Wte,selectChild:Ih.selectChild,selectChildren:Ih.selectChildren,filter:Nte,merge:Pte,selection:Hte,transition:nre,call:Ih.call,nodes:Ih.nodes,node:Ih.node,size:Ih.size,empty:Ih.empty,each:Ih.each,on:$te,attr:wte,attrTween:kte,style:jte,styleTween:Zte,text:Jte,textTween:tre,remove:zte,tween:Tte,delay:Ete,duration:_te,ease:Lte,easeVarying:Mte,end:are,[Symbol.iterator]:Ih[Symbol.iterator]}});function g4(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var lre=X(()=>{});var lM=X(()=>{lre()});function YVe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function cre(e){var t,r;e instanceof Os?(t=e._id,e=e._name):(t=p4(),(r=HVe).time=Fb(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,a=0;a{_0();ho();lM();l4();HVe={time:null,delay:0,duration:250,ease:g4}});var hre=X(()=>{Jl();bte();ure();_h.prototype.interrupt=xte;_h.prototype.transition=cre});var m4=X(()=>{hre()});var fre=X(()=>{});var dre=X(()=>{});var pre=X(()=>{});function gre(e){return[+e[0],+e[1]]}function XVe(e){return[gre(e[0]),gre(e[1])]}function cM(e){return{type:e}}var QFt,JFt,ezt,tzt,rzt,nzt,mre=X(()=>{m4();fre();dre();pre();({abs:QFt,max:JFt,min:ezt}=Math);tzt={name:"x",handles:["w","e"].map(cM),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},rzt={name:"y",handles:["n","s"].map(cM),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},nzt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(cM),input:function(e){return e==null?null:XVe(e)},output:function(e){return e}}});var yre=X(()=>{mre()});function vre(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vre;let r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i{uM=Math.PI,hM=2*uM,R0=1e-6,jVe=hM-R0;L0=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vre:KVe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-t,u=i-r,h=s-t,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>R0)if(!(Math.abs(f*l-u*h)>R0)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,g=i-o,m=l*l+u*u,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(d),T=a*Math.tan((uM-Math.acos((m+d-y)/(2*x*b)))/2),k=T/b,w=T/x;Math.abs(k-1)>R0&&this._append`L${t+k*h},${r+k*f}`,this._append`A${a},${a},0,0,${+(f*p>h*g)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),u=t+o,h=r+l,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>R0||Math.abs(this._y1-h)>R0)&&this._append`L${u},${h}`,n&&(d<0&&(d=d%hM+hM),d>jVe?this._append`A${n},${n},0,1,${f},${t-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=h}`:d>R0&&this._append`A${n},${n},0,${+(d>=uM)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};xre.prototype=L0.prototype});var fM=X(()=>{bre()});var Tre=X(()=>{});var wre=X(()=>{});var Cre=X(()=>{});var kre=X(()=>{});var Sre=X(()=>{});var Ere=X(()=>{});var Are=X(()=>{});function _re(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function I0(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var Vb=X(()=>{});function iu(e){return e=I0(Math.abs(e)),e?e[1]:NaN}var Wb=X(()=>{Vb()});function Rre(e,t){return function(r,n){for(var i=r.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}var Lre=X(()=>{});function Ire(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Mre=X(()=>{});function ld(e){if(!(t=ZVe.exec(e)))throw new Error("invalid format: "+e);var t;return new y4({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function y4(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var ZVe,dM=X(()=>{ZVe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;ld.prototype=y4.prototype;y4.prototype.toString=function(){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}});function Dre(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Nre=X(()=>{});function Ore(e,t){var r=I0(e,t);if(!r)return Ub=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(Ub=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+I0(e,Math.max(0,t+a-1))[0]}var Ub,pM=X(()=>{Vb()});function gM(e,t){var r=I0(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var Pre=X(()=>{Vb()});var mM,Bre=X(()=>{Vb();pM();Pre();mM={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_re,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>gM(e*100,t),r:gM,s:Ore,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}});function yM(e){return e}var $re=X(()=>{});function Gre(e){var t=e.grouping===void 0||e.thousands===void 0?yM:Rre(Fre.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?yM:Ire(Fre.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,d){f=ld(f);var p=f.fill,g=f.align,m=f.sign,y=f.symbol,x=f.zero,b=f.width,T=f.comma,k=f.precision,w=f.trim,C=f.type;C==="n"?(T=!0,C="g"):mM[C]||(k===void 0&&(k=12),w=!0,C="g"),(x||p==="0"&&g==="=")&&(x=!0,p="0",g="=");var S=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),E=(y==="$"?n:/[%p]/.test(C)?s:"")+(d&&d.suffix!==void 0?d.suffix:""),L=mM[C],N=/[defgprs%]/.test(C);k=k===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function O(R){var _=S,D=E,I,M,B;if(C==="c")D=L(R)+D,R="";else{R=+R;var P=R<0||1/R<0;if(R=isNaN(R)?l:L(Math.abs(R),k),w&&(R=Dre(R)),P&&+R==0&&m!=="+"&&(P=!1),_=(P?m==="("?m:o:m==="-"||m==="("?"":m)+_,D=(C==="s"&&!isNaN(R)&&Ub!==void 0?zre[8+Ub/3]:"")+D+(P&&m==="("?")":""),N){for(I=-1,M=R.length;++IB||B>57){D=(B===46?i+R.slice(I+1):R.slice(I))+D,R=R.slice(0,I);break}}}T&&!x&&(R=t(R,1/0));var $=_.length+R.length+D.length,G=$>1)+_+R+D+G.slice($);break;default:R=G+_+R+D;break}return a(R)}return O.toString=function(){return f+""},O}function h(f,d){var p=Math.max(-8,Math.min(8,Math.floor(iu(d)/3)))*3,g=Math.pow(10,-p),m=u((f=ld(f),f.type="f",f),{suffix:zre[8+p/3]});return function(y){return m(g*y)}}return{format:u,formatPrefix:h}}var Fre,zre,qre=X(()=>{Wb();Lre();Mre();dM();Nre();Bre();pM();$re();Fre=Array.prototype.map,zre=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function vM(e){return v4=Gre(e),au=v4.format,x4=v4.formatPrefix,v4}var v4,au,x4,Vre=X(()=>{qre();vM({thousands:",",grouping:[3],currency:["$",""]})});function xM(e){return Math.max(0,-iu(Math.abs(e)))}var Wre=X(()=>{Wb()});function bM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(iu(t)/3)))*3-iu(Math.abs(e)))}var Ure=X(()=>{Wb()});function TM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,iu(t)-iu(e))+1}var Hre=X(()=>{Wb()});var wM=X(()=>{Vre();dM();Wre();Ure();Hre()});var Yre=X(()=>{});function QVe(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function Xre(){return this.eachAfter(QVe)}var jre=X(()=>{});function Kre(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}var Zre=X(()=>{});function Qre(e,t){for(var r=this,n=[r],i,a,s=-1;r=n.pop();)if(e.call(t,r,++s,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}var Jre=X(()=>{});function ene(e,t){for(var r=this,n=[r],i=[],a,s,o,l=-1;r=n.pop();)if(i.push(r),a=r.children)for(s=0,o=a.length;s{});function rne(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}var nne=X(()=>{});function ine(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}var ane=X(()=>{});function sne(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var one=X(()=>{});function lne(e){for(var t=this,r=JVe(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function JVe(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var cne=X(()=>{});function une(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var hne=X(()=>{});function fne(){return Array.from(this)}var dne=X(()=>{});function pne(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var gne=X(()=>{});function mne(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var yne=X(()=>{});function*vne(){var e=this,t,r=[e],n,i,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,a=n.length;i{});function Ly(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=rWe)):t===void 0&&(t=tWe);for(var r=new Hb(e),n,i=[r],a,s,o,l;n=i.pop();)if((s=t(n.data))&&(l=(s=Array.from(s)).length))for(n.children=s,o=l-1;o>=0;--o)i.push(a=s[o]=new Hb(s[o])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(iWe)}function eWe(){return Ly(this).eachBefore(nWe)}function tWe(e){return e.children}function rWe(e){return Array.isArray(e)?e[1]:null}function nWe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function iWe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Hb(e){this.data=e,this.depth=this.height=0,this.parent=null}var bne=X(()=>{jre();Zre();Jre();tne();nne();ane();one();cne();hne();dne();gne();yne();xne();Hb.prototype=Ly.prototype={constructor:Hb,count:Xre,each:Kre,eachAfter:ene,eachBefore:Qre,find:rne,sum:ine,sort:sne,path:lne,ancestors:une,descendants:fne,leaves:pne,links:mne,copy:eWe,[Symbol.iterator]:vne}});function Tne(e){if(typeof e!="function")throw new Error;return e}var wne=X(()=>{});function Iy(){return 0}function My(e){return function(){return e}}var Cne=X(()=>{});function kne(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var Sne=X(()=>{});function Ene(e,t,r,n,i){for(var a=e.children,s,o=-1,l=a.length,u=e.value&&(n-t)/e.value;++o{});function _ne(e,t,r,n,i){for(var a=e.children,s,o=-1,l=a.length,u=e.value&&(i-r)/e.value;++o{});function sWe(e,t,r,n,i,a){for(var s=[],o=t.children,l,u,h=0,f=0,d=o.length,p,g,m=t.value,y,x,b,T,k,w,C;hb&&(b=u),C=y*y*w,T=Math.max(b/C,C/x),T>k){y-=u;break}k=T}s.push(l={value:y,dice:p{Ane();Rne();aWe=(1+Math.sqrt(5))/2;Lne=(function e(t){function r(n,i,a,s,o){sWe(t,n,i,a,s,o)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r})(aWe)});function CM(){var e=Lne,t=!1,r=1,n=1,i=[0],a=Iy,s=Iy,o=Iy,l=Iy,u=Iy;function h(d){return d.x0=d.y0=0,d.x1=r,d.y1=n,d.eachBefore(f),i=[0],t&&d.eachBefore(kne),d}function f(d){var p=i[d.depth],g=d.x0+p,m=d.y0+p,y=d.x1-p,x=d.y1-p;y{Sne();Ine();wne();Cne()});var Dne=X(()=>{bne();Mne()});var Nne=X(()=>{});var One=X(()=>{});function cd(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var Yb=X(()=>{});function Yo(){var e=new xy,t=[],r=[],n=kM;function i(a){let s=e.get(a);if(s===void 0){if(n!==kM)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new xy;for(let s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Yo(t,r).unknown(n)},cd.apply(i,arguments),i}var kM,SM=X(()=>{id();Yb();kM=Symbol("implicit")});function Dy(){var e=Yo().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,s,o=!1,l=0,u=0,h=.5;delete e.unknown;function f(){var d=t().length,p=i{id();Yb();SM()});function EM(e){return function(){return e}}var Bne=X(()=>{});function AM(e){return+e}var $ne=X(()=>{});function Ny(e){return e}function _M(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:EM(isNaN(t)?NaN:.5)}function oWe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function lWe(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i2?cWe:lWe,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=o(e.map(n),t,r)))(n(s(d)))}return f.invert=function(d){return s(i((u||(u=o(t,e.map(n),Ya)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,AM),h()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),h()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=eM,h()},f.clamp=function(d){return arguments.length?(s=d?!0:Ny,h()):s!==Ny},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,h()}}function Xb(){return uWe()(Ny,Ny)}var Fne,RM=X(()=>{id();Ay();Bne();$ne();Fne=[0,1]});function LM(e,t,r,n){var i=by(e,t,r),a;switch(n=ld(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=bM(i,s))&&(n.precision=a),x4(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=TM(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=xM(i))&&(n.precision=a-(n.type==="%")*2);break}}return au(n)}var zne=X(()=>{id();wM()});function hWe(e){var t=e.domain;return e.ticks=function(r){var n=t();return OS(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return LM(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,h=10;for(o0;){if(u=kb(s,o,r),u===l)return n[i]=s,n[a]=o,t(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function rc(){var e=Xb();return e.copy=function(){return b4(e,rc())},cd.apply(e,arguments),hWe(e)}var Gne=X(()=>{id();RM();Yb();zne()});function IM(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return a{});function Yn(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{let s=i(a),o=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{let l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,o),e(a);while(uYn(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(MM.setTime(+a),DM.setTime(+s),e(MM),e(DM),Math.floor(r(MM,DM))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var MM,DM,Mh=X(()=>{MM=new Date,DM=new Date});var su,Vne,NM=X(()=>{Mh();su=Yn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);su.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yn(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):su);Vne=su.range});var Xo,Wne,OM=X(()=>{Mh();Xo=Yn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),Wne=Xo.range});var Dh,fWe,T4,dWe,PM=X(()=>{Mh();Dh=Yn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),fWe=Dh.range,T4=Yn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),dWe=T4.range});var Nh,pWe,w4,gWe,BM=X(()=>{Mh();Nh=Yn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),pWe=Nh.range,w4=Yn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),gWe=w4.range});var Tl,mWe,Kb,yWe,C4,vWe,$M=X(()=>{Mh();Tl=Yn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),mWe=Tl.range,Kb=Yn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),yWe=Kb.range,C4=Yn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),vWe=C4.range});function N0(e){return Yn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}function O0(e){return Yn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var nc,ud,k4,S4,lu,E4,A4,Hne,xWe,bWe,TWe,wWe,CWe,kWe,P0,Oy,Yne,Xne,hd,jne,Kne,Zne,SWe,EWe,AWe,_We,RWe,LWe,FM=X(()=>{Mh();nc=N0(0),ud=N0(1),k4=N0(2),S4=N0(3),lu=N0(4),E4=N0(5),A4=N0(6),Hne=nc.range,xWe=ud.range,bWe=k4.range,TWe=S4.range,wWe=lu.range,CWe=E4.range,kWe=A4.range;P0=O0(0),Oy=O0(1),Yne=O0(2),Xne=O0(3),hd=O0(4),jne=O0(5),Kne=O0(6),Zne=P0.range,SWe=Oy.range,EWe=Yne.range,AWe=Xne.range,_We=hd.range,RWe=jne.range,LWe=Kne.range});var Oh,IWe,_4,MWe,zM=X(()=>{Mh();Oh=Yn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),IWe=Oh.range,_4=Yn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),MWe=_4.range});var jo,DWe,ic,NWe,GM=X(()=>{Mh();jo=Yn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});DWe=jo.range,ic=Yn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ic.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});NWe=ic.range});function Jne(e,t,r,n,i,a){let s=[[Xo,1,1e3],[Xo,5,5*1e3],[Xo,15,15*1e3],[Xo,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function o(u,h,f){let d=hy).right(s,d);if(p===s.length)return e.every(by(u/31536e6,h/31536e6,f));if(p===0)return su.every(Math.max(by(u,h,f),1));let[g,m]=s[d/s[p-1][2]{id();NM();OM();PM();BM();$M();FM();zM();GM();[PWe,BWe]=Jne(ic,_4,P0,C4,w4,T4),[qM,VM]=Jne(jo,Oh,nc,Tl,Nh,Dh)});var R4=X(()=>{NM();OM();PM();BM();$M();FM();zM();GM();eie()});function WM(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function UM(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Zb(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function HM(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=Qb(i),h=Jb(i),f=Qb(a),d=Jb(a),p=Qb(s),g=Jb(s),m=Qb(o),y=Jb(o),x=Qb(l),b=Jb(l),T={a:B,A:P,b:$,B:G,c:null,d:sie,e:sie,f:sUe,g:mUe,G:vUe,H:nUe,I:iUe,j:aUe,L:hie,m:oUe,M:lUe,p:q,q:z,Q:cie,s:uie,S:cUe,u:uUe,U:hUe,V:fUe,w:dUe,W:pUe,x:null,X:null,y:gUe,Y:yUe,Z:xUe,"%":lie},k={a:V,A:j,b:ee,B:ne,c:null,d:oie,e:oie,f:CUe,g:DUe,G:OUe,H:bUe,I:TUe,j:wUe,L:die,m:kUe,M:SUe,p:Q,q:pe,Q:cie,s:uie,S:EUe,u:AUe,U:_Ue,V:RUe,w:LUe,W:IUe,x:null,X:null,y:MUe,Y:NUe,Z:PUe,"%":lie},w={a:N,A:O,b:R,B:_,c:D,d:iie,e:iie,f:JWe,g:nie,G:rie,H:aie,I:aie,j:jWe,L:QWe,m:XWe,M:KWe,p:L,q:YWe,Q:tUe,s:rUe,S:ZWe,u:qWe,U:VWe,V:WWe,w:GWe,W:UWe,x:I,X:M,y:nie,Y:rie,Z:HWe,"%":eUe};T.x=C(r,T),T.X=C(n,T),T.c=C(t,T),k.x=C(r,k),k.X=C(n,k),k.c=C(t,k);function C(te,de){return function(ce){var ue=[],Re=-1,ve=0,Ge=te.length,He,Ue,me;for(ce instanceof Date||(ce=new Date(+ce));++Re53)return null;"w"in ue||(ue.w=1),"Z"in ue?(ve=UM(Zb(ue.y,0,1)),Ge=ve.getUTCDay(),ve=Ge>4||Ge===0?Oy.ceil(ve):Oy(ve),ve=Kb.offset(ve,(ue.V-1)*7),ue.y=ve.getUTCFullYear(),ue.m=ve.getUTCMonth(),ue.d=ve.getUTCDate()+(ue.w+6)%7):(ve=WM(Zb(ue.y,0,1)),Ge=ve.getDay(),ve=Ge>4||Ge===0?ud.ceil(ve):ud(ve),ve=Tl.offset(ve,(ue.V-1)*7),ue.y=ve.getFullYear(),ue.m=ve.getMonth(),ue.d=ve.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),Ge="Z"in ue?UM(Zb(ue.y,0,1)).getUTCDay():WM(Zb(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(Ge+5)%7:ue.w+ue.U*7-(Ge+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,UM(ue)):WM(ue)}}function E(te,de,ce,ue){for(var Re=0,ve=de.length,Ge=ce.length,He,Ue;Re=Ge)return-1;if(He=de.charCodeAt(Re++),He===37){if(He=de.charAt(Re++),Ue=w[He in tie?de.charAt(Re++):He],!Ue||(ue=Ue(te,ce,ue))<0)return-1}else if(He!=ce.charCodeAt(ue++))return-1}return ue}function L(te,de,ce){var ue=u.exec(de.slice(ce));return ue?(te.p=h.get(ue[0].toLowerCase()),ce+ue[0].length):-1}function N(te,de,ce){var ue=p.exec(de.slice(ce));return ue?(te.w=g.get(ue[0].toLowerCase()),ce+ue[0].length):-1}function O(te,de,ce){var ue=f.exec(de.slice(ce));return ue?(te.w=d.get(ue[0].toLowerCase()),ce+ue[0].length):-1}function R(te,de,ce){var ue=x.exec(de.slice(ce));return ue?(te.m=b.get(ue[0].toLowerCase()),ce+ue[0].length):-1}function _(te,de,ce){var ue=m.exec(de.slice(ce));return ue?(te.m=y.get(ue[0].toLowerCase()),ce+ue[0].length):-1}function D(te,de,ce){return E(te,t,de,ce)}function I(te,de,ce){return E(te,r,de,ce)}function M(te,de,ce){return E(te,n,de,ce)}function B(te){return s[te.getDay()]}function P(te){return a[te.getDay()]}function $(te){return l[te.getMonth()]}function G(te){return o[te.getMonth()]}function q(te){return i[+(te.getHours()>=12)]}function z(te){return 1+~~(te.getMonth()/3)}function V(te){return s[te.getUTCDay()]}function j(te){return a[te.getUTCDay()]}function ee(te){return l[te.getUTCMonth()]}function ne(te){return o[te.getUTCMonth()]}function Q(te){return i[+(te.getUTCHours()>=12)]}function pe(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var de=C(te+="",T);return de.toString=function(){return te},de},parse:function(te){var de=S(te+="",!1);return de.toString=function(){return te},de},utcFormat:function(te){var de=C(te+="",k);return de.toString=function(){return te},de},utcParse:function(te){var de=S(te+="",!0);return de.toString=function(){return te},de}}}function vn(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function GWe(e,t,r){var n=Ea.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function qWe(e,t,r){var n=Ea.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function VWe(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function WWe(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function UWe(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function rie(e,t,r){var n=Ea.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function nie(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function HWe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function YWe(e,t,r){var n=Ea.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function XWe(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function iie(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jWe(e,t,r){var n=Ea.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function aie(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function KWe(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function ZWe(e,t,r){var n=Ea.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function QWe(e,t,r){var n=Ea.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function JWe(e,t,r){var n=Ea.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function eUe(e,t,r){var n=$We.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function tUe(e,t,r){var n=Ea.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function rUe(e,t,r){var n=Ea.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function sie(e,t){return vn(e.getDate(),t,2)}function nUe(e,t){return vn(e.getHours(),t,2)}function iUe(e,t){return vn(e.getHours()%12||12,t,2)}function aUe(e,t){return vn(1+Tl.count(jo(e),e),t,3)}function hie(e,t){return vn(e.getMilliseconds(),t,3)}function sUe(e,t){return hie(e,t)+"000"}function oUe(e,t){return vn(e.getMonth()+1,t,2)}function lUe(e,t){return vn(e.getMinutes(),t,2)}function cUe(e,t){return vn(e.getSeconds(),t,2)}function uUe(e){var t=e.getDay();return t===0?7:t}function hUe(e,t){return vn(nc.count(jo(e)-1,e),t,2)}function fie(e){var t=e.getDay();return t>=4||t===0?lu(e):lu.ceil(e)}function fUe(e,t){return e=fie(e),vn(lu.count(jo(e),e)+(jo(e).getDay()===4),t,2)}function dUe(e){return e.getDay()}function pUe(e,t){return vn(ud.count(jo(e)-1,e),t,2)}function gUe(e,t){return vn(e.getFullYear()%100,t,2)}function mUe(e,t){return e=fie(e),vn(e.getFullYear()%100,t,2)}function yUe(e,t){return vn(e.getFullYear()%1e4,t,4)}function vUe(e,t){var r=e.getDay();return e=r>=4||r===0?lu(e):lu.ceil(e),vn(e.getFullYear()%1e4,t,4)}function xUe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vn(t/60|0,"0",2)+vn(t%60,"0",2)}function oie(e,t){return vn(e.getUTCDate(),t,2)}function bUe(e,t){return vn(e.getUTCHours(),t,2)}function TUe(e,t){return vn(e.getUTCHours()%12||12,t,2)}function wUe(e,t){return vn(1+Kb.count(ic(e),e),t,3)}function die(e,t){return vn(e.getUTCMilliseconds(),t,3)}function CUe(e,t){return die(e,t)+"000"}function kUe(e,t){return vn(e.getUTCMonth()+1,t,2)}function SUe(e,t){return vn(e.getUTCMinutes(),t,2)}function EUe(e,t){return vn(e.getUTCSeconds(),t,2)}function AUe(e){var t=e.getUTCDay();return t===0?7:t}function _Ue(e,t){return vn(P0.count(ic(e)-1,e),t,2)}function pie(e){var t=e.getUTCDay();return t>=4||t===0?hd(e):hd.ceil(e)}function RUe(e,t){return e=pie(e),vn(hd.count(ic(e),e)+(ic(e).getUTCDay()===4),t,2)}function LUe(e){return e.getUTCDay()}function IUe(e,t){return vn(Oy.count(ic(e)-1,e),t,2)}function MUe(e,t){return vn(e.getUTCFullYear()%100,t,2)}function DUe(e,t){return e=pie(e),vn(e.getUTCFullYear()%100,t,2)}function NUe(e,t){return vn(e.getUTCFullYear()%1e4,t,4)}function OUe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?hd(e):hd.ceil(e),vn(e.getUTCFullYear()%1e4,t,4)}function PUe(){return"+0000"}function lie(){return"%"}function cie(e){return+e}function uie(e){return Math.floor(+e/1e3)}var tie,Ea,$We,FWe,gie=X(()=>{R4();tie={"-":"",_:" ",0:"0"},Ea=/^\s*\d+/,$We=/^%/,FWe=/[\\^$*+?|[\]().{}]/g});function YM(e){return Py=HM(e),B0=Py.format,mie=Py.parse,yie=Py.utcFormat,vie=Py.utcParse,Py}var Py,B0,mie,yie,vie,xie=X(()=>{gie();YM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var XM=X(()=>{xie()});function BUe(e){return new Date(e)}function $Ue(e){return e instanceof Date?+e:+new Date(+e)}function bie(e,t,r,n,i,a,s,o,l,u){var h=Xb(),f=h.invert,d=h.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),b=u("%b %d"),T=u("%B"),k=u("%Y");function w(C){return(l(C){R4();XM();RM();Yb();qne()});var wie=X(()=>{Pne();Gne();SM();Tie()});function Cie(e){for(var t=e.length/6|0,r=new Array(t),n=0;n{});var jM,Sie=X(()=>{kie();jM=Cie("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var Eie=X(()=>{Sie()});function fi(e){return function(){return e}}var I4=X(()=>{});function _ie(e){return e>1?0:e<-1?By:Math.acos(e)}function ZM(e){return e>=1?e2:e<=-1?-e2:Math.asin(e)}var KM,ja,fd,Aie,M4,ac,$0,Aa,By,e2,$y,D4=X(()=>{KM=Math.abs,ja=Math.atan2,fd=Math.cos,Aie=Math.max,M4=Math.min,ac=Math.sin,$0=Math.sqrt,Aa=1e-12,By=Math.PI,e2=By/2,$y=2*By});function N4(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new L0(t)}var QM=X(()=>{fM()});function FUe(e){return e.innerRadius}function zUe(e){return e.outerRadius}function GUe(e){return e.startAngle}function qUe(e){return e.endAngle}function VUe(e){return e&&e.padAngle}function WUe(e,t,r,n,i,a,s,o){var l=r-e,u=n-t,h=s-i,f=o-a,d=f*l-h*u;if(!(d*dD*D+I*I&&(E=N,L=O),{cx:E,cy:L,x01:-h,y01:-f,x11:E*(i/w-1),y11:L*(i/w-1)}}function cu(){var e=FUe,t=zUe,r=fi(0),n=null,i=GUe,a=qUe,s=VUe,o=null,l=N4(u);function u(){var h,f,d=+e.apply(this,arguments),p=+t.apply(this,arguments),g=i.apply(this,arguments)-e2,m=a.apply(this,arguments)-e2,y=KM(m-g),x=m>g;if(o||(o=h=l()),pAa))o.moveTo(0,0);else if(y>$y-Aa)o.moveTo(p*fd(g),p*ac(g)),o.arc(0,0,p,g,m,!x),d>Aa&&(o.moveTo(d*fd(m),d*ac(m)),o.arc(0,0,d,m,g,x));else{var b=g,T=m,k=g,w=m,C=y,S=y,E=s.apply(this,arguments)/2,L=E>Aa&&(n?+n.apply(this,arguments):$0(d*d+p*p)),N=M4(KM(p-d)/2,+r.apply(this,arguments)),O=N,R=N,_,D;if(L>Aa){var I=ZM(L/d*ac(E)),M=ZM(L/p*ac(E));(C-=I*2)>Aa?(I*=x?1:-1,k+=I,w-=I):(C=0,k=w=(g+m)/2),(S-=M*2)>Aa?(M*=x?1:-1,b+=M,T-=M):(S=0,b=T=(g+m)/2)}var B=p*fd(b),P=p*ac(b),$=d*fd(w),G=d*ac(w);if(N>Aa){var q=p*fd(T),z=p*ac(T),V=d*fd(k),j=d*ac(k),ee;if(yAa?R>Aa?(_=O4(V,j,B,P,p,R,x),D=O4(q,z,$,G,p,R,x),o.moveTo(_.cx+_.x01,_.cy+_.y01),RAa)||!(C>Aa)?o.lineTo($,G):O>Aa?(_=O4($,G,q,z,d,-O,x),D=O4(B,P,V,j,d,-O,x),o.lineTo(_.cx+_.x01,_.cy+_.y01),O{I4();D4();QM()});function P4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var BVt,JM=X(()=>{BVt=Array.prototype.slice});function Lie(e){this._context=e}function Ph(e){return new Lie(e)}var eD=X(()=>{Lie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}}});function Iie(e){return e[0]}function Mie(e){return e[1]}var Die=X(()=>{});function dd(e,t){var r=fi(!0),n=null,i=Ph,a=null,s=N4(o);e=typeof e=="function"?e:e===void 0?Iie:fi(e),t=typeof t=="function"?t:t===void 0?Mie:fi(t);function o(l){var u,h=(l=P4(l)).length,f,d=!1,p;for(n==null&&(a=i(p=s())),u=0;u<=h;++u)!(u{JM();I4();eD();QM();Die()});function Oie(e,t){return te?1:t>=e?0:NaN}var Pie=X(()=>{});function Bie(e){return e}var $ie=X(()=>{});function tD(){var e=Bie,t=Oie,r=null,n=fi(0),i=fi($y),a=fi(0);function s(o){var l,u=(o=P4(o)).length,h,f,d=0,p=new Array(u),g=new Array(u),m=+n.apply(this,arguments),y=Math.min($y,Math.max(-$y,i.apply(this,arguments)-m)),x,b=Math.min(Math.abs(y)/u,a.apply(this,arguments)),T=b*(y<0?-1:1),k;for(l=0;l0&&(d+=k);for(t!=null?p.sort(function(w,C){return t(g[w],g[C])}):r!=null&&p.sort(function(w,C){return r(o[w],o[C])}),l=0,f=d?(y-u*T)/d:0;l0?k*f:0)+T,g[h]={data:o[h],index:l,value:k,startAngle:m,endAngle:x,padAngle:b};return g}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:fi(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,r=null,s):t},s.sort=function(o){return arguments.length?(r=o,t=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:fi(+o),s):n},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:fi(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:fi(+o),s):a},s}var Fie=X(()=>{JM();I4();Pie();$ie();D4()});function t2(e){return new B4(e,!0)}function r2(e){return new B4(e,!1)}var B4,zie=X(()=>{B4=class{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}});function wl(){}var n2=X(()=>{});function Fy(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function i2(e){this._context=e}function pd(e){return new i2(e)}var a2=X(()=>{i2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Fy(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function Gie(e){this._context=e}function rD(e){return new Gie(e)}var qie=X(()=>{n2();a2();Gie.prototype={areaStart:wl,areaEnd:wl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function Vie(e){this._context=e}function nD(e){return new Vie(e)}var Wie=X(()=>{a2();Vie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Fy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function Uie(e,t){this._basis=new i2(e),this._beta=t}var iD,Hie=X(()=>{a2();Uie.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,s=t[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(n+l*a),this._beta*t[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};iD=(function e(t){function r(n){return t===1?new i2(n):new Uie(n,t)}return r.beta=function(n){return e(+n)},r})(.85)});function zy(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function $4(e,t){this._context=e,this._k=(1-t)/6}var s2,o2=X(()=>{$4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:zy(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:zy(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};s2=(function e(t){function r(n){return new $4(n,t)}return r.tension=function(n){return e(+n)},r})(0)});function F4(e,t){this._context=e,this._k=(1-t)/6}var aD,sD=X(()=>{n2();o2();F4.prototype={areaStart:wl,areaEnd:wl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zy(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};aD=(function e(t){function r(n){return new F4(n,t)}return r.tension=function(n){return e(+n)},r})(0)});function z4(e,t){this._context=e,this._k=(1-t)/6}var oD,lD=X(()=>{o2();z4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zy(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};oD=(function e(t){function r(n){return new z4(n,t)}return r.tension=function(n){return e(+n)},r})(0)});function l2(e,t,r){var n=e._x1,i=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Aa){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Aa){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*u+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,i,a,s,e._x2,e._y2)}function Yie(e,t){this._context=e,this._alpha=t}var c2,G4=X(()=>{D4();o2();Yie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:l2(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};c2=(function e(t){function r(n){return t?new Yie(n,t):new $4(n,0)}return r.alpha=function(n){return e(+n)},r})(.5)});function Xie(e,t){this._context=e,this._alpha=t}var cD,jie=X(()=>{sD();n2();G4();Xie.prototype={areaStart:wl,areaEnd:wl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:l2(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};cD=(function e(t){function r(n){return t?new Xie(n,t):new F4(n,0)}return r.alpha=function(n){return e(+n)},r})(.5)});function Kie(e,t){this._context=e,this._alpha=t}var uD,Zie=X(()=>{lD();G4();Kie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:l2(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};uD=(function e(t){function r(n){return t?new Kie(n,t):new z4(n,0)}return r.alpha=function(n){return e(+n)},r})(.5)});function Qie(e){this._context=e}function hD(e){return new Qie(e)}var Jie=X(()=>{n2();Qie.prototype={areaStart:wl,areaEnd:wl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}});function eae(e){return e<0?-1:1}function tae(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(eae(a)+eae(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function rae(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function fD(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-n)/3;e._context.bezierCurveTo(n+o,i+o*t,a-o,s-o*r,a,s)}function q4(e){this._context=e}function nae(e){this._context=new iae(e)}function iae(e){this._context=e}function u2(e){return new q4(e)}function h2(e){return new nae(e)}var aae=X(()=>{q4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fD(this,this._t0,rae(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fD(this,rae(this,r=tae(this,e,t)),r);break;default:fD(this,this._t0,r=tae(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};(nae.prototype=Object.create(q4.prototype)).point=function(e,t){q4.prototype.point.call(this,t,e)};iae.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}}});function oae(e){this._context=e}function sae(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t{oae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=sae(e),i=sae(t),a=0,s=1;s{V4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}}});var uae=X(()=>{Rie();Nie();Fie();qie();Wie();a2();zie();Hie();sD();lD();o2();jie();Zie();G4();Jie();eD();aae();lae();cae()});var hae=X(()=>{});var fae=X(()=>{});function gd(e,t,r){this.k=e,this.x=t,this.y=r}function pD(e){for(;!e.__zoom;)if(!(e=e.parentNode))return dD;return e.__zoom}var dD,gD=X(()=>{gd.prototype={constructor:gd,scale:function(e){return e===1?this:new gd(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new gd(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};dD=new gd(1,0,0);pD.prototype=gd.prototype});var dae=X(()=>{});var pae=X(()=>{m4();hae();fae();gD();dae()});var gae=X(()=>{pae();gD()});var zr=X(()=>{id();WQ();yre();Tre();Sy();wre();Cre();SI();mee();kre();lM();Sre();Are();wM();Yre();Dne();Ay();fM();Nne();Ere();One();wie();Eie();Jl();uae();R4();XM();l4();m4();gae()});var xn,qi=X(()=>{hr();Yt();zr();xn=v(e=>{let{securityLevel:t}=ze(),r=ct("body");if(t==="sandbox"){let a=ct(`#i${e}`).node()?.contentDocument??document;r=ct(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var mae,UUe,F0,HUe,m2,Bt,zt,YUe,ta=X(()=>{hr();Yt();mae=v(e=>{let{handDrawnSeed:t}=ze();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),UUe=v(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),F0=v(e=>{let t=HUe([...e.cssCompiledStyles||[],...e.cssStyles||[],...UUe(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),HUe=v(e=>{let t=new Map;return e.forEach(r=>{let[n,i]=r.split(":");t.set(n.trim(),i?.trim())}),t},"styles2Map"),m2=v(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Bt=v(e=>{let{stylesArray:t}=F0(e),r=[],n=[],i=[],a=[];return t.forEach(s=>{let o=s[0];m2(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),zt=v((e,t)=>{let{themeVariables:r,handDrawnSeed:n}=ze(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=F0(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:YUe(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),YUe=v(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let i=isNaN(t[0])?0:t[0];return[i,i]}let r=isNaN(t[0])?0:t[0],n=isNaN(t[1])?0:t[1];return[r,n]},"getStrokeDashArray")});var XUe,Gy,mD,yae,W4=X(()=>{XUe=Object.freeze({left:0,top:0,width:16,height:16}),Gy=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),mD=Object.freeze({...XUe,...Gy}),yae=Object.freeze({...mD,body:"",hidden:!1})});var jUe,vae,xae=X(()=>{W4();jUe=Object.freeze({width:null,height:null}),vae=Object.freeze({...jUe,...Gy})});var yD,U4,bae=X(()=>{yD=(e,t,r,n="")=>{let i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let o=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:n,prefix:l,name:o};return t&&!U4(u)?null:u}let a=i[0],s=a.split("-");if(s.length>1){let o={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!U4(o)?null:o}if(r&&n===""){let o={provider:n,prefix:"",name:a};return t&&!U4(o,r)?null:o}return null},U4=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1});function Tae(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}var wae=X(()=>{});function vD(e,t){let r=Tae(e,t);for(let n in yae)n in Gy?n in e&&!(n in r)&&(r[n]=Gy[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}var Cae=X(()=>{W4();wae()});function kae(e,t){let r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(t||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var Sae=X(()=>{});function Eae(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),a={};function s(o){a=vD(n[o]||i[o],a)}return s(t),r.forEach(s),vD(e,a)}function xD(e,t){if(e.icons[t])return Eae(e,t,[]);let r=kae(e,[t])[t];return r?Eae(e,t,r):null}var Aae=X(()=>{Cae();Sae()});function bD(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;let n=e.split(KUe);if(n===null||!n.length)return e;let i=[],a=n.shift(),s=ZUe.test(a);for(;;){if(s){let o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*t*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}var KUe,ZUe,_ae=X(()=>{KUe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ZUe=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function QUe(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;n>=0;){let i=e.indexOf(">",n),a=e.indexOf("",a);if(s===-1)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function JUe(e,t){return e?""+e+""+t:t}function Rae(e,t,r){let n=QUe(e);return JUe(n.defs,t+n.content+r)}var Lae=X(()=>{});function TD(e,t){let r={...mD,...e},n={...vae,...t},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(m=>{let y=[],x=m.hFlip,b=m.vFlip,T=m.rotate;x?b?T+=2:(y.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),y.push("scale(-1 1)"),i.top=i.left=0):b&&(y.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),y.push("scale(1 -1)"),i.top=i.left=0);let k;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:k=i.height/2+i.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:k=i.width/2+i.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}T%2===1&&(i.left!==i.top&&(k=i.left,i.left=i.top,i.top=k),i.width!==i.height&&(k=i.width,i.width=i.height,i.height=k)),y.length&&(a=Rae(a,'',""))});let s=n.width,o=n.height,l=i.width,u=i.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=bD(f,l/u)):(h=s==="auto"?l:s,f=o===null?bD(h,u/l):o==="auto"?u:o);let d={},p=(m,y)=>{eHe(y)||(d[m]=y.toString())};p("width",h),p("height",f);let g=[i.left,i.top,l,u];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}var eHe,Iae=X(()=>{W4();xae();_ae();Lae();eHe=e=>e==="unset"||e==="undefined"||e==="none"});function rHe(e){e=e.replace(/[0-9]+$/,"")||"a";let t=Mae.get(e)||0;return Mae.set(e,t+1),t?`${e}${t}`:e}function wD(e){let t=[],r;for(;r=tHe.exec(e);)t.push(r[1]);if(!t.length)return e;let n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{let a=rHe(i),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}var tHe,Mae,Dae=X(()=>{tHe=/\sid="(\S+)"/g,Mae=new Map});function CD(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in t)r+=" "+n+'="'+t[n]+'"';return'"+e+""}var Nae=X(()=>{});var Oae=X(()=>{bae();Aae();Iae();Dae();Nae()});var SD,kD,Pae,qy,Bae,$ae,Ko,Vi=X(()=>{hr();ur();Yt();Oae();SD={body:'?',height:80,width:80},kD=new Map,Pae=new Map,qy=v(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(fe.debug("Registering icon pack:",t.name),"loader"in t)Pae.set(t.name,t.loader);else if("icons"in t)kD.set(t.name,t.icons);else throw fe.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Bae=v(async(e,t)=>{let r=yD(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=kD.get(n);if(!i){let s=Pae.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},kD.set(n,i)}catch(o){throw fe.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=xD(i,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),$ae=v(async e=>{try{return await Bae(e),!0}catch{return!1}},"isIconAvailable"),Ko=v(async(e,t,r)=>{let n;try{n=await Bae(e,t?.fallbackPrefix)}catch(s){fe.error(s),n=SD}let i=TD(n,t),a=CD(wD(i.body),{...i.attributes,...r});return Cr(a,It())},"getIconSVG")});var Fae=Rs(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.BLANK_URL=_a.relativeFirstCharacters=_a.whitespaceEscapeCharsRegex=_a.urlSchemeRegex=_a.ctrlCharactersRegex=_a.htmlCtrlEntityRegex=_a.htmlEntitiesRegex=_a.invalidProtocolRegex=void 0;_a.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;_a.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;_a.htmlCtrlEntityRegex=/&(newline|tab);/gi;_a.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;_a.urlSchemeRegex=/^.+(:|:)/gim;_a.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;_a.relativeFirstCharacters=[".","/"];_a.BLANK_URL="about:blank"});var y2=Rs(ED=>{"use strict";Object.defineProperty(ED,"__esModule",{value:!0});ED.sanitizeUrl=sHe;var ps=Fae();function nHe(e){return ps.relativeFirstCharacters.indexOf(e[0])>-1}function iHe(e){var t=e.replace(ps.ctrlCharactersRegex,"");return t.replace(ps.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function aHe(e){return URL.canParse(e)}function zae(e){try{return decodeURIComponent(e)}catch{return e}}function sHe(e){if(!e)return ps.BLANK_URL;var t,r=zae(e.trim());do r=iHe(r).replace(ps.htmlCtrlEntityRegex,"").replace(ps.ctrlCharactersRegex,"").replace(ps.whitespaceEscapeCharsRegex,"").trim(),r=zae(r),t=r.match(ps.ctrlCharactersRegex)||r.match(ps.htmlEntitiesRegex)||r.match(ps.htmlCtrlEntityRegex)||r.match(ps.whitespaceEscapeCharsRegex);while(t&&t.length>0);var n=r;if(!n)return ps.BLANK_URL;if(nHe(n))return n;var i=n.trimStart(),a=i.match(ps.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(ps.invalidProtocolRegex.test(s))return ps.BLANK_URL;var o=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!aHe(o))return ps.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}});function Gae(e){return Number.isSafeInteger(e)&&e>=0}var qae=X(()=>{});function H4(e){return e!=null&&typeof e!="function"&&Gae(e.length)}var AD=X(()=>{qae()});function Vae(e){return e==="__proto__"}var Wae=X(()=>{});function md(e){return e==null||typeof e!="object"&&typeof e!="function"}var v2=X(()=>{});function Y4(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var _D=X(()=>{});function Bh(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var x2=X(()=>{});var b2,yd,z0,G0,q0,T2,w2,C2,k2,X4,S2,Vy,E2,j4,K4,Z4,Q4,J4,eE,tE,rE,nE,iE=X(()=>{b2="[object RegExp]",yd="[object String]",z0="[object Number]",G0="[object Boolean]",q0="[object Arguments]",T2="[object Symbol]",w2="[object Date]",C2="[object Map]",k2="[object Set]",X4="[object Array]",S2="[object ArrayBuffer]",Vy="[object Object]",E2="[object DataView]",j4="[object Uint8Array]",K4="[object Uint8ClampedArray]",Z4="[object Uint16Array]",Q4="[object Uint32Array]",J4="[object Int8Array]",eE="[object Int16Array]",tE="[object Int32Array]",rE="[object Float32Array]",nE="[object Float64Array]"});var RD,Uae=X(()=>{RD=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")()});function Wy(e){return typeof RD.Buffer<"u"&&RD.Buffer.isBuffer(e)}var aE=X(()=>{Uae()});function Uy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var sE=X(()=>{});function Hae(e,t){return Hy(e,void 0,e,new Map,t)}function Hy(e,t,r,n=new Map,i=void 0){let a=i?.(e,t,r,n);if(a!==void 0)return a;if(md(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){let s=new Array(e.length);n.set(e,s);for(let o=0;o{_D();x2();iE();aE();v2();sE()});function Xae(e,t){return Hae(e,(r,n,i,a)=>{let s=t?.(r,n,i,a);if(s!==void 0)return s;if(typeof e=="object"){if(Bh(e)===Vy&&typeof e.constructor!="function"){let o={};return a.set(e,o),Cl(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case z0:case yd:case G0:{let o=new e.constructor(e?.valueOf());return Cl(o,e),o}case q0:{let o={};return Cl(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}var jae=X(()=>{Yae();x2();iE()});function LD(e){return Xae(e)}var Kae=X(()=>{jae()});function A2(e){return e!==null&&typeof e=="object"&&Bh(e)==="[object Arguments]"}var ID=X(()=>{x2()});function _2(e){return typeof e=="object"&&e!==null}var MD=X(()=>{});function Zae(e){return _2(e)&&H4(e)}var Qae=X(()=>{AD();MD()});function Jae(e){return Array.isArray(e)}var ese=X(()=>{});function V0(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");let r=function(...i){let a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);let o=e.apply(this,i);return r.cache=s.set(a,o)||s,o},n=V0.Cache||Map;return r.cache=new n,r}var tse=X(()=>{V0.Cache=Map});function rse(){}var nse=X(()=>{});function ise(e){let t=e?.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}var ase=X(()=>{});function vd(e){return Uy(e)}var oE=X(()=>{sE()});function ND(e){if(md(e))return e;let t=Bh(e);if(!lHe(e))return{};if(Jae(e)){let n=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(n.index=e.index,n.input=e.input),n}if(vd(e)){let n=e,i=n.constructor;return new i(n.buffer,n.byteOffset,n.length)}if(t===S2)return new ArrayBuffer(e.byteLength);if(t===E2){let n=e,i=n.buffer,a=n.byteOffset,s=n.byteLength,o=new ArrayBuffer(s),l=new Uint8Array(i,a,s);return new Uint8Array(o).set(l),new DataView(o)}if(t===G0||t===z0||t===yd){let n=e.constructor,i=new n(e.valueOf());return t===yd?uHe(i,e):DD(i,e),i}if(t===w2)return new Date(Number(e));if(t===b2){let n=e,i=new RegExp(n.source,n.flags);return i.lastIndex=n.lastIndex,i}if(t===T2)return Object(Symbol.prototype.valueOf.call(e));if(t===C2){let n=e,i=new Map;return n.forEach((a,s)=>{i.set(s,a)}),i}if(t===k2){let n=e,i=new Set;return n.forEach(a=>{i.add(a)}),i}if(t===q0){let n=e,i={};return DD(i,n),i.length=n.length,i[Symbol.iterator]=n[Symbol.iterator],i}let r={};return hHe(r,e),DD(r,e),cHe(r,e),r}function lHe(e){switch(Bh(e)){case q0:case X4:case S2:case E2:case G0:case w2:case rE:case nE:case J4:case eE:case tE:case C2:case z0:case Vy:case b2:case k2:case yd:case T2:case j4:case K4:case Z4:case Q4:return!0;default:return!1}}function DD(e,t){for(let r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function cHe(e,t){let r=Object.getOwnPropertySymbols(t);for(let n=0;n=r)&&(e[n]=t[n])}function hHe(e,t){let r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}var sse=X(()=>{v2();x2();iE();ese();oE()});function lE(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){let r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var ose=X(()=>{});function lse(e){if(md(e))return e;if(Array.isArray(e)||Uy(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let n=new r(e);return n.lastIndex=e.lastIndex,n}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let n;return e instanceof AggregateError?n=new r(e.errors,e.message,{cause:e.cause}):n=new r(e.message,{cause:e.cause}),n.stack=e.stack,Object.assign(n,e),n}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){let n=Object.create(t);return Object.assign(n,e)}return e}var cse=X(()=>{v2();sE()});function use(e,...t){let r=t.slice(0,-1),n=t[t.length-1],i=e;for(let a=0;a{Kae();Wae();cse();aE();v2();_D();ID();Qae();MD();ose();oE()});function OD(e,...t){return use(e,...t,rse)}var fse=X(()=>{hse();nse()});function uE(e){if(e==null)return!0;if(H4(e))return typeof e.splice!="function"&&typeof e!="string"&&!Wy(e)&&!vd(e)&&!A2(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return ise(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var dse=X(()=>{ID();AD();oE();aE();ase()});var hE=X(()=>{tse();sse();fse();dse()});function dE(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return fHe[r]??t}function xse(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,mse.sanitizeUrl)(r):r}function BD(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function bse(e){let t,r=0;e.forEach(i=>{r+=BD(i,t),t=i});let n=r/2;return $D(e,n)}function Tse(e){return e.length===1?e[0]:bse(e)}function wse(e,t,r){let n=structuredClone(r);fe.info("our points",n),t!=="start_left"&&t!=="start_right"&&n.reverse();let i=25+e,a=$D(n,i),s=10+e*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}function pE(e){let t="",r="";for(let n of e)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function Cse(e){let t="",r="0123456789abcdef",n=r.length;for(let i=0;iMath.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString())}var mse,PD,fHe,dHe,pHe,yse,vse,gHe,mHe,pse,$D,yHe,gse,FD,zD,vHe,xHe,W0,bHe,L2,THe,fE,wHe,CHe,fo,ar,kse,sc,uu,Ur=X(()=>{hr();ur();Yt();mse=Ls(y2(),1);zr();hE();PD="\u200B",fHe={curveBasis:pd,curveBasisClosed:rD,curveBasisOpen:nD,curveBumpX:t2,curveBumpY:r2,curveBundle:iD,curveCardinalClosed:aD,curveCardinalOpen:oD,curveCardinal:s2,curveCatmullRomClosed:cD,curveCatmullRomOpen:uD,curveCatmullRom:c2,curveLinear:Ph,curveLinearClosed:hD,curveMonotoneX:u2,curveMonotoneY:h2,curveNatural:f2,curveStep:d2,curveStepAfter:g2,curveStepBefore:p2},dHe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,pHe=v(function(e,t){let r=yse(e,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(o=>o.args);mb(s),n=ui(n,[...s])}else n=r.args;if(!n)return;let i=xb(e,t),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),yse=v(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${dHe.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),fe.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n,i=[];for(;(n=my.exec(e))!==null;)if(n.index===my.lastIndex&&my.lastIndex++,n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(r){return fe.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),vse=v(function(e){return e.replace(my,"")},"removeDirectives"),gHe=v(function(e,t){for(let[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");v(dE,"interpolateToCurve");v(xse,"formatUrl");mHe=v((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),$D=v((e,t)=>{let r,n=t;for(let i of e){if(r){let a=BD(i,r);if(a===0)return r;if(a=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:pse((1-s)*r.x+s*i.x,5),y:pse((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),yHe=v((e,t,r)=>{fe.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=$D(t,25),a=e?10:5,s=Math.atan2(t[0].y-i.y,t[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+i.x)/2,o.y=-Math.cos(s)*a+(t[0].y+i.y)/2,o},"calcCardinalityPosition");v(wse,"calcTerminalLabelPosition");v(pE,"getStylesFromArray");gse=0,FD=v(()=>(gse++,"id-"+Math.random().toString(36).substr(2,12)+"-"+gse),"generateId");v(Cse,"makeRandomHex");zD=v(e=>Cse(e.length),"random"),vHe=v(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),xHe=v(function(e,t){let r=t.text.replace(vt.lineBreakRegex," "),[,n]=fo(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);let a=i.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),i},"drawSimpleText"),W0=V0((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),vt.lineBreakRegex.test(e)))return e;let n=e.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,o)=>{let l=gs(`${s} `,r),u=gs(a,r);if(l>t){let{hyphenatedStrings:d,remainingWord:p}=bHe(s,t,"-",r);i.push(a,...d),a=p}else u+l>=t?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),bHe=V0((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...e],a=[],s="";return i.forEach((o,l)=>{let u=`${s}${o}`;if(gs(u,n)>=t){let f=l+1,d=i.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);v(R2,"calculateTextHeight");v(gs,"calculateTextWidth");L2=V0((e,t)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=fo(r),s=["sans-serif",n],o=e.split(vt.lineBreakRegex),l=[],u=ct("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,g={width:0,height:0,lineHeight:0};for(let m of o){let y=vHe();y.text=m||PD;let x=xHe(h,y).style("font-size",a).style("font-weight",i).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),THe=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{v(this,"InitIDGenerator")}},wHe=v(function(e){return fE=fE||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),fE.innerHTML=e,unescape(fE.textContent)},"entityDecode");v(gE,"isDetailedError");CHe=v((e,t,r,n)=>{if(!n)return;let i=e.node()?.getBBox();i&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),fo=v(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");v(Qr,"cleanAndMerge");ar={assignWithDepth:ui,wrapLabel:W0,calculateTextHeight:R2,calculateTextWidth:gs,calculateTextDimensions:L2,cleanAndMerge:Qr,detectInit:pHe,detectDirective:yse,isSubstringInArray:gHe,interpolateToCurve:dE,calcLabelPosition:Tse,calcCardinalityPosition:yHe,calcTerminalLabelPosition:wse,formatUrl:xse,getStylesFromArray:pE,generateId:FD,random:zD,runFunc:mHe,entityDecode:wHe,insertTitle:CHe,isLabelCoordinateInPath:Sse,parseFontSize:fo,InitIDGenerator:THe},kse=v(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),t},"encodeEntities"),sc=v(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),uu=v((e,t,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");v(wi,"handleUndefinedAttr");v(Sse,"isLabelCoordinateInPath")});var Ese=Rs((GD,qD)=>{(function(e){"use strict";var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(u){return setTimeout(u,16)};function n(){var u=this;u.reads=[],u.writes=[],u.raf=r.bind(e),t("initialized",u)}n.prototype={constructor:n,runTasks:function(u){t("run tasks");for(var h;h=u.shift();)h()},measure:function(u,h){t("measure");var f=h?u.bind(h):u;return this.reads.push(f),i(this),f},mutate:function(u,h){t("mutate");var f=h?u.bind(h):u;return this.writes.push(f),i(this),f},clear:function(u){return t("clear",u),s(this.reads,u)||s(this.writes,u)},extend:function(u){if(t("extend",u),typeof u!="object")throw new Error("expected object");var h=Object.create(this);return o(h,u),h.fastdom=this,h.initialize&&h.initialize(),h},catch:null};function i(u){u.scheduled||(u.scheduled=!0,u.raf(a.bind(null,u)),t("flush scheduled"))}function a(u){t("flush");var h=u.writes,f=u.reads,d;try{t("flushing reads",f.length),u.runTasks(f),t("flushing writes",h.length),u.runTasks(h)}catch(p){d=p}if(u.scheduled=!1,(f.length||h.length)&&i(u),d)if(t("task errored",d.message),u.catch)u.catch(d);else throw d}function s(u,h){var f=u.indexOf(h);return!!~f&&!!u.splice(f,1)}function o(u,h){for(var f in h)h.hasOwnProperty(f)&&(u[f]=h[f])}var l=e.fastdom=e.fastdom||new n;typeof define=="function"?define(function(){return l}):typeof qD=="object"&&(qD.exports=l)})(typeof window<"u"?window:typeof GD<"u"?GD:globalThis)});var Ase=Rs((lXt,VD)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(r,n){return t(this,"mutate",r,n)},measure:function(r,n){return t(this,"measure",r,n)},clear:function(r){var n=this._tasks,i=n.get(r);this.fastdom.clear(i),n.delete(r)}};function t(r,n,i,a){var s=r._tasks,o=r.fastdom,l,u=new Promise(function(h,f){l=o[n](function(){s.delete(u);try{h(a?i.call(a):i())}catch(d){f(d)}},a)});return s.set(u,l),u}(typeof define)[0]=="f"?define(function(){return e}):(typeof VD)[0]=="o"?VD.exports=e:window.fastdomPromised=e})()});function YD(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Nse(e){H0=e}function bn(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ps.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}function hu(e,t){if(t){if(Ps.escapeTest.test(e))return e.replace(Ps.escapeReplace,Lse)}else if(Ps.escapeTestNoEncode.test(e))return e.replace(Ps.escapeReplaceNoEncode,Lse);return e}function Ise(e){try{e=encodeURI(e).replace(Ps.percentDecode,"%")}catch{return null}return e}function Mse(e,t){let r=e.replace(Ps.findPipe,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(Ps.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function Dse(e,t,r,n,i){let a=t.href,s=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function aYe(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(` +`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(` +`)}function _n(e,t){return U0.parse(e,t)}var H0,N2,kHe,Ps,SHe,EHe,AHe,O2,_He,XD,Ose,Pse,RHe,jD,LHe,KD,IHe,MHe,bE,ZD,DHe,Bse,NHe,QD,_se,OHe,PHe,BHe,$He,$se,FHe,TE,JD,Fse,zHe,zse,GHe,qHe,VHe,Gse,WHe,UHe,qse,HHe,YHe,XHe,jHe,KHe,ZHe,QHe,yE,JHe,Vse,Wse,eYe,Rse,eN,tYe,WD,rYe,mE,I2,nYe,Lse,vE,oc,xE,tN,lc,D2,sYe,U0,cXt,uXt,hXt,fXt,dXt,pXt,gXt,Use=X(()=>{H0=YD();N2={exec:()=>null};kHe=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},SHe=/^(?:[ \t]*(?:\n|$))+/,EHe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AHe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,O2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_He=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,XD=/(?:[*+-]|\d{1,9}[.)])/,Ose=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pse=bn(Ose).replace(/bull/g,XD).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),RHe=bn(Ose).replace(/bull/g,XD).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),jD=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,LHe=/^[^\n]+/,KD=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,IHe=bn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",KD).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),MHe=bn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,XD).getRegex(),bE="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ZD=/|$))/,DHe=bn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ZD).replace("tag",bE).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bse=bn(jD).replace("hr",O2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bE).getRegex(),NHe=bn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Bse).getRegex(),QD={blockquote:NHe,code:EHe,def:IHe,fences:AHe,heading:_He,hr:O2,html:DHe,lheading:Pse,list:MHe,newline:SHe,paragraph:Bse,table:N2,text:LHe},_se=bn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",O2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bE).getRegex(),OHe={...QD,lheading:RHe,table:_se,paragraph:bn(jD).replace("hr",O2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_se).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bE).getRegex()},PHe={...QD,html:bn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ZD).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bn(jD).replace("hr",O2).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Pse).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},BHe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$He=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$se=/^( {2,}|\\)\n(?!\s*$)/,FHe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",kHe?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Gse=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,WHe=bn(Gse,"u").replace(/punct/g,TE).getRegex(),UHe=bn(Gse,"u").replace(/punct/g,zse).getRegex(),qse="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",HHe=bn(qse,"gu").replace(/notPunctSpace/g,Fse).replace(/punctSpace/g,JD).replace(/punct/g,TE).getRegex(),YHe=bn(qse,"gu").replace(/notPunctSpace/g,qHe).replace(/punctSpace/g,GHe).replace(/punct/g,zse).getRegex(),XHe=bn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Fse).replace(/punctSpace/g,JD).replace(/punct/g,TE).getRegex(),jHe=bn(/\\(punct)/,"gu").replace(/punct/g,TE).getRegex(),KHe=bn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ZHe=bn(ZD).replace("(?:-->|$)","-->").getRegex(),QHe=bn("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ZHe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yE=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,JHe=bn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",yE).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vse=bn(/^!?\[(label)\]\[(ref)\]/).replace("label",yE).replace("ref",KD).getRegex(),Wse=bn(/^!?\[(ref)\](?:\[\])?/).replace("ref",KD).getRegex(),eYe=bn("reflink|nolink(?!\\()","g").replace("reflink",Vse).replace("nolink",Wse).getRegex(),Rse=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,eN={_backpedal:N2,anyPunctuation:jHe,autolink:KHe,blockSkip:VHe,br:$se,code:$He,del:N2,emStrongLDelim:WHe,emStrongRDelimAst:HHe,emStrongRDelimUnd:XHe,escape:BHe,link:JHe,nolink:Wse,punctuation:zHe,reflink:Vse,reflinkSearch:eYe,tag:QHe,text:FHe,url:N2},tYe={...eN,link:bn(/^!?\[(label)\]\((.*?)\)/).replace("label",yE).getRegex(),reflink:bn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yE).getRegex()},WD={...eN,emStrongRDelimAst:YHe,emStrongLDelim:UHe,url:bn(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Rse).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:bn(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Lse=e=>nYe[e];vE=class{options;rules;lexer;constructor(e){this.options=e||H0}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:M2(r,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=aYe(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=M2(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:M2(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=M2(t[0],` `).split(` -`),i="",n="",a=[];for(;r.length>0;){let s=!1,o=[],l;for(l=0;l0;){let s=!1,o=[],l;for(l=0;l1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;e;){let l=!1,u="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let f=t[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),d=e.split(` +`),m=this.list(g);a[a.length-1]=m,n=n.substring(0,n.length-d.raw.length)+m.raw,i=i.substring(0,i.length-p.raw.length)+m.raw,r=g.substring(a.at(-1).raw.length).split(` +`);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;e;){let l=!1,u="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let f=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),d=e.split(` `,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,h=f.trimStart()):p?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=f.slice(g),g+=t[1].length),p&&this.rules.other.blankLine.test(d)&&(u+=d+` -`,e=e.substring(d.length+1),l=!0),!l){let v=this.rules.other.nextBulletRegex(g),x=this.rules.other.hrRegex(g),T=this.rules.other.fencesBeginRegex(g),C=this.rules.other.headingBeginRegex(g),w=this.rules.other.htmlBeginRegex(g);for(;e;){let k=e.split(` -`,1)[0],E;if(d=k,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),E=d):E=d.replace(this.rules.other.tabCharGlobal," "),T.test(d)||C.test(d)||w.test(d)||v.test(d)||x.test(d))break;if(E.search(this.rules.other.nonSpaceChar)>=g||!d.trim())h+=` -`+E.slice(g);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||C.test(f)||x.test(f))break;h+=` -`+d}!p&&!d.trim()&&(p=!0),u+=k+` -`,e=e.substring(k.length+1),f=E.slice(g)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:u,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=u}let o=n.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l=0;lf.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=h}if(n.loose)for(let l=0;l({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=gb(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=oGe(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),Hie(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Hie(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,a,s,o=n,l=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+n);(i=u.exec(t))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(s=[...a].length,i[3]||i[4]){o+=s;continue}else if((i[5]||i[6])&&n%3&&!((n+s)%3)){l+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+l);let h=[...i[0]][0].length,f=e.slice(0,n+i.index+h+s);if(Math.min(n,s)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},_l=class CD{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Jp,this.options.tokenizer=this.options.tokenizer||new a5,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:is,block:i5.normal,inline:pb.normal};this.options.pedantic?(r.block=i5.pedantic,r.inline=pb.pedantic):this.options.gfm&&(r.block=i5.gfm,this.options.breaks?r.inline=pb.breaks:r.inline=pb.gfm),this.tokenizer.rules=r}static get rules(){return{block:i5,inline:pb}}static lex(t,r){return new CD(r).lex(t)}static lexInline(t,r){return new CD(r).inlineTokens(t)}lex(t){t=t.replace(is.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let r=0;r(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=` -`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`,e=e.substring(d.length+1),l=!0),!l){let x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),T=this.rules.other.fencesBeginRegex(g),k=this.rules.other.headingBeginRegex(g),w=this.rules.other.htmlBeginRegex(g);for(;e;){let C=e.split(` +`,1)[0],S;if(d=C,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),S=d):S=d.replace(this.rules.other.tabCharGlobal," "),T.test(d)||k.test(d)||w.test(d)||x.test(d)||b.test(d))break;if(S.search(this.rules.other.nonSpaceChar)>=g||!d.trim())h+=` +`+S.slice(g);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||k.test(f)||b.test(f))break;h+=` +`+d}!p&&!d.trim()&&(p=!0),u+=C+` +`,e=e.substring(C.length+1),f=S.slice(g)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let m=null,y;this.options.gfm&&(m=this.rules.other.listIsTask.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),i.raw+=u}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lf.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=h}if(i.loose)for(let l=0;l({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=M2(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=iYe(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Dse(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Dse(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,o=i,l=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(n=u.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(s=[...a].length,n[3]||n[4]){o+=s;continue}else if((n[5]||n[6])&&i%3&&!((i+s)%3)){l+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+l);let h=[...n[0]][0].length,f=e.slice(0,i+n.index+h+s);if(Math.min(i,s)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},oc=class UD{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||H0,this.options.tokenizer=this.options.tokenizer||new vE,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ps,block:mE.normal,inline:I2.normal};this.options.pedantic?(r.block=mE.pedantic,r.inline=I2.pedantic):this.options.gfm&&(r.block=mE.gfm,this.options.breaks?r.inline=I2.breaks:r.inline=I2.gfm),this.tokenizer.rules=r}static get rules(){return{block:mE,inline:I2}}static lex(t,r){return new UD(r).lex(t)}static lexInline(t,r){return new UD(r).inlineTokens(t)}lex(t){t=t.replace(Ps.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=` +`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` `)?"":` -`)+n.raw,s.text+=` -`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)+i.raw,s.text+=` +`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` `)?"":` -`)+n.raw,s.text+=` -`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` +`)+i.raw,s.text+=` +`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` `)?"":` -`)+n.raw,s.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)+i.raw,s.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(` `)?"":` -`)+n.raw,s.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let h=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},s5=class{options;parser;constructor(e){this.options=e||Jp}space(e){return""}code({text:e,lang:t,escaped:r}){let i=(t||"").match(is.notSpaceStart)?.[0],n=e.replace(is.endingNewline,"")+` -`;return i?'
'+(r?n:Oc(n,!0))+`
-`:"
"+(r?n:Oc(n,!0))+`
+`)+i.raw,s.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let h=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},xE=class{options;parser;constructor(e){this.options=e||H0}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(Ps.notSpaceStart)?.[0],i=e.replace(Ps.endingNewline,"")+` +`;return n?'
'+(r?i:hu(i,!0))+`
+`:"
"+(r?i:hu(i,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
-`}list(e){let t=e.ordered,r=e.start,i="";for(let s=0;s -`+i+" -`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+Oc(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}list(e){let t=e.ordered,r=e.start,n="";for(let s=0;s +`+n+" +`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+hu(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t="",r="";for(let n=0;n${i}`),` +`}table(e){let t="",r="";for(let i=0;i${n}`),`
    `+t+` -`+i+`
    +`+n+` `}tablerow({text:e}){return` ${e} `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Oc(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let i=this.parser.parseInline(r),n=Wie(e);if(n===null)return i;e=n;let a='
    ",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=Wie(e);if(n===null)return Oc(r);e=n;let a=`${r}{let s=n[a].flat(1/0);r=r.concat(this.walkTokens(s,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=t.renderers[n.name];a?t.renderers[n.name]=function(...s){let o=n.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){let n=this.defaults.renderer||new s5(this.defaults);for(let a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=r.renderer[s],l=n[s];n[s]=(...u)=>{let h=o.apply(n,u);return h===!1&&(h=l.apply(n,u)),h||""}}i.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new a5(this.defaults);for(let a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=r.tokenizer[s],l=n[s];n[s]=(...u)=>{let h=o.apply(n,u);return h===!1&&(h=l.apply(n,u)),h}}i.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new mb;for(let a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=r.hooks[s],l=n[s];mb.passThroughHooks.has(a)?n[s]=u=>{if(this.defaults.async&&mb.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await o.call(n,u);return l.call(n,f)})();let h=o.call(n,u);return l.call(n,h)}:n[s]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(n,u);return f===!1&&(f=await l.apply(n,u)),f})();let h=o.apply(n,u);return h===!1&&(h=l.apply(n,u)),h}}i.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),n&&(o=o.concat(n.call(this,s))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _l.lex(e,t??this.defaults)}parser(e,t){return Ll.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(t):t,o=await(n.hooks?await n.hooks.provideLexer():e?_l.lex:_l.lexInline)(s,n),l=n.hooks?await n.hooks.processAllTokens(o):o;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser():e?Ll.parse:Ll.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(a);try{n.hooks&&(t=n.hooks.preprocess(t));let s=(n.hooks?n.hooks.provideLexer():e?_l.lex:_l.lexInline)(t,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let o=(n.hooks?n.hooks.provideParser():e?Ll.parse:Ll.parseInline)(s,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error occurred:

    "+Oc(r.message+"",!0)+"
    ";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},Qp=new cGe;si.options=si.setOptions=function(e){return Qp.setOptions(e),si.defaults=Qp.defaults,Yie(si.defaults),si};si.getDefaults=ED;si.defaults=Jp;si.use=function(...e){return Qp.use(...e),si.defaults=Qp.defaults,Yie(si.defaults),si};si.walkTokens=function(e,t){return Qp.walkTokens(e,t)};si.parseInline=Qp.parseInline;si.Parser=Ll;si.parser=Ll.parse;si.Renderer=s5;si.TextRenderer=MD;si.Lexer=_l;si.lexer=_l.lex;si.Tokenizer=a5;si.Hooks=mb;si.parse=si;yzt=si.options,vzt=si.setOptions,bzt=si.use,xzt=si.walkTokens,Tzt=si.parseInline,wzt=Ll.parse,kzt=_l.lex});function c5(e){for(var t=[],r=1;r${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${hu(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=Ise(e);if(i===null)return n;e=i;let a='
    ",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=Ise(e);if(i===null)return hu(r);e=i;let a=`${r}{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new xE(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=r.renderer[s],l=i[s];i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new vE(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=r.tokenizer[s],l=i[s];i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new D2;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=r.hooks[s],l=i[s];D2.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async&&D2.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await o.call(i,u);return l.call(i,f)})();let h=o.call(i,u);return l.call(i,h)}:i[s]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(i,u);return f===!1&&(f=await l.apply(i,u)),f})();let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return oc.lex(e,t??this.defaults)}parser(e,t){return lc.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?oc.lex:oc.lexInline)(s,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser():e?lc.parse:lc.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?oc.lex:oc.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?lc.parse:lc.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let n="

    An error occurred:

    "+hu(r.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},U0=new sYe;_n.options=_n.setOptions=function(e){return U0.setOptions(e),_n.defaults=U0.defaults,Nse(_n.defaults),_n};_n.getDefaults=YD;_n.defaults=H0;_n.use=function(...e){return U0.use(...e),_n.defaults=U0.defaults,Nse(_n.defaults),_n};_n.walkTokens=function(e,t){return U0.walkTokens(e,t)};_n.parseInline=U0.parseInline;_n.Parser=lc;_n.parser=lc.parse;_n.Renderer=xE;_n.TextRenderer=tN;_n.Lexer=oc;_n.lexer=oc.lex;_n.Tokenizer=vE;_n.Hooks=D2;_n.parse=_n;cXt=_n.options,uXt=_n.setOptions,hXt=_n.use,fXt=_n.walkTokens,dXt=_n.parseInline,pXt=lc.parse,gXt=oc.lex});function wE(e){for(var t=[],r=1;r{});function lne(e,{markdownAutoWrap:t}){let i=e.replace(//g,` +`)),s+=f+n[l+1]}),s}var rN=X(()=>{});function jse(e,{markdownAutoWrap:t}){let n=e.replace(//g,` `).replace(/\n{2,}/g,` -`);return c5(i)}function cne(e){return e.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function une(e,t={}){let r=lne(e,t),i=si.lexer(r),n=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` -`).forEach((h,f)=>{f!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&n[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return b(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}function hne(e){return e?`

    ${e.replace(/\\n|\n/g,"
    ")}

    `:""}function fne(e,{markdownAutoWrap:t}={}){let r=si.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"
    ").replace(/ /g," "):n.text.replace(/\n */g,"
    "):n.type==="strong"?`${n.tokens?.map(i).join("")}`:n.type==="em"?`${n.tokens?.map(i).join("")}`:n.type==="paragraph"?`

    ${n.tokens?.map(i).join("")}

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(ee.warn(`Unsupported markdown: ${n.type}`),n.raw)}return b(i,"output"),r.map(i).join("")}function dne(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function pne(e,t){let r=dne(t.content);return zD(e,[],r,t.type)}function zD(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];let[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?zD(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function gne(e,t){if(e.some(({content:r})=>r.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return u5(e,t)}function u5(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return u5(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){let[o,l]=pne(t,a);r.push([o]),l.content&&e.unshift(l)}return u5(e,t,r)}function BD(e,t){t&&e.attr("style",t)}async function mne(e,t,r,i,n=!1,a=It()){let s=e.append("foreignObject");s.attr("width",`${Math.min(10*r,ane)}px`),s.attr("height",`${Math.min(10*r,ane)}px`);let o=s.append("xhtml:div"),l=zi(t.label)?await mm(t.label.replace(ht.lineBreakRegex,` -`),a):mr(t.label,a),u=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),BD(h,t.labelStyle),h.attr("class",`${u} ${i}`),BD(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let f=o.node().getBoundingClientRect();return f.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),f=o.node().getBoundingClientRect()),s.node()}function f5(e,t,r,i=!1){let n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}function yne(e,t,r){let i=e.append("text"),n=f5(i,1,t);d5(n,r);let a=n.node().getComputedTextLength();return i.remove(),a}function GD(e,t,r){let i=e.append("text"),n=f5(i,1,t);d5(n,[{content:r,type:"normal"}]);let a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function vne(e,t,r,i=!1,n=!1){let s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let u=0;for(let h of r){let f=b(p=>yne(s,1.1,p)<=e,"checkWidth"),d=f(h)?[h]:gne(h,f);for(let p of d){let g=f5(l,u,1.1,n);d5(g,p),u++}}if(i){let h=l.node().getBBox(),f=2;return o.attr("x",h.x-f).attr("y",h.y-f).attr("width",h.width+2*f).attr("height",h.height+2*f),s.node()}else return l.node()}function FD(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function d5(e,t){e.text(""),t.forEach((r,i)=>{let n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(FD(r.content)):n.text(" "+FD(r.content))})}async function bne(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{let o=`${a}:${s}`;return await uGe(o)?await Pc(o,void 0,{class:"label-icon"}):``})()),n));let i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}var $D,PD,sne,h5,one,uGe,Pc,ane,zn,ya=q(()=>{$r();Er();er();zie();Ar();nne();OD();$D={body:'?',height:80,width:80},PD=new Map,sne=new Map,h5=b(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(ee.debug("Registering icon pack:",t.name),"loader"in t)sne.set(t.name,t.loader);else if("icons"in t)PD.set(t.name,t.icons);else throw ee.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),one=b(async(e,t)=>{let r=mD(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=PD.get(i);if(!n){let s=sne.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},PD.set(i,n)}catch(o){throw ee.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=vD(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),uGe=b(async e=>{try{return await one(e),!0}catch{return!1}},"isIconAvailable"),Pc=b(async(e,t,r)=>{let i;try{i=await one(e,t?.fallbackPrefix)}catch(s){ee.error(s),i=$D}let n=xD(i,t),a=wD(TD(n.body),{...n.attributes,...r});return mr(a,It())},"getIconSVG");b(lne,"preprocessMarkdown");b(cne,"nonMarkdownToLines");b(une,"markdownToLines");b(hne,"nonMarkdownToHTML");b(fne,"markdownToHTML");b(dne,"splitTextToChars");b(pne,"splitWordToFitWidth");b(zD,"splitWordToFitWidthRecursion");b(gne,"splitLineToFitWidth");b(u5,"splitLineToFitWidthRecursion");b(BD,"applyStyle");ane=16384;b(mne,"addHtmlSpan");b(f5,"createTspan");b(yne,"computeWidthOfText");b(GD,"computeDimensionOfText");b(vne,"createFormattedText");b(FD,"decodeHTMLEntities");b(d5,"updateTextContentAndStyles");b(bne,"replaceIconSubstring");zn=b(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(ee.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",u),a){let f=s?fne(t,h):hne(t),d=await bne(lo(f),h),p=t.replace(/\\\\/g,"\\"),g={isNode:o,label:zi(t)?p:d,labelStyle:r.replace("fill:","color:")};return await mne(e,g,l,n,u,h)}else{let f=lo(t.replace(//g,"
    ")),d=s?une(f.replace("
    ","
    "),h):cne(f),p=vne(l,e,d,t?u:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Qe(p).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Qe(p).select("rect").attr("style",g.replace(/background:/g,"fill:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Qe(p).select("text").attr("style",m)}return i?Qe(p).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Qe(p).selectAll("tspan.text-outer-tspan").classed("row",!0),p}},"createText")});function qD(e,t,r){if(e&&e.length){let[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of e){let[u,h]=l;l[0]=(u-i)*s-(h-n)*o+i,l[1]=(u-i)*o+(h-n)*s+n}}}function hGe(e,t){return e[0]===t[0]&&e[1]===t[1]}function fGe(e,t,r,i=1){let n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(let u of s)qD(u,o,n);let l=(function(u,h,f){let d=[];for(let x of u){let T=[...x];hGe(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&d.push(T)}let p=[];h=Math.max(h,.1);let g=[];for(let x of d)for(let T=0;Tx.yminT.ymin?1:x.xT.x?1:x.ymax===T.ymax?0:(x.ymax-T.ymax)/Math.abs(x.ymax-T.ymax))),!g.length)return p;let m=[],y=g[0].ymin,v=0;for(;m.length||g.length;){if(g.length){let x=-1;for(let T=0;Ty);T++)x=T;g.splice(0,x+1).forEach((T=>{m.push({s:y,edge:T})}))}if(m=m.filter((x=>!(x.edge.ymax<=y))),m.sort(((x,T)=>x.edge.x===T.edge.x?0:(x.edge.x-T.edge.x)/Math.abs(x.edge.x-T.edge.x))),(f!==1||v%h==0)&&m.length>1)for(let x=0;x=m.length)break;let C=m[x].edge,w=m[T].edge;p.push([[Math.round(C.x),y],[Math.round(w.x),y]])}y+=f,m.forEach((x=>{x.edge.x=x.edge.x+f*x.edge.islope})),v++}return p})(s,a,i);if(n){for(let u of s)qD(u,o,-n);(function(u,h,f){let d=[];u.forEach((p=>d.push(...p))),qD(d,h,f)})(l,o,-n)}return l}function wb(e,t){var r;let i=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),fGe(e,n,i,a||1)}function w5(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function WD(e,t){return e.type===t}function n9(e){let t=[],r=(function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:dGe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:VD,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:xne,text:""},o})(e),i="BOD",n=0,a=r[n];for(;!WD(a,xne);){let s=0,o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return n9("M0,0"+e);n++,s=p5[a.text],i=a.text}else WD(a,VD)?s=p5[i]:(n++,s=p5[a.text],i=a.text);if(!(n+sh%2?u+r:u+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{let l=o.map(((u,h)=>h%2?u+r:u+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{let l=o.map(((u,h)=>h%2?u+r:u+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Lne(e){let t=[],r="",i=0,n=0,a=0,s=0,o=0,l=0;for(let{key:u,data:h}of e){switch(u){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=i+(i-o),d=n+(n-l)):(f=i,d=n),t.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{let[f,d]=h,p=0,g=0;r==="Q"||r==="T"?(p=i+(i-o),g=n+(n-l)):(p=i,g=n);let m=i+2*(p-i)/3,y=n+2*(g-n)/3,v=f+2*(p-f)/3,x=d+2*(g-d)/3;t.push({key:"C",data:[m,y,v,x,f,d]}),o=p,l=g,i=f,n=d;break}case"Q":{let[f,d,p,g]=h,m=i+2*(f-i)/3,y=n+2*(d-n)/3,v=p+2*(f-p)/3,x=g+2*(d-g)/3;t.push({key:"C",data:[m,y,v,x,p,g]}),o=f,l=d,i=p,n=g;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],v=h[6];f===0||d===0?(t.push({key:"C",data:[i,n,y,v,y,v]}),i=y,n=v):(i!==y||n!==v)&&(Rne(i,n,y,v,f,d,p,g,m).forEach((function(x){t.push({key:"C",data:x})})),i=y,n=v);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=u}return t}function bb(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Rne(e,t,r,i,n,a,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,g=0,m=0,y=0;if(u)[p,g,m,y]=u;else{[e,t]=bb(e,t,-h),[r,i]=bb(r,i,-h);let _=(e-r)/2,R=(t-i)/2,D=_*_/(n*n)+R*R/(a*a);D>1&&(D=Math.sqrt(D),n*=D,a*=D);let I=n*n,B=a*a,M=I*B-I*R*R-B*_*_,F=I*R*R+B*_*_,z=(o===l?-1:1)*Math.sqrt(Math.abs(M/F));m=z*n*R/a+(e+r)/2,y=z*-a*_/n+(t+i)/2,p=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),eg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let v=g-p;if(Math.abs(v)>120*Math.PI/180){let _=g,R=r,D=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=Rne(r=m+n*Math.cos(g),i=y+a*Math.sin(g),R,D,n,a,s,0,l,[g,_,m,y])}v=g-p;let x=Math.cos(p),T=Math.sin(p),C=Math.cos(g),w=Math.sin(g),k=Math.tan(v/4),E=4/3*n*k,A=4/3*a*k,N=[e,t],P=[e+E*T,t-A*x],O=[r+E*w,i-A*C],L=[r,i];if(P[0]=2*N[0]-P[0],P[1]=2*N[1]-P[1],u)return[P,O,L].concat(d);{d=[P,O,L].concat(d);let _=[];for(let R=0;R2){let n=[];for(let a=0;a2*Math.PI&&(p=0,g=2*Math.PI);let m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),v=Ene(y,u,h,f,d,p,g,1,l);if(!l.disableMultiStroke){let x=Ene(y,u,h,f,d,p,g,1.5,l);v.push(...x)}return s&&(o?v.push(...Of(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...Of(u,h,u+f*Math.cos(g),h+d*Math.sin(g),l)):v.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:v}}function kne(e,t){let r=Lne(_ne(n9(e))),i=[],n=[0,0],a=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Of(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;i.push(...mGe(l,u,h,f,d,p,a,t)),a=[d,p];break}case"Z":i.push(...Of(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function UD(e,t){let r=[];for(let i of e)if(i.length){let n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+sr(n,t),i[0][1]+sr(n,t)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*Nne(n),p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=sr(p,n,u),g=sr(g,n,u);let m=[],y=()=>sr(f,n,u),v=()=>sr(h,n,u),x=n.preserveVertices;return a&&(s?m.push({op:"move",data:[e+(x?0:y()),t+(x?0:y())]}):m.push({op:"move",data:[e+(x?0:sr(h,n,u)),t+(x?0:sr(h,n,u))]})),s?m.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(i-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(x?0:y()),i+(x?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*d+v(),g+t+(i-t)*d+v(),p+e+2*(r-e)*d+v(),g+t+2*(i-t)*d+v(),r+(x?0:v()),i+(x?0:v())]}),m}function g5(e,t,r){if(!e.length)return[];let i=[];i.push([e[0][0]+sr(t,r),e[0][1]+sr(t,r)]),i.push([e[0][0]+sr(t,r),e[0][1]+sr(t,r)]);for(let n=1;n3){let a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+21&&n.push(o)):n.push(o),n.push(e[t+3])}else{let l=e[t+0],u=e[t+1],h=e[t+2],f=e[t+3],d=e0(l,u,.5),p=e0(u,h,.5),g=e0(h,f,.5),m=e0(d,p,.5),y=e0(p,g,.5),v=e0(m,y,.5);t9([l,d,m,v],0,r,n),t9([v,y,g,f],0,r,n)}var a,s;return n}function vGe(e,t){return T5(e,0,e.length,t)}function T5(e,t,r,i,n){let a=n||[],s=e[t],o=e[r-1],l=0,u=1;for(let h=t+1;hl&&(l=f,u=h)}return Math.sqrt(l)>i?(T5(e,t,u+1,i,a),T5(e,u,r,i,a)):(a.length||a.push(s),a.push(o)),a}function HD(e,t=.15,r){let i=[],n=(e.length-1)/3;for(let a=0;a0?T5(i,0,i.length,r):i}var Tb,YD,jD,XD,KD,ZD,Rs,QD,dGe,VD,xne,p5,pGe,co,Km,r9,m5,i9,st,qt=q(()=>{Tb=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let i=wb(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){let i=[];for(let n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}};YD=class extends Tb{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let n=wb(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(let[u,h]of n)w5([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},jD=class extends Tb{fillPolygons(t,r){let i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}},XD=class{constructor(t){this.helper=t}fillPolygons(t,r){let i=wb(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){let i=[],n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=n/4;for(let o of t){let l=w5(o),u=l/n,h=Math.ceil(u)-1,f=l-h*n,d=(o[0][0]+o[1][0])/2-n/4,p=Math.min(o[0][1],o[1][1]);for(let g=0;g{let o=w5(s),l=Math.floor(o/(i+n)),u=(o+n-l*(i+n))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p{let s=w5(a),o=Math.round(s/(2*r)),l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f2*Math.PI&&(E=0,A=2*Math.PI);let N=(A-E)/x.curveStepCount,P=[];for(let O=E;O<=A;O+=N)P.push([T+w*Math.cos(O),C+k*Math.sin(O)]);return P.push([T+w*Math.cos(A),C+k*Math.sin(A)]),P.push([T,C]),Xm([P],x)})(t,r,i,n,a,s,u));return u.stroke!==co&&h.push(f),this._d("arc",h,u)}curve(t,r){let i=this._o(r),n=[],a=Tne(t,i);if(i.fill&&i.fill!==co)if(i.fillStyle==="solid"){let s=Tne(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=t;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...HD(Ane([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):s.push(...HD(Ane(u),10,(1+i.roughness)/2))}s.length&&n.push(Xm([s],i))}return i.stroke!==co&&n.push(a),this._d("curve",n,i)}polygon(t,r){let i=this._o(r),n=[],a=y5(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(UD([t],i)):n.push(Xm([t],i))),i.stroke!==co&&n.push(a),this._d("polygon",n,i)}path(t,r){let i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=i.fill&&i.fill!=="transparent"&&i.fill!==co,s=i.stroke!==co,o=!!(i.simplification&&i.simplification<1),l=(function(h,f,d){let p=Lne(_ne(n9(h))),g=[],m=[],y=[0,0],v=[],x=()=>{v.length>=4&&m.push(...HD(v,f)),v=[]},T=()=>{x(),m.length&&(g.push(m),m=[])};for(let{key:w,data:k}of p)switch(w){case"M":T(),y=[k[0],k[1]],m.push(y);break;case"L":x(),m.push([k[0],k[1]]);break;case"C":if(!v.length){let E=m.length?m[m.length-1]:y;v.push([E[0],E[1]])}v.push([k[0],k[1]]),v.push([k[2],k[3]]),v.push([k[4],k[5]]);break;case"Z":x(),m.push([y[0],y[1]])}if(T(),!d)return g;let C=[];for(let w of g){let k=vGe(w,d);k.length&&C.push(k)}return C})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),u=kne(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){let h=kne(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(UD(l,i));else n.push(Xm(l,i));return s&&(o?l.forEach((h=>{n.push(y5(h,!1,i))})):n.push(u)),this._d("path",n,i)}opsToPath(t,r){let i="";for(let n of t.ops){let a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){let r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:co};break;case"fillPath":s={d:this.opsToPath(a),stroke:co,strokeWidth:0,fill:i.fill||co};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||co,strokeWidth:i,fill:co}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}},r9=class{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Km(r)}draw(t){let r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";let o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(let a of r.ops){let s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){let s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){let s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){let s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){let a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){let i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){let i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){let u=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(u),u}curve(t,r){let i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){let i=this.gen.path(t,r);return this.draw(i),i}},m5="http://www.w3.org/2000/svg",i9=class{constructor(t,r){this.svg=t,this.gen=new Km(r)}draw(t){let r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(m5,"g"),s=t.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(m5,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(m5,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);let a=t.createElementNS(m5,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){let s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){let s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){let s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){let a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){let i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){let i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){let u=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(u)}curve(t,r){let i=this.gen.curve(t,r);return this.draw(i)}path(t,r){let i=this.gen.path(t,r);return this.draw(i)}},st={canvas:(e,t)=>new r9(e,t),svg:(e,t)=>new i9(e,t),generator:e=>new Km(e),newSeed:()=>Km.newSeed()}});function Vr(e){let t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Pf(e,t,r,i,n,a){let s=[],l=r-e,u=i-t,h=l/a,f=2*Math.PI/h,d=t+u/2;for(let p=0;p<=50;p++){let g=p/50,m=e+g*l,y=d+n*Math.sin(f*(m-e));s.push({x:m,y})}return s}function Cb(e,t,r,i,n,a){let s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let f=0;fl.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);let n=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),s=b((l,u)=>l?.getAttribute(u)??void 0,"getAttr");if(n){let l={fill:s(n,"fill"),"fill-opacity":s(n,"fill-opacity")??"1"};Object.entries(l).forEach(([u,h])=>{h&&r.setAttribute(u,h)})}if(a){let l={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([u,h])=>{h&&r.setAttribute(u,h)})}let o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}function jne(e,t){return e.intersect(t)}function Xne(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),u=Math.abs(t*r*s/l);i.x0}function Jne(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,u=n-e.height/2-o;for(let h=0;h1&&a.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),m=f.x-r.x,y=f.y-r.y,v=Math.sqrt(m*m+y*y);return gh,":first-child");return f.attr("class","anchor").attr("style",An(o)),Wt(t,f),t.intersect=function(d){return ee.info("Circle intersect",t,s,d),Pt.circle(t,s,d)},a}function c9(e,t,r,i,n,a,s){let l=(e+r)/2,u=(t+i)/2,h=Math.atan2(i-t,r-e),f=(r-e)/2,d=(i-t)/2,p=f/n,g=d/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let y=Math.sqrt(1-m**2),v=l+y*a*Math.sin(h)*(s?-1:1),x=u-y*n*Math.cos(h)*(s?-1:1),T=Math.atan2((t-x)/a,(e-v)/n),w=Math.atan2((i-x)/a,(r-v)/n)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let k=[];for(let E=0;E<20;E++){let A=E/19,N=T+A*w,P=v+n*Math.cos(N),O=x+a*Math.sin(N);k.push({x:P,y:O})}return k}function tae(e,t,r){let[i,n]=[t,r].sort((a,s)=>s-a);return n*(1-Math.sqrt(1-(e/i/2)**2))}async function rae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,o=b(N=>N+s,"calcTotalHeight"),l=b(N=>{let P=N/2;return[P/(2.5+N/50),P]},"calcEllipseRadius"),{shapeSvg:u,bbox:h}=await or(e,t,ir(t)),f=o(t?.height?t?.height:h.height),[d,p]=l(f),g=tae(f,d,p),y=(t?.width?t?.width:h.width)+a*2+g-g,v=f,{cssStyles:x}=t,T=[{x:y/2,y:-v/2},{x:-y/2,y:-v/2},...c9(-y/2,-v/2,-y/2,v/2,d,p,!1),{x:y/2,y:v/2},...c9(y/2,v/2,y/2,-v/2,d,p,!0)],C=st.svg(u),w=Gt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=Vr(T),E=C.path(k,w),A=u.insert(()=>E,":first-child");return A.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${d/2}, 0)`),Wt(t,A),t.intersect=function(N){return Pt.polygon(t,T,N)},u}function sh(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function iae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?28:n,s=t.look==="neo"?24:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.width??l.width)+(t.look==="neo"?a*2:a+k5),h=(t?.height??l.height)+(t.look==="neo"?s*2:s),f=0,d=u,p=-h,g=0,m=[{x:f+k5,y:p},{x:d,y:p},{x:d,y:g},{x:f,y:g},{x:f,y:p+k5},{x:f+k5,y:p}],y,{cssStyles:v}=t;if(t.look==="handDrawn"){let x=st.svg(o),T=Gt(t,{}),C=Vr(m),w=x.path(C,T);y=o.insert(()=>w,":first-child").attr("transform",`translate(${-u/2}, ${h/2})`),v&&y.attr("style",v)}else y=sh(o,u,h,m);return i&&y.attr("style",i),Wt(t,y),t.intersect=function(x){return Pt.polygon(t,m,x)},o}function nae(e,t){let{nodeStyles:r}=Ot(t);t.label="";let i=e.insert("g").attr("class",ir(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=st.svg(i),l=Gt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=Vr(s),h=o.path(u,l),f=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return Pt.polygon(t,s,d)},i}async function u9(e,t,r){let{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:o}=await or(e,t,ir(t)),l=16,u=r?.padding??o,h=t.look==="neo"?s.width/2+l*2:s.width/2+u,f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=st.svg(a),g=Gt(t,{}),m=p.circle(0,0,h*2,g);f=a.insert(()=>m,":first-child"),f.attr("class","basic label-container").attr("style",An(d))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0);return Wt(t,f),t.calcIntersect=function(p,g){let m=p.width/2;return Pt.circle(p,m,g)},t.intersect=function(p){return ee.info("Circle intersect",t,h,p),Pt.circle(t,h,p)},a}function aae(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} - M ${n.x},${n.y} L ${s.x},${s.y}`}function sae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",ir(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=st.svg(n),l=Gt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,a*2,l),h=aae(a),f=o.path(h,l),d=n.insert(()=>u,":first-child");return d.insert(()=>f),d.attr("class","outer-path"),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Wt(t,d),t.intersect=function(p){return ee.info("crossedCircle intersect",t,{radius:a,point:p}),Pt.circle(t,a,p)},n}function ih(e,t,r,i=100,n=0,a=180){let s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),k.insert(()=>T,":first-child"),k.attr("class","text"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-u/2+f-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Wt(t,k),t.intersect=function(E){return Pt.polygon(t,g,E)},n}function nh(e,t,r,i=100,n=0,a=180){let s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),k.insert(()=>T,":first-child"),k.attr("class","text"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Wt(t,k),t.intersect=function(E){return Pt.polygon(t,g,E)},n}function va(e,t,r,i=100,n=0,a=180){let s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let f=0;fN,":first-child").attr("stroke-opacity",0),P.insert(()=>C,":first-child"),P.insert(()=>E,":first-child"),P.attr("class","text"),d&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Wt(t,P),t.intersect=function(O){return Pt.polygon(t,m,O)},n}async function uae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,o=20,l=5,{shapeSvg:u,bbox:h}=await or(e,t,ir(t)),f=Math.max(o,(h.width+a*2)*1.25,t?.width??0),d=Math.max(l,h.height+s*2,t?.height??0),p=d/2,{cssStyles:g}=t,m=st.svg(u),y=Gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=f,x=d,T=v-p,C=x/4,w=[{x:T,y:0},{x:C,y:0},{x:0,y:x/2},{x:C,y:x},{x:T,y:x},...Cb(-T,-x/2,p,50,270,90)],k=Vr(w),E=m.path(k,y),A=u.insert(()=>E,":first-child");return A.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(${-f/2}, ${-d/2})`),Wt(t,A),t.intersect=function(N){return Pt.polygon(t,w,N)},u}async function hae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?24:n,s=t.look==="neo"?24:n;if(t.width||t.height){let y=t.width??0;t.width=(t.width??0)-s,t.widthw,":first-child"),g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=IGe(0,0,h,p,f,d);g=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",An(m)).attr("style",i)}return g.attr("label-offset-y",d),g.attr("transform",`translate(${-h/2}, ${-(p/2+d)})`),Wt(t,g),u.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){let v=Pt.rect(t,y),x=v.x-(t.x??0);if(f!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(v.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-x*x/(f*f));T>0&&(T=Math.sqrt(T)),T=d-T,y.y-(t.y??0)>0&&(T=-T),v.y+=T}return v},o}async function r1(e,t,r){let{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i;let{shapeSvg:a,bbox:s}=await or(e,t,ir(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),t.look==="handDrawn"){let m=st.svg(a),y=Gt(t,{}),v=d||p?m.path(Bf(u,h,o,l,d||0),y):m.rectangle(u,h,o,l,y);f=a.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",An(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",n).attr("rx",An(d)).attr("ry",An(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return Wt(t,f),t.calcIntersect=function(m,y){return Pt.rect(m,y)},t.intersect=function(m){return Pt.rect(t,m)},a}async function fae(e,t){let{cssClasses:r,labelPaddingX:i,labelPaddingY:n,padding:a,width:s,height:o}=t,l={rx:0,ry:0,classes:r??"",labelPaddingX:i??(a??0)*2,labelPaddingY:n??a??0},u=await r1(e,t,l);if(t.look==="handDrawn"){let p=st.svg(u),g=Gt(t,{}),m=u.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return u;let v=null;if(y instanceof SVGGraphicsElement)v=y.getBBox();else return u;return u.insert(()=>p.line(v.x,v.y,v.x+v.width,v.y,g),".basic.label-container g.label"),u.insert(()=>p.line(v.x,v.y+v.height,v.x+v.width,v.y+v.height,g),".basic.label-container g.label"),m.remove(),u}let h=u.select(".basic.label-container"),f=(Number(h.attr("width"))||s)??0,d=(Number(h.attr("height"))||o)??0;return f>0&&d>0&&h.attr("stroke-dasharray",`${f} ${d}`),u}async function dae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:s,bbox:o,label:l}=await or(e,t,ir(t)),u=o.width+n,h=o.height+a,f=h*.2,d=-u/2,p=-h/2-f/2,{cssStyles:g}=t,m=st.svg(s),y=Gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:d,y:p+f},{x:-d,y:p+f},{x:-d,y:-p},{x:d,y:-p},{x:d,y:p},{x:-d,y:p},{x:-d,y:p+f}],x=m.polygon(v.map(C=>[C.x,C.y]),y),T=s.insert(()=>x,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(o.x-(o.left??0))}, ${p+f+(t.padding??0)/2-(o.y-(o.top??0))})`),Wt(t,T),t.intersect=function(C){return Pt.rect(t,C)},s}async function pae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t),n=t.look==="neo"?12:5;t.labelStyle=r;let a=t.padding??0,s=t.look==="neo"?16:a,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.width?t?.width/2:l.width/2)+(s??0),h=u-n,f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=st.svg(o),g=Gt(t,{roughness:.2,strokeWidth:2.5}),m=Gt(t,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,g),v=p.circle(0,0,h*2,m);f=o.insert("g",":first-child"),f.attr("class",An(t.cssClasses)).attr("style",An(d)),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=o.insert("g",":first-child");let p=f.insert("circle",":first-child"),g=f.insert("circle");f.attr("class","basic label-container").attr("style",i),p.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Wt(t,f),t.intersect=function(p){return ee.info("DoubleCircle intersect",t,u,p),Pt.circle(t,u,p)},o}function gae(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Ot(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",ir(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=st.svg(a),{nodeBorder:u}=r,h=Gt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Wt(t,d),t.intersect=function(p){return ee.info("filledCircle intersect",t,{radius:s,point:p}),Pt.circle(t,s,p)},a}async function mae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=t?.height??0,t.heightv,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=u,t.height=h,Wt(t,x),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(T){return ee.info("Triangle intersect",t,d,T),Pt.polygon(t,d,T)},s}function yae(e,t,{dir:r,config:{state:i,themeVariables:n}}){let{nodeStyles:a}=Ot(t);t.label="";let s=e.insert("g").attr("class",ir(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,l=Math.max(70,t?.width??0),u=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),u=Math.max(70,t?.height??0));let h=-1*l/2,f=-1*u/2,d=st.svg(s),p=Gt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=d.rectangle(h,f,l,u,p),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Wt(t,m);let y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(v){return Pt.rect(t,v)},s}async function vae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=15,a=10,s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.heightx,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Wt(t,T),t.intersect=function(C){return ee.info("Pill intersect",t,{radius:d,point:C}),Pt.polygon(t,y,C)},l}async function bae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;let a=t.padding??0,s=70,o=32,l=t.look==="neo"?s:a,u=t.look==="neo"?o:a;if(t.width||t.height){let T=(t.height??0)/n;t.width=(t?.width??0)-2*T-u,t.height=(t.height??0)-l}let{shapeSvg:h,bbox:f}=await or(e,t,ir(t)),d=(t?.height?t?.height:f.height)+l,p=d/n,g=(t?.width?t?.width:f.width)+2*p+u,m=[{x:p,y:0},{x:g-p,y:0},{x:g,y:-d/2},{x:g-p,y:-d},{x:p,y:-d},{x:0,y:-d/2}],y,{cssStyles:v}=t;if(t.look==="handDrawn"){let x=st.svg(h),T=Gt(t,{}),C=MGe(0,0,g,d,p),w=x.path(C,T);y=h.insert(()=>w,":first-child").attr("transform",`translate(${-g/2}, ${d/2})`),v&&y.attr("style",v)}else y=sh(h,g,d,m);return i&&y.attr("style",i),t.width=g,t.height=d,Wt(t,y),t.intersect=function(x){return Pt.polygon(t,m,x)},h}async function xae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.label="",t.labelStyle=r;let{shapeSvg:n}=await or(e,t,ir(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=st.svg(n),u=Gt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=Vr(h),d=l.path(f,u),p=n.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Wt(t,p),t.intersect=function(g){return ee.info("Pill intersect",t,{points:h}),Pt.polygon(t,h,g)},n}async function Tae(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Ot(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await or(e,t,"icon-shape default"),d=t.pos==="t",p=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Zp(t),v=-g/2,x=-p/2,T=t.label?8:0,C=st.svg(u),w=Gt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=C.rectangle(v,x,g,p,w),E=Math.max(g,h.width),A=p+h.height+T,N=C.rectangle(-E/2,-A/2,E,A,{...w,fill:"transparent",stroke:"none"}),P=u.insert(()=>k,":first-child"),O=u.insert(()=>N);if(t.icon){let L=u.append("g");L.html(`${await Pc(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let _=L.node().getBBox(),R=_.width,D=_.height,I=_.x,B=_.y;L.attr("transform",`translate(${-R/2-I},${d?h.height/2+T/2-D/2-B:-h.height/2-T/2-D/2-B})`),L.attr("style",`color: ${y.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),P.attr("transform",`translate(0,${d?h.height/2+T/2:-h.height/2-T/2})`),Wt(t,O),t.intersect=function(L){if(ee.info("iconSquare intersect",t,L),!t.label)return Pt.rect(t,L);let _=t.x??0,R=t.y??0,D=t.height??0,I=[];return d?I=[{x:_-h.width/2,y:R-D/2},{x:_+h.width/2,y:R-D/2},{x:_+h.width/2,y:R-D/2+h.height+T},{x:_+g/2,y:R-D/2+h.height+T},{x:_+g/2,y:R+D/2},{x:_-g/2,y:R+D/2},{x:_-g/2,y:R-D/2+h.height+T},{x:_-h.width/2,y:R-D/2+h.height+T}]:I=[{x:_-g/2,y:R-D/2},{x:_+g/2,y:R-D/2},{x:_+g/2,y:R-D/2+p},{x:_+h.width/2,y:R-D/2+p},{x:_+h.width/2/2,y:R+D/2},{x:_-h.width/2,y:R+D/2},{x:_-h.width/2,y:R-D/2+p},{x:_-g/2,y:R-D/2+p}],Pt.polygon(t,I,L)},u}async function wae(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Ot(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await or(e,t,"icon-shape default"),d=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:v}=Zp(t),x=st.svg(u),T=Gt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=v.get("fill");T.stroke=C??y;let w=u.append("g");t.icon&&w.html(`${await Pc(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let k=w.node().getBBox(),E=k.width,A=k.height,N=k.x,P=k.y,O=Math.max(E,A)*Math.SQRT2+d*2,L=x.circle(0,0,O,T),_=Math.max(O,h.width),R=O+h.height+p,D=x.rectangle(-_/2,-R/2,_,R,{...T,fill:"transparent",stroke:"none"}),I=u.insert(()=>L,":first-child"),B=u.insert(()=>D);return w.attr("transform",`translate(${-E/2-N},${g?h.height/2+p/2-A/2-P:-h.height/2-p/2-A/2-P})`),w.attr("style",`color: ${v.get("stroke")??m};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-R/2:R/2-h.height})`),I.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Wt(t,B),t.intersect=function(M){return ee.info("iconSquare intersect",t,M),Pt.rect(t,M)},u}async function kae(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Ot(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await or(e,t,"icon-shape default"),p=t.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=Zp(t),T=-m/2,C=-g/2,w=t.label?8:0,k=st.svg(u),E=Gt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let A=x.get("fill");E.stroke=A??v;let N=k.path(Bf(T,C,m,g,5),E),P=Math.max(m,h.width),O=g+h.height+w,L=k.rectangle(-P/2,-O/2,P,O,{...E,fill:"transparent",stroke:"none"}),_=u.insert(()=>N,":first-child").attr("class","icon-shape2"),R=u.insert(()=>L);if(t.icon){let D=u.append("g");D.html(`${await Pc(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let I=D.node().getBBox(),B=I.width,M=I.height,F=I.x,z=I.y;D.attr("transform",`translate(${-B/2-F},${p?h.height/2+w/2-M/2-z:-h.height/2-w/2-M/2-z})`),D.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),_.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),Wt(t,R),t.intersect=function(D){if(ee.info("iconSquare intersect",t,D),!t.label)return Pt.rect(t,D);let I=t.x??0,B=t.y??0,M=t.height??0,F=[];return p?F=[{x:I-h.width/2,y:B-M/2},{x:I+h.width/2,y:B-M/2},{x:I+h.width/2,y:B-M/2+h.height+w},{x:I+m/2,y:B-M/2+h.height+w},{x:I+m/2,y:B+M/2},{x:I-m/2,y:B+M/2},{x:I-m/2,y:B-M/2+h.height+w},{x:I-h.width/2,y:B-M/2+h.height+w}]:F=[{x:I-m/2,y:B-M/2},{x:I+m/2,y:B-M/2},{x:I+m/2,y:B-M/2+g},{x:I+h.width/2,y:B-M/2+g},{x:I+h.width/2/2,y:B+M/2},{x:I-h.width/2,y:B+M/2},{x:I-h.width/2,y:B-M/2+g},{x:I-m/2,y:B-M/2+g}],Pt.polygon(t,F,D)},u}async function Cae(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Ot(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await or(e,t,"icon-shape default"),p=t.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=Zp(t),T=-m/2,C=-g/2,w=t.label?8:0,k=st.svg(u),E=Gt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let A=x.get("fill");E.stroke=A??v;let N=k.path(Bf(T,C,m,g,.1),E),P=Math.max(m,h.width),O=g+h.height+w,L=k.rectangle(-P/2,-O/2,P,O,{...E,fill:"transparent",stroke:"none"}),_=u.insert(()=>N,":first-child"),R=u.insert(()=>L);if(t.icon){let D=u.append("g");D.html(`${await Pc(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let I=D.node().getBBox(),B=I.width,M=I.height,F=I.x,z=I.y;D.attr("transform",`translate(${-B/2-F},${p?h.height/2+w/2-M/2-z:-h.height/2-w/2-M/2-z})`),D.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),_.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),Wt(t,R),t.intersect=function(D){if(ee.info("iconSquare intersect",t,D),!t.label)return Pt.rect(t,D);let I=t.x??0,B=t.y??0,M=t.height??0,F=[];return p?F=[{x:I-h.width/2,y:B-M/2},{x:I+h.width/2,y:B-M/2},{x:I+h.width/2,y:B-M/2+h.height+w},{x:I+m/2,y:B-M/2+h.height+w},{x:I+m/2,y:B+M/2},{x:I-m/2,y:B+M/2},{x:I-m/2,y:B-M/2+h.height+w},{x:I-h.width/2,y:B-M/2+h.height+w}]:F=[{x:I-m/2,y:B-M/2},{x:I+m/2,y:B-M/2},{x:I+m/2,y:B-M/2+g},{x:I+h.width/2,y:B-M/2+g},{x:I+h.width/2/2,y:B+M/2},{x:I-h.width/2,y:B+M/2},{x:I-h.width/2,y:B-M/2+g},{x:I-m/2,y:B-M/2+g}],Pt.polygon(t,F,D)},u}async function Sae(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??"",await i.decode();let n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;let{labelStyles:s}=Ot(t);t.labelStyle=s;let o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let l=Math.max(t.label?o??0:0,t?.assetWidth??n),u=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?u/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await or(e,t,"image-shape default"),g=t.pos==="t",m=-u/2,y=-h/2,v=t.label?8:0,x=st.svg(f),T=Gt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=x.rectangle(m,y,u,h,T),w=Math.max(u,d.width),k=h+d.height+v,E=x.rectangle(-w/2,-k/2,w,k,{...T,fill:"none",stroke:"none"}),A=f.insert(()=>C,":first-child"),N=f.insert(()=>E);if(t.img){let P=f.append("image");P.attr("href",t.img),P.attr("width",u),P.attr("height",h),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-u/2},${g?k/2-h:-k/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-v/2:h/2-d.height/2+v/2})`),A.attr("transform",`translate(0,${g?d.height/2+v/2:-d.height/2-v/2})`),Wt(t,N),t.intersect=function(P){if(ee.info("iconSquare intersect",t,P),!t.label)return Pt.rect(t,P);let O=t.x??0,L=t.y??0,_=t.height??0,R=[];return g?R=[{x:O-d.width/2,y:L-_/2},{x:O+d.width/2,y:L-_/2},{x:O+d.width/2,y:L-_/2+d.height+v},{x:O+u/2,y:L-_/2+d.height+v},{x:O+u/2,y:L+_/2},{x:O-u/2,y:L+_/2},{x:O-u/2,y:L-_/2+d.height+v},{x:O-d.width/2,y:L-_/2+d.height+v}]:R=[{x:O-u/2,y:L-_/2},{x:O+u/2,y:L-_/2},{x:O+u/2,y:L-_/2+h},{x:O+d.width/2,y:L-_/2+h},{x:O+d.width/2/2,y:L+_/2},{x:O-d.width/2,y:L+_/2},{x:O-d.width/2,y:L-_/2+h},{x:O-u/2,y:L-_/2+h}],Pt.polygon(t,R,P)},f}async function Eae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=n,s=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=Math.max(l.width+(s??0)*2,t?.width??0),h=Math.max(l.height+(a??0)*2,t?.height??0),f=[{x:0,y:0},{x:u,y:0},{x:u+3*h/6,y:-h},{x:-3*h/6,y:-h}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=Gt(t,{}),y=Vr(f),v=g.path(y,m);d=o.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${h/2})`),p&&d.attr("style",p)}else d=sh(o,u,h,f);return i&&d.attr("style",i),t.width=u,t.height=h,Wt(t,d),t.intersect=function(g){return Pt.polygon(t,f,g)},o}async function Aae(e,t){let{shapeSvg:r,bbox:i,label:n}=await or(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Wt(t,a),t.intersect=function(l){return Pt.rect(t,l)},r}async function _ae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=n,s=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.height??l.height)+a,h=(t?.width??l.width)+s,f=[{x:0,y:0},{x:h+3*u/6,y:0},{x:h,y:-u},{x:-(3*u)/6,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=Gt(t,{}),y=Vr(f),v=g.path(y,m);d=o.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=sh(o,h,u,f);return i&&d.attr("style",i),t.width=h,t.height=u,Wt(t,d),t.intersect=function(g){return Pt.polygon(t,f,g)},o}async function Lae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=n,s=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.height??l.height)+a,h=(t?.width??l.width)+s,f=[{x:-3*u/6,y:0},{x:h,y:0},{x:h+3*u/6,y:-u},{x:0,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=Gt(t,{}),y=Vr(f),v=g.path(y,m);d=o.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=sh(o,h,u,f);return i&&d.attr("style",i),t.width=h,t.height=u,Wt(t,d),t.intersect=function(g){return Pt.polygon(t,f,g)},o}function Rae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",ir(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=st.svg(n),f=Gt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=Vr(u),p=h.path(d,f),g=n.insert(()=>p,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),Wt(t,g),t.intersect=function(m){return ee.info("lightningBolt intersect",t,m),Pt.polygon(t,u,m)},n}async function Iae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?24:n;if(t.width||t.height){let v=t.width??0;t.width=(t.width??0)-a,t.width<$ne&&(t.width=$ne);let T=v/2/(2.5+v/50);t.height=(t.height??0)-s-T*3,t.heightk,":first-child").attr("class","line"),m=o.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{let v=OGe(0,0,h,p,f,d,g);m=o.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",An(y)).attr("style",i)}return m.attr("label-offset-y",d),m.attr("transform",`translate(${-h/2}, ${-(p/2+d)})`),Wt(t,m),u.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(v){let x=Pt.rect(t,v),T=x.x-(t.x??0);if(f!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-d)){let C=d*d*(1-T*T/(f*f));C>0&&(C=Math.sqrt(C)),C=d-C,v.y-(t.y??0)>0&&(C=-C),x.y+=C}return x},o}async function Dae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n;if(t.width||t.height){let C=t.width;t.width=(C??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-s*2,t.height<10&&(t.height=10)}let{shapeSvg:o,bbox:l,label:u}=await or(e,t,ir(t)),h=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(s??0)*2,d=t.look==="neo"?f/4:f/8,p=f+d,{cssStyles:g}=t,m=st.svg(o),y=Gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...Pf(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,d,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],x=m.polygon(v.map(C=>[C.x,C.y]),y),T=o.insert(()=>x,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-d/2})`),u.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-f/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),Wt(t,T),t.intersect=function(C){return Pt.polygon(t,v,C)},o}async function Nae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*o,10),t.height=Math.max((t?.height??0)-s*2-2*o,10));let{shapeSvg:l,bbox:u,label:h}=await or(e,t,ir(t)),f=(t?.width?t?.width:u.width)+a*2+2*o,d=(t?.height?t?.height:u.height)+s*2+2*o,p=f-2*o,g=d-2*o,m=-p/2,y=-g/2,{cssStyles:v}=t,x=st.svg(l),T=Gt(t,{}),C=[{x:m-o,y:y+o},{x:m-o,y:y+g+o},{x:m+p-o,y:y+g+o},{x:m+p-o,y:y+g},{x:m+p,y:y+g},{x:m+p,y:y+g-o},{x:m+p+o,y:y+g-o},{x:m+p+o,y:y-o},{x:m+o,y:y-o},{x:m+o,y},{x:m,y},{x:m,y:y+o}],w=[{x:m,y:y+o},{x:m+p-o,y:y+o},{x:m+p-o,y:y+g},{x:m+p,y:y+g},{x:m+p,y},{x:m,y}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let k=Vr(C),E=x.path(k,T),A=Vr(w),N=x.path(A,T);t.look!=="handDrawn"&&(E=o9(E),N=o9(N));let P=l.insert("g",":first-child");return P.insert(()=>E),P.insert(()=>N),P.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(u.width/2)-o-(u.x-(u.left??0))}, ${-(u.height/2)+o-(u.y-(u.top??0))})`),Wt(t,P),t.intersect=function(O){return Pt.polygon(t,C,O)},l}async function Mae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await or(e,t,ir(t)),o=t.padding??0,l=t.look==="neo"?16:o,u=t.look==="neo"?12:o,h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-u*3);let f=Math.max(a.width,t?.width??0)+l*2,d=Math.max(a.height,t?.height??0)+u*3,p=t.look==="neo"?d/4:d/8,g=d+(h?p/2:-p/2),m=-f/2,y=-g/2,v=10,{cssStyles:x}=t,T=Pf(m-v,y+g+v,m+f-v,y+g+v,p,.8),C=T?.[T.length-1],w=[{x:m-v,y:y+v},{x:m-v,y:y+g+v},...T,{x:m+f-v,y:C.y-v},{x:m+f,y:C.y-v},{x:m+f,y:C.y-2*v},{x:m+f+v,y:C.y-2*v},{x:m+f+v,y:y-v},{x:m+v,y:y-v},{x:m+v,y},{x:m,y},{x:m,y:y+v}],k=[{x:m,y:y+v},{x:m+f-v,y:y+v},{x:m+f-v,y:C.y-v},{x:m+f,y:C.y-v},{x:m+f,y},{x:m,y}],E=st.svg(n),A=Gt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let N=Vr(w),P=E.path(N,A),O=Vr(k),L=E.path(O,A),_=n.insert(()=>P,":first-child");return _.insert(()=>L),_.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-(a.width/2)-v-(a.x-(a.left??0))}, ${-(a.height/2)+v-p/2-(a.y-(a.top??0))})`),Wt(t,_),t.intersect=function(R){return Pt.polygon(t,w,R)},n}async function Oae(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i,t.useHtmlLabels||Hr(It())||(t.centerLabel=!0);let{shapeSvg:s,bbox:o,label:l}=await or(e,t,ir(t)),u=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-u/2,d=-h/2,{cssStyles:p}=t,g=st.svg(s),m=Gt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=g.rectangle(f,d,u,h,m),v=s.insert(()=>y,":first-child");return v.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Wt(t,v),t.intersect=function(x){return Pt.rect(t,x)},s}async function Pae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await or(e,t,ir(t)),s=a.width+(t.padding??0),o=a.height+(t.padding??0),l=s+o,u=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=st.svg(n),g=Gt(t,{}),m=FGe(0,0,l),y=p.path(m,g);f=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+u}, ${l/2})`),d&&f.attr("style",d)}else f=sh(n,l,l,h),f.attr("transform",`translate(${-l/2+u}, ${l/2})`);return i&&f.attr("style",i),Wt(t,f),t.calcIntersect=function(p,g){let m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],v=Pt.polygon(p,y,g);return{x:v.x-.5,y:v.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},n}async function Bae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?21:n??0,s=t.look==="neo"?12:n??0,{shapeSvg:o,bbox:l,label:u}=await or(e,t,ir(t)),h=(t?.width??l.width)+(t.look==="neo"?a*2:a),f=(t?.height??l.height)+(t.look==="neo"?s*2:s),d=-h/2,p=-f/2,g=p/2,m=[{x:d+g,y:p},{x:d,y:0},{x:d+g,y:-p},{x:-d,y:-p},{x:-d,y:p}],{cssStyles:y}=t,v=st.svg(o),x=Gt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let T=Vr(m),C=v.path(T,x),w=o.insert(()=>C,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-g/2},0)`),u.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Wt(t,w),t.intersect=function(k){return Pt.polygon(t,m,k)},o}async function Fae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,u=t.label,h=await ah(o,u,t.labelStyle,!0,!0),f={width:0,height:0};if(Hr(we())){let A=h.children[0],N=Qe(h);f=A.getBoundingClientRect(),N.attr("width",f.width),N.attr("height",f.height)}ee.info("Text 2",l);let d=l||[],p=h.getBBox(),g=await ah(o,Array.isArray(d)?d.join("
    "):d,t.labelStyle,!0,!0),m=g.children[0],y=Qe(g);f=m.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height);let v=(t.padding||0)/2;Qe(g).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+v+5)+")"),Qe(h).attr("transform","translate( "+(f.width(ee.debug("Rough node insert CXC",P),O),":first-child"),k=a.insert(()=>(ee.debug("Rough node insert CXC",P),P),":first-child")}else k=s.insert("rect",":first-child"),E=s.insert("line"),k.attr("class","outer title-state").attr("style",i).attr("x",-f.width/2-v).attr("y",-f.height/2-v).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),E.attr("class","divider").attr("x1",-f.width/2-v).attr("x2",f.width/2+v).attr("y1",-f.height/2-v+p.height+v).attr("y2",-f.height/2-v+p.height+v);return Wt(t,k),t.intersect=function(A){return Pt.rect(t,A)},a}async function $ae(e,t,{config:{themeVariables:r}}){let i=r?.radius??5,n={rx:i,ry:i,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return r1(e,t,n)}async function zae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:s,bbox:o,label:l}=await or(e,t,ir(t)),u=(t?.width??o.width)+n*2+(t.look==="neo"?t0:t0*2),h=(t?.height??o.height)+a*2,f=u-t0,d=h,p=t0-u/2,g=-h/2,{cssStyles:m}=t,y=st.svg(s),v=Gt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:p,y:g},{x:p+f,y:g},{x:p+f,y:g+d},{x:p-t0,y:g+d},{x:p-t0,y:g},{x:p,y:g},{x:p,y:g+d}],T=y.polygon(x.map(w=>[w.x,w.y]),v),C=s.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path").attr("style",An(m)),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),l.attr("transform",`translate(${t0/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Wt(t,C),t.intersect=function(w){return Pt.rect(t,w)},s}async function Gae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-s*2,10));let{shapeSvg:o,bbox:l,label:u}=await or(e,t,ir(t)),h=(t?.width?t?.width:l.width)+a*2,f=((t?.height?t?.height:l.height)+s*2)*1.5,d=h,p=f/1.5,g=-d/2,m=-p/2,{cssStyles:y}=t,v=st.svg(o),x=Gt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let T=[{x:g,y:m},{x:g,y:m+p},{x:g+d,y:m+p},{x:g+d,y:m-p/2}],C=Vr(T),w=v.path(C,x),k=o.insert(()=>w,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(0, ${p/4})`),u.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-p/4+(t.padding??0)-(l.y-(l.top??0))})`),Wt(t,k),t.intersect=function(E){return Pt.polygon(t,T,E)},o}async function qae(e,t){let r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return r1(e,t,a)}async function Vae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?20:n,s=t.look==="neo"?12:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=l.height+(t.look==="neo"?s*2:s),h=l.width+u/4+(t.look==="neo"?a*2:a),f=u/2,{cssStyles:d}=t,p=st.svg(o),g=Gt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:-h/2+f,y:-u/2},{x:h/2-f,y:-u/2},...Cb(-h/2+f,0,f,50,90,270),{x:h/2-f,y:u/2},...Cb(h/2-f,0,f,50,270,450)],y=Vr(m),v=p.path(y,g),x=o.insert(()=>v,":first-child");return x.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Wt(t,x),t.intersect=function(T){return Pt.polygon(t,m,T)},o}async function Wae(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return r1(e,t,r)}function Uae(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i;let{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l,nodeShadow:u}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=st.svg(h),d=Gt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,t.width,{...d,stroke:s,strokeWidth:2}),g=o??l,m=(t.width??0)*5/14,y=f.circle(0,0,m,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),v=h.insert(()=>p,":first-child");if(v.insert(()=>y),t.look!=="handDrawn"&&v.attr("class","outer-path"),a&&v.selectAll("path").attr("style",a),n&&v.selectAll("path").attr("style",n),t.width<25&&u&&t.look!=="handDrawn"){let x=e.node()?.ownerSVGElement?.id??"",T=x?`${x}-drop-shadow-small`:"drop-shadow-small";v.attr("style",`filter:url(#${T})`)}return Wt(t,v),t.intersect=function(x){return Pt.circle(t,(t.width??0)/2,x)},h}function Hae(e,t,{config:{themeVariables:r}}){let{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s;if(t.look==="handDrawn"){let l=st.svg(a).circle(0,0,t.width,Tie(i));s=a.insert(()=>l),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){let o=e.node()?.ownerSVGElement?.id??"",l=o?`${o}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${l})`)}return Wt(t,s),t.intersect=function(o){return Pt.circle(t,(t.width??7)/2,o)},a}async function Yae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t?.padding??8,a=t.look==="neo"?28:n,s=t.look==="neo"?12:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.width??l.width)+2*Zm+a,h=(t?.height??l.height)+s,f=u-2*Zm,d=h,p=-u/2,g=-h/2,m=[{x:0,y:0},{x:f,y:0},{x:f,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){let y=st.svg(o),v=Gt(t,{}),x=y.rectangle(p,g,f+16,d,v),T=y.line(p+Zm,g,p+Zm,g+d,v),C=y.line(p+Zm+f,g,p+Zm+f,g+d,v);o.insert(()=>T,":first-child"),o.insert(()=>C,":first-child");let w=o.insert(()=>x,":first-child"),{cssStyles:k}=t;w.attr("class","basic label-container").attr("style",An(k)),Wt(t,w)}else{let y=sh(o,f,d,m);i&&y.attr("style",i),Wt(t,y)}return t.intersect=function(y){return Pt.polygon(t,m,y)},o}async function jae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-s*2,10),t.width=Math.max((t?.width??0)-a*2-s9*(t.height+s*2),10));let{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.height?t?.height:l.height)+s*2,h=s9*u,f=s9*u,p=(t?.width?t?.width:l.width)+a*2+h-h,g=u,m=-p/2,y=-g/2,{cssStyles:v}=t,x=st.svg(o),T=Gt(t,{}),C=[{x:m-h/2,y},{x:m+p+h/2,y},{x:m+p+h/2,y:y+g},{x:m-h/2,y:y+g}],w=[{x:m+p-h/2,y:y+g},{x:m+p+h/2,y:y+g},{x:m+p+h/2,y:y+g-f}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let k=Vr(C),E=x.path(k,T),A=Vr(w),N=x.path(A,{...T,fillStyle:"solid"}),P=o.insert(()=>N,":first-child");return P.insert(()=>E,":first-child"),P.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),Wt(t,P),t.intersect=function(O){return Pt.polygon(t,C,O)},o}async function Xae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await or(e,t,ir(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=l/8,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=t,g=st.svg(n),m=Gt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-o/2-o/2*.1,y:d/2},...Pf(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],v=-o/2+o/2*.1,x=-d/2-f*.4,T=[{x:v+o-h,y:(x+l)*1.3},{x:v+o,y:x+l-f},{x:v+o,y:(x+l)*.9},...Pf(v+o,(x+l)*1.25,v+o-h,(x+l)*1.3,-l*.02,.5)],C=Vr(y),w=g.path(C,m),k=Vr(T),E=g.path(k,{...m,fillStyle:"solid"}),A=n.insert(()=>E,":first-child");return A.insert(()=>w,":first-child"),A.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-u/2-(a.y-(a.top??0))})`),Wt(t,A),t.intersect=function(N){return Pt.polygon(t,y,N)},n}async function Kae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await or(e,t,ir(t)),s=Math.max(a.width+(t.padding??0),t?.width||0),o=Math.max(a.height+(t.padding??0),t?.height||0),l=-s/2,u=-o/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),Wt(t,h),t.intersect=function(f){return Pt.rect(t,f)},n}async function Zae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?12:n/2;if(t.width||t.height){let m=t.height??0;t.height=(t.height??0)-a,t.heightT,":first-child"),g=s.insert(()=>x,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{let m=$Ge(0,0,d,u,f,h);g=s.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",An(p)).attr("style",i),g.attr("class","basic label-container outer-path"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-d/2}, ${u/2} )`),l.attr("transform",`translate(${-(o.width/2)-f-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Wt(t,g),t.intersect=function(m){let y=Pt.rect(t,m),v=y.y-(t.y??0);if(h!=0&&(Math.abs(v)<(t.height??0)/2||Math.abs(v)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-f)){let x=f*f*(1-v*v/(h*h));x!=0&&(x=Math.sqrt(Math.abs(x))),x=f-x,m.x-(t.x??0)>0&&(x=-x),y.x+=x}return y},s}async function Qae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=(t.look==="neo",n),s=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.height??l.height)+a,h=(t?.width??l.width)+s,f=[{x:-3*u/6,y:0},{x:h+3*u/6,y:0},{x:h,y:-u},{x:0,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=Gt(t,{}),y=Vr(f),v=g.path(y,m);d=o.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=sh(o,h,u,f);return i&&d.attr("style",i),t.width=h,t.height=u,Wt(t,d),t.intersect=function(g){return Pt.polygon(t,f,g)},o}async function Jae(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-s*2,t.heightx,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Wt(t,T),t.intersect=function(C){return Pt.polygon(t,y,C)},u}async function ese(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.widthx,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=h,t.height=f,Wt(t,T),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${f/2-(o.height+(t.padding??0)/(u?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(C){return ee.info("Triangle intersect",t,p,C),Pt.polygon(t,p,C)},s}async function tse(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,o=!0;(t.width||t.height)&&(o=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-s*2,t.height<10&&(t.height=10));let{shapeSvg:l,bbox:u,label:h}=await or(e,t,ir(t)),f=(t?.width?t?.width:u.width)+(a??0)*2,d=(t?.height?t?.height:u.height)+(s??0)*2,p=t.look==="neo"?d/4:d/8,g=d+(o?p:-p),{cssStyles:m}=t,v=14-f,x=v>0?v/2:0,T=st.svg(l),C=Gt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let w=[{x:-f/2-x,y:g/2},...Pf(-f/2-x,g/2,f/2+x,g/2,p,.8),{x:f/2+x,y:-g/2},{x:-f/2-x,y:-g/2}],k=Vr(w),E=T.path(k,C),A=l.insert(()=>E,":first-child");return A.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(u.x-(u.left??0))},${-d/2+(t.padding??0)-p-(u.y-(u.top??0))})`),Wt(t,A),t.intersect=function(N){return Pt.polygon(t,w,N)},l}async function rse(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?20:n;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let C=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-s-C*(20/9)),t.width=t.width-a*2}let{shapeSvg:o,bbox:l}=await or(e,t,ir(t)),u=(t?.width?t?.width:l.width)+a*2,h=(t?.height?t?.height:l.height)+s,f=h/8,d=h+f*2,{cssStyles:p}=t,g=st.svg(o),m=Gt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-u/2,y:d/2},...Pf(-u/2,d/2,u/2,d/2,f,1),{x:u/2,y:-d/2},...Pf(u/2,-d/2,-u/2,-d/2,f,-1)],v=Vr(y),x=g.path(v,m),T=o.insert(()=>x,":first-child");return T.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),Wt(t,T),t.intersect=function(C){return Pt.polygon(t,y,C)},o}async function ise(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-n*2-an,10),t.height=Math.max((t?.height??0)-a*2-an,10));let{shapeSvg:s,bbox:o,label:l}=await or(e,t,ir(t)),u=(t?.width?t?.width:o.width)+n*2+an,h=(t?.height?t?.height:o.height)+a*2+an,f=u-an,d=h-an,p=-f/2,g=-d/2,{cssStyles:m}=t,y=st.svg(s),v=Gt(t,{}),x=[{x:p-an,y:g-an},{x:p-an,y:g+d},{x:p+f,y:g+d},{x:p+f,y:g-an}],T=`M${p-an},${g-an} L${p+f},${g-an} L${p+f},${g+d} L${p-an},${g+d} L${p-an},${g-an} - M${p-an},${g} L${p+f},${g} - M${p},${g-an} L${p},${g+d}`;t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let C=y.path(T,v),w=s.insert(()=>C,":first-child");return w.attr("transform",`translate(${an/2}, ${an/2})`),w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+an/2-(o.x-(o.left??0))}, ${-(o.height/2)+an/2-(o.y-(o.top??0))})`),Wt(t,w),t.intersect=function(k){return Pt.polygon(t,x,k)},s}async function h9(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:n}=It(),{rowEven:a,rowOdd:s,nodeBorder:o,borderColorArray:l}=n;if(t.look==="handDrawn"){let{themeVariables:Q}=It(),{background:Y}=Q,se={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Y}`]};await h9(e,se)}let u=It();t.useHtmlLabels=u.htmlLabels;let h=u.er?.diagramPadding??10,f=u.er?.entityPadding??6,{cssStyles:d}=t,{labelStyles:p,nodeStyles:g}=Ot(t);if(r.attributes.length===0&&t.label){let Q={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5,classes:""};ma(t.label,u)+Q.labelPaddingX*20){let Q=v.width+h*2-(w+k+E+A);w+=Q/O,k+=Q/O,E>0&&(E+=Q/O),A>0&&(A+=Q/O)}let _=w+k+E+A,R=st.svg(y),D=Gt(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let I=0;C.length>0&&(I=C.reduce((Q,Y)=>Q+(Y?.rowHeight??0),0));let B=Math.max(L.width+h*2,t?.width||0,_),M=Math.max((I??0)+v.height,t?.height||0),F=-B/2,z=-M/2;if(y.selectAll("g:not(:first-child)").each((Q,Y,se)=>{let J=Qe(se[Y]),re=J.attr("transform"),ie=0,te=0;if(re){let fe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(re);fe&&(ie=parseFloat(fe[1]),te=parseFloat(fe[2]),J.attr("class").includes("attribute-name")?ie+=w:J.attr("class").includes("attribute-keys")?ie+=w+k:J.attr("class").includes("attribute-comment")&&(ie+=w+k+E))}J.attr("transform",`translate(${F+h/2+ie}, ${te+z+v.height+f/2})`)}),y.select(".name").attr("transform","translate("+-v.width/2+", "+(z+f/2)+")"),i!=null&&Wne.has(i)){let Q=r.colorIndex??0;y.attr("data-color-id",`color-${Q%l.length}`)}let $=R.rectangle(F,z,B,M,D),G=y.insert(()=>$,":first-child").attr("class","outer-path").attr("style",d.join(""));T.push(0);for(let[Q,Y]of C.entries()){let J=(Q+1)%2===0&&Y.yOffset!==0,re=R.rectangle(F,v.height+z+Y?.yOffset,B,Y?.rowHeight,{...D,fill:J?a:s,stroke:o});y.insert(()=>re,"g.label").attr("style",d.join("")).attr("class",`row-rect-${J?"even":"odd"}`)}let U=1e-4,j=Jm(F,v.height+z,B+F,v.height+z,U),H=R.polygon(j.map(Q=>[Q.x,Q.y]),D);if(y.insert(()=>H).attr("class","divider"),j=Jm(w+F,v.height+z,w+F,M+z,U),H=R.polygon(j.map(Q=>[Q.x,Q.y]),D),y.insert(()=>H).attr("class","divider"),N){let Q=w+k+F;j=Jm(Q,v.height+z,Q,M+z,U),H=R.polygon(j.map(Y=>[Y.x,Y.y]),D),y.insert(()=>H).attr("class","divider")}if(P){let Q=w+k+E+F;j=Jm(Q,v.height+z,Q,M+z,U),H=R.polygon(j.map(Y=>[Y.x,Y.y]),D),y.insert(()=>H).attr("class","divider")}for(let Q of T){let Y=v.height+z+Q;j=Jm(F,Y,B+F,Y,U),H=R.polygon(j.map(se=>[se.x,se.y]),D),y.insert(()=>H).attr("class","divider")}if(Wt(t,G),g&&t.look!=="handDrawn")if(i!=null&&qGe.has(i))y.selectAll("path").attr("style",g);else{let Y=g.split(";")?.filter(se=>se.includes("stroke"))?.map(se=>`${se}`).join("; ");y.selectAll("path").attr("style",Y??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(Q){return Pt.rect(t,Q)},y}async function Qm(e,t,r,i=0,n=0,a=[],s=""){let o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==Tc(t)&&(t=Tc(t),t=t.replaceAll("<","<").replaceAll(">",">"));let l=o.node().appendChild(await zn(o,t,{width:ma(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let u=l.getBBox();if(vl(r.htmlLabels)){let h=l.children[0];h.style.textAlign="start";let f=Qe(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}return u}function Jm(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}async function nse(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",ir(t)).attr("id",t.domId||t.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let x=t.annotations[0];await kb(o,{text:`\xAB${x}\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await kb(l,t,0,["font-weight: bolder"]);let g=l.node().getBBox();d=g.height,u=s.insert("g").attr("class","members-group text");let m=0;for(let x of t.members){let T=await kb(u,x,m,[x.parseClassifier()]);m+=T+a}p=u.node().getBBox().height,p<=0&&(p=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(let x of t.methods){let T=await kb(h,x,y,[x.parseClassifier()]);y+=T+a}let v=s.node().getBBox();if(o!==null){let x=o.node().getBBox();o.attr("transform",`translate(${-x.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${f})`),v=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+n*2})`),v=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+n*4:n*2)})`),v=s.node().getBBox(),{shapeSvg:s,bbox:v}}async function kb(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=It(),s="useHtmlLabels"in t?t.useHtmlLabels:vl(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),zi(o)&&(s=!0);let l=await zn(n,o4(lo(o)),{width:ma(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,h=1;if(s){let f=l.children[0],d=Qe(l);h=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("").length-1);let p=f.getElementsByTagName("img");if(p){let g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function v(){if(m.style.display="flex",m.style.flexDirection="column",g){let x=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(x,10)*5+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}b(v,"setupImage"),setTimeout(()=>{m.complete&&v()}),m.addEventListener("error",v),m.addEventListener("load",v)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{i.includes("font-weight: bolder")&&Qe(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return n.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function ase(e,t){let r=we(),{themeVariables:i}=r,{useGradient:n}=i,a=r.class.padding??12,s=a,o=t.useHtmlLabels??vl(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];let{shapeSvg:u,bbox:h}=await nse(e,t,r,o,s),{labelStyles:f,nodeStyles:d}=Ot(t);t.labelStyle=f,t.cssStyles=l.styles||"";let p=l.styles?.join(";")||d||"";t.cssStyles||(t.cssStyles=p.replaceAll("!important","").split(";"));let g=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=st.svg(u),y=Gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=Math.max(t.width??0,h.width),x=Math.max(t.height??0,h.height),T=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?x+=s:l.members.length>0&&l.methods.length===0&&(x+=s*2);let C=-v/2,w=-x/2,k=g?a*2:l.members.length===0&&l.methods.length===0?-a:0;T&&(k=a*2);let E=m.rectangle(C-a,w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0),v+2*a,x+2*a+k,y),A=u.insert(()=>E,":first-child");A.attr("class","basic label-container outer-path");let N=A.node().getBBox(),P=u.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,O=u.select(".label-group").node().getBBox().height-(g?a/2:0)||0,L=u.select(".members-group").node().getBBox().height-(g?a/2:0)||0,_=(P+O+w+a-(w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(u.selectAll(".text").each((R,D,I)=>{let B=Qe(I[D]),M=B.attr("transform"),F=0;if(M){let U=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);U&&(F=parseFloat(U[2]))}let z=F+w+a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(B.attr("class").includes("methods-group")){let G=Math.max(L,s/2);T?z=Math.max(_,P+O+G+w+s*2+a)+s*2:z=P+O+G+w+s*4+a}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?z=F-s:z=F),o||(z-=4);let $=C;(B.attr("class").includes("label-group")||B.attr("class").includes("annotation-group"))&&($=-B.node()?.getBBox().width/2||0,u.selectAll("text").each(function(G,U,j){window.getComputedStyle(j[U]).textAnchor==="middle"&&($=0)})),B.attr("transform",`translate(${$}, ${z})`)}),l.members.length>0||l.methods.length>0||g){let R=P+O+w+a,D=m.line(N.x,R,N.x+N.width,R+.001,y);u.insert(()=>D).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",p)}if(g||l.members.length>0||l.methods.length>0){let R=P+O+L+w+s*2+a,D=m.line(N.x,T?Math.max(_,R):R,N.x+N.width,(T?Math.max(_,R):R)+.001,y);u.insert(()=>D).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",p)}if(l.look!=="handDrawn"&&u.selectAll("path").attr("style",p),A.select(":nth-child(2)").attr("style",p),u.selectAll(".divider").select("path").attr("style",p),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",p),!o){let R=RegExp(/color\s*:\s*([^;]*)/),D=R.exec(p);if(D){let I=D[0].replace("color","fill");u.selectAll("tspan").attr("style",I)}else if(f){let I=R.exec(f);if(I){let B=I[0].replace("color","fill");u.selectAll("tspan").attr("style",B)}}}return Wt(t,A),t.intersect=function(R){return Pt.rect(t,R)},u}async function sse(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let n=t,a=t,s=20,o=20,l="verifyMethod"in t,u=ir(t),{themeVariables:h}=we(),{borderColorArray:f,requirementEdgeLabelBackground:d}=h,p=e.insert("g").attr("class",u).attr("id",t.domId??t.id),g;l?g=await Bc(p,`<<${n.type}>>`,0,t.labelStyle):g=await Bc(p,"<<Element>>",0,t.labelStyle);let m=g,y=await Bc(p,n.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+o,l){let N=await Bc(p,`${n.requirementId?`ID: ${n.requirementId}`:""}`,m,t.labelStyle);m+=N;let P=await Bc(p,`${n.text?`Text: ${n.text}`:""}`,m,t.labelStyle);m+=P;let O=await Bc(p,`${n.risk?`Risk: ${n.risk}`:""}`,m,t.labelStyle);m+=O,await Bc(p,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,m,t.labelStyle)}else{let N=await Bc(p,`${a.type?`Type: ${a.type}`:""}`,m,t.labelStyle);m+=N,await Bc(p,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,m,t.labelStyle)}let v=(p.node()?.getBBox().width??200)+s,x=(p.node()?.getBBox().height??200)+s,T=-v/2,C=-x/2,w=st.svg(p),k=Gt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let E=w.rectangle(T,C,v,x,k),A=p.insert(()=>E,":first-child");if(A.attr("class","basic label-container outer-path").attr("style",i),f?.length){let N=t.colorIndex??0;p.attr("data-color-id",`color-${N%f.length}`)}if(p.selectAll(".label").each((N,P,O)=>{let L=Qe(O[P]),_=L.attr("transform"),R=0,D=0;if(_){let F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_);F&&(R=parseFloat(F[1]),D=parseFloat(F[2]))}let I=D-x/2,B=T+s/2;(P===0||P===1)&&(B=R),L.attr("transform",`translate(${B}, ${I+s})`)}),m>g+y+o){let N=C+g+y+o,P;if(t.look==="neo"){let _=[[T,N],[T+v,N],[T+v,N+.001],[T,N+.001]];P=w.polygon(_,k)}else P=w.line(T,N,T+v,N,k);p.insert(()=>P).attr("class","divider")}return Wt(t,A),t.intersect=function(N){return Pt.rect(t,N)},i&&t.look!=="handDrawn"&&(d||f?.length)&&p.selectAll("path").attr("style",i),p}async function Bc(e,t,r,i=""){if(t==="")return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=we(),s=a.htmlLabels??!0,o=await zn(n,o4(lo(t)),{width:ma(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),l;if(s){let u=o.children[0],h=Qe(o);l=u.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{let u=o.children[0];for(let h of u.children)i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}async function ose(e,t,{config:r}){let{labelStyles:i,nodeStyles:n}=Ot(t);t.labelStyle=i||"";let a=10,s=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await or(e,t,ir(t)),h=t.padding||10,f="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,m;d?{label:g,bbox:m}=await a9(d,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await a9(o,"ticket"in t&&t.ticket||"",p);let{label:y,bbox:v}=await a9(o,"assigned"in t&&t.assigned||"",p);t.width=s;let x=10,T=t?.width||0,C=Math.max(m.height,v.height)/2,w=Math.max(l.height+x*2,t?.height||0)+C,k=-T/2,E=-w/2;u.attr("transform","translate("+(h-T/2)+", "+(-C-l.height/2)+")"),g.attr("transform","translate("+(h-T/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+T/2-v.width-2*a)+", "+(-C+l.height/2)+")");let A,{rx:N,ry:P}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){let L=st.svg(o),_=Gt(t,{}),R=N||P?L.path(Bf(k,E,T,w,N||0),_):L.rectangle(k,E,T,w,_);A=o.insert(()=>R,":first-child"),A.attr("class","basic label-container").attr("style",O||null)}else{A=o.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",n).attr("rx",N??5).attr("ry",P??5).attr("x",k).attr("y",E).attr("width",T).attr("height",w);let L="priority"in t&&t.priority;if(L){let _=o.append("line"),R=k+2,D=E+Math.floor((N??0)/2),I=E+w-Math.floor((N??0)/2);_.attr("x1",R).attr("y1",D).attr("x2",R).attr("y2",I).attr("stroke-width","4").attr("stroke",VGe(L))}}return Wt(t,A),t.height=w,t.intersect=function(L){return Pt.rect(t,L)},o}async function lse(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await or(e,t,ir(t)),l=a.width+10*s,u=a.height+8*s,h=.15*l,{cssStyles:f}=t,d=a.width+20,p=a.height+20,g=Math.max(l,d),m=Math.max(u,p);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y,v=`M0 0 +`);return wE(n)}function Kse(e){return e.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function Zse(e,t={}){let r=jse(e,t),n=_n.lexer(r),i=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` +`).forEach((h,f)=>{f!==0&&(a++,i.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return v(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?i[a].push({content:o.text,type:"normal"}):i[a].push({content:o.raw,type:"normal"})}),i}function Qse(e){return e?`

    ${e.replace(/\\n|\n/g,"
    ")}

    `:""}function Jse(e,{markdownAutoWrap:t}={}){let r=_n.lexer(e);function n(i){return i.type==="text"?t===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

    ${i.tokens?.map(n).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(fe.warn(`Unsupported markdown: ${i.type}`),i.raw)}return v(n,"output"),r.map(n).join("")}function eoe(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function toe(e,t){let r=eoe(t.content);return oN(e,[],r,t.type)}function oN(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...t,i];return e([{content:s.join(""),type:n}])?oN(e,s,a,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function roe(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return CE(e,t)}function CE(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),t(s))return CE(e,t,r,s);if(n.length>0)r.push(n),e.unshift(a);else if(a.content){let[o,l]=toe(t,a);r.push([o]),l.content&&e.unshift(l)}return CE(e,t,r)}function aN(e,t){t&&e.attr("style",t)}async function noe(e,t,r,n,i=!1,a=It()){let s=e.append("foreignObject");s.attr("width",`${Math.min(10*r,Hse)}px`),s.attr("height",`${Math.min(10*r,Hse)}px`);let o=s.append("xhtml:div"),l=hi(t.label)?await vy(t.label.replace(vt.lineBreakRegex,` +`),a):Cr(t.label,a),u=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");return h.html(l),aN(h,t.labelStyle),h.attr("class",`${u} ${n}`),aN(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg"),(await $h.measure(()=>o.node().getBoundingClientRect())).width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px")),s.node()}function kE(e,t,r,n=!1){let i=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return n&&i.attr("text-anchor","middle"),i}function ioe(e,t,r){let n=e.append("text"),i=kE(n,1,t);SE(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function lN(e,t,r){let n=e.append("text"),i=kE(n,1,t);SE(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function aoe(e,t,r,n=!1,i=!1){let s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1");i&&l.attr("text-anchor","middle");let u=0;for(let h of r){let f=v(p=>ioe(s,1.1,p)<=e,"checkWidth"),d=f(h)?[h]:roe(h,f);for(let p of d){let g=kE(l,u,1.1,i);SE(g,p),u++}}if(n){let h=l.node().getBBox(),f=2;return o.attr("x",h.x-f).attr("y",h.y-f).attr("width",h.width+2*f).attr("height",h.height+2*f),s.node()}else return l.node()}function sN(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function SE(e,t){e.text(""),t.forEach((r,n)=>{let i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(sN(r.content)):i.text(" "+sN(r.content))})}async function soe(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{let o=`${a}:${s}`;return await $ae(o)?await Ko(o,void 0,{class:"label-icon"}):``})()),i));let n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var Yse,Xse,iN,Yy,nN,oYe,lYe,cYe,_Xt,uYe,$h,Hse,Ra,Wi=X(()=>{Vi();Ur();hr();ur();Yt();Yse=Ls(Ese(),1),Xse=Ls(Ase(),1);zr();Use();rN();iN=typeof performance<"u"&&typeof performance.now=="function",Yy=v(()=>iN?performance.now():0,"now"),nN="\u{1F9DC} ",oYe="Mermaid render",lYe="Mermaid",cYe={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},_Xt=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{v(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();let r=Yy();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(Yy()-r)}}async tick(e,t){if(!this.enabled)return t();let r=Yy();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(Yy()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();let e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;let t={name:e,start:Yy(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(t):this.roots.push(t),this.stack.push(t),iN&&typeof performance.mark=="function")try{performance.mark(`${nN}${e} \u25B6`)}catch{}}end(){if(!this.enabled)return;let e=this.stack.pop();if(!e)return;let t=Yy();if(e.duration=t-e.start,iN&&typeof performance.measure=="function")try{performance.measure(`${nN}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:"track-entry",track:oYe,trackGroup:lYe,color:cYe[e.name]??"primary",tooltipText:`${e.name} \u2014 ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;let r=e.duration,n=t&&t!==e.name?`${e.name} [${t}]`:e.name,i=["ms % phase"],a=v((o,l)=>{let u=" ".repeat(l),h=o.duration.toFixed(1).padStart(8),f=r>0?`${(o.duration/r*100).toFixed(0).padStart(3)}%`:" -";i.push(`${h} ${f} ${u}${o.name}`);for(let d of o.children)a(d,l+1);if(o.children.length>0){let d=o.children.reduce((g,m)=>g+m.duration,0),p=o.duration-d;if(p>.5){let g=p.toFixed(1).padStart(8);i.push(`${g} ${u} (self)`)}}},"walk");a(e,0);let s=Object.keys(this.buckets);if(s.length>0){i.push("\u2014\u2014 buckets (summed) \u2014\u2014");for(let o of s)i.push(`${this.buckets[o].toFixed(1).padStart(8)} ${o}`)}console.log(`${nN}mermaid render profile \xB7 ${n} +${i.join(` +`)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};uYe=Yse.default.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(Xse.default),$h=uYe;v(jse,"preprocessMarkdown");v(Kse,"nonMarkdownToLines");v(Zse,"markdownToLines");v(Qse,"nonMarkdownToHTML");v(Jse,"markdownToHTML");v(eoe,"splitTextToChars");v(toe,"splitWordToFitWidth");v(oN,"splitWordToFitWidthRecursion");v(roe,"splitLineToFitWidth");v(CE,"splitLineToFitWidthRecursion");v(aN,"applyStyle");Hse=16384;v(noe,"addHtmlSpan");v(kE,"createTspan");v(ioe,"computeWidthOfText");v(lN,"computeDimensionOfText");v(aoe,"createFormattedText");v(sN,"decodeHTMLEntities");v(SE,"updateTextContentAndStyles");v(soe,"replaceIconSubstring");Ra=v(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(fe.debug("XYZ createText",t,r,n,i,a,o,"addSvgBackground: ",u),a){let f=s?Jse(t,h):Qse(t),d=await soe(sc(f),h),p=t.replace(/\\\\/g,"\\"),g={isNode:o,label:hi(t)?p:d,labelStyle:r.replace("fill:","color:")};return await noe(e,g,l,i,u,h)}else{let f=sc(t.replace(//g,"
    ")),d=s?Zse(f.replace("
    ","
    "),h):Kse(f),p=aoe(l,e,d,t?u:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(p).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(p).select("rect").attr("style",g.replace(/background:/g,"fill:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(p).select("text").attr("style",m)}return n?ct(p).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(p).selectAll("tspan.text-outer-tspan").classed("row",!0),p}},"createText")});function cN(e,t,r){if(e&&e.length){let[n,i]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of e){let[u,h]=l;l[0]=(u-n)*s-(h-i)*o+n,l[1]=(u-n)*o+(h-i)*s+i}}}function hYe(e,t){return e[0]===t[0]&&e[1]===t[1]}function fYe(e,t,r,n=1){let i=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(i)for(let u of s)cN(u,o,i);let l=(function(u,h,f){let d=[];for(let b of u){let T=[...b];hYe(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&d.push(T)}let p=[];h=Math.max(h,.1);let g=[];for(let b of d)for(let T=0;Tb.yminT.ymin?1:b.xT.x?1:b.ymax===T.ymax?0:(b.ymax-T.ymax)/Math.abs(b.ymax-T.ymax))),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let T=0;Ty);T++)b=T;g.splice(0,b+1).forEach((T=>{m.push({s:y,edge:T})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,T)=>b.edge.x===T.edge.x?0:(b.edge.x-T.edge.x)/Math.abs(b.edge.x-T.edge.x))),(f!==1||x%h==0)&&m.length>1)for(let b=0;b=m.length)break;let k=m[b].edge,w=m[T].edge;p.push([[Math.round(k.x),y],[Math.round(w.x),y]])}y+=f,m.forEach((b=>{b.edge.x=b.edge.x+f*b.edge.islope})),x++}return p})(s,a,n);if(i){for(let u of s)cN(u,o,-i);(function(u,h,f){let d=[];u.forEach((p=>d.push(...p))),cN(d,h,f)})(l,o,-i)}return l}function F2(e,t){var r;let n=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),fYe(e,i,n,a||1)}function NE(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function hN(e,t){return e.type===t}function SN(e){let t=[],r=(function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:dYe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:uN,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:ooe,text:""},o})(e),n="BOD",i=0,a=r[i];for(;!hN(a,ooe);){let s=0,o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return SN("M0,0"+e);i++,s=EE[a.text],n=a.text}else hN(a,uN)?s=EE[n]:(i++,s=EE[a.text],n=a.text);if(!(i+sh%2?u+r:u+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{let l=o.map(((u,h)=>h%2?u+r:u+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{let l=o.map(((u,h)=>h%2?u+r:u+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=n,r=i}return a}function moe(e){let t=[],r="",n=0,i=0,a=0,s=0,o=0,l=0;for(let{key:u,data:h}of e){switch(u){case"M":t.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],t.push({key:"L",data:[n,i]});break;case"V":i=h[0],t.push({key:"L",data:[n,i]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=n+(n-o),d=i+(i-l)):(f=n,d=i),t.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{let[f,d]=h,p=0,g=0;r==="Q"||r==="T"?(p=n+(n-o),g=i+(i-l)):(p=n,g=i);let m=n+2*(p-n)/3,y=i+2*(g-i)/3,x=f+2*(p-f)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,f,d]}),o=p,l=g,n=f,i=d;break}case"Q":{let[f,d,p,g]=h,m=n+2*(f-n)/3,y=i+2*(d-i)/3,x=p+2*(f-p)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),o=f,l=d,n=p,i=g;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];f===0||d===0?(t.push({key:"C",data:[n,i,y,x,y,x]}),n=y,i=x):(n!==y||i!==x)&&(yoe(n,i,y,x,f,d,p,g,m).forEach((function(b){t.push({key:"C",data:b})})),n=y,i=x);break}case"Z":t.push({key:"Z",data:[]}),n=a,i=s}r=u}return t}function P2(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function yoe(e,t,r,n,i,a,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,g=0,m=0,y=0;if(u)[p,g,m,y]=u;else{[e,t]=P2(e,t,-h),[r,n]=P2(r,n,-h);let _=(e-r)/2,D=(t-n)/2,I=_*_/(i*i)+D*D/(a*a);I>1&&(I=Math.sqrt(I),i*=I,a*=I);let M=i*i,B=a*a,P=M*B-M*D*D-B*_*_,$=M*D*D+B*_*_,G=(o===l?-1:1)*Math.sqrt(Math.abs(P/$));m=G*i*D/a+(e+r)/2,y=G*-a*_/i+(t+n)/2,p=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((n-y)/a).toFixed(9))),eg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){let _=g,D=r,I=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=yoe(r=m+i*Math.cos(g),n=y+a*Math.sin(g),D,I,i,a,s,0,l,[g,_,m,y])}x=g-p;let b=Math.cos(p),T=Math.sin(p),k=Math.cos(g),w=Math.sin(g),C=Math.tan(x/4),S=4/3*i*C,E=4/3*a*C,L=[e,t],N=[e+S*T,t-E*b],O=[r+S*w,n-E*k],R=[r,n];if(N[0]=2*L[0]-N[0],N[1]=2*L[1]-N[1],u)return[N,O,R].concat(d);{d=[N,O,R].concat(d);let _=[];for(let D=0;D2){let i=[];for(let a=0;a2*Math.PI&&(p=0,g=2*Math.PI);let m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=doe(y,u,h,f,d,p,g,1,l);if(!l.disableMultiStroke){let b=doe(y,u,h,f,d,p,g,1.5,l);x.push(...b)}return s&&(o?x.push(...xd(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...xd(u,h,u+f*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:x}}function uoe(e,t){let r=moe(goe(SN(e))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...xd(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;n.push(...mYe(l,u,h,f,d,p,a,t)),a=[d,p];break}case"Z":n.push(...xd(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:"path",ops:n}}function fN(e,t){let r=[];for(let n of e)if(n.length){let i=t.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+kr(i,t),n[0][1]+kr(i,t)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*boe(i),p=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=kr(p,i,u),g=kr(g,i,u);let m=[],y=()=>kr(f,i,u),x=()=>kr(h,i,u),b=i.preserveVertices;return a&&(s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:kr(h,i,u)),t+(b?0:kr(h,i,u))]})),s?m.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(n-t)*d+y(),r+(b?0:y()),n+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*d+x(),g+t+(n-t)*d+x(),p+e+2*(r-e)*d+x(),g+t+2*(n-t)*d+x(),r+(b?0:x()),n+(b?0:x())]}),m}function AE(e,t,r){if(!e.length)return[];let n=[];n.push([e[0][0]+kr(t,r),e[0][1]+kr(t,r)]),n.push([e[0][0]+kr(t,r),e[0][1]+kr(t,r)]);for(let i=1;i3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+21&&i.push(o)):i.push(o),i.push(e[t+3])}else{let l=e[t+0],u=e[t+1],h=e[t+2],f=e[t+3],d=Y0(l,u,.5),p=Y0(u,h,.5),g=Y0(h,f,.5),m=Y0(d,p,.5),y=Y0(p,g,.5),x=Y0(m,y,.5);wN([l,d,m,x],0,r,i),wN([x,y,g,f],0,r,i)}var a,s;return i}function vYe(e,t){return DE(e,0,e.length,t)}function DE(e,t,r,n,i){let a=i||[],s=e[t],o=e[r-1],l=0,u=1;for(let h=t+1;hl&&(l=f,u=h)}return Math.sqrt(l)>n?(DE(e,t,u+1,n,a),DE(e,u,r,n,a)):(a.length||a.push(s),a.push(o)),a}function dN(e,t=.15,r){let n=[],i=(e.length-1)/3;for(let a=0;a0?DE(n,0,n.length,r):n}var $2,pN,gN,mN,yN,vN,po,xN,dYe,uN,ooe,EE,pYe,Zo,jy,CN,_E,kN,st,Wt=X(()=>{$2=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let n=F2(t,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(t,r){let n=[];for(let i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};pN=class extends $2{fillPolygons(t,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=F2(t,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(let[u,h]of i)NE([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},gN=class extends $2{fillPolygons(t,r){let n=this._fillPolygons(t,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,i);return n.ops=n.ops.concat(a.ops),n}},mN=class{constructor(t){this.helper=t}fillPolygons(t,r){let n=F2(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(t,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let o of t){let l=NE(o),u=l/i,h=Math.ceil(u)-1,f=l-h*i,d=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let g=0;g{let o=NE(s),l=Math.floor(o/(n+i)),u=(o+i-l*(n+i))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p{let s=NE(a),o=Math.round(s/(2*r)),l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f2*Math.PI&&(S=0,E=2*Math.PI);let L=(E-S)/b.curveStepCount,N=[];for(let O=S;O<=E;O+=L)N.push([T+w*Math.cos(O),k+C*Math.sin(O)]);return N.push([T+w*Math.cos(E),k+C*Math.sin(E)]),N.push([T,k]),Xy([N],b)})(t,r,n,i,a,s,u));return u.stroke!==Zo&&h.push(f),this._d("arc",h,u)}curve(t,r){let n=this._o(r),i=[],a=loe(t,n);if(n.fill&&n.fill!==Zo)if(n.fillStyle==="solid"){let s=loe(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=t;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...dN(poe([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):s.push(...dN(poe(u),10,(1+n.roughness)/2))}s.length&&i.push(Xy([s],n))}return n.stroke!==Zo&&i.push(a),this._d("curve",i,n)}polygon(t,r){let n=this._o(r),i=[],a=RE(t,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(fN([t],n)):i.push(Xy([t],n))),n.stroke!==Zo&&i.push(a),this._d("polygon",i,n)}path(t,r){let n=this._o(r),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==Zo,s=n.stroke!==Zo,o=!!(n.simplification&&n.simplification<1),l=(function(h,f,d){let p=moe(goe(SN(h))),g=[],m=[],y=[0,0],x=[],b=()=>{x.length>=4&&m.push(...dN(x,f)),x=[]},T=()=>{b(),m.length&&(g.push(m),m=[])};for(let{key:w,data:C}of p)switch(w){case"M":T(),y=[C[0],C[1]],m.push(y);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!x.length){let S=m.length?m[m.length-1]:y;x.push([S[0],S[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(T(),!d)return g;let k=[];for(let w of g){let C=vYe(w,d);C.length&&k.push(C)}return k})(t,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),u=uoe(t,n);if(a)if(n.fillStyle==="solid")if(l.length===1){let h=uoe(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(fN(l,n));else i.push(Xy(l,n));return s&&(o?l.forEach((h=>{i.push(RE(h,!1,n))})):i.push(u)),this._d("path",i,n)}opsToPath(t,r){let n="";for(let i of t.ops){let a=typeof r=="number"&&r>=0?i.data.map((s=>+s.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(t){let r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Zo};break;case"fillPath":s={d:this.opsToPath(a),stroke:Zo,strokeWidth:0,fill:n.fill||Zo};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Zo,strokeWidth:n,fill:Zo}}_mergedShape(t){return t.filter(((r,n)=>n===0||r.op!=="move"))}},CN=class{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new jy(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=i,this._drawToContext(t,r,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,n,i="nonzero"){t.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map((o=>+o.toFixed(n))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,n,i,a){let s=this.gen.line(t,r,n,i,a);return this.draw(s),s}rectangle(t,r,n,i,a){let s=this.gen.rectangle(t,r,n,i,a);return this.draw(s),s}ellipse(t,r,n,i,a){let s=this.gen.ellipse(t,r,n,i,a);return this.draw(s),s}circle(t,r,n,i){let a=this.gen.circle(t,r,n,i);return this.draw(a),a}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n),n}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n),n}arc(t,r,n,i,a,s,o=!1,l){let u=this.gen.arc(t,r,n,i,a,s,o,l);return this.draw(u),u}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n),n}path(t,r){let n=this.gen.path(t,r);return this.draw(n),n}},_E="http://www.w3.org/2000/svg",kN=class{constructor(t,r){this.svg=t,this.gen=new jy(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(_E,"g"),s=t.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(_E,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(_E,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=t.createElementNS(_E,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,n,i,a){let s=this.gen.line(t,r,n,i,a);return this.draw(s)}rectangle(t,r,n,i,a){let s=this.gen.rectangle(t,r,n,i,a);return this.draw(s)}ellipse(t,r,n,i,a){let s=this.gen.ellipse(t,r,n,i,a);return this.draw(s)}circle(t,r,n,i){let a=this.gen.circle(t,r,n,i);return this.draw(a)}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n)}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n)}arc(t,r,n,i,a,s,o=!1,l){let u=this.gen.arc(t,r,n,i,a,s,o,l);return this.draw(u)}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n)}path(t,r){let n=this.gen.path(t,r);return this.draw(n)}},st={canvas:(e,t)=>new CN(e,t),svg:(e,t)=>new kN(e,t),generator:e=>new jy(e),newSeed:()=>jy.newSeed()}});async function NN(e){let t=e.getElementsByTagName("img");if(!t||t.length===0)return;let r=!ON(e);await Promise.all([...t].map(n=>new Promise(i=>{function a(){if(n.style.display="flex",n.style.flexDirection="column",r){let s=ze().fontSize?ze().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[l=dr.fontSize]=fo(s),u=l*o+"px";n.style.minWidth=u,n.style.maxWidth=u}else n.style.width="100%";i(n)}v(a,"setupImage"),setTimeout(()=>{n.complete&&a()}),n.addEventListener("error",a),n.addEventListener("load",a)})))}function ON(e){return e.nodeType===bYe?e.textContent?.trim()!=="":e.nodeType!==xYe||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ON)}function an(e){let t=e.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function bd(e,t,r,n,i,a){let s=[],l=r-e,u=n-t,h=l/a,f=2*Math.PI/h,d=t+u/2;for(let p=0;p<=50;p++){let g=p/50,m=e+g*l,y=d+i*Math.sin(f*(m-e));s.push({x:m,y})}return s}function du(e,t,r,n,i,a){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fl.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",n);let i=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),s=v((l,u)=>l?.getAttribute(u)??void 0,"getAttr");if(i){let l={fill:s(i,"fill"),"fill-opacity":s(i,"fill-opacity")??"1"};Object.entries(l).forEach(([u,h])=>{h&&r.setAttribute(u,h)})}if(a){let l={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([u,h])=>{h&&r.setAttribute(u,h)})}let o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}function Noe(e,t){return e.intersect(t)}function Ooe(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,o=a-n.y,l=Math.sqrt(t*t*o*o+r*r*s*s),u=Math.abs(t*r*s/l);n.x0}function Foe(e,t,r){let n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=n-e.width/2-s,u=i-e.height/2-o;for(let h=0;h1&&a.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),m=f.x-r.x,y=f.y-r.y,x=Math.sqrt(m*m+y*y);return gh,":first-child");return f.attr("class","anchor").attr("style",wi(o)),Vt(t,f),t.intersect=function(d){return fe.info("Circle intersect",t,s,d),$t.circle(t,s,d)},a}function DN(e,t,r,n,i,a,s){let l=(e+r)/2,u=(t+n)/2,h=Math.atan2(n-t,r-e),f=(r-e)/2,d=(n-t)/2,p=f/i,g=d/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=u-y*i*Math.cos(h)*(s?-1:1),T=Math.atan2((t-b)/a,(e-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let C=[];for(let S=0;S<20;S++){let E=S/19,L=T+E*w,N=x+i*Math.cos(L),O=b+a*Math.sin(L);C.push({x:N,y:O})}return C}function Goe(e,t,r){let[n,i]=[t,r].sort((a,s)=>s-a);return i*(1-Math.sqrt(1-(e/n/2)**2))}async function qoe(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i,o=v(L=>L+s,"calcTotalHeight"),l=v(L=>{let N=L/2;return[N/(2.5+L/50),N]},"calcEllipseRadius"),{shapeSvg:u,bbox:h}=await tr(e,t,nr(t)),f=o(t?.height?t?.height:h.height),[d,p]=l(f),g=Goe(f,d,p),y=(t?.width?t?.width:h.width)+a*2+g-g,x=f,{cssStyles:b}=t,T=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...DN(-y/2,-x/2,-y/2,x/2,d,p,!1),{x:y/2,y:x/2},...DN(y/2,x/2,y/2,-x/2,d,p,!0)],k=st.svg(u),w=zt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=an(T),S=k.path(C,w),E=u.insert(()=>S,":first-child");return E.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${d/2}, 0)`),Vt(t,E),t.intersect=function(L){return $t.polygon(t,T,L)},u}async function Voe(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,label:o}=await tr(e,t,nr(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",u=t.padding??12,h=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(h*.08,12),5),d=Math.max(s.height+u*2+f,t.height??0),p=-d/2+f,g=d/2,m=h*.72,y=[`M${-h/2},${p}`,`L${-m/2},${g}`,`A${m/2},${f} 0 0 0 ${m/2},${g}`,`L${h/2},${p}`,`A${h/2},${f} 0 0 0 ${-h/2},${p}`,"Z"].join(" "),{cssStyles:x}=t,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let E=st.svg(a).path(y,zt(t,{}));b.node()?.appendChild(E),x&&b.attr("style",x)}else b.append("path").attr("d",y).attr("style",i);b.append("ellipse").attr("cx",0).attr("cy",p).attr("rx",h/2).attr("ry",f).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Vt(t,b);let T=p+(g-p)/2;o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${T-s.height/2-(s.y-(s.top??0))})`);let k=12,w=v((S,E,L)=>Array.from({length:k+1},(N,O)=>{let R=Math.PI-O*Math.PI/k;return{x:S*Math.cos(R),y:E+L*f*Math.sin(R)}}),"arc"),C=[...w(h/2,p,-1),...w(m/2,g,1).reverse()];return t.intersect=function(S){return $t.polygon(t,C,S)},a}async function Woe(e,t){let{themeVariables:r}=ze(),n=r.clusterBkg,i=r.clusterBorder,{nodeStyles:a}=Bt(t),{shapeSvg:s,bbox:o}=await tr(e,t,nr(t)),l=t.padding??8,u=o.height,h=Math.max(o.width+l*2,RYe,t?.width??0),f=Math.max(u+_N+AN+l*2,t?.height??0),d=-h/2,p=-f/2,g=-(_N+AN)/2,m=s.select(".label");m&&(t.useHtmlLabels??ea(ze())?m.attr("transform",`translate(${-o.width/2}, ${-o.height/2+g})`):m.attr("transform",`translate(0, ${-o.height/2+g})`));let y;if(t.look==="handDrawn"){let w=st.svg(s),C=zt(t,{fill:n,stroke:i,fillStyle:"solid"}),S=w.path(Qo(d,p,h,f,RN),C);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container collapsed-group").attr("style",wi(t.cssStyles))}else y=s.insert("rect",":first-child"),y.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",RN).attr("ry",RN).attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("fill",n).attr("stroke",i);let x=p+l+u+_N;s.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",x).attr("x2",d+h-8).attr("y2",x).attr("stroke",i).attr("stroke-dasharray","3, 3");let b=x+AN/2,T=2.5,k=10;for(let w=-1;w<=1;w++)s.append("circle").attr("class","collapsed-indicator").attr("cx",w*k).attr("cy",b).attr("r",T).attr("fill",i);return Vt(t,y),t.calcIntersect=function(w,C){return $t.rect(w,C)},t.intersect=function(w){return $t.rect(t,w)},s}function gu(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function Uoe(e,t){let r=t,{shapeSvg:n,bbox:i}=await tr(e,r,nr(r)),a=r.padding??0,s=i.height+2*a,o=s/2,l=i.width+2*o+a,u=r.width??0,f=r.positioned&&(r.widthInColumns??1)>1&&u>l?u:l,d=DYe(r.directions??[],i,r,f),p=gu(n,f,s,d);return p.attr("style",r.style??null),Vt(r,p),r.intersect=function(g){return $t.polygon(r,d,g)},n}async function Hoe(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,label:o}=await tr(e,t,nr(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",u=t.padding??12,h=18,f=12,d=Math.max(s.width+u*2,t.width??0,90),p=Math.max(s.height+u*2+h,t.height??0),g=-p/2,{cssStyles:m}=t,y=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let T=st.svg(a).path(Qo(-d/2,g,d,p,f),zt(t,{}));y.node()?.appendChild(T),m&&y.attr("style",m)}else y.append("rect").attr("x",-d/2).attr("y",g).attr("width",d).attr("height",p).attr("rx",f).attr("ry",f).attr("style",i);y.append("line").attr("x1",-d/2).attr("y1",g+h).attr("x2",d/2).attr("y2",g+h).attr("style",`stroke:${l};stroke-width:1px`);for(let b=0;b<3;b++)y.append("circle").attr("cx",-d/2+12+b*9).attr("cy",g+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);y.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",g+4).attr("width",Math.max(d-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Vt(t,y);let x=g+h+(p-h)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(b){return $t.rect(t,b)},a}async function Yoe(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?28:i,s=t.look==="neo"?24:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=(t?.width??l.width)+(t.look==="neo"?a*2:a+OE),h=(t?.height??l.height)+(t.look==="neo"?s*2:s),f=0,d=u,p=-h,g=0,m=[{x:f+OE,y:p},{x:d,y:p},{x:d,y:g},{x:f,y:g},{x:f,y:p+OE},{x:f+OE,y:p}],y,{cssStyles:x}=t;if(t.look==="handDrawn"){let b=st.svg(o),T=zt(t,{}),k=an(m),w=b.path(k,T);y=o.insert(()=>w,":first-child").attr("transform",`translate(${-u/2}, ${h/2})`),x&&y.attr("style",x)}else y=gu(o,u,h,m);return n&&y.attr("style",n),Vt(t,y),t.intersect=function(b){return $t.polygon(t,m,b)},o}function Xoe(e,t){let{nodeStyles:r}=Bt(t);t.label="";let n=e.insert("g").attr("class",nr(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=st.svg(n),l=zt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=an(s),h=o.path(u,l),f=n.insert(()=>h,":first-child");return i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return $t.polygon(t,s,d)},n}async function BN(e,t,r){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await tr(e,t,nr(t)),l=16,u=r?.padding??o,h=t.look==="neo"?s.width/2+l*2:s.width/2+u,f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=st.svg(a),g=zt(t,{}),m=p.circle(0,0,h*2,g);f=a.insert(()=>m,":first-child"),f.attr("class","basic label-container").attr("style",wi(d))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0);return Vt(t,f),t.calcIntersect=function(p,g){let m=p.width/2;return $t.circle(p,m,g)},t.intersect=function(p){return fe.info("Circle intersect",t,h,p),$t.circle(t,h,p)},a}async function joe(e,t){let r=t,n=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:i,bbox:a,halfPadding:s}=await tr(e,r,n),o=i.insert("rect",":first-child"),l=r.padding??0,u=r.positioned?r.width??0:a.width+l,h=r.positioned?r.height??0:a.height+l,f=r.positioned?-u/2:-a.width/2-s,d=r.positioned?-h/2:-a.height/2-s;return o.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",f).attr("y",d).attr("width",u).attr("height",h),Vt(r,o),r.intersect=function(p){return $t.rect(r,p)},i}async function Koe(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,label:o}=await tr(e,t,nr(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",u=t.padding??12,h=20,f=12,d=Math.max(s.width+u*2,t.width??0,90),p=Math.max(s.height+u*2+h,t.height??0),g=-p/2,{cssStyles:m}=t,y=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let T=st.svg(a).path(Qo(-d/2,g,d,p,f),zt(t,{}));y.node()?.appendChild(T),m&&y.attr("style",m)}else y.append("rect").attr("x",-d/2).attr("y",g).attr("width",d).attr("height",p).attr("rx",f).attr("ry",f).attr("style",i);y.append("text").attr("x",-d/2+12).attr("y",g+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Vt(t,y);let x=g+h+(p-h)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(b){return $t.rect(t,b)},a}function Zoe(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=e*2,i={x:n/2*t,y:n/2*r},a={x:-(n/2)*t,y:n/2*r},s={x:-(n/2)*t,y:-(n/2)*r},o={x:n/2*t,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} + M ${i.x},${i.y} L ${s.x},${s.y}`}function Qoe(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",nr(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=st.svg(i),l=zt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,a*2,l),h=Zoe(a),f=o.path(h,l),d=i.insert(()=>u,":first-child");return d.insert(()=>f),d.attr("class","outer-path"),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Vt(t,d),t.intersect=function(p){return fe.info("crossedCircle intersect",t,{radius:a,point:p}),$t.circle(t,a,p)},i}function Fh(e,t,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),C.insert(()=>T,":first-child"),C.attr("class","text"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-u/2+f-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,C),t.intersect=function(S){return $t.polygon(t,g,S)},i}function zh(e,t,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),C.insert(()=>T,":first-child"),C.attr("class","text"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,C),t.intersect=function(S){return $t.polygon(t,g,S)},i}function Ka(e,t,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fL,":first-child").attr("stroke-opacity",0),N.insert(()=>k,":first-child"),N.insert(()=>S,":first-child"),N.attr("class","text"),d&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,N),t.intersect=function(O){return $t.polygon(t,m,O)},i}async function rle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i,o=20,l=5,{shapeSvg:u,bbox:h}=await tr(e,t,nr(t)),f=Math.max(o,(h.width+a*2)*1.25,t?.width??0),d=Math.max(l,h.height+s*2,t?.height??0),p=d/2,{cssStyles:g}=t,m=st.svg(u),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=f,b=d,T=x-p,k=b/4,w=[{x:T,y:0},{x:k,y:0},{x:0,y:b/2},{x:k,y:b},{x:T,y:b},...du(-T,-b/2,p,50,270,90)],C=an(w),S=m.path(C,y),E=u.insert(()=>S,":first-child");return E.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",g),n&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),E.attr("transform",`translate(${-f/2}, ${-d/2})`),Vt(t,E),t.intersect=function(L){return $t.polygon(t,w,L)},u}async function nle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await tr(e,t,nr(t)),o=t.padding??20,l=Math.max(a.width+o*2,t.width??0,100),u=Math.min(Math.max(l*.23,16),56),h=u*.27,f=Math.max(a.height+o*2,t.height?t.height-(2*u-h):0),d=Math.min(l*.177,f*.45),p=f+2*u-h,g=-p/2,m=g+2*u-h,y=i.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){let E=st.svg(i),L=zt(t,{}),N=E.path(Qo(-l/2,m,l,f,d),L),O=E.circle(0,g+u,u*2,L);y.insert(()=>O,":first-child"),y.insert(()=>N,":first-child"),x&&y.attr("style",x)}else y.append("rect").attr("x",-l/2).attr("y",m).attr("width",l).attr("height",f).attr("rx",d).attr("ry",d).attr("style",n),y.append("circle").attr("cx",0).attr("cy",g+u).attr("r",u).attr("style",n);Vt(t,y);let b=m+f/2;s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);let T=g+u,k=Math.asin(Math.min(1,(m-T)/u))*180/Math.PI,S=[...du(0,-T,u,24,180+k,-k),...du(-(-l/2+d),-(m+d),d,12,90,0),...du(-(-l/2+d),-(p/2-d),d,12,360,270),...du(-(l/2-d),-(p/2-d),d,12,270,180),...du(-(l/2-d),-(m+d),d,12,180,90)];return t.intersect=function(E){return $t.polygon(t,S,E)},i}async function ile(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?24:i,s=t.look==="neo"?24:i,o=t.width??0;if(t.width&&(t.width=t.width-s,t.widthC,":first-child"),m=l.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{let x=NYe(0,0,f,g,d,p);m=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",wi(y)).attr("style",n)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-f/2}, ${-(g/2+p)})`),Vt(t,m),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(x){let b=$t.rect(t,x),T=b.x-(t.x??0);if(d!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-T*T/(d*d));k>0&&(k=Math.sqrt(k)),k=p-k,x.y-(t.y??0)>0&&(k=-k),b.y+=k}return b},l}async function Jy(e,t,r){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n;let{shapeSvg:a,bbox:s}=await tr(e,t,nr(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),t.look==="handDrawn"){let m=st.svg(a),y=zt(t,{}),x=d||p?m.path(Qo(u,h,o,l,d||0),y):m.rectangle(u,h,o,l,y);f=a.insert(()=>x,":first-child"),f.attr("class","basic label-container").attr("style",wi(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",wi(d)).attr("ry",wi(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return Vt(t,f,t.look==="handDrawn"?void 0:{width:o,height:l}),t.calcIntersect=function(m,y){return $t.rect(m,y)},t.intersect=function(m){return $t.rect(t,m)},a}async function ale(e,t){let{cssClasses:r,labelPaddingX:n,labelPaddingY:i,padding:a,width:s,height:o}=t,l={rx:0,ry:0,classes:r??"",labelPaddingX:n??(a??0)*2,labelPaddingY:i??a??0},u=await Jy(e,t,l);if(t.look==="handDrawn"){let p=st.svg(u),g=zt(t,{}),m=u.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return u;let x=null;if(y instanceof SVGGraphicsElement)x=y.getBBox();else return u;return u.insert(()=>p.line(x.x,x.y,x.x+x.width,x.y,g),".basic.label-container g.label"),u.insert(()=>p.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,g),".basic.label-container g.label"),m.remove(),u}let h=u.select(".basic.label-container"),f=(Number(h.attr("width"))||s)??0,d=(Number(h.attr("height"))||o)??0;return f>0&&d>0&&h.attr("stroke-dasharray",`${f} ${d}`),u}async function sle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:s,bbox:o,label:l}=await tr(e,t,nr(t)),u=o.width+i,h=o.height+a,f=h*.2,d=-u/2,p=-h/2-f/2,{cssStyles:g}=t,m=st.svg(s),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:d,y:p+f},{x:-d,y:p+f},{x:-d,y:-p},{x:d,y:-p},{x:d,y:p},{x:-d,y:p},{x:-d,y:p+f}],b=m.polygon(x.map(k=>[k.x,k.y]),y),T=s.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),l.attr("transform",`translate(${d+(t.padding??0)/2-(o.x-(o.left??0))}, ${p+f+(t.padding??0)/2-(o.y-(o.top??0))})`),Vt(t,T),t.intersect=function(k){return $t.rect(t,k)},s}async function ole(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t),i=t.look==="neo"?12:5;t.labelStyle=r;let a=t.padding??0,s=t.look==="neo"?16:a,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=(t?.width?t?.width/2:l.width/2)+(s??0),h=u-i,f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=st.svg(o),g=zt(t,{roughness:.2,strokeWidth:2.5}),m=zt(t,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,g),x=p.circle(0,0,h*2,m);f=o.insert("g",":first-child"),f.attr("class",wi(t.cssClasses)).attr("style",wi(d)),f.node()?.appendChild(y),f.node()?.appendChild(x)}else{f=o.insert("g",":first-child");let p=f.insert("circle",":first-child"),g=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return Vt(t,f),t.intersect=function(p){return fe.info("DoubleCircle intersect",t,u,p),$t.circle(t,u,p)},o}function lle(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.label="",t.labelStyle=n;let a=e.insert("g").attr("class",nr(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=st.svg(a),{nodeBorder:u}=r,h=zt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Vt(t,d),t.intersect=function(p){return fe.info("filledCircle intersect",t,{radius:s,point:p}),$t.circle(t,s,p)},a}async function cle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.heightx,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),t.width=u,t.height=h,Vt(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(T){return fe.info("Triangle intersect",t,d,T),$t.polygon(t,d,T)},s}async function ule(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await tr(e,t,nr(t)),o=t.padding??12,l=Math.max(a.width+o*2,t.width??0,90),u=a.height+o*2,h=Math.max(Math.min(u*.16,14),8),f=Math.max(u+h,t.height??0),d=f-h,p=Math.max(l*.38,28),g=-f/2,m=[{x:-l/2,y:g},{x:-l/2+p,y:g},{x:-l/2+p,y:g+h},{x:l/2,y:g+h},{x:l/2,y:f/2},{x:-l/2,y:f/2}],y=[`M${m[0].x},${m[0].y}`,...m.slice(1).map(k=>`L${k.x},${k.y}`),"Z"].join(" "),{cssStyles:x}=t,b;if(t.look==="handDrawn"){let w=st.svg(i).path(y,zt(t,{}));b=i.insert(()=>w,":first-child").attr("class","basic label-container"),x&&b.attr("style",x)}else b=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",n);t.look==="handDrawn"?Vt(t,b):Vt(t,b,{width:l,height:f});let T=g+h+d/2;return s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${T-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return $t.polygon(t,m,k)},i}function hle(e,t,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=Bt(t);t.label="";let s=e.insert("g").attr("class",nr(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,l=Math.max(70,t?.width??0),u=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),u=Math.max(70,t?.height??0));let h=-1*l/2,f=-1*u/2,d=st.svg(s),p=zt(t,{stroke:i.lineColor,fill:i.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=d.rectangle(h,f,l,u,p),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Vt(t,m);let y=n?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return $t.rect(t,x)},s}async function fle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=15,a=10,s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.heightb,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),Vt(t,T),t.intersect=function(k){return fe.info("Pill intersect",t,{radius:d,point:k}),$t.polygon(t,y,k)},l}async function dle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t),i=t.look==="neo"?3.5:4;t.labelStyle=r;let a=t.padding??0,s=70,o=32,l=t.look==="neo"?s:a,u=t.look==="neo"?o:a;if(t.width||t.height){let T=(t.height??0)/i;t.width=(t?.width??0)-2*T-u,t.height=(t.height??0)-l}let{shapeSvg:h,bbox:f}=await tr(e,t,nr(t)),d=(t?.height?t?.height:f.height)+l,p=d/i,g=(t?.width?t?.width:f.width)+2*p+u,m=[{x:p,y:0},{x:g-p,y:0},{x:g,y:-d/2},{x:g-p,y:-d},{x:p,y:-d},{x:0,y:-d/2}],y,{cssStyles:x}=t;if(t.look==="handDrawn"){let b=st.svg(h),T=zt(t,{}),k=BYe(0,0,g,d,p),w=b.path(k,T);y=h.insert(()=>w,":first-child").attr("transform",`translate(${-g/2}, ${d/2})`),x&&y.attr("style",x)}else y=gu(h,g,d,m);return n&&y.attr("style",n),t.width=g,t.height=d,Vt(t,y),t.intersect=function(b){return $t.polygon(t,m,b)},h}async function ple(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.label="",t.labelStyle=r;let{shapeSvg:i}=await tr(e,t,nr(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=st.svg(i),u=zt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=an(h),d=l.path(f,u),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Vt(t,p),t.intersect=function(g){return fe.info("Pill intersect",t,{points:h}),$t.polygon(t,h,g)},i}async function gle(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Bt(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await tr(e,t,"icon-shape default"),d=t.pos==="t",p=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=F0(t),x=-g/2,b=-p/2,T=t.label?8:0,k=st.svg(u),w=zt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=k.rectangle(x,b,g,p,w),S=Math.max(g,h.width),E=p+h.height+T,L=k.rectangle(-S/2,-E/2,S,E,{...w,fill:"transparent",stroke:"none"}),N=u.insert(()=>C,":first-child"),O=u.insert(()=>L);if(t.icon){let R=u.append("g");R.html(`${await Ko(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let _=R.node().getBBox(),D=_.width,I=_.height,M=_.x,B=_.y;R.attr("transform",`translate(${-D/2-M},${d?h.height/2+T/2-I/2-B:-h.height/2-T/2-I/2-B})`),R.attr("style",`color: ${y.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),N.attr("transform",`translate(0,${d?h.height/2+T/2:-h.height/2-T/2})`),Vt(t,O),t.intersect=function(R){if(fe.info("iconSquare intersect",t,R),!t.label)return $t.rect(t,R);let _=t.x??0,D=t.y??0,I=t.height??0,M=[];return d?M=[{x:_-h.width/2,y:D-I/2},{x:_+h.width/2,y:D-I/2},{x:_+h.width/2,y:D-I/2+h.height+T},{x:_+g/2,y:D-I/2+h.height+T},{x:_+g/2,y:D+I/2},{x:_-g/2,y:D+I/2},{x:_-g/2,y:D-I/2+h.height+T},{x:_-h.width/2,y:D-I/2+h.height+T}]:M=[{x:_-g/2,y:D-I/2},{x:_+g/2,y:D-I/2},{x:_+g/2,y:D-I/2+p},{x:_+h.width/2,y:D-I/2+p},{x:_+h.width/2/2,y:D+I/2},{x:_-h.width/2,y:D+I/2},{x:_-h.width/2,y:D-I/2+p},{x:_-g/2,y:D-I/2+p}],$t.polygon(t,M,R)},u}async function mle(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Bt(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await tr(e,t,"icon-shape default"),d=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=F0(t),b=st.svg(u),T=zt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let k=x.get("fill");T.stroke=k??y;let w=u.append("g");t.icon&&w.html(`${await Ko(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let C=w.node().getBBox(),S=C.width,E=C.height,L=C.x,N=C.y,O=Math.max(S,E)*Math.SQRT2+d*2,R=b.circle(0,0,O,T),_=Math.max(O,h.width),D=O+h.height+p,I=b.rectangle(-_/2,-D/2,_,D,{...T,fill:"transparent",stroke:"none"}),M=u.insert(()=>R,":first-child"),B=u.insert(()=>I);return w.attr("transform",`translate(${-S/2-L},${g?h.height/2+p/2-E/2-N:-h.height/2-p/2-E/2-N})`),w.attr("style",`color: ${x.get("stroke")??m};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-D/2:D/2-h.height})`),M.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Vt(t,B),t.intersect=function(P){return fe.info("iconSquare intersect",t,P),$t.rect(t,P)},u}async function yle(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Bt(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await tr(e,t,"icon-shape default"),p=t.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=F0(t),T=-m/2,k=-g/2,w=t.label?8:0,C=st.svg(u),S=zt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let E=b.get("fill");S.stroke=E??x;let L=C.path(Qo(T,k,m,g,5),S),N=Math.max(m,h.width),O=g+h.height+w,R=C.rectangle(-N/2,-O/2,N,O,{...S,fill:"transparent",stroke:"none"}),_=u.insert(()=>L,":first-child").attr("class","icon-shape2"),D=u.insert(()=>R);if(t.icon){let I=u.append("g");I.html(`${await Ko(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let M=I.node().getBBox(),B=M.width,P=M.height,$=M.x,G=M.y;I.attr("transform",`translate(${-B/2-$},${p?h.height/2+w/2-P/2-G:-h.height/2-w/2-P/2-G})`),I.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),_.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),Vt(t,D),t.intersect=function(I){if(fe.info("iconSquare intersect",t,I),!t.label)return $t.rect(t,I);let M=t.x??0,B=t.y??0,P=t.height??0,$=[];return p?$=[{x:M-h.width/2,y:B-P/2},{x:M+h.width/2,y:B-P/2},{x:M+h.width/2,y:B-P/2+h.height+w},{x:M+m/2,y:B-P/2+h.height+w},{x:M+m/2,y:B+P/2},{x:M-m/2,y:B+P/2},{x:M-m/2,y:B-P/2+h.height+w},{x:M-h.width/2,y:B-P/2+h.height+w}]:$=[{x:M-m/2,y:B-P/2},{x:M+m/2,y:B-P/2},{x:M+m/2,y:B-P/2+g},{x:M+h.width/2,y:B-P/2+g},{x:M+h.width/2/2,y:B+P/2},{x:M-h.width/2,y:B+P/2},{x:M-h.width/2,y:B-P/2+g},{x:M-m/2,y:B-P/2+g}],$t.polygon(t,$,I)},u}async function vle(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Bt(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;t.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await tr(e,t,"icon-shape default"),p=t.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=F0(t),T=-m/2,k=-g/2,w=t.label?8:0,C=st.svg(u),S=zt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let E=b.get("fill");S.stroke=E??x;let L=C.path(Qo(T,k,m,g,.1),S),N=Math.max(m,h.width),O=g+h.height+w,R=C.rectangle(-N/2,-O/2,N,O,{...S,fill:"transparent",stroke:"none"}),_=u.insert(()=>L,":first-child"),D=u.insert(()=>R);if(t.icon){let I=u.append("g");I.html(`${await Ko(t.icon,{height:o,width:o,fallbackPrefix:""})}`);let M=I.node().getBBox(),B=M.width,P=M.height,$=M.x,G=M.y;I.attr("transform",`translate(${-B/2-$},${p?h.height/2+w/2-P/2-G:-h.height/2-w/2-P/2-G})`),I.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),_.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),Vt(t,D),t.intersect=function(I){if(fe.info("iconSquare intersect",t,I),!t.label)return $t.rect(t,I);let M=t.x??0,B=t.y??0,P=t.height??0,$=[];return p?$=[{x:M-h.width/2,y:B-P/2},{x:M+h.width/2,y:B-P/2},{x:M+h.width/2,y:B-P/2+h.height+w},{x:M+m/2,y:B-P/2+h.height+w},{x:M+m/2,y:B+P/2},{x:M-m/2,y:B+P/2},{x:M-m/2,y:B-P/2+h.height+w},{x:M-h.width/2,y:B-P/2+h.height+w}]:$=[{x:M-m/2,y:B-P/2},{x:M+m/2,y:B-P/2},{x:M+m/2,y:B-P/2+g},{x:M+h.width/2,y:B-P/2+g},{x:M+h.width/2/2,y:B+P/2},{x:M-h.width/2,y:B+P/2},{x:M-h.width/2,y:B-P/2+g},{x:M-m/2,y:B-P/2+g}],$t.polygon(t,$,I)},u}async function xle(e,t,{config:{flowchart:r}}){let n=new Image;n.src=t?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/a;let{labelStyles:s}=Bt(t);t.labelStyle=s;let o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let l=Math.max(t.label?o??0:0,t?.assetWidth??i),u=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?u/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await tr(e,t,"image-shape default"),g=t.pos==="t",m=-u/2,y=-h/2,x=t.label?8:0,b=st.svg(f),T=zt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let k=b.rectangle(m,y,u,h,T),w=Math.max(u,d.width),C=h+d.height+x,S=b.rectangle(-w/2,-C/2,w,C,{...T,fill:"none",stroke:"none"}),E=f.insert(()=>k,":first-child"),L=f.insert(()=>S);if(t.img){let N=f.append("image");N.attr("href",t.img),N.attr("width",u),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-u/2},${g?C/2-h:-C/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),E.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),Vt(t,L),t.intersect=function(N){if(fe.info("iconSquare intersect",t,N),!t.label)return $t.rect(t,N);let O=t.x??0,R=t.y??0,_=t.height??0,D=[];return g?D=[{x:O-d.width/2,y:R-_/2},{x:O+d.width/2,y:R-_/2},{x:O+d.width/2,y:R-_/2+d.height+x},{x:O+u/2,y:R-_/2+d.height+x},{x:O+u/2,y:R+_/2},{x:O-u/2,y:R+_/2},{x:O-u/2,y:R-_/2+d.height+x},{x:O-d.width/2,y:R-_/2+d.height+x}]:D=[{x:O-u/2,y:R-_/2},{x:O+u/2,y:R-_/2},{x:O+u/2,y:R-_/2+h},{x:O+d.width/2,y:R-_/2+h},{x:O+d.width/2/2,y:R+_/2},{x:O-d.width/2,y:R+_/2},{x:O-d.width/2,y:R-_/2+h},{x:O-u/2,y:R-_/2+h}],$t.polygon(t,D,N)},f}async function ble(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=i,s=t.look==="neo"?i*2:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+s*2,(t.width??0)-u),f=[{x:0,y:0},{x:h,y:0},{x:h+3*u/6,y:-u},{x:-3*u/6,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=zt(t,{}),y=an(f),x=g.path(y,m);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=gu(o,h,u,f);return n&&d.attr("style",n),t.width=h,t.height=u,Vt(t,d),t.intersect=function(g){return $t.polygon(t,f,g)},o}async function Tle(e,t){let{shapeSvg:r,bbox:n,label:i}=await tr(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Vt(t,a),t.intersect=function(l){return $t.rect(t,l)},r}async function wle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=i,s=t.look==="neo"?i*2:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=Math.max(l.height+a,t.height??0),h=Math.max(l.width+s,(t.width??0)-u),f=[{x:0,y:0},{x:h+3*u/6,y:0},{x:h,y:-u},{x:-(3*u)/6,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=zt(t,{}),y=an(f),x=g.path(y,m);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=gu(o,h,u,f);return n&&d.attr("style",n),t.width=h,t.height=u,Vt(t,d),t.intersect=function(g){return $t.polygon(t,f,g)},o}async function Cle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=i,s=t.look==="neo"?i*2:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=Math.max(l.height+a,t.height??0),h=Math.max(l.width+s,(t.width??0)-u),f=[{x:-3*u/6,y:0},{x:h,y:0},{x:h+3*u/6,y:-u},{x:0,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=zt(t,{}),y=an(f),x=g.path(y,m);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=gu(o,h,u,f);return n&&d.attr("style",n),t.width=h,t.height=u,Vt(t,d),t.intersect=function(g){return $t.polygon(t,f,g)},o}function kle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",nr(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=st.svg(i),f=zt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=an(u),p=h.path(d,f),g=i.insert(()=>p,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-o})`),Vt(t,g),t.intersect=function(m){return fe.info("lightningBolt intersect",t,m),$t.polygon(t,u,m)},i}async function Sle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?24:i;if(t.width||t.height){let x=t.width??0;t.width=(t.width??0)-a,t.width<_oe&&(t.width=_oe);let T=x/2/(2.5+x/50);t.height=(t.height??0)-s-T*3,t.heightC,":first-child").attr("class","line"),m=o.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{let x=$Ye(0,0,h,p,f,d,g);m=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",wi(y)).attr("style",n)}return m.attr("label-offset-y",d),m.attr("transform",`translate(${-h/2}, ${-(p/2+d)})`),Vt(t,m),u.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(x){let b=$t.rect(t,x),T=b.x-(t.x??0);if(f!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-d)){let k=d*d*(1-T*T/(f*f));k>0&&(k=Math.sqrt(k)),k=d-k,x.y-(t.y??0)>0&&(k=-k),b.y+=k}return b},o}async function Ele(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i;if(t.width||t.height){let k=t.width;t.width=(k??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-s*2,t.height<10&&(t.height=10)}let{shapeSvg:o,bbox:l,label:u}=await tr(e,t,nr(t)),h=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(s??0)*2,d=t.look==="neo"?f/4:f/8,p=f+d,{cssStyles:g}=t,m=st.svg(o),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...bd(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,d,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],b=m.polygon(x.map(k=>[k.x,k.y]),y),T=o.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(0,${-d/2})`),u.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-f/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),Vt(t,T),t.intersect=function(k){return $t.polygon(t,x,k)},o}async function Ale(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*o,10),t.height=Math.max((t?.height??0)-s*2-2*o,10));let{shapeSvg:l,bbox:u,label:h}=await tr(e,t,nr(t)),f=(t?.width?t?.width:u.width)+a*2+2*o,d=(t?.height?t?.height:u.height)+s*2+2*o,p=f-2*o,g=d-2*o,m=-p/2,y=-g/2,{cssStyles:x}=t,b=st.svg(l),T=zt(t,{}),k=[{x:m-o,y:y+o},{x:m-o,y:y+g+o},{x:m+p-o,y:y+g+o},{x:m+p-o,y:y+g},{x:m+p,y:y+g},{x:m+p,y:y+g-o},{x:m+p+o,y:y+g-o},{x:m+p+o,y:y-o},{x:m+o,y:y-o},{x:m+o,y},{x:m,y},{x:m,y:y+o}],w=[{x:m,y:y+o},{x:m+p-o,y:y+o},{x:m+p-o,y:y+g},{x:m+p,y:y+g},{x:m+p,y},{x:m,y}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=an(k),S=b.path(C,T),E=an(w),L=b.path(E,T);t.look!=="handDrawn"&&(S=IN(S),L=IN(L));let N=l.insert("g",":first-child");return N.insert(()=>S),N.insert(()=>L),N.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),n&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",n),h.attr("transform",`translate(${-(u.width/2)-o-(u.x-(u.left??0))}, ${-(u.height/2)+o-(u.y-(u.top??0))})`),Vt(t,N),t.intersect=function(O){return $t.polygon(t,k,O)},l}async function _le(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await tr(e,t,nr(t)),o=t.padding??0,l=t.look==="neo"?16:o,u=t.look==="neo"?12:o,h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-u*3);let f=Math.max(a.width,t?.width??0)+l*2,d=Math.max(a.height,t?.height??0)+u*3,p=t.look==="neo"?d/4:d/8,g=d+(h?p/2:-p/2),m=-f/2,y=-g/2,x=10,{cssStyles:b}=t,T=bd(m-x,y+g+x,m+f-x,y+g+x,p,.8),k=T?.[T.length-1],w=[{x:m-x,y:y+x},{x:m-x,y:y+g+x},...T,{x:m+f-x,y:k.y-x},{x:m+f,y:k.y-x},{x:m+f,y:k.y-2*x},{x:m+f+x,y:k.y-2*x},{x:m+f+x,y:y-x},{x:m+x,y:y-x},{x:m+x,y},{x:m,y},{x:m,y:y+x}],C=[{x:m,y:y+x},{x:m+f-x,y:y+x},{x:m+f-x,y:k.y-x},{x:m+f,y:k.y-x},{x:m+f,y},{x:m,y}],S=st.svg(i),E=zt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=an(w),N=S.path(L,E),O=an(C),R=S.path(O,E),_=i.insert(()=>N,":first-child");return _.insert(()=>R),_.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-p/2-(a.y-(a.top??0))})`),Vt(t,_),t.intersect=function(D){return $t.polygon(t,w,D)},i}async function Rle(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n,t.useHtmlLabels||ea(It())||(t.centerLabel=!0);let{shapeSvg:s,bbox:o,label:l}=await tr(e,t,nr(t)),u=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-u/2,d=-h/2,{cssStyles:p}=t,g=st.svg(s),m=zt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=g.rectangle(f,d,u,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),p&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Vt(t,x),t.intersect=function(b){return $t.rect(t,b)},s}async function Lle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await tr(e,t,nr(t)),s=a.width+(t.padding??0),o=a.height+(t.padding??0),l=s+o,u=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=st.svg(i),g=zt(t,{}),m=GYe(0,0,l),y=p.path(m,g);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+u}, ${l/2})`),d&&f.attr("style",d)}else f=gu(i,l,l,h),f.attr("transform",`translate(${-l/2+u}, ${l/2})`);return n&&f.attr("style",n),Vt(t,f),t.calcIntersect=function(p,g){let m=p.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=$t.polygon(p,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(p){return this.calcIntersect(t,p)},i}async function Ile(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?21:i??0,s=t.look==="neo"?12:i??0,{shapeSvg:o,bbox:l,label:u}=await tr(e,t,nr(t)),h=l.width+(t.look==="neo"?a*2:a),f=Math.max(l.height+(t.look==="neo"?s*2:s),t.height??0),d=f/4,g=-Math.max(h,(t.width??0)-d)/2,m=-f/2,y=m/2,x=[{x:g+y,y:m},{x:g,y:0},{x:g+y,y:-m},{x:-g,y:-m},{x:-g,y:m}],{cssStyles:b}=t,T=st.svg(o),k=zt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let w=an(x),C=T.path(w,k),S=o.insert(()=>C,":first-child");return S.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-y/2},0)`),u.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,S),t.intersect=function(E){return $t.polygon(t,x,E)},o}async function Mle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i;t.cssClasses?i="node "+t.cssClasses:i="node default";let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=t.description,u=t.label,h=await pu(o,u,t.labelStyle,!0,!0),f={width:0,height:0};if(ea(ze())){let E=h.children[0],L=ct(h);f=E.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}fe.info("Text 2",l);let d=l||[],p=h.getBBox(),g=await pu(o,Array.isArray(d)?d.join("
    "):d,t.labelStyle,!0,!0),m=g.children[0],y=ct(g);f=m.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height);let x=(t.padding||0)/2;ct(g).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+x+5)+")"),ct(h).attr("transform","translate( "+(f.width(fe.debug("Rough node insert CXC",N),O),":first-child"),C=a.insert(()=>(fe.debug("Rough node insert CXC",N),N),":first-child")}else C=s.insert("rect",":first-child"),S=s.insert("line"),C.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-x).attr("y",-f.height/2-x).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),S.attr("class","divider").attr("x1",-f.width/2-x).attr("x2",f.width/2+x).attr("y1",-f.height/2-x+p.height+x).attr("y2",-f.height/2-x+p.height+x);return Vt(t,C),t.intersect=function(E){return $t.rect(t,E)},a}async function Dle(e,t,{config:{themeVariables:r}}){let n=r?.radius??5,i={rx:n,ry:n,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Jy(e,t,i)}async function Nle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:s,bbox:o,label:l}=await tr(e,t,nr(t)),u=(t?.width??o.width)+i*2+(t.look==="neo"?X0:X0*2),h=(t?.height??o.height)+a*2,f=u-X0,d=h,p=X0-u/2,g=-h/2,{cssStyles:m}=t,y=st.svg(s),x=zt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:p,y:g},{x:p+f,y:g},{x:p+f,y:g+d},{x:p-X0,y:g+d},{x:p-X0,y:g},{x:p,y:g},{x:p,y:g+d}],T=y.polygon(b.map(w=>[w.x,w.y]),x),k=s.insert(()=>T,":first-child");return k.attr("class","basic label-container outer-path").attr("style",wi(m)),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),l.attr("transform",`translate(${X0/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Vt(t,k),t.intersect=function(w){return $t.rect(t,w)},s}async function Ole(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-s*2,10));let{shapeSvg:o,bbox:l,label:u}=await tr(e,t,nr(t)),h=(t?.width?t?.width:l.width)+a*2,f=((t?.height?t?.height:l.height)+s*2)*1.5,d=h,p=f/1.5,g=-d/2,m=-p/2,{cssStyles:y}=t,x=st.svg(o),b=zt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let T=[{x:g,y:m},{x:g,y:m+p},{x:g+d,y:m+p},{x:g+d,y:m-p/2}],k=an(T),w=x.path(k,b),C=o.insert(()=>w,":first-child");return C.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",y),n&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",n),C.attr("transform",`translate(0, ${p/4})`),u.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-p/4+(t.padding??0)-(l.y-(l.top??0))})`),Vt(t,C),t.intersect=function(S){return $t.polygon(t,T,S)},o}async function Ple(e,t){let r=t.padding??0,n=t.look==="neo"?16:r*2,i=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??n,labelPaddingY:i};return Jy(e,t,a)}async function Ble(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?20:i,s=t.look==="neo"?12:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=l.height+(t.look==="neo"?s*2:s),h=l.width+u/4+(t.look==="neo"?a*2:a),f=u/2,{cssStyles:d}=t,p=st.svg(o),g=zt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:-h/2+f,y:-u/2},{x:h/2-f,y:-u/2},...du(-h/2+f,0,f,50,90,270),{x:h/2-f,y:u/2},...du(h/2-f,0,f,50,270,450)],y=an(m),x=p.path(y,g),b=o.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Vt(t,b),t.intersect=function(T){return $t.polygon(t,m,T)},o}async function $le(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Jy(e,t,r)}function Fle(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n;let{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l,nodeShadow:u}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=st.svg(h),d=zt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,t.width,{...d,stroke:s,strokeWidth:2}),g=o??l,m=(t.width??0)*5/14,y=f.circle(0,0,m,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>p,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),a&&x.selectAll("path").attr("style",a),i&&x.selectAll("path").attr("style",i),t.width<25&&u&&t.look!=="handDrawn"){let b=e.node()?.ownerSVGElement?.id??"",T=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${T})`)}return Vt(t,x),t.intersect=function(b){return $t.circle(t,(t.width??0)/2,b)},h}function zle(e,t,{config:{themeVariables:r}}){let{lineColor:n,nodeShadow:i}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s;if(t.look==="handDrawn"){let l=st.svg(a).circle(0,0,t.width,mae(n));s=a.insert(()=>l),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&i&&t.look!=="handDrawn"){let o=e.node()?.ownerSVGElement?.id??"",l=o?`${o}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${l})`)}return Vt(t,s),t.intersect=function(o){return $t.circle(t,(t.width??7)/2,o)},a}async function Gle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t?.padding??8,a=t.look==="neo"?28:i,s=t.look==="neo"?12:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=Math.max(l.width+2*Ky+a,t.width??0),h=Math.max(l.height+s,t.height??0),f=u-2*Ky,d=h,p=-u/2,g=-h/2,m=[{x:0,y:0},{x:f,y:0},{x:f,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){let y=st.svg(o),x=zt(t,{}),b=y.rectangle(p,g,f+16,d,x),T=y.line(p+Ky,g,p+Ky,g+d,x),k=y.line(p+Ky+f,g,p+Ky+f,g+d,x);o.insert(()=>T,":first-child"),o.insert(()=>k,":first-child");let w=o.insert(()=>b,":first-child"),{cssStyles:C}=t;w.attr("class","basic label-container").attr("style",wi(C)),Vt(t,w)}else{let y=gu(o,f,d,m);n&&y.attr("style",n),Vt(t,y)}return t.intersect=function(y){return $t.polygon(t,m,y)},o}async function qle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-s*2,10),t.width=Math.max((t?.width??0)-a*2-LN*(t.height+s*2),10));let{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=(t?.height?t?.height:l.height)+s*2,h=LN*u,f=LN*u,p=(t?.width?t?.width:l.width)+a*2+h-h,g=u,m=-p/2,y=-g/2,{cssStyles:x}=t,b=st.svg(o),T=zt(t,{}),k=[{x:m-h/2,y},{x:m+p+h/2,y},{x:m+p+h/2,y:y+g},{x:m-h/2,y:y+g}],w=[{x:m+p-h/2,y:y+g},{x:m+p+h/2,y:y+g},{x:m+p+h/2,y:y+g-f}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=an(k),S=b.path(C,T),E=an(w),L=b.path(E,{...T,fillStyle:"solid"}),N=o.insert(()=>L,":first-child");return N.insert(()=>S,":first-child"),N.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),n&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",n),Vt(t,N),t.intersect=function(O){return $t.polygon(t,k,O)},o}async function Vle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await tr(e,t,nr(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=l/8,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=t,g=st.svg(i),m=zt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-o/2-o/2*.1,y:d/2},...bd(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],x=-o/2+o/2*.1,b=-d/2-f*.4,T=[{x:x+o-h,y:(b+l)*1.3},{x:x+o,y:b+l-f},{x:x+o,y:(b+l)*.9},...bd(x+o,(b+l)*1.25,x+o-h,(b+l)*1.3,-l*.02,.5)],k=an(y),w=g.path(k,m),C=an(T),S=g.path(C,{...m,fillStyle:"solid"}),E=i.insert(()=>S,":first-child");return E.insert(()=>w,":first-child"),E.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-u/2-(a.y-(a.top??0))})`),Vt(t,E),t.intersect=function(L){return $t.polygon(t,y,L)},i}async function Wle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await tr(e,t,nr(t)),s=Math.max(a.width+(t.padding??0),t?.width||0),o=Math.max(a.height+(t.padding??0),t?.height||0),l=-s/2,u=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),Vt(t,h),t.intersect=function(f){return $t.rect(t,f)},i}async function Ule(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?12:i/2,s=t.height??0;if(t.height&&(t.height=t.height-a,t.heightk,":first-child"),m=o.insert(()=>T,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{let y=qYe(0,0,p,h,d,f);m=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",wi(g)).attr("style",n),m.attr("class","basic label-container outer-path"),g&&m.selectAll("path").attr("style",g),n&&m.selectAll("path").attr("style",n)}return m.attr("label-offset-x",d),m.attr("transform",`translate(${-p/2}, ${h/2} )`),u.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,m),t.intersect=function(y){let x=$t.rect(t,y),b=x.y-(t.y??0);if(f!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let T=d*d*(1-b*b/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=d-T,y.x-(t.x??0)>0&&(T=-T),x.x+=T}return x},o}async function Hle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=(t.look==="neo",i),s=t.look==="neo"?i*2:i,{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=Math.max(l.height+a,t.height??0),h=Math.max(l.width+s,(t.width??0)-u),f=[{x:-3*u/6,y:0},{x:h+3*u/6,y:0},{x:h,y:-u},{x:0,y:-u}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let g=st.svg(o),m=zt(t,{}),y=an(f),x=g.path(y,m);d=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${u/2})`),p&&d.attr("style",p)}else d=gu(o,h,u,f);return n&&d.attr("style",n),t.width=h,t.height=u,Vt(t,d),t.intersect=function(g){return $t.polygon(t,f,g)},o}async function Yle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-s*2,t.heightb,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),Vt(t,T),t.intersect=function(k){return $t.polygon(t,y,k)},u}async function Xle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.widthb,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",g),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),t.width=h,t.height=f,Vt(t,T),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${f/2-(o.height+(t.padding??0)/(u?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(k){return fe.info("Triangle intersect",t,p,k),$t.polygon(t,p,k)},s}async function jle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?12:i,o=!0;(t.width||t.height)&&(o=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-s*2,t.height<10&&(t.height=10));let{shapeSvg:l,bbox:u,label:h}=await tr(e,t,nr(t)),f=(t?.width?t?.width:u.width)+(a??0)*2,d=(t?.height?t?.height:u.height)+(s??0)*2,p=t.look==="neo"?d/4:d/8,g=d+(o?p:-p),{cssStyles:m}=t,x=14-f,b=x>0?x/2:0,T=st.svg(l),k=zt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let w=[{x:-f/2-b,y:g/2},...bd(-f/2-b,g/2,f/2+b,g/2,p,.8),{x:f/2+b,y:-g/2},{x:-f/2-b,y:-g/2}],C=an(w),S=T.path(C,k),E=l.insert(()=>S,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(u.x-(u.left??0))},${-d/2+(t.padding??0)-p-(u.y-(u.top??0))})`),Vt(t,E),t.intersect=function(L){return $t.polygon(t,w,L)},l}async function Kle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,s=t.look==="neo"?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let k=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-s-k*(20/9)),t.width=t.width-a*2}let{shapeSvg:o,bbox:l}=await tr(e,t,nr(t)),u=(t?.width?t?.width:l.width)+a*2,h=(t?.height?t?.height:l.height)+s,f=h/8,d=h+f*2,{cssStyles:p}=t,g=st.svg(o),m=zt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-u/2,y:d/2},...bd(-u/2,d/2,u/2,d/2,f,1),{x:u/2,y:-d/2},...bd(u/2,-d/2,-u/2,-d/2,f,-1)],x=an(y),b=g.path(x,m),T=o.insert(()=>b,":first-child");return T.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),Vt(t,T),t.intersect=function(k){return $t.polygon(t,y,k)},o}async function Zle(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-Ri,10),t.height=Math.max((t?.height??0)-a*2-Ri,10));let{shapeSvg:s,bbox:o,label:l}=await tr(e,t,nr(t)),u=(t?.width?t?.width:o.width)+i*2+Ri,h=(t?.height?t?.height:o.height)+a*2+Ri,f=u-Ri,d=h-Ri,p=-f/2,g=-d/2,{cssStyles:m}=t,y=st.svg(s),x=zt(t,{}),b=[{x:p-Ri,y:g-Ri},{x:p-Ri,y:g+d},{x:p+f,y:g+d},{x:p+f,y:g-Ri}],T=`M${p-Ri},${g-Ri} L${p+f},${g-Ri} L${p+f},${g+d} L${p-Ri},${g+d} L${p-Ri},${g-Ri} + M${p-Ri},${g} L${p+f},${g} + M${p},${g-Ri} L${p},${g+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=y.path(T,x),w=s.insert(()=>k,":first-child");return w.attr("transform",`translate(${Ri/2}, ${Ri/2})`),w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",n),l.attr("transform",`translate(${-(o.width/2)+Ri/2-(o.x-(o.left??0))}, ${-(o.height/2)+Ri/2-(o.y-(o.top??0))})`),Vt(t,w),t.intersect=function(C){return $t.polygon(t,b,C)},s}async function $N(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:n,themeVariables:i}=It(),{rowEven:a,rowOdd:s,nodeBorder:o,borderColorArray:l}=i;if(t.look==="handDrawn"){let{themeVariables:ne}=It(),{background:Q}=ne,pe={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Q}`]};await $N(e,pe)}let u=It();t.useHtmlLabels=u.htmlLabels;let h=u.er?.diagramPadding??10,f=u.er?.entityPadding??6,{cssStyles:d}=t,{labelStyles:p,nodeStyles:g}=Bt(t);if(r.attributes.length===0&&t.label){let ne={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5,classes:""};gs(t.label,u)+ne.labelPaddingX*20){let ne=x.width+h*2-(w+C+S+E);w+=ne/O,C+=ne/O,S>0&&(S+=ne/O),E>0&&(E+=ne/O)}let _=w+C+S+E,D=st.svg(y),I=zt(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let M=0;k.length>0&&(M=k.reduce((ne,Q)=>ne+(Q?.rowHeight??0),0));let B=Math.max(R.width+h*2,t?.width||0,_),P=Math.max((M??0)+x.height,t?.height||0),$=-B/2,G=-P/2;if(y.selectAll("g:not(:first-child)").each((ne,Q,pe)=>{let te=ct(pe[Q]),de=te.attr("transform"),ce=0,ue=0;if(de){let ve=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(de);ve&&(ce=parseFloat(ve[1]),ue=parseFloat(ve[2]),te.attr("class").includes("attribute-name")?ce+=w:te.attr("class").includes("attribute-keys")?ce+=w+C:te.attr("class").includes("attribute-comment")&&(ce+=w+C+S))}te.attr("transform",`translate(${$+h/2+ce}, ${ue+G+x.height+f/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(G+f/2)+")"),n!=null&&Doe.has(n)){let ne=r.colorIndex??0;y.attr("data-color-id",`color-${ne%l.length}`)}let q=D.rectangle($,G,B,P,I),z=y.insert(()=>q,":first-child").attr("class","outer-path").attr("style",d.join(""));T.push(0);for(let[ne,Q]of k.entries()){let te=(ne+1)%2===0&&Q.yOffset!==0,de=D.rectangle($,x.height+G+Q?.yOffset,B,Q?.rowHeight,{...I,fill:te?a:s,stroke:o});y.insert(()=>de,"g.label").attr("style",d.join("")).attr("class",`row-rect-${te?"even":"odd"}`)}let V=1e-4,j=Qy($,x.height+G,B+$,x.height+G,V),ee=D.polygon(j.map(ne=>[ne.x,ne.y]),I);if(y.insert(()=>ee).attr("class","divider"),j=Qy(w+$,x.height+G,w+$,P+G,V),ee=D.polygon(j.map(ne=>[ne.x,ne.y]),I),y.insert(()=>ee).attr("class","divider"),L){let ne=w+C+$;j=Qy(ne,x.height+G,ne,P+G,V),ee=D.polygon(j.map(Q=>[Q.x,Q.y]),I),y.insert(()=>ee).attr("class","divider")}if(N){let ne=w+C+S+$;j=Qy(ne,x.height+G,ne,P+G,V),ee=D.polygon(j.map(Q=>[Q.x,Q.y]),I),y.insert(()=>ee).attr("class","divider")}for(let ne of T){let Q=x.height+G+ne;j=Qy($,Q,B+$,Q,V),ee=D.polygon(j.map(pe=>[pe.x,pe.y]),I),y.insert(()=>ee).attr("class","divider")}if(Vt(t,z),g&&t.look!=="handDrawn")if(n!=null&&UYe.has(n))y.selectAll("path").attr("style",g);else{let Q=g.split(";")?.filter(pe=>pe.includes("stroke"))?.map(pe=>`${pe}`).join("; ");y.selectAll("path").attr("style",Q??""),y.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(ne){return $t.rect(t,ne)},y}async function Zy(e,t,r,n=0,i=0,a=[],s=""){let o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);t!==eu(t)&&(t=eu(t),t=t.replaceAll("<","<").replaceAll(">",">"));let l=o.node().appendChild(await Ra(o,t,{width:gs(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let u=l.getBBox();if(Ho(r.htmlLabels)){let h=l.children[0];h.style.textAlign="start";let f=ct(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}return u}function Qy(e,t,r,n,i){return e===r?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:r+i/2,y:n},{x:r-i/2,y:n}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:r,y:n+i/2},{x:r,y:n-i/2}]}async function Qle(e,t,r,n,i=r.class.padding??12){let a=n?0:3,s=e.insert("g").attr("class",nr(t)).attr("id",t.domId||t.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let b=t.annotations[0];await z2(o,{text:`\xAB${b}\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await z2(l,t,0,["font-weight: bolder"]);let g=l.node().getBBox();d=g.height,u=s.insert("g").attr("class","members-group text");let m=0;for(let b of t.members){let T=await z2(u,b,m,[b.parseClassifier()]);m+=T+a}p=u.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(let b of t.methods){let T=await z2(h,b,y,[b.parseClassifier()]);y+=T+a}let x=s.node().getBBox();if(o!==null){let b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${f})`),x=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+i*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+i*4:i*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}async function z2(e,t,r,n=[]){let i=e.insert("g").attr("class","label").attr("style",n.join("; ")),a=It(),s="useHtmlLabels"in t?t.useHtmlLabels:Ho(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),hi(o)&&(s=!0);let l=await Ra(i,MS(sc(o)),{width:gs(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,h=1;if(s){let f=l.children[0],d=ct(l);h=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("").length-1),await NN(f),u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return i.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function Jle(e,t){let r=ze(),{themeVariables:n}=r,{useGradient:i}=n,a=r.class.padding??12,s=a,o=t.useHtmlLabels??Ho(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];let{shapeSvg:u,bbox:h}=await Qle(e,t,r,o,s),{labelStyles:f,nodeStyles:d}=Bt(t);t.labelStyle=f,t.cssStyles=l.styles||"";let p=l.styles?.join(";")||d||"";t.cssStyles||(t.cssStyles=p.replaceAll("!important","").split(";"));let g=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=st.svg(u),y=zt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=Math.max(t.width??0,h.width),b=Math.max(t.height??0,h.height),T=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=s:l.members.length>0&&l.methods.length===0&&(b+=s*2);let k=-x/2,w=-b/2,C=g?a*2:l.members.length===0&&l.methods.length===0?-a:0;T&&(C=a*2);let S=m.rectangle(k-a,w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0),x+2*a,b+2*a+C,y),E=u.insert(()=>S,":first-child");E.attr("class","basic label-container outer-path");let L=E.node().getBBox(),N=u.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,O=u.select(".label-group").node().getBBox().height-(g?a/2:0)||0,R=u.select(".members-group").node().getBBox().height-(g?a/2:0)||0,_=(N+O+w+a-(w-a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(u.selectAll(".text").each((D,I,M)=>{let B=ct(M[I]),P=B.attr("transform"),$=0;if(P){let V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);V&&($=parseFloat(V[2]))}let G=$+w+a-(g?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(B.attr("class").includes("methods-group")){let z=Math.max(R,s/2);T?G=Math.max(_,N+O+z+w+s*2+a)+s*2:G=N+O+z+w+s*4+a}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?G=$-s:G=$),o||(G-=4);let q=k;(B.attr("class").includes("label-group")||B.attr("class").includes("annotation-group"))&&(q=-B.node()?.getBBox().width/2||0,u.selectAll("text").each(function(z,V,j){window.getComputedStyle(j[V]).textAnchor==="middle"&&(q=0)})),B.attr("transform",`translate(${q}, ${G})`)}),l.members.length>0||l.methods.length>0||g){let D=N+O+w+a,I=m.line(L.x,D,L.x+L.width,D+.001,y);u.insert(()=>I).attr("class",`divider${t.look==="neo"&&!i?" neo-line":""}`).attr("style",p)}if(g||l.members.length>0||l.methods.length>0){let D=N+O+R+w+s*2+a,I=m.line(L.x,T?Math.max(_,D):D,L.x+L.width,(T?Math.max(_,D):D)+.001,y);u.insert(()=>I).attr("class",`divider${t.look==="neo"&&!i?" neo-line":""}`).attr("style",p)}if(l.look!=="handDrawn"&&u.selectAll("path").attr("style",p),E.select(":nth-child(2)").attr("style",p),u.selectAll(".divider").select("path").attr("style",p),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",p),!o){let D=RegExp(/color\s*:\s*([^;]*)/),I=D.exec(p);if(I){let M=I[0].replace("color","fill");u.selectAll("tspan").attr("style",M)}else if(f){let M=D.exec(f);if(M){let B=M[0].replace("color","fill");u.selectAll("tspan").attr("style",B)}}}return Vt(t,E),t.intersect=function(D){return $t.rect(t,D)},u}async function ece(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let i=t,a=t,s=20,o=20,l="verifyMethod"in t,u=nr(t),h=ze(),{themeVariables:f}=h,{borderColorArray:d,requirementEdgeLabelBackground:p}=f,g=h.layout==="elk"?"start":"center",m=e.insert("g").attr("class",u).attr("id",t.domId??t.id),y;l?y=await fu(m,`<<${i.type}>>`,0,t.labelStyle):y=await fu(m,"<<Element>>",0,t.labelStyle);let x=y,b=await fu(m,i.name,x,t.labelStyle+"; font-weight: bold;");if(x+=b+o,l){let O=await fu(m,`${i.requirementId?`ID: ${i.requirementId}`:""}`,x,t.labelStyle,g);x+=O;let R=await fu(m,`${i.text?`Text: ${i.text}`:""}`,x,t.labelStyle,g);x+=R;let _=await fu(m,`${i.risk?`Risk: ${i.risk}`:""}`,x,t.labelStyle,g);x+=_,await fu(m,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,x,t.labelStyle,g)}else{let O=await fu(m,`${a.type?`Type: ${a.type}`:""}`,x,t.labelStyle,g);x+=O,await fu(m,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,x,t.labelStyle,g)}let T=(m.node()?.getBBox().width??200)+s,k=(m.node()?.getBBox().height??200)+s,w=-T/2,C=-k/2,S=st.svg(m),E=zt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=S.rectangle(w,C,T,k,E),N=m.insert(()=>L,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",n),d?.length){let O=t.colorIndex??0;m.attr("data-color-id",`color-${O%d.length}`)}if(m.selectAll(".label").each((O,R,_)=>{let D=ct(_[R]),I=D.attr("transform"),M=0,B=0;if(I){let q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);q&&(M=parseFloat(q[1]),B=parseFloat(q[2]))}let P=B-k/2,$=w+s/2;(R===0||R===1)&&($=M),D.attr("transform",`translate(${$}, ${P+s})`)}),x>y+b+o){let O=C+y+b+o,R;if(t.look==="neo"){let I=[[w,O],[w+T,O],[w+T,O+.001],[w,O+.001]];R=S.polygon(I,E)}else R=S.line(w,O,w+T,O,E);m.insert(()=>R).attr("class","divider")}return Vt(t,N),t.intersect=function(O){return $t.rect(t,O)},n&&t.look!=="handDrawn"&&(p||d?.length)&&m.selectAll("path").attr("style",n),m}async function fu(e,t,r,n="",i="center"){if(t==="")return 0;let a=e.insert("g").attr("class","label").attr("style",n),s=ze(),o=s.htmlLabels??!0,l=await Ra(a,MS(sc(t)),{width:gs(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:n},s),u;if(o){let h=l.children[0],f=ct(l);i==="start"&&ct(h).style("text-align","left"),u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{let h=l.children[0];for(let f of h.children)n&&f.setAttribute("style",n);if(i==="start"){h.setAttribute("text-anchor","start");for(let f of h.children)f.setAttribute("text-anchor","start")}u=l.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}async function tce(e,t,{config:r}){let{labelStyles:n,nodeStyles:i}=Bt(t);t.labelStyle=n||"";let a=10,s=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await tr(e,t,nr(t)),h=t.padding||10,f="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,m;d?{label:g,bbox:m}=await EN(d,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await EN(o,"ticket"in t&&t.ticket||"",p);let{label:y,bbox:x}=await EN(o,"assigned"in t&&t.assigned||"",p);t.width=s;let b=10,T=t?.width||0,k=Math.max(m.height,x.height)/2,w=Math.max(l.height+b*2,t?.height||0)+k,C=-T/2,S=-w/2;u.attr("transform","translate("+(h-T/2)+", "+(-k-l.height/2)+")"),g.attr("transform","translate("+(h-T/2)+", "+(-k+l.height/2)+")"),y.attr("transform","translate("+(h+T/2-x.width-2*a)+", "+(-k+l.height/2)+")");let E,{rx:L,ry:N}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){let R=st.svg(o),_=zt(t,{}),D=L||N?R.path(Qo(C,S,T,w,L||0),_):R.rectangle(C,S,T,w,_);E=o.insert(()=>D,":first-child"),E.attr("class","basic label-container").attr("style",O||null)}else{E=o.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",i).attr("rx",L??5).attr("ry",N??5).attr("x",C).attr("y",S).attr("width",T).attr("height",w);let R="priority"in t&&t.priority;if(R){let _=o.append("line"),D=C+2,I=S+Math.floor((L??0)/2),M=S+w-Math.floor((L??0)/2);_.attr("x1",D).attr("y1",I).attr("x2",D).attr("y2",M).attr("stroke-width","4").attr("stroke",HYe(R))}}return Vt(t,E),t.height=w,t.intersect=function(R){return $t.rect(t,R)},o}async function rce(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await tr(e,t,nr(t)),l=a.width+10*s,u=a.height+8*s,h=.15*l,{cssStyles:f}=t,d=a.width+20,p=a.height+20,g=Math.max(l,d),m=Math.max(u,p);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y,x=`M0 0 a${h},${h} 1 0,0 ${g*.25},${-1*m*.1} a${h},${h} 1 0,0 ${g*.25},0 a${h},${h} 1 0,0 ${g*.25},0 @@ -500,7 +474,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33} a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34} a${h},${h} 1 0,0 ${g*.1},${-1*m*.33} - H0 V0 Z`;if(t.look==="handDrawn"){let x=st.svg(n),T=Gt(t,{}),C=x.path(v,T);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",An(f))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",v);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Wt(t,y),t.calcIntersect=function(x,T){return Pt.rect(x,T)},t.intersect=function(x){return ee.info("Bang intersect",t,x),Pt.rect(t,x)},n}async function cse(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await or(e,t,ir(t)),l=a.width+2*s,u=a.height+2*s,h=.15*l,f=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=t,m,y=`M0 0 + H0 V0 Z`;if(t.look==="handDrawn"){let b=st.svg(i),T=zt(t,{}),k=b.path(x,T);y=i.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",wi(f))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Vt(t,y),t.calcIntersect=function(b,T){return $t.rect(b,T)},t.intersect=function(b){return fe.info("Bang intersect",t,b),$t.rect(t,b)},i}async function nce(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await tr(e,t,nr(t)),l=a.width+2*s,u=a.height+2*s,h=.15*l,f=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=t,m,y=`M0 0 a${h},${h} 0 0,1 ${l*.25},${-1*l*.1} a${d},${d} 1 0,1 ${l*.4},${-1*l*.1} a${f},${f} 1 0,1 ${l*.35},${l*.2} @@ -514,7 +488,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error a${h},${h} 1 0,1 ${-1*l*.1},${-1*u*.35} a${p},${p} 1 0,1 ${l*.1},${-1*u*.65} - H0 V0 Z`;if(t.look==="handDrawn"){let v=st.svg(n),x=Gt(t,{}),T=v.path(y,x);m=n.insert(()=>T,":first-child"),m.attr("class","basic label-container").attr("style",An(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-u/2})`),Wt(t,m),t.calcIntersect=function(v,x){return Pt.rect(v,x)},t.intersect=function(v){return ee.info("Cloud intersect",t,v),Pt.rect(t,v)},n}async function use(e,t){let{labelStyles:r,nodeStyles:i}=Ot(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await or(e,t,ir(t)),l=a.width+8*s,u=a.height+2*s,h=5,f=t.look==="neo"?` + H0 V0 Z`;if(t.look==="handDrawn"){let x=st.svg(i),b=zt(t,{}),T=x.path(y,b);m=i.insert(()=>T,":first-child"),m.attr("class","basic label-container").attr("style",wi(g))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-u/2})`),Vt(t,m),t.calcIntersect=function(x,b){return $t.rect(x,b)},t.intersect=function(x){return fe.info("Cloud intersect",t,x),$t.rect(t,x)},i}async function ice(e,t){let{labelStyles:r,nodeStyles:n}=Bt(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await tr(e,t,nr(t)),l=a.width+8*s,u=a.height+2*s,h=5,f=t.look==="neo"?` M${-l/2} ${u/2-h} v${-u+2*h} q0,-${h} ${h},-${h} @@ -534,47 +508,78 @@ Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error h${-(l-2*h)} q${-h},0 ${-h},${-h} Z - `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",f);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",u/2).attr("x2",l/2).attr("y2",u/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),Wt(t,d),t.calcIntersect=function(p,g){return Pt.rect(p,g)},t.intersect=function(p){return Pt.rect(t,p)},n}async function hse(e,t){let r={padding:t.padding??0};return u9(e,t,r)}function f9(e){return e in fse}async function r0(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?fse[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return i.attr("data-look",An(t.look)),t.tooltip&&n.attr("title",t.tooltip),C5.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var or,a9,Wt,ir,bGe,e1,xGe,ah,Bf,Une,TGe,wGe,kGe,CGe,SGe,EGe,Hne,t1,Yne,AGe,Kne,_Ge,LGe,RGe,Pt,k5,IGe,DGe,NGe,Mne,One,Pne,Bne,MGe,OGe,PGe,BGe,Fne,$ne,FGe,t0,Zm,s9,$Ge,zGe,GGe,zne,Gne,qne,Vne,an,Wne,qGe,VGe,WGe,UGe,fse,C5,dse,pse,Sb,Is=q(()=>{ts();rs();ya();$r();Er();er();Ar();Ar();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();Ar();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();qt();Ar();Ar();qt();Ar();qt();Ar();qt();qt();qt();or=b(async(e,t,r)=>{let i,n=t.useHtmlLabels||vl(we()?.htmlLabels);r?i=r:i="node default";let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",An(t.labelStyle)),o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];let l=!!t.icon||!!t.img,u=t.labelType==="markdown",h=await zn(s,mr(lo(o),we()),{useHtmlLabels:n,width:t.width||we().flowchart?.wrappingWidth,classes:u?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:u},we()),f=h.getBBox(),d=(t?.padding??0)/2;if(n){let p=h.children[0],g=Qe(h);await fb(p,o),f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return n?s.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):s.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:f,halfPadding:d,label:s}},"labelHelper"),a9=b(async(e,t,r)=>{let i=r.useHtmlLabels??Hr(we()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await zn(n,mr(lo(t),we()),{useHtmlLabels:i,width:r.width||we()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2;if(Hr(we())){let l=a.children[0],u=Qe(a);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),Wt=b((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ir=b((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");b(Vr,"createPathFromPoints");b(Pf,"generateFullSineWavePoints");b(Cb,"generateCirclePoints");b(o9,"mergePaths");bGe=b((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,u;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,u=o):(n<0&&(s=-s),l=s,u=n===0?0:s*a/n),{x:r+l,y:i+u}},"intersectRect"),e1=bGe,xGe=b(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let s=we(),o=Hr(s);return await zn(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},s)},"createLabel"),ah=xGe,Bf=b((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Une=b(async(e,t)=>{ee.info("Creating subgraph rect for ",t.id,t);let r=we(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Ot(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=Hr(r),p=f.insert("g").attr("class","cluster-label "),g;t.labelType==="markdown"?g=await zn(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):g=await ah(p,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Hr(r)){let E=g.children[0],A=Qe(g);m=E.getBoundingClientRect(),A.attr("width",m.width),A.attr("height",m.height)}let y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,x=t.x-y/2,T=t.y-v/2;ee.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){let E=st.svg(f),A=Gt(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),N=E.path(Bf(x,T,y,v,0),A);C=f.insert(()=>(ee.debug("Rough node insert CXC",N),N),":first-child"),C.select("path:nth-child(2)").attr("style",u.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=f.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",T).attr("width",y).attr("height",v);let{subGraphTitleTopMargin:w}=rh(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),o){let E=p.select("span");E&&E.attr("style",o)}let k=C.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return e1(t,E)},{cluster:f,labelBBox:m}},"rect"),TGe=b((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");let s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return e1(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),wGe=b(async(e,t)=>{let r=we(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=await ah(f,t.label,t.labelStyle,void 0,!0),g=p.getBBox();if(Hr(r)){let N=p.children[0],P=Qe(p);g=N.getBoundingClientRect(),P.attr("width",g.width),P.attr("height",g.height)}let m=0*t.padding,y=m/2,v=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+m,T=t.height+m-g.height-6,C=t.x-v/2,w=t.y-x/2;t.width=v;let k=t.y-t.height/2-y+g.height+2,E;if(t.look==="handDrawn"){let N=t.cssClasses.includes("statediagram-cluster-alt"),P=st.svg(u),O=t.rx||t.ry?P.path(Bf(C,w,v,x,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):P.rectangle(C,w,v,x,{seed:n});E=u.insert(()=>O,":first-child");let L=P.rectangle(C,k,v,T,{fill:N?a:s,fillStyle:N?"hachure":"solid",stroke:l,seed:n});E=u.insert(()=>O,":first-child"),d=u.insert(()=>L)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",C).attr("y",w).attr("width",v).attr("height",x).attr("data-look",t.look),d.attr("class","inner").attr("x",C).attr("y",k).attr("width",v).attr("height",T);f.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Hr(r)?0:3)})`);let A=E.node().getBBox();return t.height=A.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(N){return e1(t,N)},{cluster:u,labelBBox:g}},"roundedWithTitle"),kGe=b(async(e,t)=>{ee.info("Creating subgraph rect for ",t.id,t);let r=we(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Ot(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=Hr(r),p=f.insert("g").attr("class","cluster-label "),g=await zn(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}),m=g.getBBox();if(Hr(r)){let E=g.children[0],A=Qe(g);m=E.getBoundingClientRect(),A.attr("width",m.width),A.attr("height",m.height)}let y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,x=t.x-y/2,T=t.y-v/2;ee.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){let E=st.svg(f),A=Gt(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),N=E.path(Bf(x,T,y,v,t.rx),A);C=f.insert(()=>(ee.debug("Rough node insert CXC",N),N),":first-child"),C.select("path:nth-child(2)").attr("style",u.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=f.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",T).attr("width",y).attr("height",v);let{subGraphTitleTopMargin:w}=rh(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),o){let E=p.select("span");E&&E.attr("style",o)}let k=C.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return e1(t,E)},{cluster:f,labelBBox:m}},"kanbanSection"),CGe=b((e,t)=>{let r=we(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,u=t.width+l;t.diff=-t.padding;let h=t.height+l,f=t.x-u/2,d=t.y-h/2;t.width=u;let p;if(t.look==="handDrawn"){let y=st.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});p=s.insert(()=>y,":first-child")}else{p=o.insert("rect",":first-child");let m="outer";t.look,m="divider",p.attr("class",m).attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",t.look)}let g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return e1(t,m)},{cluster:s,labelBBox:{}}},"divider"),SGe=Une,EGe={rect:Une,squareRect:SGe,roundedWithTitle:wGe,noteGroup:TGe,divider:CGe,kanbanSection:kGe},Hne=new Map,t1=b(async(e,t)=>{let r=t.shape||"rect",i=await EGe[r](e,t);return Hne.set(t.id,i),i},"insertCluster"),Yne=b(()=>{Hne=new Map},"clear");b(jne,"intersectNode");AGe=jne;b(Xne,"intersectEllipse");Kne=Xne;b(Zne,"intersectCircle");_Ge=Zne;b(Qne,"intersectLine");b(l9,"sameSign");LGe=Qne;b(Jne,"intersectPolygon");RGe=Jne,Pt={node:AGe,circle:_Ge,ellipse:Kne,polygon:RGe,rect:e1};b(eae,"anchor");b(c9,"generateArcPoints");b(tae,"calculateArcSagitta");b(rae,"bowTieRect");b(sh,"insertPolygonShape");k5=12;b(iae,"card");b(nae,"choice");b(u9,"circle");b(aae,"createLine");b(sae,"crossedCircle");b(ih,"generateCirclePoints");b(oae,"curlyBraceLeft");b(nh,"generateCirclePoints");b(lae,"curlyBraceRight");b(va,"generateCirclePoints");b(cae,"curlyBraces");b(uae,"curvedTrapezoid");IGe=b((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),DGe=b((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),NGe=b((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Mne=8,One=8;b(hae,"cylinder");b(r1,"drawRect");b(fae,"datastore");b(dae,"dividedRectangle");b(pae,"doublecircle");b(gae,"filledCircle");Pne=10,Bne=10;b(mae,"flippedTriangle");b(yae,"forkJoin");b(vae,"halfRoundedRectangle");MGe=b((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");b(bae,"hexagon");b(xae,"hourglass");b(Tae,"icon");b(wae,"iconCircle");b(kae,"iconRounded");b(Cae,"iconSquare");b(Sae,"imageSquare");b(Eae,"inv_trapezoid");b(Aae,"labelRect");b(_ae,"lean_left");b(Lae,"lean_right");b(Rae,"lightningBolt");OGe=b((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),PGe=b((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),BGe=b((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Fne=10,$ne=10;b(Iae,"linedCylinder");b(Dae,"linedWaveEdgedRect");b(Nae,"multiRect");b(Mae,"multiWaveEdgedRectangle");b(Oae,"note");FGe=b((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");b(Pae,"question");b(Bae,"rect_left_inv_arrow");b(Fae,"rectWithTitle");b($ae,"roundedRect");t0=8;b(zae,"shadedProcess");b(Gae,"slopedRect");b(qae,"squareRect");b(Vae,"stadium");b(Wae,"state");b(Uae,"stateEnd");b(Hae,"stateStart");Zm=8;b(Yae,"subroutine");s9=.2;b(jae,"taggedRect");b(Xae,"taggedWaveEdgedRectangle");b(Kae,"text");$Ge=b((e,t,r,i,n,a)=>`M${e},${t} - a${n},${a} 0,0,1 0,${-i} + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",f);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",u/2).attr("x2",l/2).attr("y2",u/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>o.node()),Vt(t,d),t.calcIntersect=function(p,g){return $t.rect(p,g)},t.intersect=function(p){return $t.rect(t,p)},i}async function ace(e,t){let r={padding:t.padding??0};return BN(e,t,r)}function FN(e){return e in G2}var xYe,bYe,Toe,TYe,wYe,tr,EN,Vt,nr,CYe,Td,Qo,kYe,pu,SYe,Poe,EYe,AYe,_Ye,$t,AN,_N,RYe,RN,LYe,PN,IYe,MYe,woe,DYe,OE,NYe,OYe,PYe,Coe,koe,Soe,Eoe,BYe,$Ye,FYe,zYe,Aoe,_oe,GYe,X0,Ky,LN,qYe,VYe,WYe,Roe,Loe,Ioe,Moe,Ri,Doe,UYe,HYe,YYe,XYe,G2,Li=X(()=>{ta();Wi();Vi();Ur();hr();ur();Yt();zr();zr();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();zr();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();Wt();zr();zr();Wt();zr();Wt();zr();Wt();Wt();Wt();xYe=1,bYe=3;v(NN,"configureLabelImages");v(ON,"hasTextBesidesImages");Toe=3,TYe=32,wYe=v(async(e,t,r)=>{let n=ze(),i=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=i.insert("g").attr("class","label").attr("style",wi(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),l=t.width?Math.max(t.width-2*(t.padding??0),TYe):ze().flowchart?.wrappingWidth??200,h=n.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,f=await Promise.all(o.map(async x=>{let b=a.append("g").attr("class",x.cssClass),T=await Ra(b,Cr(sc(x.text??""),n),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},n);return ct(T).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),ct(T).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:b,box:b.node().getBBox()}})),d=Math.max(...f.map(({box:x})=>x.width),0),p=0;for(let{el:x,box:b}of f)x.attr("transform",`translate(${d/2-b.x-b.width/2}, ${p-b.y})`),p+=b.height+Toe;let g=f.length>0?p-Toe:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-d/2}, ${-g/2})`);let m=a.node().getBBox(),y=(t.padding??0)/2;return{shapeSvg:i,bbox:m,halfPadding:y,label:a}},"c4LabelHelper"),tr=v(async(e,t,r)=>{if(t.stereotype!==void 0)return wYe(e,t,r);let n,i=t.useHtmlLabels||Ho(ze()?.htmlLabels);r?n=r:n="node default";let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",wi(t.labelStyle)),o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];let l=!!t.icon||!!t.img,u=t.labelType==="markdown",h=await Ra(s,Cr(sc(o),ze()),{useHtmlLabels:i,width:t.width||t.wrappingWidth||ze().flowchart?.wrappingWidth,classes:u?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:u},ze()),f=(t?.padding??0)/2,d;if(i){let p=h.children[0],g=ct(h);await NN(p),d=await $h.measure(()=>p.getBoundingClientRect()),g.attr("width",d.width),g.attr("height",d.height)}else d=await $h.measure(()=>h.getBBox());return i?s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):s.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:f,label:s}},"labelHelper"),EN=v(async(e,t,r)=>{let n=r.useHtmlLabels??ea(ze()),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ra(i,Cr(sc(t),ze()),{useHtmlLabels:n,width:r.width||ze()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=r.padding/2,o;if(ea(ze())){let l=a.children[0],u=ct(a);o=await $h.measure(()=>l.getBoundingClientRect()),u.attr("width",o.width),u.attr("height",o.height)}else o=await $h.measure(()=>a.getBBox());return n?i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):i.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:i}},"insertLabel"),Vt=v((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}let n=t.node().getBBox();e.width=n.width,e.height=n.height},"updateNodeBounds"),nr=v((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");v(an,"createPathFromPoints");v(bd,"generateFullSineWavePoints");v(du,"generateCirclePoints");v(IN,"mergePaths");CYe=v((e,t)=>{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,o=e.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),Td=CYe,Qo=v((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD"),kYe=v(async(e,t,r,n=!1,i=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let s=ze(),o=ea(s);return await Ra(e,a,{style:r,isTitle:n,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},s)},"createLabel"),pu=kYe;v(Noe,"intersectNode");SYe=Noe;v(Ooe,"intersectEllipse");Poe=Ooe;v(Boe,"intersectCircle");EYe=Boe;v($oe,"intersectLine");v(MN,"sameSign");AYe=$oe;v(Foe,"intersectPolygon");_Ye=Foe,$t={node:SYe,circle:EYe,ellipse:Poe,polygon:_Ye,rect:Td};v(zoe,"anchor");v(DN,"generateArcPoints");v(Goe,"calculateArcSagitta");v(qoe,"bowTieRect");v(Voe,"bucket");AN=20,_N=8,RYe=80,RN=8;v(Woe,"collapsedGroup");v(gu,"insertPolygonShape");LYe=["right","left","up","down"],PN="point",IYe=v(e=>{let t=new Set;for(let r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),MYe=v(e=>LYe.filter(t=>e.has(t)).join("|")||PN,"getDirectionKey"),woe={"right|left|up|down":v(({height:e,midpoint:t,padding:r,width:n})=>[{x:0,y:0},{x:t,y:0},{x:n/2,y:2*r},{x:n-t,y:0},{x:n,y:0},{x:n,y:-e/3},{x:n+2*r,y:-e/2},{x:n,y:-2*e/3},{x:n,y:-e},{x:n-t,y:-e},{x:n/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":v(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":v(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":v(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":v(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":v(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:0},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":v(({height:e,midpoint:t,padding:r,width:n})=>[{x:n/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:n/2,y:-e},{x:n,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r},{x:n,y:-r}],"up|down"),"right|up":v(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":v(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":v(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":v(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:v(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:-r},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:v(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:0},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:v(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:n/2,y:-e},{x:n,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r}],"up"),down:v(({height:e,midpoint:t,padding:r,width:n})=>[{x:n/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r},{x:n,y:-r}],"down"),[PN]:()=>[{x:0,y:0}]},DYe=v((e,t,r,n)=>{let i=IYe(e),a=(r.padding??0)/2,s=t.height+4*a,o=s/2,l=n??t.width+2*o+2*a,u=MYe(i);return(woe[u]??woe[PN])({height:s,midpoint:o,padding:a,width:l})},"getArrowPoints");v(Uoe,"block_arrow");v(Hoe,"browser");OE=12;v(Yoe,"card");v(Xoe,"choice");v(BN,"circle");v(joe,"composite");v(Koe,"consoleWindow");v(Zoe,"createLine");v(Qoe,"crossedCircle");v(Fh,"generateCirclePoints");v(Joe,"curlyBraceLeft");v(zh,"generateCirclePoints");v(ele,"curlyBraceRight");v(Ka,"generateCirclePoints");v(tle,"curlyBraces");v(rle,"curvedTrapezoid");v(nle,"person");NYe=v((e,t,r,n,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),OYe=v((e,t,r,n,i,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),PYe=v((e,t,r,n,i,a)=>[`M${e-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Coe=8,koe=8;v(ile,"cylinder");v(Jy,"drawRect");v(ale,"datastore");v(sle,"dividedRectangle");v(ole,"doublecircle");v(lle,"filledCircle");Soe=10,Eoe=10;v(cle,"flippedTriangle");v(ule,"folder");v(hle,"forkJoin");v(fle,"halfRoundedRectangle");BYe=v((e,t,r,n,i)=>[`M${e+i},${t}`,`L${e+r-i},${t}`,`L${e+r},${t-n/2}`,`L${e+r-i},${t-n}`,`L${e+i},${t-n}`,`L${e},${t-n/2}`,"Z"].join(" "),"createHexagonPathD");v(dle,"hexagon");v(ple,"hourglass");v(gle,"icon");v(mle,"iconCircle");v(yle,"iconRounded");v(vle,"iconSquare");v(xle,"imageSquare");v(ble,"inv_trapezoid");v(Tle,"labelRect");v(wle,"lean_left");v(Cle,"lean_right");v(kle,"lightningBolt");$Ye=v((e,t,r,n,i,a,s)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),FYe=v((e,t,r,n,i,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),zYe=v((e,t,r,n,i,a)=>[`M${e-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Aoe=10,_oe=10;v(Sle,"linedCylinder");v(Ele,"linedWaveEdgedRect");v(Ale,"multiRect");v(_le,"multiWaveEdgedRectangle");v(Rle,"note");GYe=v((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");v(Lle,"question");v(Ile,"rect_left_inv_arrow");v(Mle,"rectWithTitle");v(Dle,"roundedRect");X0=8;v(Nle,"shadedProcess");v(Ole,"slopedRect");v(Ple,"squareRect");v(Ble,"stadium");v($le,"state");v(Fle,"stateEnd");v(zle,"stateStart");Ky=8;v(Gle,"subroutine");LN=.2;v(qle,"taggedRect");v(Vle,"taggedWaveEdgedRectangle");v(Wle,"text");qYe=v((e,t,r,n,i,a)=>`M${e},${t} + a${i},${a} 0,0,1 0,${-n} l${r},0 - a${n},${a} 0,0,1 0,${i} - M${r},${-i} - a${n},${a} 0,0,0 0,${i} - l${-r},0`,"createCylinderPathD"),zGe=b((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),GGe=b((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),zne=5,Gne=10;b(Zae,"tiltedCylinder");b(Qae,"trapezoid");b(Jae,"trapezoidalPentagon");qne=10,Vne=10;b(ese,"triangle");b(tse,"waveEdgedRectangle");b(rse,"waveRectangle");an=10;b(ise,"windowPane");Wne=new Set(["redux-color","redux-dark-color"]),qGe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);b(h9,"erBox");b(Qm,"addText");b(Jm,"lineToPolygon");b(nse,"textHelper");b(kb,"addText");b(ase,"classBox");b(sse,"requirementBox");b(Bc,"addText");VGe=b(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");b(ose,"kanbanItem");b(lse,"bang");b(cse,"cloud");b(use,"defaultMindmapNode");b(hse,"mindmapCircle");WGe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:qae},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:$ae},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Vae},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Yae},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:hae},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:fae},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:u9},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lse},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:cse},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Pae},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:bae},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Lae},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_ae},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Qae},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Eae},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:pae},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Kae},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:iae},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zae},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Hae},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Uae},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yae},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:xae},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:oae},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lae},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:cae},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Rae},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:tse},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vae},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Zae},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Iae},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:uae},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dae},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ese},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ise},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:gae},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jae},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:mae},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Gae},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Mae},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Nae},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:rae},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:sae},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Xae},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:jae},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rse},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Bae},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Dae}],UGe=b(()=>{let t=[...Object.entries({state:Wae,choice:nae,note:Oae,rectWithTitle:Fae,labelRect:Aae,iconSquare:Cae,iconCircle:wae,icon:Tae,iconRounded:kae,imageSquare:Sae,anchor:eae,kanbanItem:ose,mindmapCircle:hse,defaultMindmapNode:use,classBox:ase,erBox:h9,requirementBox:sse}),...WGe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),fse=UGe();b(f9,"isValidShape");C5=new Map;b(r0,"insertNode");dse=b((e,t)=>{C5.set(t.id,e)},"setNodeElem"),pse=b(()=>{C5.clear()},"clear"),Sb=b(e=>{let t=C5.get(e.id);ee.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode")});function Ab(e,t){Hr(we())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function bse(e){let t=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}function xse(e,t){if(e.length<2)return"";let r="",i=e.length,n=1e-5;for(let a=0;a({...n}));if(e.length>=2&&ga[t.arrowTypeStart]){let n=ga[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=d9(a,s),l=n*Math.cos(o),u=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+u}let i=e.length;if(i>=2&&ga[t.arrowTypeEnd]){let n=ga[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=d9(s,a),l=n*Math.cos(o),u=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-u}return r}var HGe,YGe,jGe,gse,XGe,S5,ba,vse,Eb,E5,A5,KGe,ZGe,mse,yse,QGe,JGe,_5,eqe,tqe,rqe,iqe,nqe,aqe,sqe,oqe,lqe,cqe,uqe,hqe,fqe,dqe,pqe,gqe,mqe,yqe,vqe,bqe,xqe,Tqe,wqe,kqe,L5,Fo=q(()=>{oo();Is();ts();rs();ya();$r();Er();er();Ar();qt();HGe=b((e,t,r,i,n,a=!1,s)=>{t.arrowTypeStart&&gse(e,"start",t.arrowTypeStart,r,i,n,a,s),t.arrowTypeEnd&&gse(e,"end",t.arrowTypeEnd,r,i,n,a,s)},"addEdgeMarkers"),YGe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},jGe=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],gse=b((e,t,r,i,n,a,s=!1,o)=>{let l=YGe[r],u=l&&jGe.includes(l.type);if(!l){ee.warn(`Unknown arrow type: ${r}`);return}let h=l.type,p=`${n}_${a}-${h}${t==="start"?"Start":"End"}${s&&u?"-margin":""}`;if(o&&o.trim()!==""){let g=o.replace(/[^\dA-Za-z]/g,"_"),m=`${p}_${g}`;if(!document.getElementById(m)){let y=document.getElementById(p);if(y){let v=y.cloneNode(!0);v.id=m,v.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),l.fill&&T.setAttribute("fill",o)}),y.parentNode?.appendChild(v)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${p})`)},"addEdgeMarker"),XGe=b(e=>typeof e=="string"?e:we()?.flowchart?.curve,"resolveEdgeCurveType"),S5=new Map,ba=new Map,vse=b(()=>{S5.clear(),ba.clear()},"clear"),Eb=b(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),E5=b(async(e,t)=>{let r=we(),i=Hr(r),{labelStyles:n}=Ot(t);t.labelStyle=n;let a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",u=await zn(e,t.label,{style:Eb(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);s.node().appendChild(u),ee.info("abc82",t,t.labelType);let h=u.getBBox(),f=h;if(i){let p=u.children[0],g=Qe(u);h=p.getBoundingClientRect(),f=h,g.attr("width",h.width),g.attr("height",h.height)}else{let p=Qe(u).select("text").node();p&&typeof p.getBBox=="function"&&(f=p.getBBox())}s.attr("transform",Po(f,i)),S5.set(t.id,a),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await ah(g,t.startLabelLeft,Eb(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){let v=m.children[0],x=Qe(m);y=v.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}g.attr("transform",Po(y,i)),ba.get(t.id)||ba.set(t.id,{}),ba.get(t.id).startLeft=p,Ab(d,t.startLabelLeft)}if(t.startLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await ah(g,t.startLabelRight,Eb(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){let v=m.children[0],x=Qe(m);y=v.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}g.attr("transform",Po(y,i)),ba.get(t.id)||ba.set(t.id,{}),ba.get(t.id).startRight=p,Ab(d,t.startLabelRight)}if(t.endLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await ah(p,t.endLabelLeft,Eb(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){let v=m.children[0],x=Qe(m);y=v.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}g.attr("transform",Po(y,i)),ba.get(t.id)||ba.set(t.id,{}),ba.get(t.id).endLeft=p,Ab(d,t.endLabelLeft)}if(t.endLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await ah(p,t.endLabelRight,Eb(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){let v=m.children[0],x=Qe(m);y=v.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}g.attr("transform",Po(y,i)),ba.get(t.id)||ba.set(t.id,{}),ba.get(t.id).endRight=p,Ab(d,t.endLabelRight)}return u},"insertEdgeLabel");b(Ab,"setTerminalWidth");A5=b((e,t)=>{ee.debug("Moving label abc88 ",e.id,e.label,S5.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=we(),{subGraphTitleTotalMargin:n}=rh(i);if(e.label){let a=S5.get(e.id),s=e.x,o=e.y;if(r){let l=jt.calcLabelPosition(r);ee.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){let a=ba.get(e.id).startLeft,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){let a=ba.get(e.id).startRight,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){let a=ba.get(e.id).endLeft,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){let a=ba.get(e.id).endRight,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),KGe=b((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),ZGe=b((e,t,r)=>{ee.debug(`intersection calc abc89: + a${i},${a} 0,0,1 0,${n} + M${r},${-n} + a${i},${a} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),VYe=v((e,t,r,n,i,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),WYe=v((e,t,r,n,i,a)=>[`M${e+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),Roe=5,Loe=10;v(Ule,"tiltedCylinder");v(Hle,"trapezoid");v(Yle,"trapezoidalPentagon");Ioe=10,Moe=10;v(Xle,"triangle");v(jle,"waveEdgedRectangle");v(Kle,"waveRectangle");Ri=10;v(Zle,"windowPane");Doe=new Set(["redux-color","redux-dark-color"]),UYe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);v($N,"erBox");v(Zy,"addText");v(Qy,"lineToPolygon");v(Qle,"textHelper");v(z2,"addText");v(Jle,"classBox");v(ece,"requirementBox");v(fu,"addText");HYe=v(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");v(tce,"kanbanItem");v(rce,"bang");v(nce,"cloud");v(ice,"defaultMindmapNode");v(ace,"mindmapCircle");YYe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Ple},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Dle},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ble},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gle},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ile},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ale},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:ule},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Voe},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Koe},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Hoe},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:nle},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:BN},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:rce},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:nce},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Lle},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:dle},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Cle},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:wle},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Hle},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:ble},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ole},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Wle},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Yoe},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Nle},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:zle},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fle},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:hle},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ple},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Joe},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:ele},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tle},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:kle},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:jle},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:fle},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ule},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Sle},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:rle},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sle},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Xle},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Zle},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lle},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Yle},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cle},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ole},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_le},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ale},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:qoe},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Qoe},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vle},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:qle},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Kle},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ile},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ele}],XYe=v(()=>{let t=[...Object.entries({state:$le,choice:Xoe,note:Rle,composite:joe,rectWithTitle:Mle,labelRect:Tle,block_arrow:Uoe,collapsedGroup:Woe,iconSquare:vle,iconCircle:mle,icon:gle,iconRounded:yle,imageSquare:xle,anchor:zoe,kanbanItem:tce,mindmapCircle:ace,defaultMindmapNode:ice,classBox:Jle,erBox:$N,requirementBox:ece}),...YYe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),G2=XYe();v(FN,"isValidShape")});async function mu(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?G2[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return n.attr("data-look",wi(t.look)),t.tooltip&&i.attr("title",t.tooltip),PE.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var Gh,PE,sce,oce,yu,pa=X(()=>{Li();Ur();ur();Yt();Gh=v(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,n=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins"),PE=new Map;v(mu,"insertNode");sce=v((e,t)=>{PE.set(t.id,e)},"setNodeElem"),oce=v(()=>{PE.clear()},"clear"),yu=v(e=>{let t=PE.get(e.id);fe.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var jYe,lce,KYe,ZYe,QYe,JYe,eXe,tXe,cce,wd,uce,ms=X(()=>{pa();Li();ta();Wi();hr();ur();Yt();zr();Wt();zr();Wt();jYe=v(async(e,t)=>{let r=ze(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,o=s,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=Bt(t),d=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),p=Ho(r.flowchart.htmlLabels),g=t.direction==="LR",m=d.insert("g").attr("class","cluster-label swimlane-label"),y=await Ra(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),x=y.getBBox();if(p){let _=y.children[0],D=ct(y);x=_.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height)}let b=t.padding??0,T=t.width<=x.width+b?x.width+b:t.width;t.width<=x.width+b?t.diff=(T-t.width)/2-b:t.diff=-b;let k=t.height,w=t.y-k/2,C=t.y+k/2,S=t.x-T/2,E=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:w+k/3,L=g?4:0,N=x.height+2*L,O,R;if(g){let _=Math.max(N,x.height+2*L),D=S+_,I=Math.max(0,T-_);if(t.look==="handDrawn"){let P=st.svg(d),$=zt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),G=zt(t,{roughness:.7,fill:"none",stroke:o,seed:i}),q=P.rectangle(S,w,_,k,$);O=d.insert(()=>q,":first-child");let z=P.rectangle(D,w,I,k,G);R=d.insert(()=>z,":first-child"),O.select("path:nth-child(2)").attr("style",h.join(";")),O.select("path").attr("style",f.join(";").replace("fill","stroke"))}else O=d.insert("rect",":first-child"),R=d.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",u).attr("x",S).attr("y",w).attr("width",_).attr("height",k).attr("fill",a).attr("stroke",o),R.attr("class","swimlane-body").attr("style",u).attr("x",D).attr("y",w).attr("width",I).attr("height",k).attr("fill","none").attr("stroke",o);let M=S+_/2,B=t.y;m.attr("transform",`translate(${M}, ${B}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{let _=Math.max(0,E-w),D=Math.min(N,_),I=w+D,M=Math.max(0,C-I),B=t.x-T/2;if(t.look==="handDrawn"){let G=st.svg(d),q=zt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),z=zt(t,{roughness:.7,fill:"none",stroke:o,seed:i}),V=G.rectangle(B,w,T,D,q);O=d.insert(()=>V,":first-child");let j=G.rectangle(B,I,T,M,z);R=d.insert(()=>j,":first-child"),O.select("path:nth-child(2)").attr("style",h.join(";")),O.select("path").attr("style",f.join(";").replace("fill","stroke"))}else O=d.insert("rect",":first-child"),R=d.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",u).attr("x",B).attr("y",w).attr("width",T).attr("height",D).attr("fill",a).attr("stroke",o),R.attr("class","swimlane-body").attr("style",u).attr("x",B).attr("y",I).attr("width",T).attr("height",M).attr("fill","none").attr("stroke",o);let P=t.x-x.width/2,$=w+(D-x.height)/2;m.attr("transform",`translate(${P}, ${$})`)}if(fe.trace("Swimlane data ",t,JSON.stringify(t)),l){let _=m.select("span");_&&_.attr("style",l)}return t.offsetX=0,t.width=T,t.height=k,t.offsetY=x.height-b/2,t.intersect=function(_){return Td(t,_)},{cluster:d,labelBBox:x}},"swimlane"),lce=v(async(e,t)=>{fe.info("Creating subgraph rect for ",t.id,t);let r=ze(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Bt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=ea(r),p=f.insert("g").attr("class","cluster-label "),g;t.labelType==="markdown"?g=await Ra(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):g=await pu(p,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(ea(r)){let S=g.children[0],E=ct(g);m=S.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}let y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height,b=t.x-y/2,T=t.y-x/2;fe.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){let S=st.svg(f),E=zt(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),L=S.path(Qo(b,T,y,x,0),E);k=f.insert(()=>(fe.debug("Rough node insert CXC",L),L),":first-child"),k.select("path:nth-child(2)").attr("style",u.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=f.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",T).attr("width",y).attr("height",x);let{subGraphTitleTopMargin:w}=Gh(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),o){let S=p.select("span");S&&S.attr("style",o)}let C=k.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Td(t,S)},{cluster:f,labelBBox:m}},"rect"),KYe=v((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),n=r.insert("rect",":first-child"),i=0*t.padding,a=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");let s=n.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return Td(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),ZYe=v(async(e,t)=>{let r=ze(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=await pu(f,t.label,t.labelStyle,void 0,!0),g=p.getBBox();if(ea(r)){let L=p.children[0],N=ct(p);g=L.getBoundingClientRect(),N.attr("width",g.width),N.attr("height",g.height)}let m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height+m,T=t.height+m-g.height-6,k=t.x-x/2,w=t.y-b/2;t.width=x;let C=t.y-t.height/2-y+g.height+2,S;if(t.look==="handDrawn"){let L=t.cssClasses.includes("statediagram-cluster-alt"),N=st.svg(u),O=t.rx||t.ry?N.path(Qo(k,w,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):N.rectangle(k,w,x,b,{seed:i});S=u.insert(()=>O,":first-child");let R=N.rectangle(k,C,x,T,{fill:L?a:s,fillStyle:L?"hachure":"solid",stroke:l,seed:i});S=u.insert(()=>O,":first-child"),d=u.insert(()=>R)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",k).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",k).attr("y",C).attr("width",x).attr("height",T);f.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(ea(r)?0:3)})`);let E=S.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(L){return Td(t,L)},{cluster:u,labelBBox:g}},"roundedWithTitle"),QYe=v(async(e,t)=>{fe.info("Creating subgraph rect for ",t.id,t);let r=ze(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Bt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=ea(r),p=f.insert("g").attr("class","cluster-label "),g=await Ra(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}),m=g.getBBox();if(ea(r)){let S=g.children[0],E=ct(g);m=S.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}let y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height,b=t.x-y/2,T=t.y-x/2;fe.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){let S=st.svg(f),E=zt(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),L=S.path(Qo(b,T,y,x,t.rx),E);k=f.insert(()=>(fe.debug("Rough node insert CXC",L),L),":first-child"),k.select("path:nth-child(2)").attr("style",u.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=f.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",T).attr("width",y).attr("height",x);let{subGraphTitleTopMargin:w}=Gh(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),o){let S=p.select("span");S&&S.attr("style",o)}let C=k.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Td(t,S)},{cluster:f,labelBBox:m}},"kanbanSection"),JYe=v((e,t)=>{let r=ze(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,u=t.width+l;t.diff=-t.padding;let h=t.height+l,f=t.x-u/2,d=t.y-h/2;t.width=u;let p;if(t.look==="handDrawn"){let y=st.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>y,":first-child")}else{p=o.insert("rect",":first-child");let m="outer";t.look,m="divider",p.attr("class",m).attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",t.look)}let g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Td(t,m)},{cluster:s,labelBBox:{}}},"divider"),eXe=lce,tXe={rect:lce,squareRect:eXe,roundedWithTitle:ZYe,noteGroup:KYe,divider:JYe,kanbanSection:QYe,swimlane:jYe},cce=new Map,wd=v(async(e,t)=>{let r=t.shape||"rect",n=await tXe[r](e,t);return cce.set(t.id,n),n},"insertCluster"),uce=v(()=>{cce=new Map},"clear")});function W2(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=di(e),t=di(t);let[r,n]=[e.x,e.y],[i,a]=[t.x,t.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}function U2(e,t){ea(ze())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function mce(e){let t=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}function yce(e,t){if(e.length<2)return"";let r="",n=e.length,i=1e-5;for(let a=0;a({...i}));if(e.length>=2&&ga[t.arrowTypeStart]){let i=ga[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=zN(a,s),l=i*Math.cos(o),u=i*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+u}let n=e.length;if(n>=2&&ga[t.arrowTypeEnd]){let i=ga[t.arrowTypeEnd],a=e[n-1],s=e[n-2],{angle:o}=zN(s,a),l=i*Math.cos(o),u=i*Math.sin(o);r[n-1].x=a.x-l,r[n-1].y=a.y-u}return r}var q2,ga,hce,di,rXe,nXe,iXe,aXe,fce,sXe,j0,Ii,gce,GN,V2,vu,e1,oXe,lXe,cXe,dce,pce,uXe,hXe,Cd,fXe,dXe,pXe,gXe,mXe,yXe,vXe,xXe,bXe,TXe,wXe,CXe,kXe,SXe,EXe,AXe,_Xe,RXe,LXe,IXe,MXe,DXe,NXe,OXe,t1,ys=X(()=>{pa();Li();ta();Wi();Ur();hr();ur();Yt();zr();Wt();q2=v((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,n=e.y??0;return"translate("+-(r+e.width/2)+", "+-(n+e.height/2)+")"},"computeLabelTransform"),ga={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},hce={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};v(W2,"calculateDeltaAndAngle");di=v(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),rXe=v(e=>({x:v(function(t,r,n){let i=0,a=di(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(ga,e.arrowTypeEnd)){let{angle:p,deltaX:g}=W2(n[n.length-1],n[n.length-2]);i=ga[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}let s=Math.abs(di(t).x-di(n[n.length-1]).x),o=Math.abs(di(t).y-di(n[n.length-1]).y),l=Math.abs(di(t).x-di(n[0]).x),u=Math.abs(di(t).y-di(n[0]).y),h=ga[e.arrowTypeStart],f=ga[e.arrowTypeEnd],d=1;if(s0&&o0&&u=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(ga,e.arrowTypeEnd)){let{angle:p,deltaY:g}=W2(n[n.length-1],n[n.length-2]);i=ga[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}let s=Math.abs(di(t).y-di(n[n.length-1]).y),o=Math.abs(di(t).x-di(n[n.length-1]).x),l=Math.abs(di(t).y-di(n[0]).y),u=Math.abs(di(t).x-di(n[0]).x),h=ga[e.arrowTypeStart],f=ga[e.arrowTypeEnd],d=1;if(s0&&o0&&u{t.arrowTypeStart&&fce(e,"start",t.arrowTypeStart,r,n,i,a,s),t.arrowTypeEnd&&fce(e,"end",t.arrowTypeEnd,r,n,i,a,s)},"addEdgeMarkers"),iXe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},aXe=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],fce=v((e,t,r,n,i,a,s=!1,o)=>{if(!r||r==="none")return;let l=iXe[r],u=l&&aXe.includes(l.type);if(!l){fe.warn(`Unknown arrow type: ${r}`);return}let h=l.type,p=`${i}_${a}-${h}${t==="start"?"Start":"End"}${s&&u?"-margin":""}`;if(o&&o.trim()!==""){let g=o.replace(/[^\dA-Za-z]/g,"_"),m=`${p}_${g}`;if(!document.getElementById(m)){let y=document.getElementById(p);if(y){let x=y.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),l.fill&&T.setAttribute("fill",o)}),y.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${n}#${m})`)}else e.attr(`marker-${t}`,`url(${n}#${p})`)},"addEdgeMarker"),sXe=v(e=>typeof e=="string"?e:ze()?.flowchart?.curve,"resolveEdgeCurveType"),j0=new Map,Ii=new Map,gce=v(()=>{j0.clear(),Ii.clear()},"clear"),GN=v(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),V2=v(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),vu=v(async(e,t)=>{let r=ze(),n=ea(r),{labelStyles:i}=Bt(t);t.labelStyle=i;let a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",u=await Ra(e,t.label,{style:V2(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);s.node().appendChild(u),fe.info("abc82",t,t.labelType);let h,f;if(n){let p=u.children[0],g=ct(u);h=await $h.measure(()=>p.getBoundingClientRect()),f=h,g.attr("width",h.width),g.attr("height",h.height)}else{let p=ct(u).select("text").node();await $h.measure(()=>{h=u.getBBox(),p&&typeof p.getBBox=="function"?f=p.getBBox():f=h})}s.attr("transform",q2(f,n)),j0.set(t.id,a),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await pu(g,t.startLabelLeft,V2(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(n){let x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",q2(y,n)),Ii.get(t.id)||Ii.set(t.id,{}),Ii.get(t.id).startLeft=p,U2(d,t.startLabelLeft)}if(t.startLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await pu(g,t.startLabelRight,V2(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(n){let x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",q2(y,n)),Ii.get(t.id)||Ii.set(t.id,{}),Ii.get(t.id).startRight=p,U2(d,t.startLabelRight)}if(t.endLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await pu(p,t.endLabelLeft,V2(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(n){let x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",q2(y,n)),Ii.get(t.id)||Ii.set(t.id,{}),Ii.get(t.id).endLeft=p,U2(d,t.endLabelLeft)}if(t.endLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner"),m=await pu(p,t.endLabelRight,V2(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(n){let x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",q2(y,n)),Ii.get(t.id)||Ii.set(t.id,{}),Ii.get(t.id).endRight=p,U2(d,t.endLabelRight)}return u},"insertEdgeLabel");v(U2,"setTerminalWidth");e1=v((e,t)=>{fe.debug("Moving label abc88 ",e.id,e.label,j0.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,n=ze(),{subGraphTitleTotalMargin:i}=Gh(n);if(e.label){let a=j0.get(e.id),s=e.x,o=e.y;if(r){let l=ar.calcLabelPosition(r);fe.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(e.startLabelLeft){let a=Ii.get(e.id).startLeft,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){let a=Ii.get(e.id).startRight,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){let a=Ii.get(e.id).endLeft,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){let a=Ii.get(e.id).endRight,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),oXe=v((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[r,n]=t,i=Math.abs(n.x-r.x),a=Math.abs(n.y-r.y);return i<.001||a<.001?t:a>=i?[r,{x:r.x,y:n.y},n]:[r,{x:n.x,y:r.y},n]},"orthogonalizeToLabelClippedPoints"),lXe=v((e,t)=>{let r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,o=e.height/2;return i>=s||a>=o},"outsideNode"),cXe=v((e,t,r)=>{fe.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2,o=r.xMath.abs(i-t.x)*l){let f=r.y{ee.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(ee.info("abc88 checking point",a,t),!KGe(t,a)&&!n){let s=ZGe(t,i,a);ee.debug("abc88 inside",a,i,s),ee.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?ee.warn("abc88 no intersect",s,r):r.push(s),n=!0}else ee.warn("abc88 outside",a,i),i=a,n||r.push(a)}),ee.debug("returning points",r),r},"cutPathAtIntersect");b(bse,"extractCornerPoints");yse=b(function(e,t,r){let i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),QGe=b(function(e){let{cornerPointPositions:t}=bse(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){ee.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else ee.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),JGe=b((e,t,r)=>{let i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),_5=b(function(e,t,r,i,n,a,s,o=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:l}=we(),u=t.points,h=!1,f=n;var d=a;let p=[];for(let B in t.cssCompiledStyles)db(B)||p.push(t.cssCompiledStyles[B]);ee.debug("UIO intersect check",t.points,d.x,f.x),d.intersect&&f.intersect&&!o&&(u=u.slice(1,t.points.length-1),u.unshift(f.intersect(u[0])),ee.debug("Last point UIO",t.start,"-->",t.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1])));let g=btoa(JSON.stringify(u));t.toCluster&&(ee.info("to cluster abc88",r.get(t.toCluster)),u=mse(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(ee.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=mse(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=u.filter(B=>!Number.isNaN(B.y)),y=XGe(t.curve);y!=="rounded"&&(m=QGe(m));let v=Ju;switch(y){case"linear":v=Ju;break;case"basis":v=Dc;break;case"cardinal":v=P2;break;case"bumpX":v=I2;break;case"bumpY":v=D2;break;case"catmullRom":v=$2;break;case"monotoneX":v=z2;break;case"monotoneY":v=G2;break;case"natural":v=q2;break;case"step":v=V2;break;case"stepAfter":v=U2;break;case"stepBefore":v=W2;break;case"rounded":v=Ju;break;default:v=Dc}let{x,y:T}=RC(t),C=Ic().x(x).y(T).curve(v),w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let k,E=y==="rounded"?xse(Tse(m,t),5):C(m),A=Array.isArray(t.style)?t.style:[t.style],N=A.find(B=>B?.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){let B=st.svg(e);Object.assign([],m);let M=B.path(E,{roughness:.3,seed:l});w+=" transition",k=Qe(M).select("path").attr("id",`${s}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",A?A.reduce((z,$)=>z+";"+$,""):"");let F=k.attr("d");k.attr("d",F),e.node().appendChild(k.node())}else{let B=p.join(";"),M=A?A.reduce((j,H)=>j+H+";",""):"",F=(B?B+";"+M+";":M)+";"+(A?A.reduce((j,H)=>j+";"+H,""):"");k=e.append("path").attr("d",E).attr("id",`${s}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",F),N=F.match(/stroke:([^;]+)/)?.[1],O=t.animate===!0||!!t.animation||B.includes("animation");let z=k.node(),$=typeof z.getTotalLength=="function"?z.getTotalLength():0,G=JI[t.arrowTypeStart]||0,U=JI[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){let H=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?JGe($,G,U):`0 ${G} ${$-G-U} ${U}`}; stroke-dashoffset: 0;`;k.attr("style",H+k.attr("style"))}}k.attr("data-edge",!0),k.attr("data-et","edge"),k.attr("data-id",t.id),k.attr("data-points",g),k.attr("data-look",An(t.look)),t.showPoints&&m.forEach(B=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",B.x).attr("cy",B.y)});let L="";(we().flowchart.arrowMarkerAbsolute||we().state.arrowMarkerAbsolute)&&(L=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,L=L.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ee.info("arrowTypeStart",t.arrowTypeStart),ee.info("arrowTypeEnd",t.arrowTypeEnd);let _=!O&&t?.look==="neo";HGe(k,t,L,s,i,_,N);let R=Math.floor(u.length/2),D=u[R];jt.isLabelCoordinateInPath(D,k.attr("d"))||(h=!0);let I={};return h&&(I.updatedPath=u),I.originalPath=t.points,I},"insertEdge");b(xse,"generateRoundedPath");b(d9,"calculateDeltaAndAngle");b(Tse,"applyMarkerOffsetsToPoints");eqe=b((e,t,r,i)=>{t.forEach(n=>{kqe[n](e,r,i)})},"insertMarkers"),tqe=b((e,t,r)=>{ee.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),rqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),iqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),nqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),aqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),sqe=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),oqe=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),lqe=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),cqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),uqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{transitionColor:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),hqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),fqe=b((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),dqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),pqe=b((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),gqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),mqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:s}=n,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),yqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),vqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:s}=n,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),bqe=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2,o=r.xMath.abs(n-t.x)*l){let f=r.y{fe.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(fe.info("abc88 checking point",a,t),!lXe(t,a)&&!i){let s=cXe(t,n,a);fe.debug("abc88 inside",a,n,s),fe.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?fe.warn("abc88 no intersect",s,r):r.push(s),i=!0}else fe.warn("abc88 outside",a,n),n=a,i||r.push(a)}),fe.debug("returning points",r),r},"cutPathAtIntersect");v(mce,"extractCornerPoints");pce=v(function(e,t,r){let n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:t.x-s*n,y:t.y-s*i}},"findAdjacentPoint"),uXe=v(function(e){let{cornerPointPositions:t}=mce(e),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){fe.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else fe.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(e[n]);return r},"fixCorners"),hXe=v((e,t,r)=>{let n=e-t-r,i=2,a=2,s=i+a,o=Math.floor(n/s),l=Number.isFinite(o)?Math.max(0,o):0,u=Array(l).fill(`${i} ${a}`).join(" ");return`0 ${t} ${u} ${r}`},"generateDashArray"),Cd=v(function(e,t,r,n,i,a,s,o=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:l,layout:u}=ze(),h=t.points,f=!1,d=i;var p=a;let g=[];for(let P in t.cssCompiledStyles)m2(P)||g.push(t.cssCompiledStyles[P]);if(u==="swimlane"){if(p.intersect&&d.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[d.intersect(h[0]),p.intersect(h[1])];else{let P=h.slice(1,-1),$=P[0],G=P[P.length-1],q=.5,z=Math.abs(h[h.length-1].x-G.x)!Number.isNaN(P.y)),x=sXe(t.curve);x!=="rounded"&&(y=uXe(y));let b=Ph;switch(x){case"linear":b=Ph;break;case"basis":b=pd;break;case"cardinal":b=s2;break;case"bumpX":b=t2;break;case"bumpY":b=r2;break;case"catmullRom":b=c2;break;case"monotoneX":b=u2;break;case"monotoneY":b=h2;break;case"natural":b=f2;break;case"step":b=d2;break;case"stepAfter":b=g2;break;case"stepBefore":b=p2;break;case"rounded":b=Ph;break;default:b=pd}let{x:T,y:k}=rXe(t),w=dd().x(T).y(k).curve(b),C;switch(t.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible";break;default:C="edge-thickness-normal"}switch(t.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed";break;default:C+=" edge-pattern-solid"}let S,E=x==="rounded"?yce(vce(y,t),5):w(y),L=Array.isArray(t.style)?t.style:[t.style],N=L.find(P=>P?.startsWith("stroke:")),O="";t.animate&&(O="edge-animation-fast"),t.animation&&(O="edge-animation-"+t.animation);let R=!1;if(t.look==="handDrawn"){let P=st.svg(e);Object.assign([],y);let $=P.path(E,{roughness:.3,seed:l});C+=" transition",S=ct($).select("path").attr("id",`${s}-${t.id}`).attr("class"," "+C+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",L?L.reduce((q,z)=>q+";"+z,""):"");let G=S.attr("d");S.attr("d",G),e.node().appendChild(S.node())}else{let P=g.join(";"),$=L?L.reduce((ee,ne)=>ee+ne+";",""):"",G=(P?P+";"+$+";":$)+";"+(L?L.reduce((ee,ne)=>ee+";"+ne,""):"");S=e.append("path").attr("d",E).attr("id",`${s}-${t.id}`).attr("class"," "+C+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",G),N=G.match(/stroke:([^;]+)/)?.[1],R=t.animate===!0||!!t.animation||P.includes("animation");let q=S.node(),z=typeof q.getTotalLength=="function"?q.getTotalLength():0,V=hce[t.arrowTypeStart]||0,j=hce[t.arrowTypeEnd]||0;if(t.look==="neo"&&!R){let ne=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?hXe(z,V,j):`0 ${V} ${z-V-j} ${j}`}; stroke-dashoffset: 0;`;S.attr("style",ne+S.attr("style"))}}S.attr("data-edge",!0),S.attr("data-et","edge"),S.attr("data-id",t.id),S.attr("data-points",m),S.attr("data-look",wi(t.look)),t.showPoints&&y.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let _="";(ze().flowchart.arrowMarkerAbsolute||ze().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),fe.info("arrowTypeStart",t.arrowTypeStart),fe.info("arrowTypeEnd",t.arrowTypeEnd);let D=!R&&t?.look==="neo";nXe(S,t,_,s,n,D,N);let I=Math.floor(h.length/2),M=h[I];ar.isLabelCoordinateInPath(M,S.attr("d"))||(f=!0);let B={};return f&&(B.updatedPath=h),B.originalPath=t.points,B},"insertEdge");v(yce,"generateRoundedPath");v(zN,"calculateDeltaAndAngle");v(vce,"applyMarkerOffsetsToPoints");fXe=v((e,t,r,n)=>{t.forEach(i=>{OXe[i](e,r,n)})},"insertMarkers"),dXe=v((e,t,r)=>{fe.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),pXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),gXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),mXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),yXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),vXe=v((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),xXe=v((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),bXe=v((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),TXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),wXe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{transitionColor:a}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),CXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),kXe=v((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),SXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),EXe=v((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),AXe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{strokeWidth:a}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),_Xe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{strokeWidth:a,mainBkg:s}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),RXe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{strokeWidth:a}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),LXe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{strokeWidth:a,mainBkg:s}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),IXe=v((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`)},"requirement_arrow"),xqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{strokeWidth:a}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 + L0,20`)},"requirement_arrow"),MXe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{strokeWidth:a}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Tqe=b((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),wqe=b((e,t,r)=>{let i=It(),{themeVariables:n}=i,{strokeWidth:a}=n,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),kqe={extension:tqe,composition:rqe,aggregation:iqe,dependency:nqe,lollipop:aqe,point:sqe,circle:oqe,cross:lqe,barb:cqe,barbNeo:uqe,only_one:hqe,zero_or_one:fqe,one_or_more:dqe,zero_or_more:pqe,only_one_neo:gqe,zero_or_one_neo:mqe,one_or_more_neo:yqe,zero_or_more_neo:vqe,requirement_arrow:bqe,requirement_contains:Tqe,requirement_arrow_neo:xqe,requirement_contains_neo:wqe},L5=eqe});var Cqe,R5,p9=q(()=>{Cqe=typeof global=="object"&&global&&global.Object===Object&&global,R5=Cqe});var Sqe,Eqe,sn,$o=q(()=>{p9();Sqe=typeof self=="object"&&self&&self.Object===Object&&self,Eqe=R5||Sqe||Function("return this")(),sn=Eqe});var Aqe,ra,i0=q(()=>{$o();Aqe=sn.Symbol,ra=Aqe});function Rqe(e){var t=_qe.call(e,_b),r=e[_b];try{e[_b]=void 0;var i=!0}catch{}var n=Lqe.call(e);return i&&(t?e[_b]=r:delete e[_b]),n}var wse,_qe,Lqe,_b,kse,Cse=q(()=>{i0();wse=Object.prototype,_qe=wse.hasOwnProperty,Lqe=wse.toString,_b=ra?ra.toStringTag:void 0;kse=Rqe});function Nqe(e){return Dqe.call(e)}var Iqe,Dqe,Sse,Ese=q(()=>{Iqe=Object.prototype,Dqe=Iqe.toString;Sse=Nqe});function Pqe(e){return e==null?e===void 0?Oqe:Mqe:Ase&&Ase in Object(e)?kse(e):Sse(e)}var Mqe,Oqe,Ase,ns,Ff=q(()=>{i0();Cse();Ese();Mqe="[object Null]",Oqe="[object Undefined]",Ase=ra?ra.toStringTag:void 0;ns=Pqe});function Bqe(e){return e!=null&&typeof e=="object"}var yn,Rl=q(()=>{yn=Bqe});function $qe(e){return typeof e=="symbol"||yn(e)&&ns(e)==Fqe}var Fqe,uo,n0=q(()=>{Ff();Rl();Fqe="[object Symbol]";uo=$qe});function zqe(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r{Fc=zqe});var Gqe,Dr,_n=q(()=>{Gqe=Array.isArray,Dr=Gqe});function Rse(e){if(typeof e=="string")return e;if(Dr(e))return Fc(e,Rse)+"";if(uo(e))return Lse?Lse.call(e):"";var t=e+"";return t=="0"&&1/e==-qqe?"-0":t}var qqe,_se,Lse,Ise,Dse=q(()=>{i0();Lb();_n();n0();qqe=1/0,_se=ra?ra.prototype:void 0,Lse=_se?_se.toString:void 0;Ise=Rse});function Wqe(e){for(var t=e.length;t--&&Vqe.test(e.charAt(t)););return t}var Vqe,Nse,Mse=q(()=>{Vqe=/\s/;Nse=Wqe});function Hqe(e){return e&&e.slice(0,Nse(e)+1).replace(Uqe,"")}var Uqe,Ose,Pse=q(()=>{Mse();Uqe=/^\s+/;Ose=Hqe});function Yqe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vi,zo=q(()=>{Vi=Yqe});function Qqe(e){if(typeof e=="number")return e;if(uo(e))return Bse;if(Vi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Vi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ose(e);var r=Xqe.test(e);return r||Kqe.test(e)?Zqe(e.slice(2),r?2:8):jqe.test(e)?Bse:+e}var Bse,jqe,Xqe,Kqe,Zqe,Fse,$se=q(()=>{Pse();zo();n0();Bse=NaN,jqe=/^[-+]0x[0-9a-f]+$/i,Xqe=/^0b[01]+$/i,Kqe=/^0o[0-7]+$/i,Zqe=parseInt;Fse=Qqe});function eVe(e){if(!e)return e===0?e:0;if(e=Fse(e),e===zse||e===-zse){var t=e<0?-1:1;return t*Jqe}return e===e?e:0}var zse,Jqe,i1,g9=q(()=>{$se();zse=1/0,Jqe=17976931348623157e292;i1=eVe});function tVe(e){var t=i1(e),r=t%1;return t===t?r?t-r:t:0}var Gse,qse=q(()=>{g9();Gse=tVe});function rVe(e){return e}var Ds,$f=q(()=>{Ds=rVe});function oVe(e){if(!Vi(e))return!1;var t=ns(e);return t==nVe||t==aVe||t==iVe||t==sVe}var iVe,nVe,aVe,sVe,$c,Rb=q(()=>{Ff();zo();iVe="[object AsyncFunction]",nVe="[object Function]",aVe="[object GeneratorFunction]",sVe="[object Proxy]";$c=oVe});var lVe,I5,Vse=q(()=>{$o();lVe=sn["__core-js_shared__"],I5=lVe});function cVe(e){return!!Wse&&Wse in e}var Wse,Use,Hse=q(()=>{Vse();Wse=(function(){var e=/[^.]+$/.exec(I5&&I5.keys&&I5.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();Use=cVe});function fVe(e){if(e!=null){try{return hVe.call(e)}catch{}try{return e+""}catch{}}return""}var uVe,hVe,oh,m9=q(()=>{uVe=Function.prototype,hVe=uVe.toString;oh=fVe});function xVe(e){if(!Vi(e)||Use(e))return!1;var t=$c(e)?bVe:pVe;return t.test(oh(e))}var dVe,pVe,gVe,mVe,yVe,vVe,bVe,Yse,jse=q(()=>{Rb();Hse();zo();m9();dVe=/[\\^$.*+?()[\]{}|]/g,pVe=/^\[object .+?Constructor\]$/,gVe=Function.prototype,mVe=Object.prototype,yVe=gVe.toString,vVe=mVe.hasOwnProperty,bVe=RegExp("^"+yVe.call(vVe).replace(dVe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Yse=xVe});function TVe(e,t){return e?.[t]}var Xse,Kse=q(()=>{Xse=TVe});function wVe(e,t){var r=Xse(e,t);return Yse(r)?r:void 0}var Ns,zf=q(()=>{jse();Kse();Ns=wVe});var kVe,D5,Zse=q(()=>{zf();$o();kVe=Ns(sn,"WeakMap"),D5=kVe});var Qse,CVe,Jse,eoe=q(()=>{zo();Qse=Object.create,CVe=(function(){function e(){}return function(t){if(!Vi(t))return{};if(Qse)return Qse(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Jse=CVe});function SVe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var toe,roe=q(()=>{toe=SVe});function EVe(){}var ioe,noe=q(()=>{ioe=EVe});function AVe(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r{N5=AVe});function IVe(e){var t=0,r=0;return function(){var i=RVe(),n=LVe-(i-r);if(r=i,n>0){if(++t>=_Ve)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _Ve,LVe,RVe,aoe,soe=q(()=>{_Ve=800,LVe=16,RVe=Date.now;aoe=IVe});function DVe(e){return function(){return e}}var Ms,v9=q(()=>{Ms=DVe});var NVe,n1,b9=q(()=>{zf();NVe=(function(){try{var e=Ns(Object,"defineProperty");return e({},"",{}),e}catch{}})(),n1=NVe});var MVe,ooe,loe=q(()=>{v9();b9();$f();MVe=n1?function(e,t){return n1(e,"toString",{configurable:!0,enumerable:!1,value:Ms(t),writable:!0})}:Ds,ooe=MVe});var OVe,M5,x9=q(()=>{loe();soe();OVe=aoe(ooe),M5=OVe});function PVe(e,t){for(var r=-1,i=e==null?0:e.length;++r{O5=PVe});function BVe(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a{P5=BVe});function FVe(e){return e!==e}var coe,uoe=q(()=>{coe=FVe});function $Ve(e,t,r){for(var i=r-1,n=e.length;++i{hoe=$Ve});function zVe(e,t,r){return t===t?hoe(e,t,r):P5(e,coe,r)}var doe,poe=q(()=>{w9();uoe();foe();doe=zVe});function GVe(e,t){var r=e==null?0:e.length;return!!r&&doe(e,t,0)>-1}var goe,moe=q(()=>{poe();goe=GVe});function WVe(e,t){var r=typeof e;return t=t??qVe,!!t&&(r=="number"||r!="symbol"&&VVe.test(e))&&e>-1&&e%1==0&&e{qVe=9007199254740991,VVe=/^(?:0|[1-9]\d*)$/;Gf=WVe});function UVe(e,t,r){t=="__proto__"&&n1?n1(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var qf,Db=q(()=>{b9();qf=UVe});function HVe(e,t){return e===t||e!==e&&t!==t}var Go,a0=q(()=>{Go=HVe});function XVe(e,t,r){var i=e[t];(!(jVe.call(e,t)&&Go(i,r))||r===void 0&&!(t in e))&&qf(e,t,r)}var YVe,jVe,Vf,Nb=q(()=>{Db();a0();YVe=Object.prototype,jVe=YVe.hasOwnProperty;Vf=XVe});function KVe(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a{Nb();Db();zc=KVe});function ZVe(e,t,r){return t=yoe(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=yoe(i.length-t,0),s=Array(a);++n{roe();yoe=Math.max;B5=ZVe});function QVe(e,t){return M5(B5(e,t,Ds),e+"")}var Wf,Mb=q(()=>{$f();k9();x9();Wf=QVe});function eWe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JVe}var JVe,s1,F5=q(()=>{JVe=9007199254740991;s1=eWe});function tWe(e){return e!=null&&s1(e.length)&&!$c(e)}var ia,Gc=q(()=>{Rb();F5();ia=tWe});function rWe(e,t,r){if(!Vi(r))return!1;var i=typeof t;return(i=="number"?ia(r)&&Gf(t,r.length):i=="string"&&t in r)?Go(r[t],e):!1}var lh,Ob=q(()=>{a0();Gc();Ib();zo();lh=rWe});function iWe(e){return Wf(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&lh(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i{Mb();Ob();voe=iWe});function aWe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||nWe;return e===r}var nWe,Uf,Pb=q(()=>{nWe=Object.prototype;Uf=aWe});function sWe(e,t){for(var r=-1,i=Array(e);++r{xoe=sWe});function lWe(e){return yn(e)&&ns(e)==oWe}var oWe,C9,woe=q(()=>{Ff();Rl();oWe="[object Arguments]";C9=lWe});var koe,cWe,uWe,hWe,Il,o1=q(()=>{woe();Rl();koe=Object.prototype,cWe=koe.hasOwnProperty,uWe=koe.propertyIsEnumerable,hWe=C9((function(){return arguments})())?C9:function(e){return yn(e)&&cWe.call(e,"callee")&&!uWe.call(e,"callee")},Il=hWe});function fWe(){return!1}var Coe,Soe=q(()=>{Coe=fWe});var _oe,Eoe,dWe,Aoe,pWe,gWe,Dl,l1=q(()=>{$o();Soe();_oe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Eoe=_oe&&typeof module=="object"&&module&&!module.nodeType&&module,dWe=Eoe&&Eoe.exports===_oe,Aoe=dWe?sn.Buffer:void 0,pWe=Aoe?Aoe.isBuffer:void 0,gWe=pWe||Coe,Dl=gWe});function zWe(e){return yn(e)&&s1(e.length)&&!!Ni[ns(e)]}var mWe,yWe,vWe,bWe,xWe,TWe,wWe,kWe,CWe,SWe,EWe,AWe,_We,LWe,RWe,IWe,DWe,NWe,MWe,OWe,PWe,BWe,FWe,$We,Ni,Loe,Roe=q(()=>{Ff();F5();Rl();mWe="[object Arguments]",yWe="[object Array]",vWe="[object Boolean]",bWe="[object Date]",xWe="[object Error]",TWe="[object Function]",wWe="[object Map]",kWe="[object Number]",CWe="[object Object]",SWe="[object RegExp]",EWe="[object Set]",AWe="[object String]",_We="[object WeakMap]",LWe="[object ArrayBuffer]",RWe="[object DataView]",IWe="[object Float32Array]",DWe="[object Float64Array]",NWe="[object Int8Array]",MWe="[object Int16Array]",OWe="[object Int32Array]",PWe="[object Uint8Array]",BWe="[object Uint8ClampedArray]",FWe="[object Uint16Array]",$We="[object Uint32Array]",Ni={};Ni[IWe]=Ni[DWe]=Ni[NWe]=Ni[MWe]=Ni[OWe]=Ni[PWe]=Ni[BWe]=Ni[FWe]=Ni[$We]=!0;Ni[mWe]=Ni[yWe]=Ni[LWe]=Ni[vWe]=Ni[RWe]=Ni[bWe]=Ni[xWe]=Ni[TWe]=Ni[wWe]=Ni[kWe]=Ni[CWe]=Ni[SWe]=Ni[EWe]=Ni[AWe]=Ni[_We]=!1;Loe=zWe});function GWe(e){return function(t){return e(t)}}var Hf,Bb=q(()=>{Hf=GWe});var Ioe,Fb,qWe,S9,VWe,ch,$5=q(()=>{p9();Ioe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fb=Ioe&&typeof module=="object"&&module&&!module.nodeType&&module,qWe=Fb&&Fb.exports===Ioe,S9=qWe&&R5.process,VWe=(function(){try{var e=Fb&&Fb.require&&Fb.require("util").types;return e||S9&&S9.binding&&S9.binding("util")}catch{}})(),ch=VWe});var Doe,WWe,Yf,$b=q(()=>{Roe();Bb();$5();Doe=ch&&ch.isTypedArray,WWe=Doe?Hf(Doe):Loe,Yf=WWe});function YWe(e,t){var r=Dr(e),i=!r&&Il(e),n=!r&&!i&&Dl(e),a=!r&&!i&&!n&&Yf(e),s=r||i||n||a,o=s?xoe(e.length,String):[],l=o.length;for(var u in e)(t||HWe.call(e,u))&&!(s&&(u=="length"||n&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Gf(u,l)))&&o.push(u);return o}var UWe,HWe,z5,E9=q(()=>{Toe();o1();_n();l1();Ib();$b();UWe=Object.prototype,HWe=UWe.hasOwnProperty;z5=YWe});function jWe(e,t){return function(r){return e(t(r))}}var G5,A9=q(()=>{G5=jWe});var XWe,Noe,Moe=q(()=>{A9();XWe=G5(Object.keys,Object),Noe=XWe});function QWe(e){if(!Uf(e))return Noe(e);var t=[];for(var r in Object(e))ZWe.call(e,r)&&r!="constructor"&&t.push(r);return t}var KWe,ZWe,c1,q5=q(()=>{Pb();Moe();KWe=Object.prototype,ZWe=KWe.hasOwnProperty;c1=QWe});function JWe(e){return ia(e)?z5(e):c1(e)}var on,uh=q(()=>{E9();q5();Gc();on=JWe});function eUe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ooe,Poe=q(()=>{Ooe=eUe});function iUe(e){if(!Vi(e))return Ooe(e);var t=Uf(e),r=[];for(var i in e)i=="constructor"&&(t||!rUe.call(e,i))||r.push(i);return r}var tUe,rUe,Boe,Foe=q(()=>{zo();Pb();Poe();tUe=Object.prototype,rUe=tUe.hasOwnProperty;Boe=iUe});function nUe(e){return ia(e)?z5(e,!0):Boe(e)}var Os,jf=q(()=>{E9();Foe();Gc();Os=nUe});function oUe(e,t){if(Dr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||uo(e)?!0:sUe.test(e)||!aUe.test(e)||t!=null&&e in Object(t)}var aUe,sUe,u1,V5=q(()=>{_n();n0();aUe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sUe=/^\w*$/;u1=oUe});var lUe,hh,zb=q(()=>{zf();lUe=Ns(Object,"create"),hh=lUe});function cUe(){this.__data__=hh?hh(null):{},this.size=0}var $oe,zoe=q(()=>{zb();$oe=cUe});function uUe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Goe,qoe=q(()=>{Goe=uUe});function pUe(e){var t=this.__data__;if(hh){var r=t[e];return r===hUe?void 0:r}return dUe.call(t,e)?t[e]:void 0}var hUe,fUe,dUe,Voe,Woe=q(()=>{zb();hUe="__lodash_hash_undefined__",fUe=Object.prototype,dUe=fUe.hasOwnProperty;Voe=pUe});function yUe(e){var t=this.__data__;return hh?t[e]!==void 0:mUe.call(t,e)}var gUe,mUe,Uoe,Hoe=q(()=>{zb();gUe=Object.prototype,mUe=gUe.hasOwnProperty;Uoe=yUe});function bUe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=hh&&t===void 0?vUe:t,this}var vUe,Yoe,joe=q(()=>{zb();vUe="__lodash_hash_undefined__";Yoe=bUe});function h1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{zoe();qoe();Woe();Hoe();joe();h1.prototype.clear=$oe;h1.prototype.delete=Goe;h1.prototype.get=Voe;h1.prototype.has=Uoe;h1.prototype.set=Yoe;_9=h1});function xUe(){this.__data__=[],this.size=0}var Koe,Zoe=q(()=>{Koe=xUe});function TUe(e,t){for(var r=e.length;r--;)if(Go(e[r][0],t))return r;return-1}var Xf,Gb=q(()=>{a0();Xf=TUe});function CUe(e){var t=this.__data__,r=Xf(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():kUe.call(t,r,1),--this.size,!0}var wUe,kUe,Qoe,Joe=q(()=>{Gb();wUe=Array.prototype,kUe=wUe.splice;Qoe=CUe});function SUe(e){var t=this.__data__,r=Xf(t,e);return r<0?void 0:t[r][1]}var ele,tle=q(()=>{Gb();ele=SUe});function EUe(e){return Xf(this.__data__,e)>-1}var rle,ile=q(()=>{Gb();rle=EUe});function AUe(e,t){var r=this.__data__,i=Xf(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var nle,ale=q(()=>{Gb();nle=AUe});function f1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{Zoe();Joe();tle();ile();ale();f1.prototype.clear=Koe;f1.prototype.delete=Qoe;f1.prototype.get=ele;f1.prototype.has=rle;f1.prototype.set=nle;Kf=f1});var _Ue,Zf,W5=q(()=>{zf();$o();_Ue=Ns(sn,"Map"),Zf=_Ue});function LUe(){this.size=0,this.__data__={hash:new _9,map:new(Zf||Kf),string:new _9}}var sle,ole=q(()=>{Xoe();qb();W5();sle=LUe});function RUe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var lle,cle=q(()=>{lle=RUe});function IUe(e,t){var r=e.__data__;return lle(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Qf,Vb=q(()=>{cle();Qf=IUe});function DUe(e){var t=Qf(this,e).delete(e);return this.size-=t?1:0,t}var ule,hle=q(()=>{Vb();ule=DUe});function NUe(e){return Qf(this,e).get(e)}var fle,dle=q(()=>{Vb();fle=NUe});function MUe(e){return Qf(this,e).has(e)}var ple,gle=q(()=>{Vb();ple=MUe});function OUe(e,t){var r=Qf(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var mle,yle=q(()=>{Vb();mle=OUe});function d1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{ole();hle();dle();gle();yle();d1.prototype.clear=sle;d1.prototype.delete=ule;d1.prototype.get=fle;d1.prototype.has=ple;d1.prototype.set=mle;s0=d1});function L9(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(PUe);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var s=e.apply(this,i);return r.cache=a.set(n,s)||a,s};return r.cache=new(L9.Cache||s0),r}var PUe,vle,ble=q(()=>{U5();PUe="Expected a function";L9.Cache=s0;vle=L9});function FUe(e){var t=vle(e,function(i){return r.size===BUe&&r.clear(),i}),r=t.cache;return t}var BUe,xle,Tle=q(()=>{ble();BUe=500;xle=FUe});var $Ue,zUe,GUe,wle,kle=q(()=>{Tle();$Ue=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zUe=/\\(\\)?/g,GUe=xle(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($Ue,function(r,i,n,a){t.push(n?a.replace(zUe,"$1"):i||r)}),t}),wle=GUe});function qUe(e){return e==null?"":Ise(e)}var H5,R9=q(()=>{Dse();H5=qUe});function VUe(e,t){return Dr(e)?e:u1(e,t)?[e]:wle(H5(e))}var Jf,Wb=q(()=>{_n();V5();kle();R9();Jf=VUe});function UUe(e){if(typeof e=="string"||uo(e))return e;var t=e+"";return t=="0"&&1/e==-WUe?"-0":t}var WUe,qc,p1=q(()=>{n0();WUe=1/0;qc=UUe});function HUe(e,t){t=Jf(t,e);for(var r=0,i=t.length;e!=null&&r{Wb();p1();ed=HUe});function YUe(e,t,r){var i=e==null?void 0:ed(e,t);return i===void 0?r:i}var Cle,Sle=q(()=>{Ub();Cle=YUe});function jUe(e,t){for(var r=-1,i=t.length,n=e.length;++r{g1=jUe});function XUe(e){return Dr(e)||Il(e)||!!(Ele&&e&&e[Ele])}var Ele,Ale,_le=q(()=>{i0();o1();_n();Ele=ra?ra.isConcatSpreadable:void 0;Ale=XUe});function Lle(e,t,r,i,n){var a=-1,s=e.length;for(r||(r=Ale),n||(n=[]);++a0&&r(o)?t>1?Lle(o,t-1,r,i,n):g1(n,o):i||(n[n.length]=o)}return n}var m1,j5=q(()=>{Y5();_le();m1=Lle});function KUe(e){var t=e==null?0:e.length;return t?m1(e,1):[]}var qo,I9=q(()=>{j5();qo=KUe});function ZUe(e){return M5(B5(e,void 0,qo),e+"")}var Rle,Ile=q(()=>{I9();k9();x9();Rle=ZUe});var QUe,y1,X5=q(()=>{A9();QUe=G5(Object.getPrototypeOf,Object),y1=QUe});function nHe(e){if(!yn(e)||ns(e)!=JUe)return!1;var t=y1(e);if(t===null)return!0;var r=rHe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Dle.call(r)==iHe}var JUe,eHe,tHe,Dle,rHe,iHe,Nle,Mle=q(()=>{Ff();X5();Rl();JUe="[object Object]",eHe=Function.prototype,tHe=Object.prototype,Dle=eHe.toString,rHe=tHe.hasOwnProperty,iHe=Dle.call(Object);Nle=nHe});function dHe(e){return fHe.test(e)}var aHe,sHe,oHe,lHe,cHe,uHe,hHe,fHe,Ole,Ple=q(()=>{aHe="\\ud800-\\udfff",sHe="\\u0300-\\u036f",oHe="\\ufe20-\\ufe2f",lHe="\\u20d0-\\u20ff",cHe=sHe+oHe+lHe,uHe="\\ufe0e\\ufe0f",hHe="\\u200d",fHe=RegExp("["+hHe+aHe+cHe+uHe+"]");Ole=dHe});function pHe(e,t,r,i){var n=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++n]);++n{Ble=pHe});function gHe(){this.__data__=new Kf,this.size=0}var $le,zle=q(()=>{qb();$le=gHe});function mHe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Gle,qle=q(()=>{Gle=mHe});function yHe(e){return this.__data__.get(e)}var Vle,Wle=q(()=>{Vle=yHe});function vHe(e){return this.__data__.has(e)}var Ule,Hle=q(()=>{Ule=vHe});function xHe(e,t){var r=this.__data__;if(r instanceof Kf){var i=r.__data__;if(!Zf||i.length{qb();W5();U5();bHe=200;Yle=xHe});function v1(e){var t=this.__data__=new Kf(e);this.size=t.size}var Vc,Hb=q(()=>{qb();zle();qle();Wle();Hle();jle();v1.prototype.clear=$le;v1.prototype.delete=Gle;v1.prototype.get=Vle;v1.prototype.has=Ule;v1.prototype.set=Yle;Vc=v1});function THe(e,t){return e&&zc(t,on(t),e)}var Xle,Kle=q(()=>{a1();uh();Xle=THe});function wHe(e,t){return e&&zc(t,Os(t),e)}var Zle,Qle=q(()=>{a1();jf();Zle=wHe});function CHe(e,t){if(t)return e.slice();var r=e.length,i=tce?tce(r):new e.constructor(r);return e.copy(i),i}var rce,Jle,kHe,ece,tce,K5,D9=q(()=>{$o();rce=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jle=rce&&typeof module=="object"&&module&&!module.nodeType&&module,kHe=Jle&&Jle.exports===rce,ece=kHe?sn.Buffer:void 0,tce=ece?ece.allocUnsafe:void 0;K5=CHe});function SHe(e,t){for(var r=-1,i=e==null?0:e.length,n=0,a=[];++r{Z5=SHe});function EHe(){return[]}var Q5,M9=q(()=>{Q5=EHe});var AHe,_He,ice,LHe,b1,J5=q(()=>{N9();M9();AHe=Object.prototype,_He=AHe.propertyIsEnumerable,ice=Object.getOwnPropertySymbols,LHe=ice?function(e){return e==null?[]:(e=Object(e),Z5(ice(e),function(t){return _He.call(e,t)}))}:Q5,b1=LHe});function RHe(e,t){return zc(e,b1(e),t)}var nce,ace=q(()=>{a1();J5();nce=RHe});var IHe,DHe,e3,O9=q(()=>{Y5();X5();J5();M9();IHe=Object.getOwnPropertySymbols,DHe=IHe?function(e){for(var t=[];e;)g1(t,b1(e)),e=y1(e);return t}:Q5,e3=DHe});function NHe(e,t){return zc(e,e3(e),t)}var sce,oce=q(()=>{a1();O9();sce=NHe});function MHe(e,t,r){var i=t(e);return Dr(e)?i:g1(i,r(e))}var t3,P9=q(()=>{Y5();_n();t3=MHe});function OHe(e){return t3(e,on,b1)}var Yb,B9=q(()=>{P9();J5();uh();Yb=OHe});function PHe(e){return t3(e,Os,e3)}var lce,cce=q(()=>{P9();O9();jf();lce=PHe});var BHe,r3,uce=q(()=>{zf();$o();BHe=Ns(sn,"DataView"),r3=BHe});var FHe,i3,hce=q(()=>{zf();$o();FHe=Ns(sn,"Promise"),i3=FHe});var $He,td,F9=q(()=>{zf();$o();$He=Ns(sn,"Set"),td=$He});var fce,zHe,dce,pce,gce,mce,GHe,qHe,VHe,WHe,UHe,o0,ho,l0=q(()=>{uce();W5();hce();F9();Zse();Ff();m9();fce="[object Map]",zHe="[object Object]",dce="[object Promise]",pce="[object Set]",gce="[object WeakMap]",mce="[object DataView]",GHe=oh(r3),qHe=oh(Zf),VHe=oh(i3),WHe=oh(td),UHe=oh(D5),o0=ns;(r3&&o0(new r3(new ArrayBuffer(1)))!=mce||Zf&&o0(new Zf)!=fce||i3&&o0(i3.resolve())!=dce||td&&o0(new td)!=pce||D5&&o0(new D5)!=gce)&&(o0=function(e){var t=ns(e),r=t==zHe?e.constructor:void 0,i=r?oh(r):"";if(i)switch(i){case GHe:return mce;case qHe:return fce;case VHe:return dce;case WHe:return pce;case UHe:return gce}return t});ho=o0});function jHe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&YHe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var HHe,YHe,yce,vce=q(()=>{HHe=Object.prototype,YHe=HHe.hasOwnProperty;yce=jHe});var XHe,x1,$9=q(()=>{$o();XHe=sn.Uint8Array,x1=XHe});function KHe(e){var t=new e.constructor(e.byteLength);return new x1(t).set(new x1(e)),t}var T1,n3=q(()=>{$9();T1=KHe});function ZHe(e,t){var r=t?T1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var bce,xce=q(()=>{n3();bce=ZHe});function JHe(e){var t=new e.constructor(e.source,QHe.exec(e));return t.lastIndex=e.lastIndex,t}var QHe,Tce,wce=q(()=>{QHe=/\w*$/;Tce=JHe});function eYe(e){return Cce?Object(Cce.call(e)):{}}var kce,Cce,Sce,Ece=q(()=>{i0();kce=ra?ra.prototype:void 0,Cce=kce?kce.valueOf:void 0;Sce=eYe});function tYe(e,t){var r=t?T1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var a3,z9=q(()=>{n3();a3=tYe});function TYe(e,t,r){var i=e.constructor;switch(t){case uYe:return T1(e);case rYe:case iYe:return new i(+e);case hYe:return bce(e,r);case fYe:case dYe:case pYe:case gYe:case mYe:case yYe:case vYe:case bYe:case xYe:return a3(e,r);case nYe:return new i;case aYe:case lYe:return new i(e);case sYe:return Tce(e);case oYe:return new i;case cYe:return Sce(e)}}var rYe,iYe,nYe,aYe,sYe,oYe,lYe,cYe,uYe,hYe,fYe,dYe,pYe,gYe,mYe,yYe,vYe,bYe,xYe,Ace,_ce=q(()=>{n3();xce();wce();Ece();z9();rYe="[object Boolean]",iYe="[object Date]",nYe="[object Map]",aYe="[object Number]",sYe="[object RegExp]",oYe="[object Set]",lYe="[object String]",cYe="[object Symbol]",uYe="[object ArrayBuffer]",hYe="[object DataView]",fYe="[object Float32Array]",dYe="[object Float64Array]",pYe="[object Int8Array]",gYe="[object Int16Array]",mYe="[object Int32Array]",yYe="[object Uint8Array]",vYe="[object Uint8ClampedArray]",bYe="[object Uint16Array]",xYe="[object Uint32Array]";Ace=TYe});function wYe(e){return typeof e.constructor=="function"&&!Uf(e)?Jse(y1(e)):{}}var s3,G9=q(()=>{eoe();X5();Pb();s3=wYe});function CYe(e){return yn(e)&&ho(e)==kYe}var kYe,Lce,Rce=q(()=>{l0();Rl();kYe="[object Map]";Lce=CYe});var Ice,SYe,Dce,Nce=q(()=>{Rce();Bb();$5();Ice=ch&&ch.isMap,SYe=Ice?Hf(Ice):Lce,Dce=SYe});function AYe(e){return yn(e)&&ho(e)==EYe}var EYe,Mce,Oce=q(()=>{l0();Rl();EYe="[object Set]";Mce=AYe});var Pce,_Ye,Bce,Fce=q(()=>{Oce();Bb();$5();Pce=ch&&ch.isSet,_Ye=Pce?Hf(Pce):Mce,Bce=_Ye});function o3(e,t,r,i,n,a){var s,o=t&LYe,l=t&RYe,u=t&IYe;if(r&&(s=n?r(e,i,n,a):r(e)),s!==void 0)return s;if(!Vi(e))return e;var h=Dr(e);if(h){if(s=yce(e),!o)return N5(e,s)}else{var f=ho(e),d=f==zce||f==PYe;if(Dl(e))return K5(e,o);if(f==Gce||f==$ce||d&&!n){if(s=l||d?{}:s3(e),!o)return l?sce(e,Zle(s,e)):nce(e,Xle(s,e))}else{if(!Si[f])return n?e:{};s=Ace(e,f,o)}}a||(a=new Vc);var p=a.get(e);if(p)return p;a.set(e,s),Bce(e)?e.forEach(function(y){s.add(o3(y,t,r,y,e,a))}):Dce(e)&&e.forEach(function(y,v){s.set(v,o3(y,t,r,v,e,a))});var g=u?l?lce:Yb:l?Os:on,m=h?void 0:g(e);return O5(m||e,function(y,v){m&&(v=y,y=e[v]),Vf(s,v,o3(y,t,r,v,e,a))}),s}var LYe,RYe,IYe,$ce,DYe,NYe,MYe,OYe,zce,PYe,BYe,FYe,Gce,$Ye,zYe,GYe,qYe,VYe,WYe,UYe,HYe,YYe,jYe,XYe,KYe,ZYe,QYe,JYe,eje,Si,l3,q9=q(()=>{Hb();T9();Nb();Kle();Qle();D9();y9();ace();oce();B9();cce();l0();vce();_ce();G9();_n();l1();Nce();zo();Fce();uh();jf();LYe=1,RYe=2,IYe=4,$ce="[object Arguments]",DYe="[object Array]",NYe="[object Boolean]",MYe="[object Date]",OYe="[object Error]",zce="[object Function]",PYe="[object GeneratorFunction]",BYe="[object Map]",FYe="[object Number]",Gce="[object Object]",$Ye="[object RegExp]",zYe="[object Set]",GYe="[object String]",qYe="[object Symbol]",VYe="[object WeakMap]",WYe="[object ArrayBuffer]",UYe="[object DataView]",HYe="[object Float32Array]",YYe="[object Float64Array]",jYe="[object Int8Array]",XYe="[object Int16Array]",KYe="[object Int32Array]",ZYe="[object Uint8Array]",QYe="[object Uint8ClampedArray]",JYe="[object Uint16Array]",eje="[object Uint32Array]",Si={};Si[$ce]=Si[DYe]=Si[WYe]=Si[UYe]=Si[NYe]=Si[MYe]=Si[HYe]=Si[YYe]=Si[jYe]=Si[XYe]=Si[KYe]=Si[BYe]=Si[FYe]=Si[Gce]=Si[$Ye]=Si[zYe]=Si[GYe]=Si[qYe]=Si[ZYe]=Si[QYe]=Si[JYe]=Si[eje]=!0;Si[OYe]=Si[zce]=Si[VYe]=!1;l3=o3});function rje(e){return l3(e,tje)}var tje,V9,qce=q(()=>{q9();tje=4;V9=rje});function aje(e){return l3(e,ije|nje)}var ije,nje,W9,Vce=q(()=>{q9();ije=1,nje=4;W9=aje});function oje(e){return this.__data__.set(e,sje),this}var sje,Wce,Uce=q(()=>{sje="__lodash_hash_undefined__";Wce=oje});function lje(e){return this.__data__.has(e)}var Hce,Yce=q(()=>{Hce=lje});function c3(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new s0;++t{U5();Uce();Yce();c3.prototype.add=c3.prototype.push=Wce;c3.prototype.has=Hce;u3=c3});function cje(e,t){for(var r=-1,i=e==null?0:e.length;++r{jce=cje});function uje(e,t){return e.has(t)}var h3,H9=q(()=>{h3=uje});function dje(e,t,r,i,n,a){var s=r&hje,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=r&fje?new u3:void 0;for(a.set(e,t),a.set(t,e);++f{U9();Xce();H9();hje=1,fje=2;f3=dje});function pje(e){var t=-1,r=Array(e.size);return e.forEach(function(i,n){r[++t]=[n,i]}),r}var Kce,Zce=q(()=>{Kce=pje});function gje(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var w1,d3=q(()=>{w1=gje});function Lje(e,t,r,i,n,a,s){switch(r){case _je:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Aje:return!(e.byteLength!=t.byteLength||!a(new x1(e),new x1(t)));case vje:case bje:case wje:return Go(+e,+t);case xje:return e.name==t.name&&e.message==t.message;case kje:case Sje:return e==t+"";case Tje:var o=Kce;case Cje:var l=i&mje;if(o||(o=w1),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;i|=yje,s.set(e,t);var h=f3(o(e),o(t),i,n,a,s);return s.delete(e),h;case Eje:if(j9)return j9.call(e)==j9.call(t)}return!1}var mje,yje,vje,bje,xje,Tje,wje,kje,Cje,Sje,Eje,Aje,_je,Qce,j9,Jce,eue=q(()=>{i0();$9();a0();Y9();Zce();d3();mje=1,yje=2,vje="[object Boolean]",bje="[object Date]",xje="[object Error]",Tje="[object Map]",wje="[object Number]",kje="[object RegExp]",Cje="[object Set]",Sje="[object String]",Eje="[object Symbol]",Aje="[object ArrayBuffer]",_je="[object DataView]",Qce=ra?ra.prototype:void 0,j9=Qce?Qce.valueOf:void 0;Jce=Lje});function Nje(e,t,r,i,n,a){var s=r&Rje,o=Yb(e),l=o.length,u=Yb(t),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in t:Dje.call(t,d)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=s;++f{B9();Rje=1,Ije=Object.prototype,Dje=Ije.hasOwnProperty;tue=Nje});function Pje(e,t,r,i,n,a){var s=Dr(e),o=Dr(t),l=s?nue:ho(e),u=o?nue:ho(t);l=l==iue?p3:l,u=u==iue?p3:u;var h=l==p3,f=u==p3,d=l==u;if(d&&Dl(e)){if(!Dl(t))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Vc),s||Yf(e)?f3(e,t,r,i,n,a):Jce(e,t,l,r,i,n,a);if(!(r&Mje)){var p=h&&aue.call(e,"__wrapped__"),g=f&&aue.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,y=g?t.value():t;return a||(a=new Vc),n(m,y,r,i,a)}}return d?(a||(a=new Vc),tue(e,t,r,i,n,a)):!1}var Mje,iue,nue,p3,Oje,aue,sue,oue=q(()=>{Hb();Y9();eue();rue();l0();_n();l1();$b();Mje=1,iue="[object Arguments]",nue="[object Array]",p3="[object Object]",Oje=Object.prototype,aue=Oje.hasOwnProperty;sue=Pje});function lue(e,t,r,i,n){return e===t?!0:e==null||t==null||!yn(e)&&!yn(t)?e!==e&&t!==t:sue(e,t,r,i,lue,n)}var g3,X9=q(()=>{oue();Rl();g3=lue});function $je(e,t,r,i){var n=r.length,a=n,s=!i;if(e==null)return!a;for(e=Object(e);n--;){var o=r[n];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n{Hb();X9();Bje=1,Fje=2;cue=$je});function zje(e){return e===e&&!Vi(e)}var m3,K9=q(()=>{zo();m3=zje});function Gje(e){for(var t=on(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,m3(n)]}return t}var hue,fue=q(()=>{K9();uh();hue=Gje});function qje(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var y3,Z9=q(()=>{y3=qje});function Vje(e){var t=hue(e);return t.length==1&&t[0][2]?y3(t[0][0],t[0][1]):function(r){return r===e||cue(r,e,t)}}var due,pue=q(()=>{uue();fue();Z9();due=Vje});function Wje(e,t){return e!=null&&t in Object(e)}var gue,mue=q(()=>{gue=Wje});function Uje(e,t,r){t=Jf(t,e);for(var i=-1,n=t.length,a=!1;++i{Wb();o1();_n();Ib();F5();p1();v3=Uje});function Hje(e,t){return e!=null&&v3(e,t,gue)}var b3,J9=q(()=>{mue();Q9();b3=Hje});function Xje(e,t){return u1(e)&&m3(t)?y3(qc(e),t):function(r){var i=Cle(r,e);return i===void 0&&i===t?b3(r,e):g3(t,i,Yje|jje)}}var Yje,jje,yue,vue=q(()=>{X9();Sle();J9();V5();K9();Z9();p1();Yje=1,jje=2;yue=Xje});function Kje(e){return function(t){return t?.[e]}}var x3,eN=q(()=>{x3=Kje});function Zje(e){return function(t){return ed(t,e)}}var bue,xue=q(()=>{Ub();bue=Zje});function Qje(e){return u1(e)?x3(qc(e)):bue(e)}var Tue,wue=q(()=>{eN();xue();V5();p1();Tue=Qje});function Jje(e){return typeof e=="function"?e:e==null?Ds:typeof e=="object"?Dr(e)?yue(e[0],e[1]):due(e):Tue(e)}var Oa,fh=q(()=>{pue();vue();$f();_n();wue();Oa=Jje});function eXe(e){return function(t,r,i){for(var n=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[e?o:++n];if(r(a[l],l,a)===!1)break}return t}}var kue,Cue=q(()=>{kue=eXe});var tXe,k1,T3=q(()=>{Cue();tXe=kue(),k1=tXe});function rXe(e,t){return e&&k1(e,t,on)}var C1,w3=q(()=>{T3();uh();C1=rXe});function iXe(e,t){return function(r,i){if(r==null)return r;if(!ia(r))return e(r,i);for(var n=r.length,a=t?n:-1,s=Object(r);(t?a--:++a{Gc();Sue=iXe});var nXe,rd,jb=q(()=>{w3();Eue();nXe=Sue(C1),rd=nXe});var aXe,k3,Aue=q(()=>{$o();aXe=function(){return sn.Date.now()},k3=aXe});var _ue,sXe,oXe,tN,Lue=q(()=>{Mb();a0();Ob();jf();_ue=Object.prototype,sXe=_ue.hasOwnProperty,oXe=Wf(function(e,t){e=Object(e);var r=-1,i=t.length,n=i>2?t[2]:void 0;for(n&&lh(t[0],t[1],n)&&(i=1);++r{Db();a0();Xb=lXe});function cXe(e){return yn(e)&&ia(e)}var C3,iN=q(()=>{Gc();Rl();C3=cXe});function uXe(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Kb,nN=q(()=>{Kb=uXe});function hXe(e){return zc(e,Os(e))}var Rue,Iue=q(()=>{a1();jf();Rue=hXe});function fXe(e,t,r,i,n,a,s){var o=Kb(e,r),l=Kb(t,r),u=s.get(l);if(u){Xb(e,r,u);return}var h=a?a(o,l,r+"",e,t,s):void 0,f=h===void 0;if(f){var d=Dr(l),p=!d&&Dl(l),g=!d&&!p&&Yf(l);h=l,d||p||g?Dr(o)?h=o:C3(o)?h=N5(o):p?(f=!1,h=K5(l,!0)):g?(f=!1,h=a3(l,!0)):h=[]:Nle(l)||Il(l)?(h=o,Il(o)?h=Rue(o):(!Vi(o)||$c(o))&&(h=s3(l))):f=!1}f&&(s.set(l,h),n(h,l,i,a,s),s.delete(l)),Xb(e,r,h)}var Due,Nue=q(()=>{rN();D9();z9();y9();G9();o1();_n();iN();l1();Rb();zo();Mle();$b();nN();Iue();Due=fXe});function Mue(e,t,r,i,n){e!==t&&k1(t,function(a,s){if(n||(n=new Vc),Vi(a))Due(e,t,s,r,Mue,i,n);else{var o=i?i(Kb(e,s),a,s+"",e,t,n):void 0;o===void 0&&(o=a),Xb(e,s,o)}},Os)}var Oue,Pue=q(()=>{Hb();rN();T3();Nue();zo();jf();nN();Oue=Mue});function dXe(e,t,r){for(var i=-1,n=e==null?0:e.length;++i{Bue=dXe});function pXe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var id,$ue=q(()=>{id=pXe});function gXe(e){return typeof e=="function"?e:Ds}var S1,S3=q(()=>{$f();S1=gXe});function mXe(e,t){var r=Dr(e)?O5:rd;return r(e,S1(t))}var tt,aN=q(()=>{T9();jb();S3();_n();tt=mXe});var zue=q(()=>{aN()});function yXe(e,t){var r=[];return rd(e,function(i,n,a){t(i,n,a)&&r.push(i)}),r}var Gue,que=q(()=>{jb();Gue=yXe});function vXe(e,t){var r=Dr(e)?Z5:Gue;return r(e,Oa(t,3))}var as,Vue=q(()=>{N9();que();fh();_n();as=vXe});function bXe(e){return function(t,r,i){var n=Object(t);if(!ia(t)){var a=Oa(r,3);t=on(t),r=function(o){return a(n[o],o,n)}}var s=e(t,r,i);return s>-1?n[a?t[s]:s]:void 0}}var Wue,Uue=q(()=>{fh();Gc();uh();Wue=bXe});function TXe(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Gse(r);return n<0&&(n=xXe(i+n,0)),P5(e,Oa(t,3),n)}var xXe,Hue,Yue=q(()=>{w9();fh();qse();xXe=Math.max;Hue=TXe});var wXe,E1,jue=q(()=>{Uue();Yue();wXe=Wue(Hue),E1=wXe});function kXe(e,t){var r=-1,i=ia(e)?Array(e.length):[];return rd(e,function(n,a,s){i[++r]=t(n,a,s)}),i}var E3,sN=q(()=>{jb();Gc();E3=kXe});function CXe(e,t){var r=Dr(e)?Fc:E3;return r(e,Oa(t,3))}var ei,Xue=q(()=>{Lb();fh();sN();_n();ei=CXe});function SXe(e,t){return e==null?e:k1(e,S1(t),Os)}var oN,Kue=q(()=>{T3();S3();jf();oN=SXe});function EXe(e,t){return e&&C1(e,S1(t))}var lN,Zue=q(()=>{w3();S3();lN=EXe});function AXe(e,t){return e>t}var Que,Jue=q(()=>{Que=AXe});function RXe(e,t){return e!=null&&LXe.call(e,t)}var _Xe,LXe,ehe,the=q(()=>{_Xe=Object.prototype,LXe=_Xe.hasOwnProperty;ehe=RXe});function IXe(e,t){return e!=null&&v3(e,t,ehe)}var Zb,rhe=q(()=>{the();Q9();Zb=IXe});function NXe(e){return typeof e=="string"||!Dr(e)&&yn(e)&&ns(e)==DXe}var DXe,ihe,nhe=q(()=>{Ff();_n();Rl();DXe="[object String]";ihe=NXe});function MXe(e,t){return Fc(t,function(r){return e[r]})}var ahe,she=q(()=>{Lb();ahe=MXe});function OXe(e){return e==null?[]:ahe(e,on(e))}var fo,ohe=q(()=>{she();uh();fo=OXe});function zXe(e){if(e==null)return!0;if(ia(e)&&(Dr(e)||typeof e=="string"||typeof e.splice=="function"||Dl(e)||Yf(e)||Il(e)))return!e.length;var t=ho(e);if(t==PXe||t==BXe)return!e.size;if(Uf(e))return!c1(e).length;for(var r in e)if($Xe.call(e,r))return!1;return!0}var PXe,BXe,FXe,$Xe,A3,lhe=q(()=>{q5();l0();o1();_n();Gc();l1();Pb();$b();PXe="[object Map]",BXe="[object Set]",FXe=Object.prototype,$Xe=FXe.hasOwnProperty;A3=zXe});function GXe(e){return e===void 0}var bi,che=q(()=>{bi=GXe});function qXe(e,t){return e{_3=qXe});function VXe(e,t){var r={};return t=Oa(t,3),C1(e,function(i,n,a){qf(r,n,t(i,n,a))}),r}var c0,uhe=q(()=>{Db();w3();fh();c0=VXe});function WXe(e,t,r){for(var i=-1,n=e.length;++i{n0();A1=WXe});function UXe(e){return e&&e.length?A1(e,Ds,Que):void 0}var Ps,hhe=q(()=>{L3();Jue();$f();Ps=UXe});var HXe,_1,fhe=q(()=>{Pue();boe();HXe=voe(function(e,t,r){Oue(e,t,r)}),_1=HXe});function YXe(e){return e&&e.length?A1(e,Ds,_3):void 0}var dh,dhe=q(()=>{L3();cN();$f();dh=YXe});function jXe(e,t){return e&&e.length?A1(e,Oa(t,2),_3):void 0}var u0,phe=q(()=>{L3();fh();cN();u0=jXe});function XXe(e,t,r,i){if(!Vi(e))return e;t=Jf(t,e);for(var n=-1,a=t.length,s=a-1,o=e;o!=null&&++n{Nb();Wb();Ib();zo();p1();ghe=XXe});function KXe(e,t,r){for(var i=-1,n=t.length,a={};++i{Ub();mhe();Wb();yhe=KXe});function ZXe(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var bhe,xhe=q(()=>{bhe=ZXe});function QXe(e,t){if(e!==t){var r=e!==void 0,i=e===null,n=e===e,a=uo(e),s=t!==void 0,o=t===null,l=t===t,u=uo(t);if(!o&&!u&&!a&&e>t||a&&s&&l&&!o&&!u||i&&s&&l||!r&&l||!n)return 1;if(!i&&!a&&!u&&e{n0();The=QXe});function JXe(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,s=n.length,o=r.length;++i=o)return l;var u=r[i];return l*(u=="desc"?-1:1)}}return e.index-t.index}var khe,Che=q(()=>{whe();khe=JXe});function eKe(e,t,r){t.length?t=Fc(t,function(a){return Dr(a)?function(s){return ed(s,a.length===1?a[0]:a)}:a}):t=[Ds];var i=-1;t=Fc(t,Hf(Oa));var n=E3(e,function(a,s,o){var l=Fc(t,function(u){return u(a)});return{criteria:l,index:++i,value:a}});return bhe(n,function(a,s){return khe(a,s,r)})}var She,Ehe=q(()=>{Lb();Ub();fh();sN();xhe();Bb();Che();$f();_n();She=eKe});var tKe,Ahe,_he=q(()=>{eN();tKe=x3("length"),Ahe=tKe});function dKe(e){for(var t=Lhe.lastIndex=0;Lhe.test(e);)++t;return t}var Rhe,rKe,iKe,nKe,aKe,sKe,oKe,uN,hN,lKe,Ihe,Dhe,Nhe,cKe,Mhe,Ohe,uKe,hKe,fKe,Lhe,Phe,Bhe=q(()=>{Rhe="\\ud800-\\udfff",rKe="\\u0300-\\u036f",iKe="\\ufe20-\\ufe2f",nKe="\\u20d0-\\u20ff",aKe=rKe+iKe+nKe,sKe="\\ufe0e\\ufe0f",oKe="["+Rhe+"]",uN="["+aKe+"]",hN="\\ud83c[\\udffb-\\udfff]",lKe="(?:"+uN+"|"+hN+")",Ihe="[^"+Rhe+"]",Dhe="(?:\\ud83c[\\udde6-\\uddff]){2}",Nhe="[\\ud800-\\udbff][\\udc00-\\udfff]",cKe="\\u200d",Mhe=lKe+"?",Ohe="["+sKe+"]?",uKe="(?:"+cKe+"(?:"+[Ihe,Dhe,Nhe].join("|")+")"+Ohe+Mhe+")*",hKe=Ohe+Mhe+uKe,fKe="(?:"+[Ihe+uN+"?",uN,Dhe,Nhe,oKe].join("|")+")",Lhe=RegExp(hN+"(?="+hN+")|"+fKe+hKe,"g");Phe=dKe});function pKe(e){return Ole(e)?Phe(e):Ahe(e)}var Fhe,$he=q(()=>{_he();Ple();Bhe();Fhe=pKe});function gKe(e,t){return yhe(e,t,function(r,i){return b3(e,i)})}var zhe,Ghe=q(()=>{vhe();J9();zhe=gKe});var mKe,h0,qhe=q(()=>{Ghe();Ile();mKe=Rle(function(e,t){return e==null?{}:zhe(e,t)}),h0=mKe});function bKe(e,t,r,i){for(var n=-1,a=vKe(yKe((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}var yKe,vKe,Vhe,Whe=q(()=>{yKe=Math.ceil,vKe=Math.max;Vhe=bKe});function xKe(e){return function(t,r,i){return i&&typeof i!="number"&&lh(t,r,i)&&(r=i=void 0),t=i1(t),r===void 0?(r=t,t=0):r=i1(r),i=i===void 0?t{Whe();Ob();g9();Uhe=xKe});var TKe,Vo,Yhe=q(()=>{Hhe();TKe=Uhe(),Vo=TKe});function wKe(e,t,r,i,n){return n(e,function(a,s,o){r=i?(i=!1,a):t(r,a,s,o)}),r}var jhe,Xhe=q(()=>{jhe=wKe});function kKe(e,t,r){var i=Dr(e)?Ble:jhe,n=arguments.length<3;return i(e,Oa(t,4),r,n,rd)}var Wc,Khe=q(()=>{Fle();jb();fh();Xhe();_n();Wc=kKe});function EKe(e){if(e==null)return 0;if(ia(e))return ihe(e)?Fhe(e):e.length;var t=ho(e);return t==CKe||t==SKe?e.size:c1(e).length}var CKe,SKe,fN,Zhe=q(()=>{q5();l0();Gc();nhe();$he();CKe="[object Map]",SKe="[object Set]";fN=EKe});var AKe,Uc,Qhe=q(()=>{j5();Ehe();Mb();Ob();AKe=Wf(function(e,t){if(e==null)return[];var r=t.length;return r>1&&lh(e,t[0],t[1])?t=[]:r>2&&lh(t[0],t[1],t[2])&&(t=[t[0]]),She(e,m1(t,1),[])}),Uc=AKe});var _Ke,LKe,Jhe,efe=q(()=>{F9();noe();d3();_Ke=1/0,LKe=td&&1/w1(new td([,-0]))[1]==_Ke?function(e){return new td(e)}:ioe,Jhe=LKe});function IKe(e,t,r){var i=-1,n=goe,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=Bue;else if(a>=RKe){var u=t?null:Jhe(e);if(u)return w1(u);s=!1,n=h3,l=new u3}else l=t?[]:o;e:for(;++i{U9();moe();Fue();H9();efe();d3();RKe=200;tfe=IKe});var DKe,dN,ife=q(()=>{j5();Mb();rfe();iN();DKe=Wf(function(e){return tfe(m1(e,1,C3,!0))}),dN=DKe});function MKe(e){var t=++NKe;return H5(e)+t}var NKe,f0,nfe=q(()=>{R9();NKe=0;f0=MKe});function OKe(e,t,r){for(var i=-1,n=e.length,a=t.length,s={};++i{afe=OKe});function PKe(e,t){return afe(e||[],t||[],Vf)}var R3,ofe=q(()=>{Nb();sfe();R3=PKe});var ci=q(()=>{qce();Vce();v9();Lue();zue();Vue();jue();I9();aN();Kue();Zue();rhe();_n();lhe();Rb();che();uh();$ue();Xue();uhe();hhe();fhe();dhe();phe();Aue();qhe();Yhe();Khe();Zhe();Qhe();ife();nfe();ohe();ofe();});function cfe(e,t){e[t]?e[t]++:e[t]=1}function ufe(e,t){--e[t]||delete e[t]}function Qb(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var s=n;n=a,a=s}return n+lfe+a+lfe+(bi(i)?BKe:i)}function FKe(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var s=n;n=a,a=s}var o={v:n,w:a};return i&&(o.name=i),o}function pN(e,t){return Qb(e,t.v,t.w,t.name)}var BKe,d0,lfe,ui,I3=q(()=>{ci();BKe="\0",d0="\0",lfe="",ui=class{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Ms(void 0),this._defaultEdgeLabelFn=Ms(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[d0]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return $c(t)||(t=Ms(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return on(this._nodes)}sources(){var t=this;return as(this.nodes(),function(r){return A3(t._in[r])})}sinks(){var t=this;return as(this.nodes(),function(r){return A3(t._out[r])})}setNodes(t,r){var i=arguments,n=this;return tt(t,function(a){i.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=d0,this._children[t]={},this._children[d0][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],tt(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),tt(on(this._in[t]),r),delete this._in[t],delete this._preds[t],tt(on(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(bi(r))r=d0;else{r+="";for(var i=r;!bi(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==d0)return r}}children(t){if(bi(t)&&(t=d0),this._isCompound){var r=this._children[t];if(r)return on(r)}else{if(t===d0)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return on(r)}successors(t){var r=this._sucs[t];if(r)return on(r)}neighbors(t){var r=this.predecessors(t);if(r)return dN(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;tt(this._nodes,function(s,o){t(o)&&r.setNode(o,s)}),tt(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,i.edge(s))});var n={};function a(s){var o=i.parent(s);return o===void 0||r.hasNode(o)?(n[s]=o,o):o in n?n[o]:a(o)}return this._isCompound&&tt(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(t){return $c(t)||(t=Ms(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return fo(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return Wc(t,function(a,s){return n.length>1?i.setEdge(a,s,r):i.setEdge(a,s),s}),this}setEdge(){var t,r,i,n,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(t=s.v,r=s.w,i=s.name,arguments.length===2&&(n=arguments[1],a=!0)):(t=s,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),t=""+t,r=""+r,bi(i)||(i=""+i);var o=Qb(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=n),this;if(!bi(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=a?n:this._defaultEdgeLabelFn(t,r,i);var l=FKe(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,cfe(this._preds[r],t),cfe(this._sucs[t],r),this._in[r][o]=l,this._out[t][o]=l,this._edgeCount++,this}edge(t,r,i){var n=arguments.length===1?pN(this._isDirected,arguments[0]):Qb(this._isDirected,t,r,i);return this._edgeLabels[n]}hasEdge(t,r,i){var n=arguments.length===1?pN(this._isDirected,arguments[0]):Qb(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,r,i){var n=arguments.length===1?pN(this._isDirected,arguments[0]):Qb(this._isDirected,t,r,i),a=this._edgeObjs[n];return a&&(t=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],ufe(this._preds[r],t),ufe(this._sucs[t],r),delete this._in[r][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var n=fo(i);return r?as(n,function(a){return a.v===r}):n}}outEdges(t,r){var i=this._out[t];if(i){var n=fo(i);return r?as(n,function(a){return a.w===r}):n}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}};ui.prototype._nodeCount=0;ui.prototype._edgeCount=0});var Wo=q(()=>{I3()});function hfe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function $Ke(e,t){if(e!=="_next"&&e!=="_prev")return t}var N3,ffe=q(()=>{N3=class{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return hfe(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&hfe(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,i=r._prev;i!==r;)t.push(JSON.stringify(i,$Ke)),i=i._prev;return"["+t.join(", ")+"]"}}});function dfe(e,t){if(e.nodeCount()<=1)return[];var r=qKe(e,t||zKe),i=GKe(r.graph,r.buckets,r.zeroIdx);return qo(ei(i,function(n){return e.outEdges(n.v,n.w)}))}function GKe(e,t,r){for(var i=[],n=t[t.length-1],a=t[0],s;e.nodeCount();){for(;s=a.dequeue();)gN(e,t,r,s);for(;s=n.dequeue();)gN(e,t,r,s);if(e.nodeCount()){for(var o=t.length-2;o>0;--o)if(s=t[o].dequeue(),s){i=i.concat(gN(e,t,r,s,!0));break}}}return i}function gN(e,t,r,i,n){var a=n?[]:void 0;return tt(e.inEdges(i.v),function(s){var o=e.edge(s),l=e.node(s.v);n&&a.push({v:s.v,w:s.w}),l.out-=o,mN(t,r,l)}),tt(e.outEdges(i.v),function(s){var o=e.edge(s),l=s.w,u=e.node(l);u.in-=o,mN(t,r,u)}),e.removeNode(i.v),a}function qKe(e,t){var r=new ui,i=0,n=0;tt(e.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),tt(e.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=t(o),h=l+u;r.setEdge(o.v,o.w,h),n=Math.max(n,r.node(o.v).out+=u),i=Math.max(i,r.node(o.w).in+=u)});var a=Vo(n+i+3).map(function(){return new N3}),s=i+1;return tt(r.nodes(),function(o){mN(a,s,r.node(o))}),{graph:r,buckets:a,zeroIdx:s}}function mN(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var zKe,pfe=q(()=>{ci();Wo();ffe();zKe=Ms(1)});function gfe(e){var t=e.graph().acyclicer==="greedy"?dfe(e,r(e)):VKe(e);tt(t,function(i){var n=e.edge(i);e.removeEdge(i),n.forwardName=i.name,n.reversed=!0,e.setEdge(i.w,i.v,n,f0("rev"))});function r(i){return function(n){return i.edge(n).weight}}}function VKe(e){var t=[],r={},i={};function n(a){Object.prototype.hasOwnProperty.call(i,a)||(i[a]=!0,r[a]=!0,tt(e.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?t.push(s):n(s.w)}),delete r[a])}return tt(e.nodes(),n),t}function mfe(e){tt(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var i=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,i)}})}var yN=q(()=>{ci();pfe()});function Hc(e,t,r,i){var n;do n=f0(i);while(e.hasNode(n));return r.dummy=t,e.setNode(n,r),n}function vfe(e){var t=new ui().setGraph(e.graph());return tt(e.nodes(),function(r){t.setNode(r,e.node(r))}),tt(e.edges(),function(r){var i=t.edge(r.v,r.w)||{weight:0,minlen:1},n=e.edge(r);t.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),t}function M3(e){var t=new ui({multigraph:e.isMultigraph()}).setGraph(e.graph());return tt(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),tt(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function vN(e,t){var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2;if(!n&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=o*n/a,u=o):(n<0&&(s=-s),l=s,u=s*a/n),{x:r+l,y:i+u}}function nd(e){var t=ei(Vo(xN(e)+1),function(){return[]});return tt(e.nodes(),function(r){var i=e.node(r),n=i.rank;bi(n)||(t[n][i.order]=r)}),t}function bfe(e){var t=dh(ei(e.nodes(),function(r){return e.node(r).rank}));tt(e.nodes(),function(r){var i=e.node(r);Zb(i,"rank")&&(i.rank-=t)})}function xfe(e){var t=dh(ei(e.nodes(),function(a){return e.node(a).rank})),r=[];tt(e.nodes(),function(a){var s=e.node(a).rank-t;r[s]||(r[s]=[]),r[s].push(a)});var i=0,n=e.graph().nodeRankFactor;tt(r,function(a,s){bi(a)&&s%n!==0?--i:i&&tt(a,function(o){e.node(o).rank+=i})})}function bN(e,t,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Hc(e,"border",n,t)}function xN(e){return Ps(ei(e.nodes(),function(t){var r=e.node(t).rank;if(!bi(r))return r}))}function Tfe(e,t){var r={lhs:[],rhs:[]};return tt(e,function(i){t(i)?r.lhs.push(i):r.rhs.push(i)}),r}function wfe(e,t){var r=k3();try{return t()}finally{console.log(e+" time: "+(k3()-r)+"ms")}}function kfe(e,t){return t()}var Yc=q(()=>{ci();Wo()});function Sfe(e){function t(r){var i=e.children(r),n=e.node(r);if(i.length&&tt(i,t),Object.prototype.hasOwnProperty.call(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var a=n.minRank,s=n.maxRank+1;a{ci();Yc()});function _fe(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Rfe(e)}function Lfe(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&WKe(e),(t==="lr"||t==="rl")&&(UKe(e),Rfe(e))}function Rfe(e){tt(e.nodes(),function(t){Afe(e.node(t))}),tt(e.edges(),function(t){Afe(e.edge(t))})}function Afe(e){var t=e.width;e.width=e.height,e.height=t}function WKe(e){tt(e.nodes(),function(t){TN(e.node(t))}),tt(e.edges(),function(t){var r=e.edge(t);tt(r.points,TN),Object.prototype.hasOwnProperty.call(r,"y")&&TN(r)})}function TN(e){e.y=-e.y}function UKe(e){tt(e.nodes(),function(t){wN(e.node(t))}),tt(e.edges(),function(t){var r=e.edge(t);tt(r.points,wN),Object.prototype.hasOwnProperty.call(r,"x")&&wN(r)})}function wN(e){var t=e.x;e.x=e.y,e.y=t}var Ife=q(()=>{ci()});function Dfe(e){e.graph().dummyChains=[],tt(e.edges(),function(t){YKe(e,t)})}function YKe(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==i+1){e.removeEdge(t);var u=void 0,h,f;for(f=0,++i;i{ci();Yc()});function Jb(e){var t={};function r(i){var n=e.node(i);if(Object.prototype.hasOwnProperty.call(t,i))return n.rank;t[i]=!0;var a=dh(ei(e.outEdges(i),function(s){return r(s.w)-e.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),n.rank=a}tt(e.sources(),r)}function p0(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var O3=q(()=>{ci()});function P3(e){var t=new ui({directed:!1}),r=e.nodes()[0],i=e.nodeCount();t.setNode(r,{});for(var n,a;jKe(t,e){ci();Wo();O3()});var Ofe=q(()=>{});var SN=q(()=>{});var frr,EN=q(()=>{ci();SN();frr=Ms(1)});var Pfe=q(()=>{EN()});var AN=q(()=>{});var Bfe=q(()=>{AN()});var brr,Ffe=q(()=>{ci();brr=Ms(1)});function _N(e){var t={},r={},i=[];function n(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new ex;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,tt(e.predecessors(a),n),delete r[a],i.push(a))}if(tt(e.sinks(),n),fN(t)!==e.nodeCount())throw new ex;return i}function ex(){}var LN=q(()=>{ci();_N.CycleException=ex;ex.prototype=new Error});var $fe=q(()=>{LN()});function B3(e,t,r){Dr(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],a={};return tt(t,function(s){if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);zfe(e,s,r==="post",a,i,n)}),n}function zfe(e,t,r,i,n,a){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,r||a.push(t),tt(n(t),function(s){zfe(e,s,r,i,n,a)}),r&&a.push(t))}var RN=q(()=>{ci()});function IN(e,t){return B3(e,t,"post")}var Gfe=q(()=>{RN()});function DN(e,t){return B3(e,t,"pre")}var qfe=q(()=>{RN()});var Vfe=q(()=>{SN();I3()});var Wfe=q(()=>{Ofe();EN();Pfe();Bfe();Ffe();$fe();Gfe();qfe();Vfe();AN();LN()});function sd(e){e=vfe(e),Jb(e);var t=P3(e);MN(t),NN(t,e);for(var r,i;r=jfe(t);)i=Xfe(t,e,r),Kfe(t,e,r,i)}function NN(e,t){var r=IN(e,e.nodes());r=r.slice(0,r.length-1),tt(r,function(i){tZe(e,t,i)})}function tZe(e,t,r){var i=e.node(r),n=i.parent;e.edge(r,n).cutvalue=Hfe(e,t,r)}function Hfe(e,t,r){var i=e.node(r),n=i.parent,a=!0,s=t.edge(r,n),o=0;return s||(a=!1,s=t.edge(n,r)),o=s.weight,tt(t.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==n){var f=u===a,d=t.edge(l).weight;if(o+=f?d:-d,iZe(e,r,h)){var p=e.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function MN(e,t){arguments.length<2&&(t=e.nodes()[0]),Yfe(e,{},1,t)}function Yfe(e,t,r,i,n){var a=r,s=e.node(i);return t[i]=!0,tt(e.neighbors(i),function(o){Object.prototype.hasOwnProperty.call(t,o)||(r=Yfe(e,t,r,o,i))}),s.low=a,s.lim=r++,n?s.parent=n:delete s.parent,r}function jfe(e){return E1(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Xfe(e,t,r){var i=r.v,n=r.w;t.hasEdge(i,n)||(i=r.w,n=r.v);var a=e.node(i),s=e.node(n),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var u=as(t.edges(),function(h){return l===Ufe(e,e.node(h.v),o)&&l!==Ufe(e,e.node(h.w),o)});return u0(u,function(h){return p0(t,h)})}function Kfe(e,t,r,i){var n=r.v,a=r.w;e.removeEdge(n,a),e.setEdge(i.v,i.w,{}),MN(e),NN(e,t),rZe(e,t)}function rZe(e,t){var r=E1(e.nodes(),function(n){return!t.node(n).parent}),i=DN(e,r);i=i.slice(1),tt(i,function(n){var a=e.node(n).parent,s=t.edge(n,a),o=!1;s||(s=t.edge(a,n),o=!0),t.node(n).rank=t.node(a).rank+(o?s.minlen:-s.minlen)})}function iZe(e,t,r){return e.hasEdge(t,r)}function Ufe(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var Zfe=q(()=>{ci();Wfe();Yc();CN();O3();sd.initLowLimValues=MN;sd.initCutValues=NN;sd.calcCutValue=Hfe;sd.leaveEdge=jfe;sd.enterEdge=Xfe;sd.exchangeEdges=Kfe});function ON(e){switch(e.graph().ranker){case"network-simplex":Qfe(e);break;case"tight-tree":aZe(e);break;case"longest-path":nZe(e);break;default:Qfe(e)}}function aZe(e){Jb(e),P3(e)}function Qfe(e){sd(e)}var nZe,PN=q(()=>{CN();Zfe();O3();nZe=Jb});function Jfe(e){var t=Hc(e,"root",{},"_root"),r=sZe(e),i=Ps(fo(r))-1,n=2*i+1;e.graph().nestingRoot=t,tt(e.edges(),function(s){e.edge(s).minlen*=n});var a=oZe(e)+1;tt(e.children(),function(s){ede(e,t,n,a,i,r,s)}),e.graph().nodeRankFactor=n}function ede(e,t,r,i,n,a,s){var o=e.children(s);if(!o.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}var l=bN(e,"_bt"),u=bN(e,"_bb"),h=e.node(s);e.setParent(l,s),h.borderTop=l,e.setParent(u,s),h.borderBottom=u,tt(o,function(f){ede(e,t,r,i,n,a,f);var d=e.node(f),p=d.borderTop?d.borderTop:f,g=d.borderBottom?d.borderBottom:f,m=d.borderTop?i:2*i,y=p!==g?1:n-a[s]+1;e.setEdge(l,p,{weight:m,minlen:y,nestingEdge:!0}),e.setEdge(g,u,{weight:m,minlen:y,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:n+a[s]})}function sZe(e){var t={};function r(i,n){var a=e.children(i);a&&a.length&&tt(a,function(s){r(s,n+1)}),t[i]=n}return tt(e.children(),function(i){r(i,1)}),t}function oZe(e){return Wc(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function tde(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,tt(e.edges(),function(r){var i=e.edge(r);i.nestingEdge&&e.removeEdge(r)})}var rde=q(()=>{ci();Yc()});function ide(e,t,r){var i={},n;tt(r,function(a){for(var s=e.parent(a),o,l;s;){if(o=e.parent(s),o?(l=i[o],i[o]=s):(l=n,n=s),l&&l!==s){t.setEdge(l,s);return}s=o}})}var nde=q(()=>{ci()});function ade(e,t,r){var i=cZe(e),n=new ui({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(a){return e.node(a)});return tt(e.nodes(),function(a){var s=e.node(a),o=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(n.setNode(a),n.setParent(a,o||i),tt(e[r](a),function(l){var u=l.v===a?l.w:l.v,h=n.edge(u,a),f=bi(h)?0:h.weight;n.setEdge(u,a,{weight:e.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&n.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),n}function cZe(e){for(var t;e.hasNode(t=f0("_root")););return t}var sde=q(()=>{ci();Wo()});function ode(e,t){for(var r=0,i=1;i0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var lde=q(()=>{ci()});function cde(e){var t={},r=as(e.nodes(),function(o){return!e.children(o).length}),i=Ps(ei(r,function(o){return e.node(o).rank})),n=ei(Vo(i+1),function(){return[]});function a(o){if(!Zb(t,o)){t[o]=!0;var l=e.node(o);n[l.rank].push(o),tt(e.successors(o),a)}}var s=Uc(r,function(o){return e.node(o).rank});return tt(s,a),n}var ude=q(()=>{ci()});function hde(e,t){return ei(t,function(r){var i=e.inEdges(r);if(i.length){var n=Wc(i,function(a,s){var o=e.edge(s),l=e.node(s.v);return{sum:a.sum+o.weight*l.order,weight:a.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}var fde=q(()=>{ci()});function dde(e,t){var r={};tt(e,function(n,a){var s=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:a};bi(n.barycenter)||(s.barycenter=n.barycenter,s.weight=n.weight)}),tt(t.edges(),function(n){var a=r[n.v],s=r[n.w];!bi(a)&&!bi(s)&&(s.indegree++,a.out.push(r[n.w]))});var i=as(r,function(n){return!n.indegree});return hZe(i)}function hZe(e){var t=[];function r(a){return function(s){s.merged||(bi(s.barycenter)||bi(a.barycenter)||s.barycenter>=a.barycenter)&&fZe(a,s)}}function i(a){return function(s){s.in.push(a),--s.indegree===0&&e.push(s)}}for(;e.length;){var n=e.pop();t.push(n),tt(n.in.reverse(),r(n)),tt(n.out,i(n))}return ei(as(t,function(a){return!a.merged}),function(a){return h0(a,["vs","i","barycenter","weight"])})}function fZe(e,t){var r=0,i=0;e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var pde=q(()=>{ci()});function mde(e,t){var r=Tfe(e,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),i=r.lhs,n=Uc(r.rhs,function(h){return-h.i}),a=[],s=0,o=0,l=0;i.sort(dZe(!!t)),l=gde(a,n,l),tt(i,function(h){l+=h.vs.length,a.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=gde(a,n,l)});var u={vs:qo(a)};return o&&(u.barycenter=s/o,u.weight=o),u}function gde(e,t,r){for(var i;t.length&&(i=id(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function dZe(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var yde=q(()=>{ci();Yc()});function BN(e,t,r,i){var n=e.children(t),a=e.node(t),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(n=as(n,function(g){return g!==s&&g!==o}));var u=hde(e,n);tt(u,function(g){if(e.children(g.v).length){var m=BN(e,g.v,r,i);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&gZe(g,m)}});var h=dde(u,r);pZe(h,l);var f=mde(h,i);if(s&&(f.vs=qo([s,f.vs,o]),e.predecessors(s).length)){var d=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function pZe(e,t){tt(e,function(r){r.vs=qo(r.vs.map(function(i){return t[i]?t[i].vs:i}))})}function gZe(e,t){bi(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var vde=q(()=>{ci();fde();pde();yde()});function Tde(e){var t=xN(e),r=bde(e,Vo(1,t+1),"inEdges"),i=bde(e,Vo(t-1,-1,-1),"outEdges"),n=cde(e);xde(e,n);for(var a=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){mZe(o%2?r:i,o%4>=2),n=nd(e);var u=ode(e,n);u{ci();Wo();Yc();nde();sde();lde();ude();vde()});function kde(e){var t=vZe(e);tt(e.graph().dummyChains,function(r){for(var i=e.node(r),n=i.edgeObj,a=yZe(e,t,n.v,n.w),s=a.path,o=a.lca,l=0,u=s[l],h=!0;r!==n.w;){if(i=e.node(r),h){for(;(u=s[l])!==o&&e.node(u).maxRanks||o>t[l].lim));for(u=l,l=i;(l=e.parent(l))!==u;)a.push(l);return{path:n.concat(a.reverse()),lca:u}}function vZe(e){var t={},r=0;function i(n){var a=r;tt(e.children(n),i),t[n]={low:a,lim:r++}}return tt(e.children(),i),t}var Cde=q(()=>{ci()});function bZe(e,t){var r={};function i(n,a){var s=0,o=0,l=n.length,u=id(a);return tt(a,function(h,f){var d=TZe(e,h),p=d?e.node(d).order:l;(d||h===u)&&(tt(a.slice(o,f+1),function(g){tt(e.predecessors(g),function(m){var y=e.node(m),v=y.order;(vu)&&Sde(r,d,h)})})}function n(a,s){var o=-1,l,u=0;return tt(s,function(h,f){if(e.node(h).dummy==="border"){var d=e.predecessors(h);d.length&&(l=e.node(d[0]).order,i(s,u,f,o,l),u=f,o=l)}i(s,u,s.length,l,a.length)}),s}return Wc(t,n),r}function TZe(e,t){if(e.node(t).dummy)return E1(e.predecessors(t),function(r){return e.node(r).dummy})}function Sde(e,t,r){if(t>r){var i=t;t=r,r=i}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var n=e[t];Object.defineProperty(n,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function wZe(e,t,r){if(t>r){var i=t;t=r,r=i}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function kZe(e,t,r,i){var n={},a={},s={};return tt(t,function(o){tt(o,function(l,u){n[l]=l,a[l]=l,s[l]=u})}),tt(t,function(o){var l=-1;tt(o,function(u){var h=i(u);if(h.length){h=Uc(h,function(m){return s[m]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var g=h[d];a[u]===u&&l{ci();Wo();Yc()});function _de(e){e=M3(e),IZe(e),lN(Ede(e),function(t,r){e.node(r).x=t})}function IZe(e){var t=nd(e),r=e.graph().ranksep,i=0;tt(t,function(n){var a=Ps(ei(n,function(s){return e.node(s).height}));tt(n,function(s){e.node(s).y=i+a/2}),i+=a+r})}var Lde=q(()=>{ci();Yc();Ade()});function tx(e,t){var r=t&&t.debugTiming?wfe:kfe;r("layout",()=>{var i=r(" buildLayoutGraph",()=>qZe(e));r(" runLayout",()=>DZe(i,r)),r(" updateInputGraph",()=>NZe(e,i))})}function DZe(e,t){t(" makeSpaceForEdgeLabels",()=>VZe(e)),t(" removeSelfEdges",()=>QZe(e)),t(" acyclic",()=>gfe(e)),t(" nestingGraph.run",()=>Jfe(e)),t(" rank",()=>ON(M3(e))),t(" injectEdgeLabelProxies",()=>WZe(e)),t(" removeEmptyRanks",()=>xfe(e)),t(" nestingGraph.cleanup",()=>tde(e)),t(" normalizeRanks",()=>bfe(e)),t(" assignRankMinMax",()=>UZe(e)),t(" removeEdgeLabelProxies",()=>HZe(e)),t(" normalize.run",()=>Dfe(e)),t(" parentDummyChains",()=>kde(e)),t(" addBorderSegments",()=>Sfe(e)),t(" order",()=>Tde(e)),t(" insertSelfEdges",()=>JZe(e)),t(" adjustCoordinateSystem",()=>_fe(e)),t(" position",()=>_de(e)),t(" positionSelfEdges",()=>eQe(e)),t(" removeBorderNodes",()=>ZZe(e)),t(" normalize.undo",()=>Nfe(e)),t(" fixupEdgeLabelCoords",()=>XZe(e)),t(" undoCoordinateSystem",()=>Lfe(e)),t(" translateGraph",()=>YZe(e)),t(" assignNodeIntersects",()=>jZe(e)),t(" reversePoints",()=>KZe(e)),t(" acyclic.undo",()=>mfe(e))}function NZe(e,t){tt(e.nodes(),function(r){var i=e.node(r),n=t.node(r);i&&(i.x=n.x,i.y=n.y,t.children(r).length&&(i.width=n.width,i.height=n.height))}),tt(e.edges(),function(r){var i=e.edge(r),n=t.edge(r);i.points=n.points,Object.prototype.hasOwnProperty.call(n,"x")&&(i.x=n.x,i.y=n.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function qZe(e){var t=new ui({multigraph:!0,compound:!0}),r=$N(e.graph());return t.setGraph(_1({},OZe,FN(r,MZe),h0(r,PZe))),tt(e.nodes(),function(i){var n=$N(e.node(i));t.setNode(i,tN(FN(n,BZe),FZe)),t.setParent(i,e.parent(i))}),tt(e.edges(),function(i){var n=$N(e.edge(i));t.setEdge(i,_1({},zZe,FN(n,$Ze),h0(n,GZe)))}),t}function VZe(e){var t=e.graph();t.ranksep/=2,tt(e.edges(),function(r){var i=e.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function WZe(e){tt(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var i=e.node(t.v),n=e.node(t.w),a={rank:(n.rank-i.rank)/2+i.rank,e:t};Hc(e,"edge-proxy",a,"_ep")}})}function UZe(e){var t=0;tt(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=Ps(t,i.maxRank))}),e.graph().maxRank=t}function HZe(e){tt(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function YZe(e){var t=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,a=e.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;t=Math.min(t,h-d/2),r=Math.max(r,h+d/2),i=Math.min(i,f-p/2),n=Math.max(n,f+p/2)}tt(e.nodes(),function(u){l(e.node(u))}),tt(e.edges(),function(u){var h=e.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),t-=s,i-=o,tt(e.nodes(),function(u){var h=e.node(u);h.x-=t,h.y-=i}),tt(e.edges(),function(u){var h=e.edge(u);tt(h.points,function(f){f.x-=t,f.y-=i}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=t),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=i)}),a.width=r-t+s,a.height=n-i+o}function jZe(e){tt(e.edges(),function(t){var r=e.edge(t),i=e.node(t.v),n=e.node(t.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=n,s=i),r.points.unshift(vN(i,a)),r.points.push(vN(n,s))})}function XZe(e){tt(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function KZe(e){tt(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function ZZe(e){tt(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),n=e.node(r.borderBottom),a=e.node(id(r.borderLeft)),s=e.node(id(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(n.y-i.y),r.x=a.x+r.width/2,r.y=i.y+r.height/2}}),tt(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function QZe(e){tt(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function JZe(e){var t=nd(e);tt(t,function(r){var i=0;tt(r,function(n,a){var s=e.node(n);s.order=a+i,tt(s.selfEdges,function(o){Hc(e,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++i,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function eQe(e){tt(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var i=e.node(r.e.v),n=i.x+i.width/2,a=i.y,s=r.x-n,o=i.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:n+2*s/3,y:a-o},{x:n+5*s/6,y:a-o},{x:n+s,y:a},{x:n+5*s/6,y:a+o},{x:n+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function FN(e,t){return c0(h0(e,t),Number)}function $N(e){var t={};return tt(e,function(r,i){t[i.toLowerCase()]=r}),t}var MZe,OZe,PZe,BZe,FZe,$Ze,zZe,GZe,Rde=q(()=>{ci();Wo();Efe();Ife();yN();kN();PN();rde();wde();Cde();Lde();Yc();MZe=["nodesep","edgesep","ranksep","marginx","marginy"],OZe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},PZe=["acyclicer","ranker","rankdir","align"],BZe=["width","height"],FZe={width:0,height:0},$Ze=["minlen","weight","width","height","labeloffset"],zZe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},GZe=["labelpos"]});var zN=q(()=>{yN();Rde();kN();PN()});function Uo(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:tQe(e),edges:rQe(e)};return bi(e.graph())||(t.value=V9(e.graph())),t}function tQe(e){return ei(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),n={v:t};return bi(r)||(n.value=r),bi(i)||(n.parent=i),n})}function rQe(e){return ei(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return bi(t.name)||(i.name=t.name),bi(r)||(i.value=r),i})}var GN=q(()=>{ci();I3()});var $de={};Lr($de,{render:()=>lQe});var Or,g0,Nde,iQe,F3,nQe,Mde,Ode,aQe,rx,Dde,sQe,Pde,Bde,oQe,Fde,lQe,zde=q(()=>{Fo();oo();Is();ts();rs();ya();$r();Er();er();zN();GN();Wo();Wo();GN();Or=new Map,g0=new Map,Nde=new Map,iQe=b(()=>{g0.clear(),Nde.clear(),Or.clear()},"clear"),F3=b((e,t)=>{let r=g0.get(t)||[];return ee.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),nQe=b((e,t)=>{let r=g0.get(t)||[];return ee.info("Descendants of ",t," is ",r),ee.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||F3(e.v,t)||F3(e.w,t)||r.includes(e.w):(ee.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Mde=b((e,t,r,i)=>{ee.warn("Copying children of ",e,"root",i,"data",t.node(e),i);let n=t.children(e)||[];e!==i&&n.push(e),ee.warn("Copying (nodes) clusterId",e,"nodes",n),n.forEach(a=>{if(t.children(a).length>0)Mde(a,t,r,i);else{let s=t.node(a);ee.info("cp ",a," to ",i," with parent ",e),r.setNode(a,s),i!==t.parent(a)&&(ee.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(ee.debug("Setting parent",a,e),r.setParent(a,e)):(ee.info("In copy ",e,"root",i,"data",t.node(e),i),ee.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));let o=t.edges(a);ee.debug("Copying Edges",o),o.forEach(l=>{ee.info("Edge",l);let u=t.edge(l.v,l.w,l.name);ee.info("Edge data",u,i);try{nQe(l,i)?(ee.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),ee.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):ee.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){ee.error(h)}})}ee.debug("Removing node",a),t.removeNode(a)})},"copy"),Ode=b((e,t)=>{let r=t.children(e),i=[...r];for(let n of r)Nde.set(n,e),i=[...i,...Ode(n,t)];return i},"extractDescendants"),aQe=b((e,t,r)=>{let i=e.edges().filter(l=>l.v===t||l.w===t),n=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),s=n.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),rx=b((e,t,r)=>{let i=t.children(e);if(ee.trace("Searching children of id ",e,i),i.length<1)return e;let n;for(let a of i){let s=rx(a,t,r),o=aQe(t,r,s);if(s)if(o.length>0)n=s;else return s}return n},"findNonClusterChild"),Dde=b(e=>!Or.has(e)||!Or.get(e).externalConnections?e:Or.has(e)?Or.get(e).id:e,"getAnchorId"),sQe=b((e,t)=>{if(!e||t>10){ee.debug("Opting out, no graph ");return}else ee.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(ee.warn("Cluster identified",r," Replacement id in edges: ",rx(r,e,r)),g0.set(r,Ode(r,e)),Or.set(r,{id:rx(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let i=e.children(r),n=e.edges();i.length>0?(ee.debug("Cluster identified",r,g0),n.forEach(a=>{let s=F3(a.v,r),o=F3(a.w,r);s^o&&(ee.warn("Edge: ",a," leaves cluster ",r),ee.warn("Descendants of XXX ",r,": ",g0.get(r)),Or.get(r).externalConnections=!0)})):ee.debug("Not a cluster ",r,g0)});for(let r of Or.keys()){let i=Or.get(r).id,n=e.parent(i);n!==r&&Or.has(n)&&!Or.get(n).externalConnections&&(Or.get(r).id=n)}e.edges().forEach(function(r){let i=e.edge(r);ee.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),ee.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let n=r.v,a=r.w;if(ee.warn("Fix XXX",Or,"ids:",r.v,r.w,"Translating: ",Or.get(r.v)," --- ",Or.get(r.w)),Or.get(r.v)||Or.get(r.w)){if(ee.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),n=Dde(r.v),a=Dde(r.w),e.removeEdge(r.v,r.w,r.name),n!==r.v){let s=e.parent(n);Or.get(s).externalConnections=!0,i.fromCluster=r.v}if(a!==r.w){let s=e.parent(a);Or.get(s).externalConnections=!0,i.toCluster=r.w}ee.warn("Fix Replacing with XXX",n,a,r.name),e.setEdge(n,a,i,r.name)}}),ee.warn("Adjusted Graph",Uo(e)),Pde(e,0),ee.trace(Or)},"adjustClustersAndEdges"),Pde=b((e,t)=>{if(ee.warn("extractor - ",t,Uo(e),e.children("D")),t>10){ee.error("Bailing out");return}let r=e.nodes(),i=!1;for(let n of r){let a=e.children(n);i=i||a.length>0}if(!i){ee.debug("Done, no node has children",e.nodes());return}ee.debug("Nodes = ",r,t);for(let n of r)if(ee.debug("Extracting node",n,Or,Or.has(n)&&!Or.get(n).externalConnections,!e.parent(n),e.node(n),e.children("D")," Depth ",t),!Or.has(n))ee.debug("Not a cluster",n,t);else if(!Or.get(n).externalConnections&&e.children(n)&&e.children(n).length>0){ee.warn("Cluster without external connections, without a parent and with children",n,t);let s=e.graph().rankdir==="TB"?"LR":"TB";Or.get(n)?.clusterData?.dir&&(s=Or.get(n).clusterData.dir,ee.warn("Fixing dir",Or.get(n).clusterData.dir,s));let o=new ui({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});ee.warn("Old graph before copy",Uo(e)),Mde(n,e,o,n),e.setNode(n,{clusterNode:!0,id:n,clusterData:Or.get(n).clusterData,label:Or.get(n).label,graph:o}),ee.warn("New graph after copy node: (",n,")",Uo(o)),ee.debug("Old graph after copy",Uo(e))}else ee.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!Or.get(n).externalConnections," no parent: ",!e.parent(n)," children ",e.children(n)&&e.children(n).length>0,e.children("D"),t),ee.debug(Or);r=e.nodes(),ee.warn("New list of nodes",r);for(let n of r){let a=e.node(n);ee.warn(" Now next level",n,a),a?.clusterNode&&Pde(a.graph,t+1)}},"extractor"),Bde=b((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{let n=e.children(i),a=Bde(e,n);r=[...r,...a]}),r},"sorter"),oQe=b(e=>Bde(e,e.children()),"sortNodesByHierarchy"),Fde=b(async(e,t,r,i,n,a)=>{ee.warn("Graph in recursive render:XAX",Uo(t),n);let s=t.graph().rankdir;ee.trace("Dir in recursive render - dir:",s);let o=e.insert("g").attr("class","root");t.nodes()?ee.info("Recursive render XXX",t.nodes()):ee.info("No nodes found for",t),t.edges().length>0&&ee.info("Recursive edges",t.edge(t.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(m){let y=t.node(m);if(n!==void 0){let v=JSON.parse(JSON.stringify(n.clusterData));ee.trace(`Setting data for parent cluster XXX + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),DXe=v((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),NXe=v((e,t,r)=>{let n=It(),{themeVariables:i}=n,{strokeWidth:a}=i,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),OXe={extension:dXe,composition:pXe,aggregation:gXe,dependency:mXe,lollipop:yXe,point:vXe,circle:xXe,cross:bXe,barb:TXe,barbNeo:wXe,only_one:CXe,zero_or_one:kXe,one_or_more:SXe,zero_or_more:EXe,only_one_neo:AXe,zero_or_one_neo:_Xe,one_or_more_neo:RXe,zero_or_more_neo:LXe,requirement_arrow:IXe,requirement_contains:DXe,requirement_arrow_neo:MXe,requirement_contains_neo:NXe},t1=fXe});var PXe,BE,qN=X(()=>{PXe=typeof global=="object"&&global&&global.Object===Object&&global,BE=PXe});var BXe,$Xe,Mi,kl=X(()=>{qN();BXe=typeof self=="object"&&self&&self.Object===Object&&self,$Xe=BE||BXe||Function("return this")(),Mi=$Xe});var FXe,La,K0=X(()=>{kl();FXe=Mi.Symbol,La=FXe});function qXe(e){var t=zXe.call(e,H2),r=e[H2];try{e[H2]=void 0;var n=!0}catch{}var i=GXe.call(e);return n&&(t?e[H2]=r:delete e[H2]),i}var xce,zXe,GXe,H2,bce,Tce=X(()=>{K0();xce=Object.prototype,zXe=xce.hasOwnProperty,GXe=xce.toString,H2=La?La.toStringTag:void 0;bce=qXe});function UXe(e){return WXe.call(e)}var VXe,WXe,wce,Cce=X(()=>{VXe=Object.prototype,WXe=VXe.toString;wce=UXe});function XXe(e){return e==null?e===void 0?YXe:HXe:kce&&kce in Object(e)?bce(e):wce(e)}var HXe,YXe,kce,Bs,kd=X(()=>{K0();Tce();Cce();HXe="[object Null]",YXe="[object Undefined]",kce=La?La.toStringTag:void 0;Bs=XXe});function jXe(e){return e!=null&&typeof e=="object"}var Ui,cc=X(()=>{Ui=jXe});function ZXe(e){return typeof e=="symbol"||Ui(e)&&Bs(e)==KXe}var KXe,Jo,Z0=X(()=>{kd();cc();KXe="[object Symbol]";Jo=ZXe});function QXe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{xu=QXe});var JXe,Hr,ra=X(()=>{JXe=Array.isArray,Hr=JXe});function Ace(e){if(typeof e=="string")return e;if(Hr(e))return xu(e,Ace)+"";if(Jo(e))return Ece?Ece.call(e):"";var t=e+"";return t=="0"&&1/e==-eje?"-0":t}var eje,Sce,Ece,_ce,Rce=X(()=>{K0();Y2();ra();Z0();eje=1/0,Sce=La?La.prototype:void 0,Ece=Sce?Sce.toString:void 0;_ce=Ace});function rje(e){for(var t=e.length;t--&&tje.test(e.charAt(t)););return t}var tje,Lce,Ice=X(()=>{tje=/\s/;Lce=rje});function ije(e){return e&&e.slice(0,Lce(e)+1).replace(nje,"")}var nje,Mce,Dce=X(()=>{Ice();nje=/^\s+/;Mce=ije});function aje(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pi,Sl=X(()=>{pi=aje});function uje(e){if(typeof e=="number")return e;if(Jo(e))return Nce;if(pi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Mce(e);var r=oje.test(e);return r||lje.test(e)?cje(e.slice(2),r?2:8):sje.test(e)?Nce:+e}var Nce,sje,oje,lje,cje,Oce,Pce=X(()=>{Dce();Sl();Z0();Nce=NaN,sje=/^[-+]0x[0-9a-f]+$/i,oje=/^0b[01]+$/i,lje=/^0o[0-7]+$/i,cje=parseInt;Oce=uje});function fje(e){if(!e)return e===0?e:0;if(e=Oce(e),e===Bce||e===-Bce){var t=e<0?-1:1;return t*hje}return e===e?e:0}var Bce,hje,r1,VN=X(()=>{Pce();Bce=1/0,hje=17976931348623157e292;r1=fje});function dje(e){var t=r1(e),r=t%1;return t===t?r?t-r:t:0}var $ce,Fce=X(()=>{VN();$ce=dje});function pje(e){return e}var go,Sd=X(()=>{go=pje});function xje(e){if(!pi(e))return!1;var t=Bs(e);return t==mje||t==yje||t==gje||t==vje}var gje,mje,yje,vje,bu,X2=X(()=>{kd();Sl();gje="[object AsyncFunction]",mje="[object Function]",yje="[object GeneratorFunction]",vje="[object Proxy]";bu=xje});var bje,$E,zce=X(()=>{kl();bje=Mi["__core-js_shared__"],$E=bje});function Tje(e){return!!Gce&&Gce in e}var Gce,qce,Vce=X(()=>{zce();Gce=(function(){var e=/[^.]+$/.exec($E&&$E.keys&&$E.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();qce=Tje});function kje(e){if(e!=null){try{return Cje.call(e)}catch{}try{return e+""}catch{}}return""}var wje,Cje,qh,WN=X(()=>{wje=Function.prototype,Cje=wje.toString;qh=kje});function Mje(e){if(!pi(e)||qce(e))return!1;var t=bu(e)?Ije:Eje;return t.test(qh(e))}var Sje,Eje,Aje,_je,Rje,Lje,Ije,Wce,Uce=X(()=>{X2();Vce();Sl();WN();Sje=/[\\^$.*+?()[\]{}|]/g,Eje=/^\[object .+?Constructor\]$/,Aje=Function.prototype,_je=Object.prototype,Rje=Aje.toString,Lje=_je.hasOwnProperty,Ije=RegExp("^"+Rje.call(Lje).replace(Sje,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Wce=Mje});function Dje(e,t){return e?.[t]}var Hce,Yce=X(()=>{Hce=Dje});function Nje(e,t){var r=Hce(e,t);return Wce(r)?r:void 0}var mo,Ed=X(()=>{Uce();Yce();mo=Nje});var Oje,FE,Xce=X(()=>{Ed();kl();Oje=mo(Mi,"WeakMap"),FE=Oje});var jce,Pje,Kce,Zce=X(()=>{Sl();jce=Object.create,Pje=(function(){function e(){}return function(t){if(!pi(t))return{};if(jce)return jce(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Kce=Pje});function Bje(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Qce,Jce=X(()=>{Qce=Bje});function $je(){}var eue,tue=X(()=>{eue=$je});function Fje(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{zE=Fje});function Vje(e){var t=0,r=0;return function(){var n=qje(),i=Gje-(n-r);if(r=n,i>0){if(++t>=zje)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var zje,Gje,qje,rue,nue=X(()=>{zje=800,Gje=16,qje=Date.now;rue=Vje});function Wje(e){return function(){return e}}var yo,HN=X(()=>{yo=Wje});var Uje,n1,YN=X(()=>{Ed();Uje=(function(){try{var e=mo(Object,"defineProperty");return e({},"",{}),e}catch{}})(),n1=Uje});var Hje,iue,aue=X(()=>{HN();YN();Sd();Hje=n1?function(e,t){return n1(e,"toString",{configurable:!0,enumerable:!1,value:yo(t),writable:!0})}:go,iue=Hje});var Yje,GE,XN=X(()=>{aue();nue();Yje=rue(iue),GE=Yje});function Xje(e,t){for(var r=-1,n=e==null?0:e.length;++r{qE=Xje});function jje(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{VE=jje});function Kje(e){return e!==e}var sue,oue=X(()=>{sue=Kje});function Zje(e,t,r){for(var n=r-1,i=e.length;++n{lue=Zje});function Qje(e,t,r){return t===t?lue(e,t,r):VE(e,sue,r)}var uue,hue=X(()=>{KN();oue();cue();uue=Qje});function Jje(e,t){var r=e==null?0:e.length;return!!r&&uue(e,t,0)>-1}var fue,due=X(()=>{hue();fue=Jje});function rKe(e,t){var r=typeof e;return t=t??eKe,!!t&&(r=="number"||r!="symbol"&&tKe.test(e))&&e>-1&&e%1==0&&e{eKe=9007199254740991,tKe=/^(?:0|[1-9]\d*)$/;Ad=rKe});function nKe(e,t,r){t=="__proto__"&&n1?n1(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _d,K2=X(()=>{YN();_d=nKe});function iKe(e,t){return e===t||e!==e&&t!==t}var El,Q0=X(()=>{El=iKe});function oKe(e,t,r){var n=e[t];(!(sKe.call(e,t)&&El(n,r))||r===void 0&&!(t in e))&&_d(e,t,r)}var aKe,sKe,Rd,Z2=X(()=>{K2();Q0();aKe=Object.prototype,sKe=aKe.hasOwnProperty;Rd=oKe});function lKe(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a{Z2();K2();Tu=lKe});function cKe(e,t,r){return t=pue(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=pue(n.length-t,0),s=Array(a);++i{Jce();pue=Math.max;WE=cKe});function uKe(e,t){return GE(WE(e,t,go),e+"")}var Ld,Q2=X(()=>{Sd();ZN();XN();Ld=uKe});function fKe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hKe}var hKe,a1,UE=X(()=>{hKe=9007199254740991;a1=fKe});function dKe(e){return e!=null&&a1(e.length)&&!bu(e)}var Ia,wu=X(()=>{X2();UE();Ia=dKe});function pKe(e,t,r){if(!pi(r))return!1;var n=typeof t;return(n=="number"?Ia(r)&&Ad(t,r.length):n=="string"&&t in r)?El(r[t],e):!1}var Vh,J2=X(()=>{Q0();wu();j2();Sl();Vh=pKe});function gKe(e){return Ld(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&Vh(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n{Q2();J2();gue=gKe});function yKe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mKe;return e===r}var mKe,Id,eT=X(()=>{mKe=Object.prototype;Id=yKe});function vKe(e,t){for(var r=-1,n=Array(e);++r{yue=vKe});function bKe(e){return Ui(e)&&Bs(e)==xKe}var xKe,QN,xue=X(()=>{kd();cc();xKe="[object Arguments]";QN=bKe});var bue,TKe,wKe,CKe,uc,s1=X(()=>{xue();cc();bue=Object.prototype,TKe=bue.hasOwnProperty,wKe=bue.propertyIsEnumerable,CKe=QN((function(){return arguments})())?QN:function(e){return Ui(e)&&TKe.call(e,"callee")&&!wKe.call(e,"callee")},uc=CKe});function kKe(){return!1}var Tue,wue=X(()=>{Tue=kKe});var Sue,Cue,SKe,kue,EKe,AKe,hc,o1=X(()=>{kl();wue();Sue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cue=Sue&&typeof module=="object"&&module&&!module.nodeType&&module,SKe=Cue&&Cue.exports===Sue,kue=SKe?Mi.Buffer:void 0,EKe=kue?kue.isBuffer:void 0,AKe=EKe||Tue,hc=AKe});function QKe(e){return Ui(e)&&a1(e.length)&&!!ri[Bs(e)]}var _Ke,RKe,LKe,IKe,MKe,DKe,NKe,OKe,PKe,BKe,$Ke,FKe,zKe,GKe,qKe,VKe,WKe,UKe,HKe,YKe,XKe,jKe,KKe,ZKe,ri,Eue,Aue=X(()=>{kd();UE();cc();_Ke="[object Arguments]",RKe="[object Array]",LKe="[object Boolean]",IKe="[object Date]",MKe="[object Error]",DKe="[object Function]",NKe="[object Map]",OKe="[object Number]",PKe="[object Object]",BKe="[object RegExp]",$Ke="[object Set]",FKe="[object String]",zKe="[object WeakMap]",GKe="[object ArrayBuffer]",qKe="[object DataView]",VKe="[object Float32Array]",WKe="[object Float64Array]",UKe="[object Int8Array]",HKe="[object Int16Array]",YKe="[object Int32Array]",XKe="[object Uint8Array]",jKe="[object Uint8ClampedArray]",KKe="[object Uint16Array]",ZKe="[object Uint32Array]",ri={};ri[VKe]=ri[WKe]=ri[UKe]=ri[HKe]=ri[YKe]=ri[XKe]=ri[jKe]=ri[KKe]=ri[ZKe]=!0;ri[_Ke]=ri[RKe]=ri[GKe]=ri[LKe]=ri[qKe]=ri[IKe]=ri[MKe]=ri[DKe]=ri[NKe]=ri[OKe]=ri[PKe]=ri[BKe]=ri[$Ke]=ri[FKe]=ri[zKe]=!1;Eue=QKe});function JKe(e){return function(t){return e(t)}}var Md,tT=X(()=>{Md=JKe});var _ue,rT,eZe,JN,tZe,Wh,HE=X(()=>{qN();_ue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rT=_ue&&typeof module=="object"&&module&&!module.nodeType&&module,eZe=rT&&rT.exports===_ue,JN=eZe&&BE.process,tZe=(function(){try{var e=rT&&rT.require&&rT.require("util").types;return e||JN&&JN.binding&&JN.binding("util")}catch{}})(),Wh=tZe});var Rue,rZe,Dd,nT=X(()=>{Aue();tT();HE();Rue=Wh&&Wh.isTypedArray,rZe=Rue?Md(Rue):Eue,Dd=rZe});function aZe(e,t){var r=Hr(e),n=!r&&uc(e),i=!r&&!n&&hc(e),a=!r&&!n&&!i&&Dd(e),s=r||n||i||a,o=s?yue(e.length,String):[],l=o.length;for(var u in e)(t||iZe.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ad(u,l)))&&o.push(u);return o}var nZe,iZe,YE,eO=X(()=>{vue();s1();ra();o1();j2();nT();nZe=Object.prototype,iZe=nZe.hasOwnProperty;YE=aZe});function sZe(e,t){return function(r){return e(t(r))}}var XE,tO=X(()=>{XE=sZe});var oZe,Lue,Iue=X(()=>{tO();oZe=XE(Object.keys,Object),Lue=oZe});function uZe(e){if(!Id(e))return Lue(e);var t=[];for(var r in Object(e))cZe.call(e,r)&&r!="constructor"&&t.push(r);return t}var lZe,cZe,l1,jE=X(()=>{eT();Iue();lZe=Object.prototype,cZe=lZe.hasOwnProperty;l1=uZe});function hZe(e){return Ia(e)?YE(e):l1(e)}var Di,Uh=X(()=>{eO();jE();wu();Di=hZe});function fZe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Mue,Due=X(()=>{Mue=fZe});function gZe(e){if(!pi(e))return Mue(e);var t=Id(e),r=[];for(var n in e)n=="constructor"&&(t||!pZe.call(e,n))||r.push(n);return r}var dZe,pZe,Nue,Oue=X(()=>{Sl();eT();Due();dZe=Object.prototype,pZe=dZe.hasOwnProperty;Nue=gZe});function mZe(e){return Ia(e)?YE(e,!0):Nue(e)}var vo,Nd=X(()=>{eO();Oue();wu();vo=mZe});function xZe(e,t){if(Hr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Jo(e)?!0:vZe.test(e)||!yZe.test(e)||t!=null&&e in Object(t)}var yZe,vZe,c1,KE=X(()=>{ra();Z0();yZe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vZe=/^\w*$/;c1=xZe});var bZe,Hh,iT=X(()=>{Ed();bZe=mo(Object,"create"),Hh=bZe});function TZe(){this.__data__=Hh?Hh(null):{},this.size=0}var Pue,Bue=X(()=>{iT();Pue=TZe});function wZe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $ue,Fue=X(()=>{$ue=wZe});function EZe(e){var t=this.__data__;if(Hh){var r=t[e];return r===CZe?void 0:r}return SZe.call(t,e)?t[e]:void 0}var CZe,kZe,SZe,zue,Gue=X(()=>{iT();CZe="__lodash_hash_undefined__",kZe=Object.prototype,SZe=kZe.hasOwnProperty;zue=EZe});function RZe(e){var t=this.__data__;return Hh?t[e]!==void 0:_Ze.call(t,e)}var AZe,_Ze,que,Vue=X(()=>{iT();AZe=Object.prototype,_Ze=AZe.hasOwnProperty;que=RZe});function IZe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Hh&&t===void 0?LZe:t,this}var LZe,Wue,Uue=X(()=>{iT();LZe="__lodash_hash_undefined__";Wue=IZe});function u1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{Bue();Fue();Gue();Vue();Uue();u1.prototype.clear=Pue;u1.prototype.delete=$ue;u1.prototype.get=zue;u1.prototype.has=que;u1.prototype.set=Wue;rO=u1});function MZe(){this.__data__=[],this.size=0}var Yue,Xue=X(()=>{Yue=MZe});function DZe(e,t){for(var r=e.length;r--;)if(El(e[r][0],t))return r;return-1}var Od,aT=X(()=>{Q0();Od=DZe});function PZe(e){var t=this.__data__,r=Od(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():OZe.call(t,r,1),--this.size,!0}var NZe,OZe,jue,Kue=X(()=>{aT();NZe=Array.prototype,OZe=NZe.splice;jue=PZe});function BZe(e){var t=this.__data__,r=Od(t,e);return r<0?void 0:t[r][1]}var Zue,Que=X(()=>{aT();Zue=BZe});function $Ze(e){return Od(this.__data__,e)>-1}var Jue,ehe=X(()=>{aT();Jue=$Ze});function FZe(e,t){var r=this.__data__,n=Od(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var the,rhe=X(()=>{aT();the=FZe});function h1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{Xue();Kue();Que();ehe();rhe();h1.prototype.clear=Yue;h1.prototype.delete=jue;h1.prototype.get=Zue;h1.prototype.has=Jue;h1.prototype.set=the;Pd=h1});var zZe,Bd,ZE=X(()=>{Ed();kl();zZe=mo(Mi,"Map"),Bd=zZe});function GZe(){this.size=0,this.__data__={hash:new rO,map:new(Bd||Pd),string:new rO}}var nhe,ihe=X(()=>{Hue();sT();ZE();nhe=GZe});function qZe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ahe,she=X(()=>{ahe=qZe});function VZe(e,t){var r=e.__data__;return ahe(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $d,oT=X(()=>{she();$d=VZe});function WZe(e){var t=$d(this,e).delete(e);return this.size-=t?1:0,t}var ohe,lhe=X(()=>{oT();ohe=WZe});function UZe(e){return $d(this,e).get(e)}var che,uhe=X(()=>{oT();che=UZe});function HZe(e){return $d(this,e).has(e)}var hhe,fhe=X(()=>{oT();hhe=HZe});function YZe(e,t){var r=$d(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var dhe,phe=X(()=>{oT();dhe=YZe});function f1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{ihe();lhe();uhe();fhe();phe();f1.prototype.clear=nhe;f1.prototype.delete=ohe;f1.prototype.get=che;f1.prototype.has=hhe;f1.prototype.set=dhe;J0=f1});function nO(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XZe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(nO.Cache||J0),r}var XZe,ghe,mhe=X(()=>{QE();XZe="Expected a function";nO.Cache=J0;ghe=nO});function KZe(e){var t=ghe(e,function(n){return r.size===jZe&&r.clear(),n}),r=t.cache;return t}var jZe,yhe,vhe=X(()=>{mhe();jZe=500;yhe=KZe});var ZZe,QZe,JZe,xhe,bhe=X(()=>{vhe();ZZe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,QZe=/\\(\\)?/g,JZe=yhe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZZe,function(r,n,i,a){t.push(i?a.replace(QZe,"$1"):n||r)}),t}),xhe=JZe});function eQe(e){return e==null?"":_ce(e)}var JE,iO=X(()=>{Rce();JE=eQe});function tQe(e,t){return Hr(e)?e:c1(e,t)?[e]:xhe(JE(e))}var Fd,lT=X(()=>{ra();KE();bhe();iO();Fd=tQe});function nQe(e){if(typeof e=="string"||Jo(e))return e;var t=e+"";return t=="0"&&1/e==-rQe?"-0":t}var rQe,Cu,d1=X(()=>{Z0();rQe=1/0;Cu=nQe});function iQe(e,t){t=Fd(t,e);for(var r=0,n=t.length;e!=null&&r{lT();d1();zd=iQe});function aQe(e,t,r){var n=e==null?void 0:zd(e,t);return n===void 0?r:n}var The,whe=X(()=>{cT();The=aQe});function sQe(e,t){for(var r=-1,n=t.length,i=e.length;++r{p1=sQe});function oQe(e){return Hr(e)||uc(e)||!!(Che&&e&&e[Che])}var Che,khe,She=X(()=>{K0();s1();ra();Che=La?La.isConcatSpreadable:void 0;khe=oQe});function Ehe(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=khe),i||(i=[]);++a0&&r(o)?t>1?Ehe(o,t-1,r,n,i):p1(i,o):n||(i[i.length]=o)}return i}var g1,t5=X(()=>{e5();She();g1=Ehe});function lQe(e){var t=e==null?0:e.length;return t?g1(e,1):[]}var Al,aO=X(()=>{t5();Al=lQe});function cQe(e){return GE(WE(e,void 0,Al),e+"")}var Ahe,_he=X(()=>{aO();ZN();XN();Ahe=cQe});var uQe,m1,r5=X(()=>{tO();uQe=XE(Object.getPrototypeOf,Object),m1=uQe});function mQe(e){if(!Ui(e)||Bs(e)!=hQe)return!1;var t=m1(e);if(t===null)return!0;var r=pQe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Rhe.call(r)==gQe}var hQe,fQe,dQe,Rhe,pQe,gQe,Lhe,Ihe=X(()=>{kd();r5();cc();hQe="[object Object]",fQe=Function.prototype,dQe=Object.prototype,Rhe=fQe.toString,pQe=dQe.hasOwnProperty,gQe=Rhe.call(Object);Lhe=mQe});function SQe(e){return kQe.test(e)}var yQe,vQe,xQe,bQe,TQe,wQe,CQe,kQe,Mhe,Dhe=X(()=>{yQe="\\ud800-\\udfff",vQe="\\u0300-\\u036f",xQe="\\ufe20-\\ufe2f",bQe="\\u20d0-\\u20ff",TQe=vQe+xQe+bQe,wQe="\\ufe0e\\ufe0f",CQe="\\u200d",kQe=RegExp("["+CQe+yQe+TQe+wQe+"]");Mhe=SQe});function EQe(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i{Nhe=EQe});function AQe(){this.__data__=new Pd,this.size=0}var Phe,Bhe=X(()=>{sT();Phe=AQe});function _Qe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var $he,Fhe=X(()=>{$he=_Qe});function RQe(e){return this.__data__.get(e)}var zhe,Ghe=X(()=>{zhe=RQe});function LQe(e){return this.__data__.has(e)}var qhe,Vhe=X(()=>{qhe=LQe});function MQe(e,t){var r=this.__data__;if(r instanceof Pd){var n=r.__data__;if(!Bd||n.length{sT();ZE();QE();IQe=200;Whe=MQe});function y1(e){var t=this.__data__=new Pd(e);this.size=t.size}var ku,uT=X(()=>{sT();Bhe();Fhe();Ghe();Vhe();Uhe();y1.prototype.clear=Phe;y1.prototype.delete=$he;y1.prototype.get=zhe;y1.prototype.has=qhe;y1.prototype.set=Whe;ku=y1});function DQe(e,t){return e&&Tu(t,Di(t),e)}var Hhe,Yhe=X(()=>{i1();Uh();Hhe=DQe});function NQe(e,t){return e&&Tu(t,vo(t),e)}var Xhe,jhe=X(()=>{i1();Nd();Xhe=NQe});function PQe(e,t){if(t)return e.slice();var r=e.length,n=Qhe?Qhe(r):new e.constructor(r);return e.copy(n),n}var Jhe,Khe,OQe,Zhe,Qhe,n5,sO=X(()=>{kl();Jhe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Khe=Jhe&&typeof module=="object"&&module&&!module.nodeType&&module,OQe=Khe&&Khe.exports===Jhe,Zhe=OQe?Mi.Buffer:void 0,Qhe=Zhe?Zhe.allocUnsafe:void 0;n5=PQe});function BQe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r{i5=BQe});function $Qe(){return[]}var a5,lO=X(()=>{a5=$Qe});var FQe,zQe,efe,GQe,v1,s5=X(()=>{oO();lO();FQe=Object.prototype,zQe=FQe.propertyIsEnumerable,efe=Object.getOwnPropertySymbols,GQe=efe?function(e){return e==null?[]:(e=Object(e),i5(efe(e),function(t){return zQe.call(e,t)}))}:a5,v1=GQe});function qQe(e,t){return Tu(e,v1(e),t)}var tfe,rfe=X(()=>{i1();s5();tfe=qQe});var VQe,WQe,o5,cO=X(()=>{e5();r5();s5();lO();VQe=Object.getOwnPropertySymbols,WQe=VQe?function(e){for(var t=[];e;)p1(t,v1(e)),e=m1(e);return t}:a5,o5=WQe});function UQe(e,t){return Tu(e,o5(e),t)}var nfe,ife=X(()=>{i1();cO();nfe=UQe});function HQe(e,t,r){var n=t(e);return Hr(e)?n:p1(n,r(e))}var l5,uO=X(()=>{e5();ra();l5=HQe});function YQe(e){return l5(e,Di,v1)}var hT,hO=X(()=>{uO();s5();Uh();hT=YQe});function XQe(e){return l5(e,vo,o5)}var afe,sfe=X(()=>{uO();cO();Nd();afe=XQe});var jQe,c5,ofe=X(()=>{Ed();kl();jQe=mo(Mi,"DataView"),c5=jQe});var KQe,u5,lfe=X(()=>{Ed();kl();KQe=mo(Mi,"Promise"),u5=KQe});var ZQe,Gd,fO=X(()=>{Ed();kl();ZQe=mo(Mi,"Set"),Gd=ZQe});var cfe,QQe,ufe,hfe,ffe,dfe,JQe,eJe,tJe,rJe,nJe,eg,el,tg=X(()=>{ofe();ZE();lfe();fO();Xce();kd();WN();cfe="[object Map]",QQe="[object Object]",ufe="[object Promise]",hfe="[object Set]",ffe="[object WeakMap]",dfe="[object DataView]",JQe=qh(c5),eJe=qh(Bd),tJe=qh(u5),rJe=qh(Gd),nJe=qh(FE),eg=Bs;(c5&&eg(new c5(new ArrayBuffer(1)))!=dfe||Bd&&eg(new Bd)!=cfe||u5&&eg(u5.resolve())!=ufe||Gd&&eg(new Gd)!=hfe||FE&&eg(new FE)!=ffe)&&(eg=function(e){var t=Bs(e),r=t==QQe?e.constructor:void 0,n=r?qh(r):"";if(n)switch(n){case JQe:return dfe;case eJe:return cfe;case tJe:return ufe;case rJe:return hfe;case nJe:return ffe}return t});el=eg});function sJe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&aJe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var iJe,aJe,pfe,gfe=X(()=>{iJe=Object.prototype,aJe=iJe.hasOwnProperty;pfe=sJe});var oJe,x1,dO=X(()=>{kl();oJe=Mi.Uint8Array,x1=oJe});function lJe(e){var t=new e.constructor(e.byteLength);return new x1(t).set(new x1(e)),t}var b1,h5=X(()=>{dO();b1=lJe});function cJe(e,t){var r=t?b1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var mfe,yfe=X(()=>{h5();mfe=cJe});function hJe(e){var t=new e.constructor(e.source,uJe.exec(e));return t.lastIndex=e.lastIndex,t}var uJe,vfe,xfe=X(()=>{uJe=/\w*$/;vfe=hJe});function fJe(e){return Tfe?Object(Tfe.call(e)):{}}var bfe,Tfe,wfe,Cfe=X(()=>{K0();bfe=La?La.prototype:void 0,Tfe=bfe?bfe.valueOf:void 0;wfe=fJe});function dJe(e,t){var r=t?b1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var f5,pO=X(()=>{h5();f5=dJe});function DJe(e,t,r){var n=e.constructor;switch(t){case wJe:return b1(e);case pJe:case gJe:return new n(+e);case CJe:return mfe(e,r);case kJe:case SJe:case EJe:case AJe:case _Je:case RJe:case LJe:case IJe:case MJe:return f5(e,r);case mJe:return new n;case yJe:case bJe:return new n(e);case vJe:return vfe(e);case xJe:return new n;case TJe:return wfe(e)}}var pJe,gJe,mJe,yJe,vJe,xJe,bJe,TJe,wJe,CJe,kJe,SJe,EJe,AJe,_Je,RJe,LJe,IJe,MJe,kfe,Sfe=X(()=>{h5();yfe();xfe();Cfe();pO();pJe="[object Boolean]",gJe="[object Date]",mJe="[object Map]",yJe="[object Number]",vJe="[object RegExp]",xJe="[object Set]",bJe="[object String]",TJe="[object Symbol]",wJe="[object ArrayBuffer]",CJe="[object DataView]",kJe="[object Float32Array]",SJe="[object Float64Array]",EJe="[object Int8Array]",AJe="[object Int16Array]",_Je="[object Int32Array]",RJe="[object Uint8Array]",LJe="[object Uint8ClampedArray]",IJe="[object Uint16Array]",MJe="[object Uint32Array]";kfe=DJe});function NJe(e){return typeof e.constructor=="function"&&!Id(e)?Kce(m1(e)):{}}var d5,gO=X(()=>{Zce();r5();eT();d5=NJe});function PJe(e){return Ui(e)&&el(e)==OJe}var OJe,Efe,Afe=X(()=>{tg();cc();OJe="[object Map]";Efe=PJe});var _fe,BJe,Rfe,Lfe=X(()=>{Afe();tT();HE();_fe=Wh&&Wh.isMap,BJe=_fe?Md(_fe):Efe,Rfe=BJe});function FJe(e){return Ui(e)&&el(e)==$Je}var $Je,Ife,Mfe=X(()=>{tg();cc();$Je="[object Set]";Ife=FJe});var Dfe,zJe,Nfe,Ofe=X(()=>{Mfe();tT();HE();Dfe=Wh&&Wh.isSet,zJe=Dfe?Md(Dfe):Ife,Nfe=zJe});function p5(e,t,r,n,i,a){var s,o=t&GJe,l=t&qJe,u=t&VJe;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!pi(e))return e;var h=Hr(e);if(h){if(s=pfe(e),!o)return zE(e,s)}else{var f=el(e),d=f==Bfe||f==XJe;if(hc(e))return n5(e,o);if(f==$fe||f==Pfe||d&&!i){if(s=l||d?{}:d5(e),!o)return l?nfe(e,Xhe(s,e)):tfe(e,Hhe(s,e))}else{if(!jn[f])return i?e:{};s=kfe(e,f,o)}}a||(a=new ku);var p=a.get(e);if(p)return p;a.set(e,s),Nfe(e)?e.forEach(function(y){s.add(p5(y,t,r,y,e,a))}):Rfe(e)&&e.forEach(function(y,x){s.set(x,p5(y,t,r,x,e,a))});var g=u?l?afe:hT:l?vo:Di,m=h?void 0:g(e);return qE(m||e,function(y,x){m&&(x=y,y=e[x]),Rd(s,x,p5(y,t,r,x,e,a))}),s}var GJe,qJe,VJe,Pfe,WJe,UJe,HJe,YJe,Bfe,XJe,jJe,KJe,$fe,ZJe,QJe,JJe,eet,tet,ret,net,iet,aet,set,oet,cet,uet,het,fet,det,jn,Ffe,zfe=X(()=>{uT();jN();Z2();Yhe();jhe();sO();UN();rfe();ife();hO();sfe();tg();gfe();Sfe();gO();ra();o1();Lfe();Sl();Ofe();Uh();Nd();GJe=1,qJe=2,VJe=4,Pfe="[object Arguments]",WJe="[object Array]",UJe="[object Boolean]",HJe="[object Date]",YJe="[object Error]",Bfe="[object Function]",XJe="[object GeneratorFunction]",jJe="[object Map]",KJe="[object Number]",$fe="[object Object]",ZJe="[object RegExp]",QJe="[object Set]",JJe="[object String]",eet="[object Symbol]",tet="[object WeakMap]",ret="[object ArrayBuffer]",net="[object DataView]",iet="[object Float32Array]",aet="[object Float64Array]",set="[object Int8Array]",oet="[object Int16Array]",cet="[object Int32Array]",uet="[object Uint8Array]",het="[object Uint8ClampedArray]",fet="[object Uint16Array]",det="[object Uint32Array]",jn={};jn[Pfe]=jn[WJe]=jn[ret]=jn[net]=jn[UJe]=jn[HJe]=jn[iet]=jn[aet]=jn[set]=jn[oet]=jn[cet]=jn[jJe]=jn[KJe]=jn[$fe]=jn[ZJe]=jn[QJe]=jn[JJe]=jn[eet]=jn[uet]=jn[het]=jn[fet]=jn[det]=!0;jn[YJe]=jn[Bfe]=jn[tet]=!1;Ffe=p5});function met(e){return Ffe(e,pet|get)}var pet,get,mO,Gfe=X(()=>{zfe();pet=1,get=4;mO=met});function vet(e){return this.__data__.set(e,yet),this}var yet,qfe,Vfe=X(()=>{yet="__lodash_hash_undefined__";qfe=vet});function xet(e){return this.__data__.has(e)}var Wfe,Ufe=X(()=>{Wfe=xet});function g5(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new J0;++t{QE();Vfe();Ufe();g5.prototype.add=g5.prototype.push=qfe;g5.prototype.has=Wfe;m5=g5});function bet(e,t){for(var r=-1,n=e==null?0:e.length;++r{Hfe=bet});function Tet(e,t){return e.has(t)}var y5,vO=X(()=>{y5=Tet});function ket(e,t,r,n,i,a){var s=r&wet,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=r&Cet?new m5:void 0;for(a.set(e,t),a.set(t,e);++f{yO();Yfe();vO();wet=1,Cet=2;v5=ket});function Eet(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Xfe,jfe=X(()=>{Xfe=Eet});function Aet(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var T1,x5=X(()=>{T1=Aet});function Get(e,t,r,n,i,a,s){switch(r){case zet:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fet:return!(e.byteLength!=t.byteLength||!a(new x1(e),new x1(t)));case Let:case Iet:case Net:return El(+e,+t);case Met:return e.name==t.name&&e.message==t.message;case Oet:case Bet:return e==t+"";case Det:var o=Xfe;case Pet:var l=n&_et;if(o||(o=T1),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=Ret,s.set(e,t);var h=v5(o(e),o(t),n,i,a,s);return s.delete(e),h;case $et:if(bO)return bO.call(e)==bO.call(t)}return!1}var _et,Ret,Let,Iet,Met,Det,Net,Oet,Pet,Bet,$et,Fet,zet,Kfe,bO,Zfe,Qfe=X(()=>{K0();dO();Q0();xO();jfe();x5();_et=1,Ret=2,Let="[object Boolean]",Iet="[object Date]",Met="[object Error]",Det="[object Map]",Net="[object Number]",Oet="[object RegExp]",Pet="[object Set]",Bet="[object String]",$et="[object Symbol]",Fet="[object ArrayBuffer]",zet="[object DataView]",Kfe=La?La.prototype:void 0,bO=Kfe?Kfe.valueOf:void 0;Zfe=Get});function Uet(e,t,r,n,i,a){var s=r&qet,o=hT(e),l=o.length,u=hT(t),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in t:Wet.call(t,d)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=s;++f{hO();qet=1,Vet=Object.prototype,Wet=Vet.hasOwnProperty;Jfe=Uet});function Xet(e,t,r,n,i,a){var s=Hr(e),o=Hr(t),l=s?rde:el(e),u=o?rde:el(t);l=l==tde?b5:l,u=u==tde?b5:u;var h=l==b5,f=u==b5,d=l==u;if(d&&hc(e)){if(!hc(t))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new ku),s||Dd(e)?v5(e,t,r,n,i,a):Zfe(e,t,l,r,n,i,a);if(!(r&Het)){var p=h&&nde.call(e,"__wrapped__"),g=f&&nde.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,y=g?t.value():t;return a||(a=new ku),i(m,y,r,n,a)}}return d?(a||(a=new ku),Jfe(e,t,r,n,i,a)):!1}var Het,tde,rde,b5,Yet,nde,ide,ade=X(()=>{uT();xO();Qfe();ede();tg();ra();o1();nT();Het=1,tde="[object Arguments]",rde="[object Array]",b5="[object Object]",Yet=Object.prototype,nde=Yet.hasOwnProperty;ide=Xet});function sde(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ui(e)&&!Ui(t)?e!==e&&t!==t:ide(e,t,r,n,sde,i)}var T5,TO=X(()=>{ade();cc();T5=sde});function Zet(e,t,r,n){var i=r.length,a=i,s=!n;if(e==null)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i{uT();TO();jet=1,Ket=2;ode=Zet});function Qet(e){return e===e&&!pi(e)}var w5,wO=X(()=>{Sl();w5=Qet});function Jet(e){for(var t=Di(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,w5(i)]}return t}var cde,ude=X(()=>{wO();Uh();cde=Jet});function ett(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var C5,CO=X(()=>{C5=ett});function ttt(e){var t=cde(e);return t.length==1&&t[0][2]?C5(t[0][0],t[0][1]):function(r){return r===e||ode(r,e,t)}}var hde,fde=X(()=>{lde();ude();CO();hde=ttt});function rtt(e,t){return e!=null&&t in Object(e)}var dde,pde=X(()=>{dde=rtt});function ntt(e,t,r){t=Fd(t,e);for(var n=-1,i=t.length,a=!1;++n{lT();s1();ra();j2();UE();d1();k5=ntt});function itt(e,t){return e!=null&&k5(e,t,dde)}var S5,SO=X(()=>{pde();kO();S5=itt});function ott(e,t){return c1(e)&&w5(t)?C5(Cu(e),t):function(r){var n=The(r,e);return n===void 0&&n===t?S5(r,e):T5(t,n,att|stt)}}var att,stt,gde,mde=X(()=>{TO();whe();SO();KE();wO();CO();d1();att=1,stt=2;gde=ott});function ltt(e){return function(t){return t?.[e]}}var E5,EO=X(()=>{E5=ltt});function ctt(e){return function(t){return zd(t,e)}}var yde,vde=X(()=>{cT();yde=ctt});function utt(e){return c1(e)?E5(Cu(e)):yde(e)}var xde,bde=X(()=>{EO();vde();KE();d1();xde=utt});function htt(e){return typeof e=="function"?e:e==null?go:typeof e=="object"?Hr(e)?gde(e[0],e[1]):hde(e):xde(e)}var vs,Yh=X(()=>{fde();mde();Sd();ra();bde();vs=htt});function ftt(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++i];if(r(a[l],l,a)===!1)break}return t}}var Tde,wde=X(()=>{Tde=ftt});var dtt,w1,A5=X(()=>{wde();dtt=Tde(),w1=dtt});function ptt(e,t){return e&&w1(e,t,Di)}var C1,_5=X(()=>{A5();Uh();C1=ptt});function gtt(e,t){return function(r,n){if(r==null)return r;if(!Ia(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a{wu();Cde=gtt});var mtt,qd,fT=X(()=>{_5();kde();mtt=Cde(C1),qd=mtt});var ytt,R5,Sde=X(()=>{kl();ytt=function(){return Mi.Date.now()},R5=ytt});var Ede,vtt,xtt,AO,Ade=X(()=>{Q2();Q0();J2();Nd();Ede=Object.prototype,vtt=Ede.hasOwnProperty,xtt=Ld(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Vh(t[0],t[1],i)&&(n=1);++r{K2();Q0();dT=btt});function Ttt(e){return Ui(e)&&Ia(e)}var L5,RO=X(()=>{wu();cc();L5=Ttt});function wtt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var pT,LO=X(()=>{pT=wtt});function Ctt(e){return Tu(e,vo(e))}var _de,Rde=X(()=>{i1();Nd();_de=Ctt});function ktt(e,t,r,n,i,a,s){var o=pT(e,r),l=pT(t,r),u=s.get(l);if(u){dT(e,r,u);return}var h=a?a(o,l,r+"",e,t,s):void 0,f=h===void 0;if(f){var d=Hr(l),p=!d&&hc(l),g=!d&&!p&&Dd(l);h=l,d||p||g?Hr(o)?h=o:L5(o)?h=zE(o):p?(f=!1,h=n5(l,!0)):g?(f=!1,h=f5(l,!0)):h=[]:Lhe(l)||uc(l)?(h=o,uc(o)?h=_de(o):(!pi(o)||bu(o))&&(h=d5(l))):f=!1}f&&(s.set(l,h),i(h,l,n,a,s),s.delete(l)),dT(e,r,h)}var Lde,Ide=X(()=>{_O();sO();pO();UN();gO();s1();ra();RO();o1();X2();Sl();Ihe();nT();LO();Rde();Lde=ktt});function Mde(e,t,r,n,i){e!==t&&w1(t,function(a,s){if(i||(i=new ku),pi(a))Lde(e,t,s,r,Mde,n,i);else{var o=n?n(pT(e,s),a,s+"",e,t,i):void 0;o===void 0&&(o=a),dT(e,s,o)}},vo)}var Dde,Nde=X(()=>{uT();_O();A5();Ide();Sl();Nd();LO();Dde=Mde});function Stt(e,t,r){for(var n=-1,i=e==null?0:e.length;++n{Ode=Stt});function Ett(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Vd,Bde=X(()=>{Vd=Ett});function Att(e){return typeof e=="function"?e:go}var k1,I5=X(()=>{Sd();k1=Att});function _tt(e,t){var r=Hr(e)?qE:qd;return r(e,k1(t))}var it,IO=X(()=>{jN();fT();I5();ra();it=_tt});var $de=X(()=>{IO()});function Rtt(e,t){var r=[];return qd(e,function(n,i,a){t(n,i,a)&&r.push(n)}),r}var Fde,zde=X(()=>{fT();Fde=Rtt});function Ltt(e,t){var r=Hr(e)?i5:Fde;return r(e,vs(t,3))}var $s,Gde=X(()=>{oO();zde();Yh();ra();$s=Ltt});function Itt(e){return function(t,r,n){var i=Object(t);if(!Ia(t)){var a=vs(r,3);t=Di(t),r=function(o){return a(i[o],o,i)}}var s=e(t,r,n);return s>-1?i[a?t[s]:s]:void 0}}var qde,Vde=X(()=>{Yh();wu();Uh();qde=Itt});function Dtt(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:$ce(r);return i<0&&(i=Mtt(n+i,0)),VE(e,vs(t,3),i)}var Mtt,Wde,Ude=X(()=>{KN();Yh();Fce();Mtt=Math.max;Wde=Dtt});var Ntt,S1,Hde=X(()=>{Vde();Ude();Ntt=qde(Wde),S1=Ntt});function Ott(e,t){var r=-1,n=Ia(e)?Array(e.length):[];return qd(e,function(i,a,s){n[++r]=t(i,a,s)}),n}var M5,MO=X(()=>{fT();wu();M5=Ott});function Ptt(e,t){var r=Hr(e)?xu:M5;return r(e,vs(t,3))}var Bn,Yde=X(()=>{Y2();Yh();MO();ra();Bn=Ptt});function Btt(e,t){return e==null?e:w1(e,k1(t),vo)}var DO,Xde=X(()=>{A5();I5();Nd();DO=Btt});function $tt(e,t){return e&&C1(e,k1(t))}var NO,jde=X(()=>{_5();I5();NO=$tt});function Ftt(e,t){return e>t}var Kde,Zde=X(()=>{Kde=Ftt});function qtt(e,t){return e!=null&&Gtt.call(e,t)}var ztt,Gtt,Qde,Jde=X(()=>{ztt=Object.prototype,Gtt=ztt.hasOwnProperty;Qde=qtt});function Vtt(e,t){return e!=null&&k5(e,t,Qde)}var gT,epe=X(()=>{Jde();kO();gT=Vtt});function Utt(e){return typeof e=="string"||!Hr(e)&&Ui(e)&&Bs(e)==Wtt}var Wtt,tpe,rpe=X(()=>{kd();ra();cc();Wtt="[object String]";tpe=Utt});function Htt(e,t){return xu(t,function(r){return e[r]})}var npe,ipe=X(()=>{Y2();npe=Htt});function Ytt(e){return e==null?[]:npe(e,Di(e))}var tl,ape=X(()=>{ipe();Uh();tl=Ytt});function Qtt(e){if(e==null)return!0;if(Ia(e)&&(Hr(e)||typeof e=="string"||typeof e.splice=="function"||hc(e)||Dd(e)||uc(e)))return!e.length;var t=el(e);if(t==Xtt||t==jtt)return!e.size;if(Id(e))return!l1(e).length;for(var r in e)if(Ztt.call(e,r))return!1;return!0}var Xtt,jtt,Ktt,Ztt,D5,spe=X(()=>{jE();tg();s1();ra();wu();o1();eT();nT();Xtt="[object Map]",jtt="[object Set]",Ktt=Object.prototype,Ztt=Ktt.hasOwnProperty;D5=Qtt});function Jtt(e){return e===void 0}var Ni,ope=X(()=>{Ni=Jtt});function ert(e,t){return e{N5=ert});function trt(e,t){var r={};return t=vs(t,3),C1(e,function(n,i,a){_d(r,i,t(n,i,a))}),r}var rg,lpe=X(()=>{K2();_5();Yh();rg=trt});function rrt(e,t,r){for(var n=-1,i=e.length;++n{Z0();E1=rrt});function nrt(e){return e&&e.length?E1(e,go,Kde):void 0}var xo,cpe=X(()=>{O5();Zde();Sd();xo=nrt});var irt,A1,upe=X(()=>{Nde();mue();irt=gue(function(e,t,r){Dde(e,t,r)}),A1=irt});function art(e){return e&&e.length?E1(e,go,N5):void 0}var Xh,hpe=X(()=>{O5();OO();Sd();Xh=art});function srt(e,t){return e&&e.length?E1(e,vs(t,2),N5):void 0}var ng,fpe=X(()=>{O5();Yh();OO();ng=srt});function ort(e,t,r,n){if(!pi(e))return e;t=Fd(t,e);for(var i=-1,a=t.length,s=a-1,o=e;o!=null&&++i{Z2();lT();j2();Sl();d1();dpe=ort});function lrt(e,t,r){for(var n=-1,i=t.length,a={};++n{cT();ppe();lT();gpe=lrt});function crt(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var ype,vpe=X(()=>{ype=crt});function urt(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=Jo(e),s=t!==void 0,o=t===null,l=t===t,u=Jo(t);if(!o&&!u&&!a&&e>t||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e{Z0();xpe=urt});function hrt(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Tpe,wpe=X(()=>{bpe();Tpe=hrt});function frt(e,t,r){t.length?t=xu(t,function(a){return Hr(a)?function(s){return zd(s,a.length===1?a[0]:a)}:a}):t=[go];var n=-1;t=xu(t,Md(vs));var i=M5(e,function(a,s,o){var l=xu(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return ype(i,function(a,s){return Tpe(a,s,r)})}var Cpe,kpe=X(()=>{Y2();cT();Yh();MO();vpe();tT();wpe();Sd();ra();Cpe=frt});var drt,Spe,Epe=X(()=>{EO();drt=E5("length"),Spe=drt});function Srt(e){for(var t=Ape.lastIndex=0;Ape.test(e);)++t;return t}var _pe,prt,grt,mrt,yrt,vrt,xrt,PO,BO,brt,Rpe,Lpe,Ipe,Trt,Mpe,Dpe,wrt,Crt,krt,Ape,Npe,Ope=X(()=>{_pe="\\ud800-\\udfff",prt="\\u0300-\\u036f",grt="\\ufe20-\\ufe2f",mrt="\\u20d0-\\u20ff",yrt=prt+grt+mrt,vrt="\\ufe0e\\ufe0f",xrt="["+_pe+"]",PO="["+yrt+"]",BO="\\ud83c[\\udffb-\\udfff]",brt="(?:"+PO+"|"+BO+")",Rpe="[^"+_pe+"]",Lpe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ipe="[\\ud800-\\udbff][\\udc00-\\udfff]",Trt="\\u200d",Mpe=brt+"?",Dpe="["+vrt+"]?",wrt="(?:"+Trt+"(?:"+[Rpe,Lpe,Ipe].join("|")+")"+Dpe+Mpe+")*",Crt=Dpe+Mpe+wrt,krt="(?:"+[Rpe+PO+"?",PO,Lpe,Ipe,xrt].join("|")+")",Ape=RegExp(BO+"(?="+BO+")|"+krt+Crt,"g");Npe=Srt});function Ert(e){return Mhe(e)?Npe(e):Spe(e)}var Ppe,Bpe=X(()=>{Epe();Dhe();Ope();Ppe=Ert});function Art(e,t){return gpe(e,t,function(r,n){return S5(e,n)})}var $pe,Fpe=X(()=>{mpe();SO();$pe=Art});var _rt,ig,zpe=X(()=>{Fpe();_he();_rt=Ahe(function(e,t){return e==null?{}:$pe(e,t)}),ig=_rt});function Irt(e,t,r,n){for(var i=-1,a=Lrt(Rrt((t-e)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=e,e+=r;return s}var Rrt,Lrt,Gpe,qpe=X(()=>{Rrt=Math.ceil,Lrt=Math.max;Gpe=Irt});function Mrt(e){return function(t,r,n){return n&&typeof n!="number"&&Vh(t,r,n)&&(r=n=void 0),t=r1(t),r===void 0?(r=t,t=0):r=r1(r),n=n===void 0?t{qpe();J2();VN();Vpe=Mrt});var Drt,_l,Upe=X(()=>{Wpe();Drt=Vpe(),_l=Drt});function Nrt(e,t,r,n,i){return i(e,function(a,s,o){r=n?(n=!1,a):t(r,a,s,o)}),r}var Hpe,Ype=X(()=>{Hpe=Nrt});function Ort(e,t,r){var n=Hr(e)?Nhe:Hpe,i=arguments.length<3;return n(e,vs(t,4),r,i,qd)}var Su,Xpe=X(()=>{Ohe();fT();Yh();Ype();ra();Su=Ort});function $rt(e){if(e==null)return 0;if(Ia(e))return tpe(e)?Ppe(e):e.length;var t=el(e);return t==Prt||t==Brt?e.size:l1(e).length}var Prt,Brt,$O,jpe=X(()=>{jE();tg();wu();rpe();Bpe();Prt="[object Map]",Brt="[object Set]";$O=$rt});var Frt,Eu,Kpe=X(()=>{t5();kpe();Q2();J2();Frt=Ld(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Vh(e,t[0],t[1])?t=[]:r>2&&Vh(t[0],t[1],t[2])&&(t=[t[0]]),Cpe(e,g1(t,1),[])}),Eu=Frt});var zrt,Grt,Zpe,Qpe=X(()=>{fO();tue();x5();zrt=1/0,Grt=Gd&&1/T1(new Gd([,-0]))[1]==zrt?function(e){return new Gd(e)}:eue,Zpe=Grt});function Vrt(e,t,r){var n=-1,i=fue,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=Ode;else if(a>=qrt){var u=t?null:Zpe(e);if(u)return T1(u);s=!1,i=y5,l=new m5}else l=t?[]:o;e:for(;++n{yO();due();Pde();vO();Qpe();x5();qrt=200;Jpe=Vrt});var Wrt,FO,t0e=X(()=>{t5();Q2();e0e();RO();Wrt=Ld(function(e){return Jpe(g1(e,1,L5,!0))}),FO=Wrt});function Hrt(e){var t=++Urt;return JE(e)+t}var Urt,ag,r0e=X(()=>{iO();Urt=0;ag=Hrt});function Yrt(e,t,r){for(var n=-1,i=e.length,a=t.length,s={};++n{n0e=Yrt});function Xrt(e,t){return n0e(e||[],t||[],Rd)}var P5,a0e=X(()=>{Z2();i0e();P5=Xrt});var $n=X(()=>{Gfe();HN();Ade();$de();Gde();Hde();aO();IO();Xde();jde();epe();ra();spe();X2();ope();Uh();Bde();Yde();lpe();cpe();upe();hpe();fpe();Sde();zpe();Upe();Xpe();jpe();Kpe();t0e();r0e();ape();a0e();});function o0e(e,t){e[t]?e[t]++:e[t]=1}function l0e(e,t){--e[t]||delete e[t]}function mT(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var s=i;i=a,a=s}return i+s0e+a+s0e+(Ni(n)?jrt:n)}function Krt(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function zO(e,t){return mT(e,t.v,t.w,t.name)}var jrt,sg,s0e,Rn,GO=X(()=>{$n();jrt="\0",sg="\0",s0e="",Rn=class{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=yo(void 0),this._defaultEdgeLabelFn=yo(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[sg]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return bu(t)||(t=yo(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Di(this._nodes)}sources(){var t=this;return $s(this.nodes(),function(r){return D5(t._in[r])})}sinks(){var t=this;return $s(this.nodes(),function(r){return D5(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return it(t,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=sg,this._children[t]={},this._children[sg][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],it(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),it(Di(this._in[t]),r),delete this._in[t],delete this._preds[t],it(Di(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ni(r))r=sg;else{r+="";for(var n=r;!Ni(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==sg)return r}}children(t){if(Ni(t)&&(t=sg),this._isCompound){var r=this._children[t];if(r)return Di(r)}else{if(t===sg)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Di(r)}successors(t){var r=this._sucs[t];if(r)return Di(r)}neighbors(t){var r=this.predecessors(t);if(r)return FO(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;it(this._nodes,function(s,o){t(o)&&r.setNode(o,s)}),it(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var i={};function a(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(i[s]=o,o):o in i?i[o]:a(o)}return this._isCompound&&it(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(t){return bu(t)||(t=yo(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return tl(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Su(t,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s}),this}setEdge(){var t,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(t=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(t=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,r=""+r,Ni(n)||(n=""+n);var o=mT(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=i),this;if(!Ni(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=a?i:this._defaultEdgeLabelFn(t,r,n);var l=Krt(this._isDirected,t,r,n);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,o0e(this._preds[r],t),o0e(this._sucs[t],r),this._in[r][o]=l,this._out[t][o]=l,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?zO(this._isDirected,arguments[0]):mT(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?zO(this._isDirected,arguments[0]):mT(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?zO(this._isDirected,arguments[0]):mT(this._isDirected,t,r,n),a=this._edgeObjs[i];return a&&(t=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],l0e(this._preds[r],t),l0e(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=tl(n);return r?$s(i,function(a){return a.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=tl(n);return r?$s(i,function(a){return a.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};Rn.prototype._nodeCount=0;Rn.prototype._edgeCount=0});var rl=X(()=>{GO()});var d0e={};cr(d0e,{captureNodeSizes:()=>f0e,shouldCaptureSizes:()=>c0e});function qO(){if(!(typeof globalThis>"u"))return globalThis}function c0e(){return!!qO()?.mermaidCaptureSizes}function u0e(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}function h0e(e,t){let r=qO();if(!r)return;let n=t.node(),a=((n&&"ownerSVGElement"in n?n.ownerSVGElement:null)??n)?.id??"(unknown)";r.mermaidCapturedSizes??=[];let s={svgId:a,sizes:e};r.mermaidCapturedSizes.push(s),r.mermaidLastCapturedSizes=s}function f0e(e,t){let r=[];for(let n of t.nodes)n.isGroup||r.push({id:n.id,width:n.width??0,height:n.height??0});r.length!==0&&h0e({metadata:{captureVersion:Zrt,capturedAt:new Date().toISOString(),capturedFrom:u0e()},nodes:r},e)}var Zrt,p0e=X(()=>{Yt();Zrt=1;v(qO,"getCaptureGlobal");v(c0e,"shouldCaptureSizes");v(u0e,"capturedFromLocation");v(h0e,"emitCapturedSizes");v(f0e,"captureNodeSizes")});function B5(e,{edgePathsClass:t="edges edgePaths"}={}){let r=e.insert("g").attr("class","root"),n=r.insert("g").attr("class","clusters"),i=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),s=r.insert("g").attr("class","nodes");return{clusters:n,edgePaths:i,edgeLabels:a,nodes:s,rootGroups:r}}async function m0e(e,t){if(t.label){let{shapeSvg:r,bbox:n}=await tr(e,t);t.labelBBox={width:n.width,height:n.height},r.remove()}else t.labelBBox={width:0,height:0}}async function $5(e,t,r){let n=await mu(e,t,r),i=n.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,n}async function y0e(e,t){let r=new Rn({multigraph:!0,compound:!0}),n=[...t.edges],i=ze(),a=B5(e),{edgeLabels:s,nodes:o}=a,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)u&&await m0e(o,h),r.setNode(h.id,{...h});else{if(u){let f=await $5(o,h,{config:i,dir:h.dir});l.set(h.id,f)}r.setNode(h.id,{...h})}}));for(let h of n)u&&GN(h)&&await vu(s,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(d=>d.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:h}=await Promise.resolve().then(()=>(p0e(),d0e));h(e,t)}return{graph:r,groups:a,nodeElements:l}}function _1({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:n,afterPaint:i,paintOptions:a}){let s=t??UO;return v(async function(l,u,h,f){let d=u.select("g");(h?.insertMarkers??t1)(d,l.markers,l.type,l.diagramId),WO();let p={element:d,helpers:h,options:f};p.preparedLayout=await e?.(l,p);let g=await s(l,p),m=await r(l,p),y={...p,measure:g};n?await n(l,y,m):await HO(l,y,a),await i?.(l,y,m)},"render")}function WO(){oce(),gce(),uce(),Qrt()}async function UO(e,{element:t}){return await y0e(t,e)}async function HO(e,t,r={}){let{measure:n}=t,{groups:i}=n;for(let s of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(s,t)||await S0e(i,s,t,r);let a=A0e(e.nodes);for(let s of e.edges)_0e(s,r)||await R0e(i,s,a,e,r,t)}async function S0e(e,t,r,n){t.clusterNode?yu(t):E0e(t,r,n)?await wd(e.clusters,t):yu(t)}function E0e(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}function A0e(e){let t=new Map;for(let r of e)r?.id&&t.set(r.id,r);return t}function _0e(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function R0e(e,t,r,n,i,a){let s=Cd(e.edgePaths,{...t},i.clusterDb??new Map,n.type,VO(t.start,t,r,a,i),VO(t.end,t,r,a,i),n.diagramId,L0e(t,i));GN(t)&&(j0.has(t.id)||await vu(e.edgeLabels,t),I0e(t,s))}function VO(e,t,r,n,i){return i.getEdgeNode?.(e,t,n)??(e?r.get(e)??{}:{})}function L0e(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}function I0e(e,t){let r=t?.updatedPath??t?.originalPath,n=It(),{subGraphTitleTotalMargin:i}=Gh({flowchart:n.flowchart??{}});if(e.label){let a=j0.get(e.id),s=e.x,o=e.y;if(r){let l=ar.calcLabelPosition(r);fe.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(e?.startLabelLeft){let a=Ii.get(e.id).startLeft,s=e?.x,o=e?.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){let a=Ii.get(e.id).startRight,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){let a=Ii.get(e.id).endLeft,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){let a=Ii.get(e.id).endRight,s=e.x,o=e.y;if(r){let l=ar.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}}var Gr,og,v0e,Qrt,vT,Jrt,x0e,b0e,ent,lg,g0e,T0e,w0e,C0e,F5,k0e,tnt,z5=X(()=>{ms();ys();pa();Li();Ur();hr();ur();Yt();rl();rl();v(B5,"createLayoutElementGroups");v(m0e,"measureGroupLabel");v($5,"insertMeasuredNode");v(y0e,"createGraphWithElements");Gr=new Map,og=new Map,v0e=new Map,Qrt=v(()=>{og.clear(),v0e.clear(),Gr.clear()},"clear"),vT=v((e,t)=>{let r=og.get(t)||[];return fe.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Jrt=v((e,t)=>{let r=og.get(t)||[];return fe.info("Descendants of ",t," is ",r),fe.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||vT(e.v,t)||vT(e.w,t)||r.includes(e.w):(fe.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),x0e=v((e,t,r,n)=>{fe.debug("Copying children of ",e,"root",n,"data",t.node(e),n);let i=t.children(e)||[];e!==n&&i.push(e),fe.debug("Copying (nodes) clusterId",e,"nodes",i),i.forEach(a=>{if(t.children(a).length>0)x0e(a,t,r,n);else{let s=t.node(a);fe.info("cp ",a," to ",n," with parent ",e),r.setNode(a,s),n!==t.parent(a)&&(fe.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==n&&a!==e?(fe.debug("Setting parent",a,e),r.setParent(a,e)):(fe.info("In copy ",e,"root",n,"data",t.node(e),n),fe.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==n,"node!==clusterId",a!==e));let o=t.edges(a);fe.debug("Copying Edges",o),o.forEach(l=>{fe.info("Edge",l);let u=t.edge(l.v,l.w,l.name);fe.info("Edge data",u,n);try{Jrt(l,n)?(fe.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),fe.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):fe.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",e)}catch(h){fe.error(h)}})}fe.debug("Removing node",a),t.removeNode(a)})},"copy"),b0e=v((e,t)=>{let r=t.children(e),n=[...r];for(let i of r)v0e.set(i,e),n=[...n,...b0e(i,t)];return n},"extractDescendants"),ent=v((e,t,r)=>{let n=e.edges().filter(l=>l.v===t||l.w===t),i=e.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),s=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),lg=v((e,t,r)=>{let n=t.children(e);if(fe.trace("Searching children of id ",e,n),n.length<1)return e;let i;for(let a of n){let s=lg(a,t,r),o=ent(t,r,s);if(s)if(o.length>0)i=s;else return s}return i},"findNonClusterChild"),g0e=v(e=>!Gr.has(e)||!Gr.get(e).externalConnections?e:Gr.has(e)?Gr.get(e).id:e,"getAnchorId"),T0e=v((e,t)=>{if(!e||t>10){fe.debug("Opting out, no graph ");return}else fe.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(fe.debug("Cluster identified",r," Replacement id in edges: ",lg(r,e,r)),og.set(r,b0e(r,e)),Gr.set(r,{id:lg(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let n=e.children(r),i=e.edges();n.length>0?(fe.debug("Cluster identified",r,og),i.forEach(a=>{let s=vT(a.v,r),o=vT(a.w,r);s^o&&(fe.debug("Edge: ",a," leaves cluster ",r),fe.debug("Descendants of XXX ",r,": ",og.get(r)),Gr.get(r).externalConnections=!0)})):fe.debug("Not a cluster ",r,og)});for(let r of Gr.keys()){let n=Gr.get(r).id,i=e.parent(n);i!==r&&Gr.has(i)&&!Gr.get(i).externalConnections&&(Gr.get(r).id=i);let a=e.edges().some(s=>s.v===r);if(n&&Gr.get(r)?.externalConnections&&a&&k0e(e,n,r)){let s=tnt(e,r,e.parent(n));s&&(Gr.get(r).id=s)}}e.edges().forEach(function(r){let n=e.edge(r);fe.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),fe.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,a=r.w;if(fe.debug("Fix XXX",Gr,"ids:",r.v,r.w,"Translating: ",Gr.get(r.v)," --- ",Gr.get(r.w)),Gr.get(r.v)||Gr.get(r.w)){if(fe.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),i=g0e(r.v),a=g0e(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v){let s=e.parent(i);Gr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=e.parent(a);Gr.get(s).externalConnections=!0,n.toCluster=r.w}fe.debug("Fix Replacing with XXX",i,a,r.name),e.setEdge(i,a,n,r.name)}}),w0e(e,0),fe.trace(Gr)},"adjustClustersAndEdges"),w0e=v((e,t)=>{if(t>10){fe.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i of r){let a=e.children(i);n=n||a.length>0}if(!n){fe.debug("Done, no node has children",e.nodes());return}fe.debug("Nodes = ",r,t);for(let i of r)if(fe.debug("Extracting node",i,Gr,Gr.has(i)&&!Gr.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!Gr.has(i))fe.debug("Not a cluster",i,t);else if(!Gr.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){fe.debug("Cluster without external connections, without a parent and with children",i,t);let s=e.graph().rankdir==="TB"?"LR":"TB";Gr.get(i)?.clusterData?.dir&&(s=Gr.get(i).clusterData.dir,fe.debug("Fixing dir",Gr.get(i).clusterData.dir,s));let o=new Rn({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});x0e(i,e,o,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:Gr.get(i).clusterData,label:Gr.get(i).label,graph:o})}else fe.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Gr.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),fe.debug(Gr);r=e.nodes(),fe.debug("New list of nodes",r);for(let i of r){let a=e.node(i);fe.debug(" Now next level",i,a),a?.clusterNode&&w0e(a.graph,t+1)}},"extractor"),C0e=v((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(n=>{let i=e.children(n),a=C0e(e,i);r=[...r,...a]}),r},"sorter"),F5=v(e=>C0e(e,e.children()),"sortNodesByHierarchy"),k0e=v((e,t,r)=>{let n=e.parent(t);for(;n&&n!==r;){let i=Gr.get(n);if(i&&!i.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),tnt=v((e,t,r)=>{let n=e.children(t)??[];for(let i of n){if(i===r||vT(i,r))continue;let a=lg(i,e,t);if(a&&!k0e(e,a,t))return a}return null},"findSafeAnchorNode");v(_1,"createCommonLayoutRenderer");v(WO,"clearLayoutRenderState");v(UO,"defaultMeasureLayout");v(HO,"paintLayoutData");v(S0e,"paintLayoutNode");v(E0e,"shouldPaintAsCluster");v(A0e,"buildNodeLookup");v(_0e,"shouldSkipPaintEdge");v(R0e,"paintLayoutEdge");v(VO,"getRenderedNode");v(L0e,"shouldSkipIntersect");v(I0e,"positionRenderedEdgeLabel")});function nge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function R1(){if(M0e)return Wd;M0e=1;function e(s){return typeof s>"u"||s===null}v(e,"isNothing");function t(s){return typeof s=="object"&&s!==null}v(t,"isObject");function r(s){return Array.isArray(s)?s:e(s)?[]:[s]}v(r,"toArray");function n(s,o){if(o){let l=Object.keys(o);for(let u=0,h=l.length;uf&&(u=" ... ",a=o-f+u.length),s-o>f&&(h=" ...",s=o+f-h.length),{str:u+i.slice(a,s).replace(/\t/g,"\u2192")+h,pos:o-a+u.length}}v(t,"getLine");function r(i,a){return e.repeat(" ",a-i.length)+i}v(r,"padStart");function n(i,a){if(a=Object.create(a||null),!i.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let s=/\r?\n|\r|\0/g,o=[0],l=[],u,h=-1;for(;u=s.exec(i.buffer);)l.push(u.index),o.push(u.index+u[0].length),i.position<=u.index&&h<0&&(h=o.length-2);h<0&&(h=o.length-1);let f="",d=Math.min(i.line+a.linesAfter,l.length).toString().length,p=a.maxLength-(a.indent+d+3);for(let m=1;m<=a.linesBefore&&!(h-m<0);m++){let y=t(i.buffer,o[h-m],l[h-m],i.position-(o[h]-o[h-m]),p);f=e.repeat(" ",a.indent)+r((i.line-m+1).toString(),d)+" | "+y.str+` +`+f}let g=t(i.buffer,o[h],l[h],i.position,p);f+=e.repeat(" ",a.indent)+r((i.line+1).toString(),d)+" | "+g.str+` +`,f+=e.repeat("-",a.indent+d+3+g.pos)+`^ +`;for(let m=1;m<=a.linesAfter&&!(h+m>=l.length);m++){let y=t(i.buffer,o[h+m],l[h+m],i.position-(o[h]-o[h+m]),p);f+=e.repeat(" ",a.indent)+r((i.line+m+1).toString(),d)+" | "+y.str+` +`}return f.replace(/\n$/,"")}return v(n,"makeSnippet"),XO=n,XO}function bs(){if(O0e)return jO;O0e=1;let e=L1(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(a){let s={};return a!==null&&Object.keys(a).forEach(function(o){a[o].forEach(function(l){s[String(l)]=o})}),s}v(n,"compileStyleAliases");function i(a,s){if(s=s||{},Object.keys(s).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+a+'" YAML type.')}),this.options=s,this.tag=a,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(o){return o},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=n(s.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return v(i,"Type2"),jO=i,jO}function g9(){if(P0e)return KO;P0e=1;let e=L1(),t=bs();function r(a,s){let o=[];return a[s].forEach(function(l){let u=o.length;o.forEach(function(h,f){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(u=f)}),o[u]=l}),o}v(r,"compileList");function n(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(o){o.multi?(a.multi[o.kind].push(o),a.multi.fallback.push(o)):a[o.kind][o.tag]=a.fallback[o.tag]=o}v(s,"collectType");for(let o=0,l=arguments.length;o=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}v(r,"isHexCode");function n(u){return u>=48&&u<=55}v(n,"isOctCode");function i(u){return u>=48&&u<=57}v(i,"isDecCode");function a(u){if(u===null)return!1;let h=u.length,f=0,d=!1;if(!h)return!1;let p=u[f];if((p==="-"||p==="+")&&(p=u[++f]),p==="0"){if(f+1===h)return!0;if(p=u[++f],p==="b"){for(f++;f=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},"binary"),octal:v(function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},"octal"),decimal:v(function(u){return u.toString(10)},"decimal"),hexadecimal:v(function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),n9}function C9(){if(W0e)return i9;W0e=1;let e=R1(),t=bs(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(u){return u===null||!r.test(u)?!1:isFinite(parseFloat(u,10))?!0:n.test(u)}v(i,"resolveYamlFloat");function a(u){let h=u.toLowerCase(),f=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:f*parseFloat(h,10)}v(a,"constructYamlFloat");let s=/^[-+]?[0-9]+e/;function o(u,h){if(isNaN(u))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(u))return"-0.0";let f=u.toString(10);return s.test(f)?f.replace("e",".e"):f}v(o,"representYamlFloat");function l(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||e.isNegativeZero(u))}return v(l,"isFloat"),i9=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:a,predicate:l,represent:o,defaultStyle:"lowercase"}),i9}function k9(){return U0e||(U0e=1,a9=x9().extend({implicit:[b9(),T9(),w9(),C9()]})),a9}function S9(){return H0e||(H0e=1,s9=k9()),s9}function E9(){if(Y0e)return o9;Y0e=1;let e=bs(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function n(s){return s===null?!1:t.exec(s)!==null||r.exec(s)!==null}v(n,"resolveYamlTimestamp");function i(s){let o=0,l=null,u=t.exec(s);if(u===null&&(u=r.exec(s)),u===null)throw new Error("Date resolve error");let h=+u[1],f=+u[2]-1,d=+u[3];if(!u[4])return new Date(Date.UTC(h,f,d));let p=+u[4],g=+u[5],m=+u[6];if(u[7]){for(o=u[7].slice(0,3);o.length<3;)o+="0";o=+o}if(u[9]){let x=+u[10],b=+(u[11]||0);l=(x*60+b)*6e4,u[9]==="-"&&(l=-l)}let y=new Date(Date.UTC(h,f,d,p,g,m,o));return l&&y.setTime(y.getTime()-l),y}v(i,"constructYamlTimestamp");function a(s){return s.toISOString()}return v(a,"representYamlTimestamp"),o9=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:a}),o9}function A9(){if(X0e)return l9;X0e=1;let e=bs();function t(r){return r==="<<"||r===null}return v(t,"resolveYamlMerge"),l9=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),l9}function _9(){if(j0e)return c9;j0e=1;let e=bs(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function r(s){if(s===null)return!1;let o=0,l=s.length,u=t;for(let h=0;h64)){if(f<0)return!1;o+=6}}return o%8===0}v(r,"resolveYamlBinary");function n(s){let o=s.replace(/[\r\n=]/g,""),l=o.length,u=t,h=0,f=[];for(let p=0;p>16&255),f.push(h>>8&255),f.push(h&255)),h=h<<6|u.indexOf(o.charAt(p));let d=l%4*6;return d===0?(f.push(h>>16&255),f.push(h>>8&255),f.push(h&255)):d===18?(f.push(h>>10&255),f.push(h>>2&255)):d===12&&f.push(h>>4&255),new Uint8Array(f)}v(n,"constructYamlBinary");function i(s){let o="",l=0,u=s.length,h=t;for(let d=0;d>18&63],o+=h[l>>12&63],o+=h[l>>6&63],o+=h[l&63]),l=(l<<8)+s[d];let f=u%3;return f===0?(o+=h[l>>18&63],o+=h[l>>12&63],o+=h[l>>6&63],o+=h[l&63]):f===2?(o+=h[l>>10&63],o+=h[l>>4&63],o+=h[l<<2&63],o+=h[64]):f===1&&(o+=h[l>>2&63],o+=h[l<<4&63],o+=h[64],o+=h[64]),o}v(i,"representYamlBinary");function a(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return v(a,"isBinary"),c9=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:a,represent:i}),c9}function R9(){if(K0e)return u9;K0e=1;let e=bs(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(a){if(a===null)return!0;let s=[],o=a;for(let l=0,u=o.length;l=48&&F<=57)return F-48;let H=F|32;return H>=97&&H<=102?H-97+10:-1}v(C,"fromHexCode");function S(F){return F===120?2:F===117?4:F===85?8:0}v(S,"escapedHexLen");function E(F){return F>=48&&F<=57?F-48:-1}v(E,"fromDecimalCode");function L(F){switch(F){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return` +`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}v(L,"simpleEscapeSequence");function N(F){return F<=65535?String.fromCharCode(F):String.fromCharCode((F-65536>>10)+55296,(F-65536&1023)+56320)}v(N,"charFromCodepoint");function O(F,H,W){H==="__proto__"?Object.defineProperty(F,H,{configurable:!0,enumerable:!0,writable:!0,value:W}):F[H]=W}v(O,"setProperty");let R=new Array(256),_=new Array(256);for(let F=0;F<256;F++)R[F]=L(F)?1:0,_[F]=L(F);function D(F,H){this.input=F,this.filename=H.filename||null,this.schema=H.schema||n,this.onWarning=H.onWarning||null,this.legacy=H.legacy||!1,this.json=H.json||!1,this.listener=H.listener||null,this.maxDepth=typeof H.maxDepth=="number"?H.maxDepth:100,this.maxTotalMergeKeys=typeof H.maxTotalMergeKeys=="number"?H.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=F.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}v(D,"State");function I(F,H){let W={name:F.filename,buffer:F.input.slice(0,-1),position:F.position,line:F.line,column:F.position-F.lineStart};return W.snippet=r(W),new t(H,W)}v(I,"generateError");function M(F,H){throw I(F,H)}v(M,"throwError");function B(F,H){F.onWarning&&F.onWarning.call(null,I(F,H))}v(B,"throwWarning");function P(F,H,W){let U=F.anchorMapTransactions;if(U.length!==0){let ae=U[U.length-1];i.call(ae,H)||(ae[H]={existed:i.call(F.anchorMap,H),value:F.anchorMap[H]})}F.anchorMap[H]=W}v(P,"storeAnchor");function $(F){F.anchorMapTransactions.push(Object.create(null))}v($,"beginAnchorTransaction");function G(F){let H=F.anchorMapTransactions.pop(),W=F.anchorMapTransactions;if(W.length===0)return;let U=W[W.length-1],ae=Object.keys(H);for(let K=0,Y=ae.length;K=0;U-=1){let ae=H[W[U]];ae.existed?F.anchorMap[W[U]]=ae.value:delete F.anchorMap[W[U]]}}v(q,"rollbackAnchorTransaction");function z(F){return{position:F.position,line:F.line,lineStart:F.lineStart,lineIndent:F.lineIndent,firstTabInLine:F.firstTabInLine,tag:F.tag,anchor:F.anchor,kind:F.kind,result:F.result}}v(z,"snapshotState");function V(F,H){F.position=H.position,F.line=H.line,F.lineStart=H.lineStart,F.lineIndent=H.lineIndent,F.firstTabInLine=H.firstTabInLine,F.tag=H.tag,F.anchor=H.anchor,F.kind=H.kind,F.result=H.result}v(V,"restoreState");let j={YAML:v(function(H,W,U){H.version!==null&&M(H,"duplication of %YAML directive"),U.length!==1&&M(H,"YAML directive accepts exactly one argument");let ae=/^([0-9]+)\.([0-9]+)$/.exec(U[0]);ae===null&&M(H,"ill-formed argument of the YAML directive");let K=parseInt(ae[1],10),Y=parseInt(ae[2],10);K!==1&&M(H,"unacceptable YAML version of the document"),H.version=U[0],H.checkLineBreaks=Y<2,Y!==1&&Y!==2&&B(H,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:v(function(H,W,U){let ae;U.length!==2&&M(H,"TAG directive accepts exactly two arguments");let K=U[0];ae=U[1],m.test(K)||M(H,"ill-formed tag handle (first argument) of the TAG directive"),i.call(H.tagMap,K)&&M(H,'there is a previously declared suffix for "'+K+'" tag handle'),y.test(ae)||M(H,"ill-formed tag prefix (second argument) of the TAG directive");try{ae=decodeURIComponent(ae)}catch{M(H,"tag prefix is malformed: "+ae)}H.tagMap[K]=ae},"handleTagDirective")};function ee(F,H,W,U){if(H=32&&Z<=1114111||M(F,"expected valid JSON character")}else d.test(ae)&&M(F,"the stream contains non-printable characters");F.result+=ae}}v(ee,"captureSegment");function ne(F,H,W,U){e.isObject(W)||M(F,"cannot merge mappings; the provided source object is unacceptable");let ae=Object.keys(W);for(let K=0,Y=ae.length;KF.maxTotalMergeKeys&&M(F,"merge keys exceeded maxTotalMergeKeys ("+F.maxTotalMergeKeys+")"),i.call(H,Z)||(O(H,Z,W[Z]),U[Z]=!0)}}v(ne,"mergeMappings");function Q(F,H,W,U,ae,K,Y,Z,Ce){if(Array.isArray(ae)){ae=Array.prototype.slice.call(ae);for(let we=0,ke=ae.length;we1&&(F.result+=e.repeat(` +`,H-1))}v(ce,"writeFoldedLines");function ue(F,H,W){let U,ae,K,Y,Z,Ce,we=F.kind,ke=F.result,Se=F.input.charCodeAt(F.position);if(k(Se)||w(Se)||Se===35||Se===38||Se===42||Se===33||Se===124||Se===62||Se===39||Se===34||Se===37||Se===64||Se===96)return!1;if(Se===63||Se===45){let Ne=F.input.charCodeAt(F.position+1);if(k(Ne)||W&&w(Ne))return!1}for(F.kind="scalar",F.result="",U=ae=F.position,K=!1;Se!==0;){if(Se===58){let Ne=F.input.charCodeAt(F.position+1);if(k(Ne)||W&&w(Ne))break}else if(Se===35){let Ne=F.input.charCodeAt(F.position-1);if(k(Ne))break}else{if(F.position===F.lineStart&&de(F)||W&&w(Se))break;if(b(Se))if(Y=F.line,Z=F.lineStart,Ce=F.lineIndent,te(F,!1,-1),F.lineIndent>=H){K=!0,Se=F.input.charCodeAt(F.position);continue}else{F.position=ae,F.line=Y,F.lineStart=Z,F.lineIndent=Ce;break}}K&&(ee(F,U,ae,!1),ce(F,F.line-Y),U=ae=F.position,K=!1),T(Se)||(ae=F.position+1),Se=F.input.charCodeAt(++F.position)}return ee(F,U,ae,!1),F.result?!0:(F.kind=we,F.result=ke,!1)}v(ue,"readPlainScalar");function Re(F,H){let W,U,ae=F.input.charCodeAt(F.position);if(ae!==39)return!1;for(F.kind="scalar",F.result="",F.position++,W=U=F.position;(ae=F.input.charCodeAt(F.position))!==0;)if(ae===39)if(ee(F,W,F.position,!0),ae=F.input.charCodeAt(++F.position),ae===39)W=F.position,F.position++,U=F.position;else return!0;else b(ae)?(ee(F,W,U,!0),ce(F,te(F,!1,H)),W=U=F.position):F.position===F.lineStart&&de(F)?M(F,"unexpected end of the document within a single quoted scalar"):(F.position++,T(ae)||(U=F.position));M(F,"unexpected end of the stream within a single quoted scalar")}v(Re,"readSingleQuotedScalar");function ve(F,H){let W,U,ae,K=F.input.charCodeAt(F.position);if(K!==34)return!1;for(F.kind="scalar",F.result="",F.position++,W=U=F.position;(K=F.input.charCodeAt(F.position))!==0;){if(K===34)return ee(F,W,F.position,!0),F.position++,!0;if(K===92){if(ee(F,W,F.position,!0),K=F.input.charCodeAt(++F.position),b(K))te(F,!1,H);else if(K<256&&R[K])F.result+=_[K],F.position++;else if((ae=S(K))>0){let Y=ae,Z=0;for(;Y>0;Y--)K=F.input.charCodeAt(++F.position),(ae=C(K))>=0?Z=(Z<<4)+ae:M(F,"expected hexadecimal character");F.result+=N(Z),F.position++}else M(F,"unknown escape sequence");W=U=F.position}else b(K)?(ee(F,W,U,!0),ce(F,te(F,!1,H)),W=U=F.position):F.position===F.lineStart&&de(F)?M(F,"unexpected end of the document within a double quoted scalar"):(F.position++,T(K)||(U=F.position))}M(F,"unexpected end of the stream within a double quoted scalar")}v(ve,"readDoubleQuotedScalar");function Ge(F,H){let W=!0,U,ae,K,Y=F.tag,Z,Ce=F.anchor,we,ke,Se,Ne,Ae=Object.create(null),Fe,Pe,We,be=F.input.charCodeAt(F.position);if(be===91)we=93,Ne=!1,Z=[];else if(be===123)we=125,Ne=!0,Z={};else return!1;for(F.anchor!==null&&P(F,F.anchor,Z),be=F.input.charCodeAt(++F.position);be!==0;){if(te(F,!0,H),be=F.input.charCodeAt(F.position),be===we)return F.position++,F.tag=Y,F.anchor=Ce,F.kind=Ne?"mapping":"sequence",F.result=Z,!0;if(W?be===44&&M(F,"expected the node content, but found ','"):M(F,"missed comma between flow collection entries"),Pe=Fe=We=null,ke=Se=!1,be===63){let lt=F.input.charCodeAt(F.position+1);k(lt)&&(ke=Se=!0,F.position++,te(F,!0,H))}U=F.line,ae=F.lineStart,K=F.position,le(F,H,a,!1,!0),Pe=F.tag,Fe=F.result,te(F,!0,H),be=F.input.charCodeAt(F.position),(Se||F.line===U)&&be===58&&(ke=!0,be=F.input.charCodeAt(++F.position),te(F,!0,H),le(F,H,a,!1,!0),We=F.result),Ne?Q(F,Z,Ae,Pe,Fe,We,U,ae,K):ke?Z.push(Q(F,null,Ae,Pe,Fe,We,U,ae,K)):Z.push(Fe),te(F,!0,H),be=F.input.charCodeAt(F.position),be===44?(W=!0,be=F.input.charCodeAt(++F.position)):W=!1}M(F,"unexpected end of the stream within a flow collection")}v(Ge,"readFlowCollection");function He(F,H){let W,U=u,ae=!1,K=!1,Y=H,Z=0,Ce=!1,we,ke=F.input.charCodeAt(F.position);if(ke===124)W=!1;else if(ke===62)W=!0;else return!1;for(F.kind="scalar",F.result="";ke!==0;)if(ke=F.input.charCodeAt(++F.position),ke===43||ke===45)u===U?U=ke===43?f:h:M(F,"repeat of a chomping mode identifier");else if((we=E(ke))>=0)we===0?M(F,"bad explicit indentation width of a block scalar; it cannot be less than one"):K?M(F,"repeat of an indentation width identifier"):(Y=H+we-1,K=!0);else break;if(T(ke)){do ke=F.input.charCodeAt(++F.position);while(T(ke));if(ke===35)do ke=F.input.charCodeAt(++F.position);while(!b(ke)&&ke!==0)}for(;ke!==0;){for(pe(F),F.lineIndent=0,ke=F.input.charCodeAt(F.position);(!K||F.lineIndentY&&(Y=F.lineIndent),b(ke)){Z++;continue}if(!K&&Y===0&&M(F,"missing indentation for block scalar"),F.lineIndentH)&&Y!==0)M(F,"bad indentation of a sequence entry");else if(F.lineIndentH)&&(Fe&&(ae=F.line,K=F.lineStart,Y=F.position),le(F,H,l,!0,U)&&(Fe?Ne=F.result:Ae=F.result),Fe||(Q(F,we,ke,Se,Ne,Ae,ae,K,Y),Se=Ne=Ae=null),te(F,!0,-1),We=F.input.charCodeAt(F.position)),(F.line===lt||F.lineIndent>H)&&We!==0)M(F,"bad indentation of a mapping entry");else if(F.lineIndent=F.maxDepth&&M(F,"nesting exceeded maxDepth ("+F.maxDepth+")"),F.depth+=1,F.listener!==null&&F.listener("open",F),F.tag=null,F.anchor=null,F.kind=null,F.result=null;let Fe=K=Y=l===W||o===W;if(U&&te(F,!0,-1)&&(Ce=!0,F.lineIndent>H?Z=1:F.lineIndent===H?Z=0:F.lineIndentH?Z=1:F.lineIndent===H?Z=0:F.lineIndent tag; it should be "scalar", not "'+F.kind+'"');for(let Pe=0,We=F.implicitTypes.length;Pe"),F.result!==null&&Se.kind!==F.kind&&M(F,"unacceptable node kind for !<"+F.tag+'> tag; it should be "'+Se.kind+'", not "'+F.kind+'"'),Se.resolve(F.result,F.tag)?(F.result=Se.construct(F.result,F.tag),F.anchor!==null&&P(F,F.anchor,F.result)):M(F,"cannot resolve a node with !<"+F.tag+"> explicit tag")}return F.listener!==null&&F.listener("close",F),F.depth-=1,F.tag!==null||F.anchor!==null||we}v(le,"composeNode");function oe(F){let H=F.position,W=!1,U;for(F.version=null,F.checkLineBreaks=F.legacy,F.tagMap=Object.create(null),F.anchorMap=Object.create(null);(U=F.input.charCodeAt(F.position))!==0&&(te(F,!0,-1),U=F.input.charCodeAt(F.position),!(F.lineIndent>0||U!==37));){W=!0,U=F.input.charCodeAt(++F.position);let ae=F.position;for(;U!==0&&!k(U);)U=F.input.charCodeAt(++F.position);let K=F.input.slice(ae,F.position),Y=[];for(K.length<1&&M(F,"directive name must not be less than one character in length");U!==0;){for(;T(U);)U=F.input.charCodeAt(++F.position);if(U===35){do U=F.input.charCodeAt(++F.position);while(U!==0&&!b(U));break}if(b(U))break;for(ae=F.position;U!==0&&!k(U);)U=F.input.charCodeAt(++F.position);Y.push(F.input.slice(ae,F.position))}U!==0&&pe(F),i.call(j,K)?j[K](F,K,Y):B(F,'unknown document directive "'+K+'"')}if(te(F,!0,-1),F.lineIndent===0&&F.input.charCodeAt(F.position)===45&&F.input.charCodeAt(F.position+1)===45&&F.input.charCodeAt(F.position+2)===45?(F.position+=3,te(F,!0,-1)):W&&M(F,"directives end mark is expected"),le(F,F.lineIndent-1,l,!1,!0),te(F,!0,-1),F.checkLineBreaks&&p.test(F.input.slice(H,F.position))&&B(F,"non-ASCII line breaks are interpreted as content"),F.documents.push(F.result),F.position===F.lineStart&&de(F)){F.input.charCodeAt(F.position)===46&&(F.position+=3,te(F,!0,-1));return}F.position"u"&&(W=H,H=null);let U=he(F,W);if(typeof H!="function")return U;for(let ae=0,K=U.length;ae=32&&Y<=126||Y>=161&&Y<=55295&&Y!==8232&&Y!==8233||Y>=57344&&Y<=65533&&Y!==a||Y>=65536&&Y<=1114111}v(ne,"isPrintable");function Q(Y){return ne(Y)&&Y!==a&&Y!==l&&Y!==o}v(Q,"isNsCharOrWhitespace");function pe(Y,Z,Ce){let we=Q(Y),ke=we&&!ee(Y);return(Ce?we:we&&Y!==x&&Y!==E&&Y!==L&&Y!==O&&Y!==_)&&Y!==d&&!(Z===T&&!ke)||Q(Z)&&!ee(Z)&&Y===d||Z===T&&ke}v(pe,"isPlainSafe");function te(Y){return ne(Y)&&Y!==a&&!ee(Y)&&Y!==b&&Y!==C&&Y!==T&&Y!==x&&Y!==E&&Y!==L&&Y!==O&&Y!==_&&Y!==d&&Y!==g&&Y!==y&&Y!==h&&Y!==R&&Y!==k&&Y!==w&&Y!==m&&Y!==f&&Y!==p&&Y!==S&&Y!==N}v(te,"isPlainSafeFirst");function de(Y){return!ee(Y)&&Y!==T}v(de,"isPlainSafeLast");function ce(Y,Z){let Ce=Y.charCodeAt(Z),we;return Ce>=55296&&Ce<=56319&&Z+1=56320&&we<=57343)?(Ce-55296)*1024+we-56320+65536:Ce}v(ce,"codePointAt");function ue(Y){return/^\n* /.test(Y)}v(ue,"needIndentIndicator");let Re=1,ve=2,Ge=3,He=4,Ue=5;function me(Y,Z,Ce,we,ke,Se,Ne,Ae){let Fe,Pe=0,We=null,be=!1,lt=!1,$e=we!==-1,at=-1,bt=te(ce(Y,0))&&de(ce(Y,Y.length-1));if(Z||Ne)for(Fe=0;Fe=65536?Fe+=2:Fe++){if(Pe=ce(Y,Fe),!ne(Pe))return Ue;bt=bt&&pe(Pe,We,Ae),We=Pe}else{for(Fe=0;Fe=65536?Fe+=2:Fe++){if(Pe=ce(Y,Fe),Pe===o)be=!0,$e&&(lt=lt||Fe-at-1>we&&Y[at+1]!==" ",at=Fe);else if(!ne(Pe))return Ue;bt=bt&&pe(Pe,We,Ae),We=Pe}lt=lt||$e&&Fe-at-1>we&&Y[at+1]!==" "}return!be&&!lt?bt&&!Ne&&!ke(Y)?Re:Se===G?Ue:ve:Ce>9&&ue(Y)?Ue:Ne?Se===G?Ue:ve:lt?He:Ge}v(me,"chooseScalarStyle");function De(Y,Z,Ce,we,ke){Y.dump=(function(){if(Z.length===0)return Y.quotingType===G?'""':"''";if(!Y.noCompatMode&&(I.indexOf(Z)!==-1||M.test(Z)))return Y.quotingType===G?'"'+Z+'"':"'"+Z+"'";let Se=Y.indent*Math.max(1,Ce),Ne=Y.lineWidth===-1?-1:Math.max(Math.min(Y.lineWidth,40),Y.lineWidth-Se),Ae=we||Y.flowLevel>-1&&Ce>=Y.flowLevel;function Fe(Pe){return j(Y,Pe)}switch(v(Fe,"testAmbiguity"),me(Z,Ae,Y.indent,Ne,Fe,Y.quotingType,Y.forceQuotes&&!we,ke)){case Re:return Z;case ve:return"'"+Z.replace(/'/g,"''")+"'";case Ge:return"|"+Ie(Z,Y.indent)+Me(z(Z,Se));case He:return">"+Ie(Z,Y.indent)+Me(z(re(Z,Ne),Se));case Ue:return'"'+oe(Z)+'"';default:throw new t("impossible error: invalid scalar style")}})()}v(De,"writeScalar");function Ie(Y,Z){let Ce=ue(Y)?String(Z):"",we=Y[Y.length-1]===` +`,Se=we&&(Y[Y.length-2]===` +`||Y===` +`)?"+":we?"":"-";return Ce+Se+` +`}v(Ie,"blockHeader");function Me(Y){return Y[Y.length-1]===` +`?Y.slice(0,-1):Y}v(Me,"dropEndingNewline");function re(Y,Z){let Ce=/(\n+)([^\n]*)/g,we=(function(){let Ae=Y.indexOf(` +`);return Ae=Ae!==-1?Ae:Y.length,Ce.lastIndex=Ae,le(Y.slice(0,Ae),Z)})(),ke=Y[0]===` +`||Y[0]===" ",Se,Ne;for(;Ne=Ce.exec(Y);){let Ae=Ne[1],Fe=Ne[2];Se=Fe[0]===" ",we+=Ae+(!ke&&!Se&&Fe!==""?` +`:"")+le(Fe,Z),ke=Se}return we}v(re,"foldString");function le(Y,Z){if(Y===""||Y[0]===" ")return Y;let Ce=/ [^ ]/g,we,ke=0,Se,Ne=0,Ae=0,Fe="";for(;we=Ce.exec(Y);)Ae=we.index,Ae-ke>Z&&(Se=Ne>ke?Ne:Ae,Fe+=` +`+Y.slice(ke,Se),ke=Se+1),Ne=Ae;return Fe+=` +`,Y.length-ke>Z&&Ne>ke?Fe+=Y.slice(ke,Ne)+` +`+Y.slice(Ne+1):Fe+=Y.slice(ke),Fe.slice(1)}v(le,"foldLine");function oe(Y){let Z="",Ce=0;for(let we=0;we=65536?we+=2:we++){Ce=ce(Y,we);let ke=D[Ce];!ke&&ne(Ce)?(Z+=Y[we],Ce>=65536&&(Z+=Y[we+1])):Z+=ke||P(Ce)}return Z}v(oe,"escapeString");function he(Y,Z,Ce){let we="",ke=Y.tag;for(let Se=0,Ne=Ce.length;Se"u"&&W(Y,Z,null,!1,!1))&&(we!==""&&(we+=","+(Y.condenseFlow?"":" ")),we+=Y.dump)}Y.tag=ke,Y.dump="["+we+"]"}v(he,"writeFlowSequence");function xe(Y,Z,Ce,we){let ke="",Se=Y.tag;for(let Ne=0,Ae=Ce.length;Ne"u"&&W(Y,Z+1,null,!0,!0,!1,!0))&&((!we||ke!=="")&&(ke+=V(Y,Z)),Y.dump&&o===Y.dump.charCodeAt(0)?ke+="-":ke+="- ",ke+=Y.dump)}Y.tag=Se,Y.dump=ke||"[]"}v(xe,"writeBlockSequence");function se(Y,Z,Ce){let we="",ke=Y.tag,Se=Object.keys(Ce);for(let Ne=0,Ae=Se.length;Ne1024&&(Fe+="? "),Fe+=Y.dump+(Y.condenseFlow?'"':"")+":"+(Y.condenseFlow?"":" "),W(Y,Z,We,!1,!1)&&(Fe+=Y.dump,we+=Fe))}Y.tag=ke,Y.dump="{"+we+"}"}v(se,"writeFlowMapping");function F(Y,Z,Ce,we){let ke="",Se=Y.tag,Ne=Object.keys(Ce);if(Y.sortKeys===!0)Ne.sort();else if(typeof Y.sortKeys=="function")Ne.sort(Y.sortKeys);else if(Y.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let Ae=0,Fe=Ne.length;Ae1024;lt&&(Y.dump&&o===Y.dump.charCodeAt(0)?Pe+="?":Pe+="? "),Pe+=Y.dump,lt&&(Pe+=V(Y,Z)),W(Y,Z+1,be,!0,lt)&&(Y.dump&&o===Y.dump.charCodeAt(0)?Pe+=":":Pe+=": ",Pe+=Y.dump,ke+=Pe)}Y.tag=Se,Y.dump=ke||"{}"}v(F,"writeBlockMapping");function H(Y,Z,Ce){let we=Ce?Y.explicitTypes:Y.implicitTypes;for(let ke=0,Se=we.length;ke tag resolver accepts not "'+Ae+'" style');Y.dump=Fe}return!0}}return!1}v(H,"detectType");function W(Y,Z,Ce,we,ke,Se,Ne){Y.tag=null,Y.dump=Ce,H(Y,Ce,!1)||H(Y,Ce,!0);let Ae=n.call(Y.dump),Fe=we;we&&(we=Y.flowLevel<0||Y.flowLevel>Z);let Pe=Ae==="[object Object]"||Ae==="[object Array]",We,be;if(Pe&&(We=Y.duplicates.indexOf(Ce),be=We!==-1),(Y.tag!==null&&Y.tag!=="?"||be||Y.indent!==2&&Z>0)&&(ke=!1),be&&Y.usedDuplicates[We])Y.dump="*ref_"+We;else{if(Pe&&be&&!Y.usedDuplicates[We]&&(Y.usedDuplicates[We]=!0),Ae==="[object Object]")we&&Object.keys(Y.dump).length!==0?(F(Y,Z,Y.dump,ke),be&&(Y.dump="&ref_"+We+Y.dump)):(se(Y,Z,Y.dump),be&&(Y.dump="&ref_"+We+" "+Y.dump));else if(Ae==="[object Array]")we&&Y.dump.length!==0?(Y.noArrayIndent&&!Ne&&Z>0?xe(Y,Z-1,Y.dump,ke):xe(Y,Z,Y.dump,ke),be&&(Y.dump="&ref_"+We+Y.dump)):(he(Y,Z,Y.dump),be&&(Y.dump="&ref_"+We+" "+Y.dump));else if(Ae==="[object String]")Y.tag!=="?"&&De(Y,Y.dump,Z,Se,Fe);else{if(Ae==="[object Undefined]")return!1;if(Y.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+Ae)}if(Y.tag!==null&&Y.tag!=="?"){let lt=encodeURI(Y.tag[0]==="!"?Y.tag.slice(1):Y.tag).replace(/!/g,"%21");Y.tag[0]==="!"?lt="!"+lt:lt.slice(0,18)==="tag:yaml.org,2002:"?lt="!!"+lt.slice(18):lt="!<"+lt+">",Y.dump=lt+" "+Y.dump}}return!0}v(W,"writeNode");function U(Y,Z){let Ce=[],we=[];ae(Y,Ce,we);let ke=we.length;for(let Se=0;Se{Yt();v(nge,"getDefaultExportFromCjs");xs={},G5={},Wd={};v(R1,"requireCommon");v(L1,"requireException");v(ige,"requireSnippet");v(bs,"requireType");v(g9,"requireSchema");v(m9,"requireStr");v(y9,"requireSeq");v(v9,"requireMap");v(x9,"requireFailsafe");v(b9,"require_null");v(T9,"requireBool");v(w9,"requireInt");v(C9,"requireFloat");v(k9,"requireJson");v(S9,"requireCore");v(E9,"requireTimestamp");v(A9,"requireMerge");v(_9,"requireBinary");v(R9,"requireOmap");v(L9,"requirePairs");v(I9,"requireSet");v(q5,"require_default");v(age,"requireLoader");p9={};v(sge,"requireDumper");v(oge,"requireJsYaml");rnt=oge(),nnt=nge(rnt),{Type:Eur,Schema:Aur,FAILSAFE_SCHEMA:_ur,JSON_SCHEMA:Ud,CORE_SCHEMA:Rur,DEFAULT_SCHEMA:Lur,load:Hd,loadAll:Iur,dump:Mur,YAMLException:Dur,types:Nur,safeLoad:Our,safeLoadAll:Pur,safeDump:Bur}=nnt});function lge(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function int(e,t){if(e!=="_next"&&e!=="_prev")return t}var V5,cge=X(()=>{V5=class{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return lge(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&lge(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,n=r._prev;n!==r;)t.push(JSON.stringify(n,int)),n=n._prev;return"["+t.join(", ")+"]"}}});function uge(e,t){if(e.nodeCount()<=1)return[];var r=ont(e,t||ant),n=snt(r.graph,r.buckets,r.zeroIdx);return Al(Bn(n,function(i){return e.outEdges(i.v,i.w)}))}function snt(e,t,r){for(var n=[],i=t[t.length-1],a=t[0],s;e.nodeCount();){for(;s=a.dequeue();)M9(e,t,r,s);for(;s=i.dequeue();)M9(e,t,r,s);if(e.nodeCount()){for(var o=t.length-2;o>0;--o)if(s=t[o].dequeue(),s){n=n.concat(M9(e,t,r,s,!0));break}}}return n}function M9(e,t,r,n,i){var a=i?[]:void 0;return it(e.inEdges(n.v),function(s){var o=e.edge(s),l=e.node(s.v);i&&a.push({v:s.v,w:s.w}),l.out-=o,D9(t,r,l)}),it(e.outEdges(n.v),function(s){var o=e.edge(s),l=s.w,u=e.node(l);u.in-=o,D9(t,r,u)}),e.removeNode(n.v),a}function ont(e,t){var r=new Rn,n=0,i=0;it(e.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),it(e.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=t(o),h=l+u;r.setEdge(o.v,o.w,h),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var a=_l(i+n+3).map(function(){return new V5}),s=n+1;return it(r.nodes(),function(o){D9(a,s,r.node(o))}),{graph:r,buckets:a,zeroIdx:s}}function D9(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var ant,hge=X(()=>{$n();rl();cge();ant=yo(1)});function fge(e){var t=e.graph().acyclicer==="greedy"?uge(e,r(e)):lnt(e);it(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,ag("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function lnt(e){var t=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,it(e.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?t.push(s):i(s.w)}),delete r[a])}return it(e.nodes(),i),t}function dge(e){it(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var N9=X(()=>{$n();hge()});function Au(e,t,r,n){var i;do i=ag(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function gge(e){var t=new Rn().setGraph(e.graph());return it(e.nodes(),function(r){t.setNode(r,e.node(r))}),it(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function W5(e){var t=new Rn({multigraph:e.isMultigraph()}).setGraph(e.graph());return it(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),it(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function O9(e,t){var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,o=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:r+l,y:n+u}}function Yd(e){var t=Bn(_l(B9(e)+1),function(){return[]});return it(e.nodes(),function(r){var n=e.node(r),i=n.rank;Ni(i)||(t[i][n.order]=r)}),t}function mge(e){var t=Xh(Bn(e.nodes(),function(r){return e.node(r).rank}));it(e.nodes(),function(r){var n=e.node(r);gT(n,"rank")&&(n.rank-=t)})}function yge(e){var t=Xh(Bn(e.nodes(),function(a){return e.node(a).rank})),r=[];it(e.nodes(),function(a){var s=e.node(a).rank-t;r[s]||(r[s]=[]),r[s].push(a)});var n=0,i=e.graph().nodeRankFactor;it(r,function(a,s){Ni(a)&&s%i!==0?--n:n&&it(a,function(o){e.node(o).rank+=n})})}function P9(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Au(e,"border",i,t)}function B9(e){return xo(Bn(e.nodes(),function(t){var r=e.node(t).rank;if(!Ni(r))return r}))}function vge(e,t){var r={lhs:[],rhs:[]};return it(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function xge(e,t){var r=R5();try{return t()}finally{console.log(e+" time: "+(R5()-r)+"ms")}}function bge(e,t){return t()}var _u=X(()=>{$n();rl()});function wge(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&it(n,t),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a{$n();_u()});function Sge(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Age(e)}function Ege(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&cnt(e),(t==="lr"||t==="rl")&&(unt(e),Age(e))}function Age(e){it(e.nodes(),function(t){kge(e.node(t))}),it(e.edges(),function(t){kge(e.edge(t))})}function kge(e){var t=e.width;e.width=e.height,e.height=t}function cnt(e){it(e.nodes(),function(t){$9(e.node(t))}),it(e.edges(),function(t){var r=e.edge(t);it(r.points,$9),Object.prototype.hasOwnProperty.call(r,"y")&&$9(r)})}function $9(e){e.y=-e.y}function unt(e){it(e.nodes(),function(t){F9(e.node(t))}),it(e.edges(),function(t){var r=e.edge(t);it(r.points,F9),Object.prototype.hasOwnProperty.call(r,"x")&&F9(r)})}function F9(e){var t=e.x;e.x=e.y,e.y=t}var _ge=X(()=>{$n()});function Rge(e){e.graph().dummyChains=[],it(e.edges(),function(t){fnt(e,t)})}function fnt(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==n+1){e.removeEdge(t);var u=void 0,h,f;for(f=0,++n;n{$n();_u()});function xT(e){var t={};function r(n){var i=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return i.rank;t[n]=!0;var a=Xh(Bn(e.outEdges(n),function(s){return r(s.w)-e.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}it(e.sources(),r)}function ug(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var U5=X(()=>{$n()});function H5(e){var t=new Rn({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,a;dnt(t,e){$n();rl();U5()});var Mge=X(()=>{});var q9=X(()=>{});var Jur,V9=X(()=>{$n();q9();Jur=yo(1)});var Dge=X(()=>{V9()});var W9=X(()=>{});var Nge=X(()=>{W9()});var shr,Oge=X(()=>{$n();shr=yo(1)});function U9(e){var t={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new bT;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,it(e.predecessors(a),i),delete r[a],n.push(a))}if(it(e.sinks(),i),$O(t)!==e.nodeCount())throw new bT;return n}function bT(){}var H9=X(()=>{$n();U9.CycleException=bT;bT.prototype=new Error});var Pge=X(()=>{H9()});function Y5(e,t,r){Hr(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return it(t,function(s){if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);Bge(e,s,r==="post",a,n,i)}),i}function Bge(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),it(i(t),function(s){Bge(e,s,r,n,i,a)}),r&&a.push(t))}var Y9=X(()=>{$n()});function X9(e,t){return Y5(e,t,"post")}var $ge=X(()=>{Y9()});function j9(e,t){return Y5(e,t,"pre")}var Fge=X(()=>{Y9()});var zge=X(()=>{q9();GO()});var Gge=X(()=>{Mge();V9();Dge();Nge();Oge();Pge();$ge();Fge();zge();W9();H9()});function jd(e){e=gge(e),xT(e);var t=H5(e);Z9(t),K9(t,e);for(var r,n;r=Uge(t);)n=Hge(t,e,r),Yge(t,e,r,n)}function K9(e,t){var r=X9(e,e.nodes());r=r.slice(0,r.length-1),it(r,function(n){bnt(e,t,n)})}function bnt(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=Vge(e,t,r)}function Vge(e,t,r){var n=e.node(r),i=n.parent,a=!0,s=t.edge(r,i),o=0;return s||(a=!1,s=t.edge(i,r)),o=s.weight,it(t.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==i){var f=u===a,d=t.edge(l).weight;if(o+=f?d:-d,wnt(e,r,h)){var p=e.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function Z9(e,t){arguments.length<2&&(t=e.nodes()[0]),Wge(e,{},1,t)}function Wge(e,t,r,n,i){var a=r,s=e.node(n);return t[n]=!0,it(e.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(t,o)||(r=Wge(e,t,r,o,n))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function Uge(e){return S1(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Hge(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var a=e.node(n),s=e.node(i),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var u=$s(t.edges(),function(h){return l===qge(e,e.node(h.v),o)&&l!==qge(e,e.node(h.w),o)});return ng(u,function(h){return ug(t,h)})}function Yge(e,t,r,n){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(n.v,n.w,{}),Z9(e),K9(e,t),Tnt(e,t)}function Tnt(e,t){var r=S1(e.nodes(),function(i){return!t.node(i).parent}),n=j9(e,r);n=n.slice(1),it(n,function(i){var a=e.node(i).parent,s=t.edge(i,a),o=!1;s||(s=t.edge(a,i),o=!0),t.node(i).rank=t.node(a).rank+(o?s.minlen:-s.minlen)})}function wnt(e,t,r){return e.hasEdge(t,r)}function qge(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var Xge=X(()=>{$n();Gge();_u();G9();U5();jd.initLowLimValues=Z9;jd.initCutValues=K9;jd.calcCutValue=Vge;jd.leaveEdge=Uge;jd.enterEdge=Hge;jd.exchangeEdges=Yge});function Q9(e){switch(e.graph().ranker){case"network-simplex":jge(e);break;case"tight-tree":knt(e);break;case"longest-path":Cnt(e);break;default:jge(e)}}function knt(e){xT(e),H5(e)}function jge(e){jd(e)}var Cnt,J9=X(()=>{G9();Xge();U5();Cnt=xT});function Kge(e){var t=Au(e,"root",{},"_root"),r=Snt(e),n=xo(tl(r))-1,i=2*n+1;e.graph().nestingRoot=t,it(e.edges(),function(s){e.edge(s).minlen*=i});var a=Ent(e)+1;it(e.children(),function(s){Zge(e,t,i,a,n,r,s)}),e.graph().nodeRankFactor=i}function Zge(e,t,r,n,i,a,s){var o=e.children(s);if(!o.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}var l=P9(e,"_bt"),u=P9(e,"_bb"),h=e.node(s);e.setParent(l,s),h.borderTop=l,e.setParent(u,s),h.borderBottom=u,it(o,function(f){Zge(e,t,r,n,i,a,f);var d=e.node(f),p=d.borderTop?d.borderTop:f,g=d.borderBottom?d.borderBottom:f,m=d.borderTop?n:2*n,y=p!==g?1:i-a[s]+1;e.setEdge(l,p,{weight:m,minlen:y,nestingEdge:!0}),e.setEdge(g,u,{weight:m,minlen:y,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:i+a[s]})}function Snt(e){var t={};function r(n,i){var a=e.children(n);a&&a.length&&it(a,function(s){r(s,i+1)}),t[n]=i}return it(e.children(),function(n){r(n,1)}),t}function Ent(e){return Su(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function Qge(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,it(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var Jge=X(()=>{$n();_u()});function eme(e,t,r){var n={},i;it(r,function(a){for(var s=e.parent(a),o,l;s;){if(o=e.parent(s),o?(l=n[o],n[o]=s):(l=i,i=s),l&&l!==s){t.setEdge(l,s);return}s=o}})}var tme=X(()=>{$n()});function rme(e,t,r){var n=_nt(e),i=new Rn({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return e.node(a)});return it(e.nodes(),function(a){var s=e.node(a),o=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(i.setNode(a),i.setParent(a,o||n),it(e[r](a),function(l){var u=l.v===a?l.w:l.v,h=i.edge(u,a),f=Ni(h)?0:h.weight;i.setEdge(u,a,{weight:e.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),i}function _nt(e){for(var t;e.hasNode(t=ag("_root")););return t}var nme=X(()=>{$n();rl()});function ime(e,t){for(var r=0,n=1;n0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var ame=X(()=>{$n()});function sme(e){var t={},r=$s(e.nodes(),function(o){return!e.children(o).length}),n=xo(Bn(r,function(o){return e.node(o).rank})),i=Bn(_l(n+1),function(){return[]});function a(o){if(!gT(t,o)){t[o]=!0;var l=e.node(o);i[l.rank].push(o),it(e.successors(o),a)}}var s=Eu(r,function(o){return e.node(o).rank});return it(s,a),i}var ome=X(()=>{$n()});function lme(e,t){return Bn(t,function(r){var n=e.inEdges(r);if(n.length){var i=Su(n,function(a,s){var o=e.edge(s),l=e.node(s.v);return{sum:a.sum+o.weight*l.order,weight:a.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var cme=X(()=>{$n()});function ume(e,t){var r={};it(e,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Ni(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),it(t.edges(),function(i){var a=r[i.v],s=r[i.w];!Ni(a)&&!Ni(s)&&(s.indegree++,a.out.push(r[i.w]))});var n=$s(r,function(i){return!i.indegree});return Lnt(n)}function Lnt(e){var t=[];function r(a){return function(s){s.merged||(Ni(s.barycenter)||Ni(a.barycenter)||s.barycenter>=a.barycenter)&&Int(a,s)}}function n(a){return function(s){s.in.push(a),--s.indegree===0&&e.push(s)}}for(;e.length;){var i=e.pop();t.push(i),it(i.in.reverse(),r(i)),it(i.out,n(i))}return Bn($s(t,function(a){return!a.merged}),function(a){return ig(a,["vs","i","barycenter","weight"])})}function Int(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var hme=X(()=>{$n()});function dme(e,t){var r=vge(e,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),n=r.lhs,i=Eu(r.rhs,function(h){return-h.i}),a=[],s=0,o=0,l=0;n.sort(Mnt(!!t)),l=fme(a,i,l),it(n,function(h){l+=h.vs.length,a.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=fme(a,i,l)});var u={vs:Al(a)};return o&&(u.barycenter=s/o,u.weight=o),u}function fme(e,t,r){for(var n;t.length&&(n=Vd(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Mnt(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var pme=X(()=>{$n();_u()});function eP(e,t,r,n){var i=e.children(t),a=e.node(t),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(i=$s(i,function(g){return g!==s&&g!==o}));var u=lme(e,i);it(u,function(g){if(e.children(g.v).length){var m=eP(e,g.v,r,n);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&Nnt(g,m)}});var h=ume(u,r);Dnt(h,l);var f=dme(h,n);if(s&&(f.vs=Al([s,f.vs,o]),e.predecessors(s).length)){var d=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function Dnt(e,t){it(e,function(r){r.vs=Al(r.vs.map(function(n){return t[n]?t[n].vs:n}))})}function Nnt(e,t){Ni(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var gme=X(()=>{$n();cme();hme();pme()});function vme(e){var t=B9(e),r=mme(e,_l(1,t+1),"inEdges"),n=mme(e,_l(t-1,-1,-1),"outEdges"),i=sme(e);yme(e,i);for(var a=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){Ont(o%2?r:n,o%4>=2),i=Yd(e);var u=ime(e,i);u{$n();rl();_u();tme();nme();ame();ome();gme()});function bme(e){var t=Bnt(e);it(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,a=Pnt(e,t,i.v,i.w),s=a.path,o=a.lca,l=0,u=s[l],h=!0;r!==i.w;){if(n=e.node(r),h){for(;(u=s[l])!==o&&e.node(u).maxRanks||o>t[l].lim));for(u=l,l=n;(l=e.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function Bnt(e){var t={},r=0;function n(i){var a=r;it(e.children(i),n),t[i]={low:a,lim:r++}}return it(e.children(),n),t}var Tme=X(()=>{$n()});function $nt(e,t){var r={};function n(i,a){var s=0,o=0,l=i.length,u=Vd(a);return it(a,function(h,f){var d=znt(e,h),p=d?e.node(d).order:l;(d||h===u)&&(it(a.slice(o,f+1),function(g){it(e.predecessors(g),function(m){var y=e.node(m),x=y.order;(xu)&&wme(r,d,h)})})}function i(a,s){var o=-1,l,u=0;return it(s,function(h,f){if(e.node(h).dummy==="border"){var d=e.predecessors(h);d.length&&(l=e.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,a.length)}),s}return Su(t,i),r}function znt(e,t){if(e.node(t).dummy)return S1(e.predecessors(t),function(r){return e.node(r).dummy})}function wme(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Gnt(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function qnt(e,t,r,n){var i={},a={},s={};return it(t,function(o){it(o,function(l,u){i[l]=l,a[l]=l,s[l]=u})}),it(t,function(o){var l=-1;it(o,function(u){var h=n(u);if(h.length){h=Eu(h,function(m){return s[m]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var g=h[d];a[u]===u&&l{$n();rl();_u()});function Sme(e){e=W5(e),Knt(e),NO(Cme(e),function(t,r){e.node(r).x=t})}function Knt(e){var t=Yd(e),r=e.graph().ranksep,n=0;it(t,function(i){var a=xo(Bn(i,function(s){return e.node(s).height}));it(i,function(s){e.node(s).y=n+a/2}),n+=a+r})}var Eme=X(()=>{$n();_u();kme()});function TT(e,t){var r=t&&t.debugTiming?xge:bge;r("layout",()=>{var n=r(" buildLayoutGraph",()=>oit(e));r(" runLayout",()=>Znt(n,r)),r(" updateInputGraph",()=>Qnt(e,n))})}function Znt(e,t){t(" makeSpaceForEdgeLabels",()=>lit(e)),t(" removeSelfEdges",()=>yit(e)),t(" acyclic",()=>fge(e)),t(" nestingGraph.run",()=>Kge(e)),t(" rank",()=>Q9(W5(e))),t(" injectEdgeLabelProxies",()=>cit(e)),t(" removeEmptyRanks",()=>yge(e)),t(" nestingGraph.cleanup",()=>Qge(e)),t(" normalizeRanks",()=>mge(e)),t(" assignRankMinMax",()=>uit(e)),t(" removeEdgeLabelProxies",()=>hit(e)),t(" normalize.run",()=>Rge(e)),t(" parentDummyChains",()=>bme(e)),t(" addBorderSegments",()=>wge(e)),t(" order",()=>vme(e)),t(" insertSelfEdges",()=>vit(e)),t(" adjustCoordinateSystem",()=>Sge(e)),t(" position",()=>Sme(e)),t(" positionSelfEdges",()=>xit(e)),t(" removeBorderNodes",()=>mit(e)),t(" normalize.undo",()=>Lge(e)),t(" fixupEdgeLabelCoords",()=>pit(e)),t(" undoCoordinateSystem",()=>Ege(e)),t(" translateGraph",()=>fit(e)),t(" assignNodeIntersects",()=>dit(e)),t(" reversePoints",()=>git(e)),t(" acyclic.undo",()=>dge(e))}function Qnt(e,t){it(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),it(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function oit(e){var t=new Rn({multigraph:!0,compound:!0}),r=rP(e.graph());return t.setGraph(A1({},eit,tP(r,Jnt),ig(r,tit))),it(e.nodes(),function(n){var i=rP(e.node(n));t.setNode(n,AO(tP(i,rit),nit)),t.setParent(n,e.parent(n))}),it(e.edges(),function(n){var i=rP(e.edge(n));t.setEdge(n,A1({},ait,tP(i,iit),ig(i,sit)))}),t}function lit(e){var t=e.graph();t.ranksep/=2,it(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function cit(e){it(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-n.rank)/2+n.rank,e:t};Au(e,"edge-proxy",a,"_ep")}})}function uit(e){var t=0;it(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=xo(t,n.maxRank))}),e.graph().maxRank=t}function hit(e){it(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function fit(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;t=Math.min(t,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),i=Math.max(i,f+p/2)}it(e.nodes(),function(u){l(e.node(u))}),it(e.edges(),function(u){var h=e.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),t-=s,n-=o,it(e.nodes(),function(u){var h=e.node(u);h.x-=t,h.y-=n}),it(e.edges(),function(u){var h=e.edge(u);it(h.points,function(f){f.x-=t,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=t),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),a.width=r-t+s,a.height=i-n+o}function dit(e){it(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(O9(n,a)),r.points.push(O9(i,s))})}function pit(e){it(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function git(e){it(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function mit(e){it(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),a=e.node(Vd(r.borderLeft)),s=e.node(Vd(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),it(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function yit(e){it(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function vit(e){var t=Yd(e);it(t,function(r){var n=0;it(r,function(i,a){var s=e.node(i);s.order=a+n,it(s.selfEdges,function(o){Au(e,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function xit(e){it(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function tP(e,t){return rg(ig(e,t),Number)}function rP(e){var t={};return it(e,function(r,n){t[n.toLowerCase()]=r}),t}var Jnt,eit,tit,rit,nit,iit,ait,sit,Ame=X(()=>{$n();rl();Cge();_ge();N9();z9();J9();Jge();xme();Tme();Eme();_u();Jnt=["nodesep","edgesep","ranksep","marginx","marginy"],eit={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},tit=["acyclicer","ranker","rankdir","align"],rit=["width","height"],nit={width:0,height:0},iit=["minlen","weight","width","height","labeloffset"],ait={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},sit=["labelpos"]});var nP=X(()=>{N9();Ame();z9();J9()});var Pme={};cr(Pme,{applyDagreLayoutResult:()=>Dme,getEdgesToRender:()=>iP,measureDagreLayout:()=>Nme,prepareLayoutForDagre:()=>aP,render:()=>Iit,runDagreLayoutCore:()=>Ome});var _me,Rme,bit,Tit,wit,Cit,kit,iP,Ime,Mme,Sit,Lme,Eit,Dme,Ait,_it,aP,Nme,Ome,Rit,Lit,Iit,Bme=X(()=>{z5();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();nP();rl();_me=v((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),Rme=v((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),bit=v(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),Tit=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],wit=v((e,t,r,n,i)=>{let a=[],s=new Set;if(r.forEach(({start:h,end:f})=>{h!==n&&s.add(h),f!==n&&s.add(f)}),s.forEach(h=>{let f=e.node(h);typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)}),a.length===0&&r.forEach(({edge:h})=>{(h.points??[]).forEach(f=>{typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)})}),a.length===0)return Rme(i);let o=a.reduce((h,f)=>({x:h.x+f.x/a.length,y:h.y+f.y/a.length}),{x:0,y:0}),l=o.x-t.x,u=o.y-t.y;return Math.abs(l)>Math.abs(u)?l>0?"right":"left":Math.abs(u)>0?u>0?"bottom":"top":Rme(i)},"getSelfLoopSide"),Cit=v((e,t="top",r=0,n=0)=>{let i=e.x,a=e.y-r,s=e.width/2,o=e.height/2,l=Math.max(36,Math.min(100,e.width*.8)),u=_me(Math.max(n,e.width*.35),36,l),h=_me(Math.min(e.width,e.height)*.45,24,48);switch(t){case"bottom":{let f=a+o;return[{x:i-u/2,y:f},{x:i-u/2,y:f+h},{x:i+u/2,y:f+h},{x:i+u/2,y:f}]}case"right":{let f=i+s;return[{x:f,y:a-u/2},{x:f+h,y:a-u/2},{x:f+h,y:a+u/2},{x:f,y:a+u/2}]}case"left":{let f=i-s;return[{x:f,y:a-u/2},{x:f-h,y:a-u/2},{x:f-h,y:a+u/2},{x:f,y:a+u/2}]}default:{let f=a-o;return[{x:i-u/2,y:f},{x:i-u/2,y:f-h},{x:i+u/2,y:f-h},{x:i+u/2,y:f}]}}},"getSelfLoopPoints"),kit=v((e,t,r="top",n=0,i={})=>{let s=e.x,o=e.y-n,l=i.width??0,u=i.height??0;switch(r){case"bottom":return{x:s,y:Math.max(...t.map(h=>h.y))+u/2+4};case"right":return{x:Math.max(...t.map(h=>h.x))+l/2+4,y:o};case"left":return{x:Math.min(...t.map(h=>h.x))-l/2-4,y:o};default:return{x:s,y:Math.min(...t.map(h=>h.y))-u/2-4}}},"getSelfLoopLabelPosition"),iP=v((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(s=>{let o=e.edge(s);if(r&&o.selfLoop){let l=o.selfLoop.id;n.has(l)||n.set(l,[]),n.get(l).push({edge:o,start:s.v,end:s.w})}else i.push({edge:o,start:s.v,end:s.w})}),n.forEach(s=>{if(s.length!==3){s.forEach(x=>i.push(x));return}s.sort((x,b)=>x.edge.selfLoop.order-b.edge.selfLoop.order);let[o,l,u]=s,h=o.edge.originalEdge??l.edge.originalEdge??u.edge.originalEdge??l.edge,f=e.node(h.start);if(!f){s.forEach(x=>i.push(x));return}let d={width:l.edge.width,height:l.edge.height},p=wit(e,f,s,h.start,a),g=Cit(f,p,t,d.width??0),m=kit(f,g,p,t,d),y={...l.edge,...h,id:h.id,points:g,start:h.start,end:h.end,x:m.x,y:m.y,width:d.width,height:d.height,labelStyle:l.edge.labelStyle,fromCluster:o.edge.fromCluster??l.edge.fromCluster??u.edge.fromCluster,toCluster:o.edge.toCluster??l.edge.toCluster??u.edge.toCluster};delete y.selfLoop,delete y.originalEdge,i.push({edge:y,start:y.start,end:y.end})}),i},"getEdgesToRender"),Ime=v(async({element:e,graph:t,diagramType:r,id:n,parentCluster:i,siteConfig:a})=>{let s=t.graph().rankdir;fe.trace("Dir in recursive render - dir:",s);let{clusters:o,edgePaths:l,edgeLabels:u,nodes:h,rootGroups:f}=B5(e,{edgePathsClass:"edgePaths"});t.nodes()?fe.info("Recursive render XXX",t.nodes()):fe.info("No nodes found for",t),t.edges().length>0&&fe.info("Recursive edges",t.edge(t.edges()[0]));let d=bit(r);await Promise.all(t.nodes().map(async function(m){let y=t.node(m);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));fe.trace(`Setting data for parent cluster XXX Node.id = `,m,` - data=`,v.height,` -Parent cluster`,n.height),t.setNode(n.id,v),t.parent(m)||(ee.trace("Setting parent",m,n.id),t.setParent(m,n.id,v))}if(ee.info("(Insert) Node XXX"+m+": "+JSON.stringify(t.node(m))),y?.clusterNode){ee.info("Cluster identified XBX",m,y.width,t.node(m));let{ranksep:v,nodesep:x}=t.graph();y.graph.setGraph({...y.graph.graph(),ranksep:v+25,nodesep:x});let T=await Fde(f,y.graph,r,i,t.node(m),a),C=T.elem;Wt(y,C),y.diff=T.diff||0,ee.info("New compound node after recursive render XAX",m,"width",y.width,"height",y.height),dse(C,y)}else t.children(m).length>0?(ee.trace("Cluster - the non recursive path XBX",m,y.id,y,y.width,"Graph:",t),ee.trace(rx(y.id,t)),Or.set(y.id,{id:rx(y.id,t),node:y})):(ee.trace("Node - the non recursive path XAX",m,f,t.node(m),s),await r0(f,t.node(m),{config:a,dir:s}))})),await b(async()=>{let m=t.edges().map(async function(y){let v=t.edge(y.v,y.w,y.name);ee.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(y)),ee.info("Edge "+y.v+" -> "+y.w+": ",y," ",JSON.stringify(t.edge(y))),ee.info("Fix",Or,"ids:",y.v,y.w,"Translating: ",Or.get(y.v),Or.get(y.w)),await E5(h,v)});await Promise.all(m)},"processEdges")(),ee.info("Graph before layout:",JSON.stringify(Uo(t))),ee.info("############################################# XXX"),ee.info("### Layout ### XXX"),ee.info("############################################# XXX"),tx(t),ee.info("Graph after layout:",JSON.stringify(Uo(t)));let p=0,{subGraphTitleTotalMargin:g}=rh(a);return await Promise.all(oQe(t).map(async function(m){let y=t.node(m);if(ee.info("Position XBX => "+m+": ("+y.x,","+y.y,") width: ",y.width," height: ",y.height),y?.clusterNode)y.y+=g,ee.info("A tainted cluster node XBX1",m,y.id,y.width,y.height,y.x,y.y,t.parent(m)),Or.get(y.id).node=y,Sb(y);else if(t.children(m).length>0){ee.info("A pure cluster node XBX1",m,y.id,y.x,y.y,y.width,y.height,t.parent(m)),y.height+=g,t.node(y.parentId);let v=y?.padding/2||0,x=y?.labelBBox?.height||0,T=x-v||0;ee.debug("OffsetY",T,"labelHeight",x,"halfPadding",v),await t1(l,y),Or.get(y.id).node=y}else{let v=t.node(y.parentId);y.y+=g/2,ee.info("A regular node XBX1 - using the padding",y.id,"parent",y.parentId,y.width,y.height,y.x,y.y,"offsetY",y.offsetY,"parent",v,v?.offsetY,y),Sb(y)}})),t.edges().forEach(function(m){let y=t.edge(m);ee.info("Edge "+m.v+" -> "+m.w+": "+JSON.stringify(y),y),y.points.forEach(C=>C.y+=g/2);let v=t.node(m.v);var x=t.node(m.w);let T=_5(u,y,Or,r,v,x,i);A5(y,T)}),t.nodes().forEach(function(m){let y=t.node(m);ee.info(m,y.type,y.diff),y.isGroup&&(p=y.diff)}),ee.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),lQe=b(async(e,t)=>{let r=new ui({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),i=t.select("g");L5(i,e.markers,e.type,e.diagramId),pse(),vse(),Yne(),iQe(),e.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),ee.debug("Edges:",e.edges),e.edges.forEach(a=>{if(a.start===a.end){let s=a.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(a),f=structuredClone(a),d=structuredClone(a);h.label="",h.arrowTypeEnd="none",h.endLabelLeft="",h.endLabelRight="",h.startLabelLeft="",h.id=s+"-cyclic-special-1",f.startLabelRight="",f.startLabelLeft="",f.endLabelLeft="",f.endLabelRight="",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",d.startLabelRight="",d.startLabelLeft="",d.arrowTypeStart="none",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",d.arrowTypeStart="none",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyce.length)&&(t=e.length);for(var r=0,i=Array(t);r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,a=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw a}}}}function gge(e,t,r){return(t=mge(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fQe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dQe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,n,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(h){u=!0,n=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}function pQe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gQe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rn(e,t){return cQe(e)||dQe(e,t)||FO(e,t)||pQe()}function cS(e){return uQe(e)||fQe(e)||FO(e)||gQe()}function mQe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mge(e){var t=mQe(e,"string");return typeof t=="symbol"?t:t+""}function Vn(e){"@babel/helpers - typeof";return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(e)}function FO(e,t){if(e){if(typeof e=="string")return vO(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vO(e,t):void 0}}function _x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lx(){if(Vde)return qN;Vde=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return qN=e,qN}function $Qe(){if(Wde)return VN;Wde=1;var e=typeof $3=="object"&&$3&&$3.Object===Object&&$3;return VN=e,VN}function CS(){if(Ude)return WN;Ude=1;var e=$Qe(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return WN=r,WN}function zQe(){if(Hde)return UN;Hde=1;var e=CS(),t=function(){return e.Date.now()};return UN=t,UN}function GQe(){if(Yde)return HN;Yde=1;var e=/\s/;function t(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return HN=t,HN}function qQe(){if(jde)return YN;jde=1;var e=GQe(),t=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(t,"")}return YN=r,YN}function GO(){if(Xde)return jN;Xde=1;var e=CS(),t=e.Symbol;return jN=t,jN}function VQe(){if(Kde)return XN;Kde=1;var e=GO(),t=Object.prototype,r=t.hasOwnProperty,i=t.toString,n=e?e.toStringTag:void 0;function a(s){var o=r.call(s,n),l=s[n];try{s[n]=void 0;var u=!0}catch{}var h=i.call(s);return u&&(o?s[n]=l:delete s[n]),h}return XN=a,XN}function WQe(){if(Zde)return KN;Zde=1;var e=Object.prototype,t=e.toString;function r(i){return t.call(i)}return KN=r,KN}function Sge(){if(Qde)return ZN;Qde=1;var e=GO(),t=VQe(),r=WQe(),i="[object Null]",n="[object Undefined]",a=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?n:i:a&&a in Object(o)?t(o):r(o)}return ZN=s,ZN}function UQe(){if(Jde)return QN;Jde=1;function e(t){return t!=null&&typeof t=="object"}return QN=e,QN}function Rx(){if(epe)return JN;epe=1;var e=Sge(),t=UQe(),r="[object Symbol]";function i(n){return typeof n=="symbol"||t(n)&&e(n)==r}return JN=i,JN}function HQe(){if(tpe)return eM;tpe=1;var e=qQe(),t=Lx(),r=Rx(),i=NaN,n=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(r(u))return i;if(t(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=t(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):n.test(u)?i:+u}return eM=l,eM}function YQe(){if(rpe)return tM;rpe=1;var e=Lx(),t=zQe(),r=HQe(),i="Expected a function",n=Math.max,a=Math.min;function s(o,l,u){var h,f,d,p,g,m,y=0,v=!1,x=!1,T=!0;if(typeof o!="function")throw new TypeError(i);l=r(l)||0,e(u)&&(v=!!u.leading,x="maxWait"in u,d=x?n(r(u.maxWait)||0,l):d,T="trailing"in u?!!u.trailing:T);function C(_){var R=h,D=f;return h=f=void 0,y=_,p=o.apply(D,R),p}function w(_){return y=_,g=setTimeout(A,l),v?C(_):p}function k(_){var R=_-m,D=_-y,I=l-R;return x?a(I,d-D):I}function E(_){var R=_-m,D=_-y;return m===void 0||R>=l||R<0||x&&D>=d}function A(){var _=t();if(E(_))return N(_);g=setTimeout(A,k(_))}function N(_){return g=void 0,T&&h?C(_):(h=f=void 0,p)}function P(){g!==void 0&&clearTimeout(g),y=0,h=m=f=g=void 0}function O(){return g===void 0?p:N(t())}function L(){var _=t(),R=E(_);if(h=arguments,f=this,m=_,R){if(g===void 0)return w(m);if(x)return clearTimeout(g),g=setTimeout(A,l),C(m)}return g===void 0&&(g=setTimeout(A,l)),p}return L.cancel=P,L.flush=O,L}return tM=s,tM}function QQe(e,t,r,i,n){var a=n*Math.PI/180,s=Math.cos(a)*(e-r)-Math.sin(a)*(t-i)+r,o=Math.sin(a)*(e-r)+Math.cos(a)*(t-i)+i;return{x:s,y:o}}function eJe(e,t,r){if(r===0)return e;var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2,a=t.w/t.h,s=1/a,o=QQe(e.x,e.y,i,n,r),l=JQe(o.x,o.y,i,n,a,s);return{x:l.x,y:l.y}}function hJe(){return ope||(ope=1,(function(e,t){(function(){var r,i,n,a,s,o,l,u,h,f,d,p,g,m,y;n=Math.floor,f=Math.min,i=function(v,x){return vx?1:0},h=function(v,x,T,C,w){var k;if(T==null&&(T=0),w==null&&(w=i),T<0)throw new Error("lo must be non-negative");for(C==null&&(C=v.length);TP;0<=P?N++:N--)A.push(N);return A}).apply(this).reverse(),E=[],C=0,w=k.length;CO;0<=O?++A:--A)L.push(s(v,T));return L},m=function(v,x,T,C){var w,k,E;for(C==null&&(C=i),w=v[T];T>x;){if(E=T-1>>1,k=v[E],C(w,k)<0){v[T]=k,T=E;continue}break}return v[T]=w},y=function(v,x,T){var C,w,k,E,A;for(T==null&&(T=i),w=v.length,A=x,k=v[x],C=2*x+1;C-1}return RM=t,RM}function stt(){if(jpe)return IM;jpe=1;var e=RS();function t(r,i){var n=this.__data__,a=e(n,r);return a<0?(++this.size,n.push([r,i])):n[a][1]=i,this}return IM=t,IM}function ott(){if(Xpe)return DM;Xpe=1;var e=rtt(),t=itt(),r=ntt(),i=att(),n=stt();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&i%1==0&&i0;){var h=n.shift();t(h),a.add(h.id()),o&&i(n,a,h)}return e}function rme(e,t,r){if(r.isParent())for(var i=r._private.children,n=0;n0&&arguments[0]!==void 0?arguments[0]:yrt,t=arguments.length>1?arguments[1]:void 0,r=0;r0?L=R:O=R;while(Math.abs(_)>s&&++D=a?x(P,D):I===0?D:C(P,O,O+u)}var k=!1;function E(){k=!0,(e!==t||r!==i)&&T()}var A=function(O){return k||E(),e===t&&r===i?O:O===0?0:O===1?1:y(w(O),t,i)};A.getControlPoints=function(){return[{x:e,y:t},{x:r,y:i}]};var N="generateBezier("+[e,t,r,i]+")";return A.toString=function(){return N},A}function F0e(e,t,r,i,n){if(i===1||t===r)return r;var a=n(t,r,i);return e==null||((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max))),a}function $0e(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!=="%")?e.pfValue:e.value:e}function I1(e,t,r,i,n){var a=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var s=$0e(e,n),o=$0e(t,n);if(Lt(s)&&Lt(o))return F0e(a,s,o,r,i);if(Ci(s)&&Ci(o)){for(var l=[],u=0;u0?(p==="spring"&&g.push(s.duration),s.easingImpl=iS[p].apply(null,g)):s.easingImpl=iS[p]}var m=s.easingImpl,y;if(s.duration===0?y=1:y=(r-l)/s.duration,s.applying&&(y=s.progress),y<0?y=0:y>1&&(y=1),s.delay==null){var v=s.startPosition,x=s.position;if(x&&n&&!e.locked()){var T={};sx(v.x,x.x)&&(T.x=I1(v.x,x.x,y,m)),sx(v.y,x.y)&&(T.y=I1(v.y,x.y,y,m)),e.position(T)}var C=s.startPan,w=s.pan,k=a.pan,E=w!=null&&i;E&&(sx(C.x,w.x)&&(k.x=I1(C.x,w.x,y,m)),sx(C.y,w.y)&&(k.y=I1(C.y,w.y,y,m)),e.emit("pan"));var A=s.startZoom,N=s.zoom,P=N!=null&&i;P&&(sx(A,N)&&(a.zoom=bx(a.minZoom,I1(A,N,y,m),a.maxZoom)),e.emit("zoom")),(E||P)&&e.emit("viewport");var O=s.style;if(O&&O.length>0&&n){for(var L=0;L=0;E--){var A=k[E];A()}k.splice(0,k.length)},x=p.length-1;x>=0;x--){var T=p[x],C=T._private;if(C.stopped){p.splice(x,1),C.hooked=!1,C.playing=!1,C.started=!1,v(C.frames);continue}!C.playing&&!C.applying||(C.playing&&C.applying&&(C.applying=!1),C.started||Irt(h,T,e),Rrt(h,T,e,f),C.applying&&(C.applying=!1),v(C.frames),C.step!=null&&C.step(e),T.completed()&&(p.splice(x,1),C.hooked=!1,C.playing=!1,C.started=!1,v(C.completes)),m=!0)}return!f&&p.length===0&&g.length===0&&i.push(h),m}for(var a=!1,s=0;s0?t.notify("draw",r):t.notify("draw")),r.unmerge(i),t.emit("step")}function xme(e){this.options=nr({},$rt,zrt,e)}function Tme(e){this.options=nr({},Grt,e)}function wme(e){this.options=nr({},qrt,e)}function FS(e){this.options=nr({},Vrt,e),this.options.layout=this;var t=this.options.eles.nodes(),r=this.options.eles.edges(),i=r.filter(function(n){var a=n.source().data("id"),s=n.target().data("id"),o=t.some(function(u){return u.data("id")===a}),l=t.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(i)}function Eme(e){this.options=nr({},nit,e)}function iP(e){this.options=nr({},ait,e)}function Ame(e){this.options=nr({},sit,e)}function _me(e){this.options=nr({},oit,e)}function Lme(e){this.options=e,this.notifications=0}function Dme(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function aP(e,t,r,i){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return i===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(uit(e,t,r,i,n),{cx:LO,cy:RO,radius:x0,startX:Rme,startY:Ime,stopX:IO,stopY:DO,startAngle:Kc.ang+Math.PI/2*w0,endAngle:Ho.ang-Math.PI/2*w0,counterClockwise:sS})}function Nme(e){var t=[];if(e!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(a,i/2,n/2);e.beginPath(),e.moveTo(t+s,r),e.lineTo(t+i-s,r),e.quadraticCurveTo(t+i,r,t+i,r+s),e.lineTo(t+i,r+n-s),e.quadraticCurveTo(t+i,r+n,t+i-s,r+n),e.lineTo(t+s,r+n),e.quadraticCurveTo(t,r+n,t,r+n-s),e.lineTo(t,r+s),e.quadraticCurveTo(t,r,t+s,r),e.closePath()}function sge(e,t,r){var i=e.createShader(t);if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(i));return i}function tnt(e,t,r){var i=sge(e,e.VERTEX_SHADER,t),n=sge(e,e.FRAGMENT_SHADER,r),a=e.createProgram();if(e.attachShader(a,i),e.attachShader(a,n),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function rnt(e,t,r){r===void 0&&(r=t);var i=e.makeOffscreenCanvas(t,r),n=i.context=i.getContext("2d");return i.clear=function(){return n.clearRect(0,0,i.width,i.height)},i.clear(),i}function lP(e){var t=e.pixelRatio,r=e.cy.zoom(),i=e.cy.pan();return{zoom:r*t,pan:{x:i.x*t,y:i.y*t}}}function int(e){var t=e.pixelRatio,r=e.cy.zoom();return r*t}function nnt(e,t,r,i,n){var a=i*r+t.x,s=n*r+t.y;return s=Math.round(e.canvasHeight-s),[a,s]}function ant(e,t){return t.picking?!0:e.pstyle("background-fill").value!=="solid"||e.pstyle("background-image").strValue!=="none"?!1:e.pstyle("border-width").value===0||e.pstyle("border-opacity").value===0?!0:e.pstyle("border-style").value==="solid"}function snt(e,t){if(e.length!==t.length)return!1;for(var r=0;r>0&255)/255,r[1]=(e>>8&255)/255,r[2]=(e>>16&255)/255,r[3]=(e>>24&255)/255,r}function ont(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function lnt(e,t){var r=e.createTexture();return r.buffer=function(i){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function Yme(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function jme(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function cnt(e,t,r,i,n,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*i,n);case e.INT:return new Int32Array(r.buffer,a*i,n)}}function unt(e,t,r,i){var n=Yme(e,t),a=Rn(n,2),s=a[0],o=a[1],l=jme(e,o,i),u=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,l,e.STATIC_DRAW),o===e.FLOAT?e.vertexAttribPointer(r,s,o,!1,0,0):o===e.INT&&e.vertexAttribIPointer(r,s,o,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),u}function Xc(e,t,r,i){var n=Yme(e,r),a=Rn(n,3),s=a[0],o=a[1],l=a[2],u=jme(e,o,t*s),h=s*l,f=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,f),e.bufferData(e.ARRAY_BUFFER,t*h,e.DYNAMIC_DRAW),e.enableVertexAttribArray(i),o===e.FLOAT?e.vertexAttribPointer(i,s,o,!1,h,0):o===e.INT&&e.vertexAttribIPointer(i,s,o,h,0),e.vertexAttribDivisor(i,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var d=new Array(t),p=0;pqme?(Ant(e),t.call(e,a)):(_nt(e),Qme(e,a,gx.SCREEN)))}}{var r=e.matchCanvasSize;e.matchCanvasSize=function(a){r.call(e,a),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0}}e.findNearestElements=function(a,s,o,l){return Mnt(e,a,s)};{var i=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){i.call(e),e.pickingFrameBuffer.needsDraw=!0}}{var n=e.notify;e.notify=function(a,s){n.call(e,a,s),a==="viewport"||a==="bounds"?e.pickingFrameBuffer.needsDraw=!0:a==="background"&&e.drawing.invalidate(s,{type:"node-body"})}}}function Ant(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function _nt(e){var t=function(i){i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,e.canvasWidth,e.canvasHeight),i.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function Lnt(e){var t=e.canvasWidth,r=e.canvasHeight,i=lP(e),n=i.pan,a=i.zoom,s=fO();lS(s,s,[n.x,n.y]),MO(s,s,[a,a]);var o=fO();pnt(o,t,r);var l=fO();return dnt(l,o,s),l}function Zme(e,t){var r=e.canvasWidth,i=e.canvasHeight,n=lP(e),a=n.pan,s=n.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,i),t.translate(a.x,a.y),t.scale(s,s)}function Rnt(e,t){e.drawSelectionRectangle(t,function(r){return Zme(e,r)})}function Int(e){var t=e.data.contexts[e.NODE];t.save(),Zme(e,t),t.strokeStyle="rgba(0, 0, 0, 0.3)",t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function Dnt(e){var t=function(n,a,s){for(var o=n.atlasManager.getAtlasCollection(a),l=e.data.contexts[e.NODE],u=o.atlases,h=0;h=0&&C.add(E)}return C}function Mnt(e,t,r){var i=Nnt(e,t,r),n=e.getCachedZSortedEles(),a,s,o=$s(i),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,h=n[u];if(!a&&h.isNode()&&(a=h),!s&&h.isEdge()&&(s=h),a&&s)break}}catch(f){o.e(f)}finally{o.f()}return[a,s].filter(Boolean)}function yO(e,t,r){var i=e.drawing;t+=1,r.isNode()?(i.drawNode(r,t,"node-underlay"),i.drawNode(r,t,"node-body"),i.drawTexture(r,t,"label"),i.drawNode(r,t,"node-overlay")):(i.drawEdgeLine(r,t),i.drawEdgeArrow(r,t,"source"),i.drawEdgeArrow(r,t,"target"),i.drawTexture(r,t,"label"),i.drawTexture(r,t,"edge-source-label"),i.drawTexture(r,t,"edge-target-label"))}function Qme(e,t,r){var i;e.webglDebug&&(i=performance.now());var n=e.drawing,a=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&Rnt(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var s=e.data.contexts[e.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=Lnt(e),l=e.getCachedZSortedEles();if(a=l.length,n.startFrame(o,r),r.screen){for(var u=0;u{Gn=typeof window>"u"?null:window,Gde=Gn?Gn.navigator:null;Gn&&Gn.document;yQe=Vn(""),yge=Vn({}),vQe=Vn(function(){}),bQe=typeof HTMLElement>"u"?"undefined":Vn(HTMLElement),Ex=function(t){return t&&t.instanceString&&Xi(t.instanceString)?t.instanceString():null},Qt=function(t){return t!=null&&Vn(t)==yQe},Xi=function(t){return t!=null&&Vn(t)===vQe},Ci=function(t){return!po(t)&&(Array.isArray?Array.isArray(t):t!=null&&t instanceof Array)},Kr=function(t){return t!=null&&Vn(t)===yge&&!Ci(t)&&t.constructor===Object},xQe=function(t){return t!=null&&Vn(t)===yge},Lt=function(t){return t!=null&&Vn(t)===Vn(1)&&!isNaN(t)},TQe=function(t){return Lt(t)&&Math.floor(t)===t},uS=function(t){if(bQe!=="undefined")return t!=null&&t instanceof HTMLElement},po=function(t){return Ax(t)||vge(t)},Ax=function(t){return Ex(t)==="collection"&&t._private.single},vge=function(t){return Ex(t)==="collection"&&!t._private.single},$O=function(t){return Ex(t)==="core"},bge=function(t){return Ex(t)==="stylesheet"},wQe=function(t){return Ex(t)==="event"},gd=function(t){return t==null?!0:!!(t===""||t.match(/^\s+$/))},kQe=function(t){return typeof HTMLElement>"u"?!1:t instanceof HTMLElement},CQe=function(t){return Kr(t)&&Lt(t.x1)&&Lt(t.x2)&&Lt(t.y1)&&Lt(t.y2)},SQe=function(t){return xQe(t)&&Xi(t.then)},EQe=function(){return Gde&&Gde.userAgent.match(/msie|trident|edge/i)},W1=function(t,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;sr?1:0},NQe=function(t,r){return-1*Tge(t,r)},nr=Object.assign!=null?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r1&&(y-=1),y<1/6?g+(m-g)*6*y:y<1/2?m:y<2/3?g+(m-g)*(2/3-y)*6:g}var f=new RegExp("^"+LQe+"$").exec(t);if(f){if(i=parseInt(f[1]),i<0?i=(360- -1*i%360)%360:i>360&&(i=i%360),i/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(a*255);else{var d=a<.5?a*(1+n):a+n-a*n,p=2*a-d;o=Math.round(255*h(p,d,i+1/3)),l=Math.round(255*h(p,d,i)),u=Math.round(255*h(p,d,i-1/3))}r=[o,l,u,s]}return r},PQe=function(t){var r,i=new RegExp("^"+AQe+"$").exec(t);if(i){r=[];for(var n=[],a=1;a<=3;a++){var s=i[a];if(s[s.length-1]==="%"&&(n[a]=!0),s=parseFloat(s),n[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=i[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},BQe=function(t){return FQe[t.toLowerCase()]},wge=function(t){return(Ci(t)?t:null)||BQe(t)||MQe(t)||PQe(t)||OQe(t)},FQe={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},kge=function(t){for(var r=t.map,i=t.keys,n=i.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:T0,i=r,n;n=t.next(),!n.done;)i=i*Age+n.value|0;return i},mx=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T0;return r*Age+t|0},yx=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P1;return(r<<5)+r+t|0},KQe=function(t,r){return t*2097152+r},od=function(t){return t[0]*2097152+t[1]},z3=function(t,r){return[mx(t[0],r[0]),yx(t[1],r[1])]},ipe=function(t,r){var i={value:0,done:!1},n=0,a=t.length,s={next:function(){return n=0;n--)t[n]===r&&t.splice(n,1)},WO=function(t){t.splice(0,t.length)},sJe=function(t,r){for(var i=0;i"u"?"undefined":Vn(Set))!==lJe?Set:cJe,SS=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(t===void 0||r===void 0||!$O(t)){Wi("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Wi("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var a=this._private={cy:t,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new Y1,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=t.pan(),l=t.zoom();a.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Ci(r.classes)?u=r.classes:Qt(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,f=u.length;h0;){var k=x.pop(),E=y(k),A=k.id();if(d[A]=E,E!==1/0)for(var N=k.neighborhood().intersect(g),P=0;P0)for(M.unshift(B);f[z];){var $=f[z];M.unshift($.edge),M.unshift($.node),F=$.node,z=F.id()}return o.spawn(M)}}}},mJe={kruskal:function(t){t=t||function(T){return 1};for(var r=this.byGroup(),i=r.nodes,n=r.edges,a=i.length,s=new Array(a),o=i,l=function(C){for(var w=0;w0;){if(w(),E++,C===h){for(var A=[],N=a,P=h,O=v[P];A.unshift(N),O!=null&&A.unshift(O),N=y[P],N!=null;)P=N.id(),O=v[P];return{found:!0,distance:f[C],path:this.spawn(A),steps:E}}p[C]=!0;for(var L=T._private.edges,_=0;_O&&(g[P]=O,x[P]=N,T[P]=w),!a){var L=N*h+A;!a&&g[L]>O&&(g[L]=O,x[L]=A,T[L]=w)}}}for(var _=0;_1&&arguments[1]!==void 0?arguments[1]:s,Pe=T(Ce),pe=[],Je=Pe;;){if(Je==null)return r.spawn();var Te=x(Je),Be=Te.edge,He=Te.pred;if(pe.unshift(Je[0]),Je.same(Ie)&&pe.length>0)break;Be!=null&&pe.unshift(Be),Je=He}return l.spawn(pe)},k=0;k=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var g=0;gn;){var a=Math.floor(Math.random()*r.length);r=CJe(a,t,r),i--}return r},SJe={kargerStein:function(){var t=this,r=this.byGroup(),i=r.nodes,n=r.edges;n.unmergeBy(function(M){return M.isLoop()});var a=i.length,s=n.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),l=Math.floor(a/kJe);if(a<2){Wi("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,n=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,n=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,n=0,a=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?t=t.slice(r,i):(i0&&t.splice(0,r));for(var o=0,l=t.length-1;l>=0;l--){var u=t[l];s?isFinite(u)||(t[l]=-1/0,o++):t.splice(l,1)}a&&t.sort(function(d,p){return d-p});var h=t.length,f=Math.floor(h/2);return h%2!==0?t[f+1+o]:(t[f-1+o]+t[f+o])/2},IJe=function(t){return Math.PI*t/180},G3=function(t,r){return Math.atan2(r,t)-Math.PI/2},UO=Math.log2||function(e){return Math.log(e)/Math.log(2)},HO=function(t){return t>0?1:t<0?-1:0},S0=function(t,r){return Math.sqrt(b0(t,r))},b0=function(t,r){var i=r.x-t.x,n=r.y-t.y;return i*i+n*n},DJe=function(t){for(var r=t.length,i=0,n=0;n=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(t.w!=null&&t.h!=null&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},MJe=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},OJe=function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},PJe=function(t,r){t.x1=Math.min(t.x1,r.x1),t.x2=Math.max(t.x2,r.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r.y1),t.y2=Math.max(t.y2,r.y2),t.h=t.y2-t.y1},Oge=function(t,r,i){t.x1=Math.min(t.x1,r),t.x2=Math.max(t.x2,r),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,i),t.y2=Math.max(t.y2,i),t.h=t.y2-t.y1},J3=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.x1-=r,t.x2+=r,t.y1-=r,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},eS=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],i,n,a,s;if(r.length===1)i=n=a=s=r[0];else if(r.length===2)i=a=r[0],s=n=r[1];else if(r.length===4){var o=Rn(r,4);i=o[0],n=o[1],a=o[2],s=o[3]}return t.x1-=s,t.x2+=n,t.y1-=i,t.y2+=a,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},cpe=function(t,r){t.x1=r.x1,t.y1=r.y1,t.x2=r.x2,t.y2=r.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},YO=function(t,r){return!(t.x1>r.x2||r.x1>t.x2||t.x2r.y2||r.y1>t.y2)},hd=function(t,r,i){return t.x1<=r&&r<=t.x2&&t.y1<=i&&i<=t.y2},upe=function(t,r){return hd(t,r.x,r.y)},Pge=function(t,r){return hd(t,r.x1,r.y1)&&hd(t,r.x2,r.y2)},BJe=(aM=Math.hypot)!==null&&aM!==void 0?aM:function(e,t){return Math.sqrt(e*e+t*t)};Bge=function(t,r,i,n,a,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?yd(a,s):l,h=a/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,g;if(d){var m=i-h+u-o,y=n-f-o,v=i+h-u+o,x=y;if(g=fd(t,r,i,n,m,y,v,x,!1),g.length>0)return g}if(p){var T=i+h+o,C=n-f+u-o,w=T,k=n+f-u+o;if(g=fd(t,r,i,n,T,C,w,k,!1),g.length>0)return g}if(d){var E=i-h+u-o,A=n+f+o,N=i+h-u+o,P=A;if(g=fd(t,r,i,n,E,A,N,P,!1),g.length>0)return g}if(p){var O=i-h-o,L=n-f+u-o,_=O,R=n+f-u+o;if(g=fd(t,r,i,n,O,L,_,R,!1),g.length>0)return g}var D;{var I=i-h+u,B=n-f+u;if(D=ux(t,r,i,n,I,B,u+o),D.length>0&&D[0]<=I&&D[1]<=B)return[D[0],D[1]]}{var M=i+h-u,F=n-f+u;if(D=ux(t,r,i,n,M,F,u+o),D.length>0&&D[0]>=M&&D[1]<=F)return[D[0],D[1]]}{var z=i+h-u,$=n+f-u;if(D=ux(t,r,i,n,z,$,u+o),D.length>0&&D[0]>=z&&D[1]>=$)return[D[0],D[1]]}{var G=i-h+u,U=n+f-u;if(D=ux(t,r,i,n,G,U,u+o),D.length>0&&D[0]<=G&&D[1]>=U)return[D[0],D[1]]}return[]},zJe=function(t,r,i,n,a,s,o){var l=o,u=Math.min(i,a),h=Math.max(i,a),f=Math.min(n,s),d=Math.max(n,s);return u-l<=t&&t<=h+l&&f-l<=r&&r<=d+l},GJe=function(t,r,i,n,a,s,o,l,u){var h={x1:Math.min(i,o,a)-u,x2:Math.max(i,o,a)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(th.x2||rh.y2)},qJe=function(t,r,i,n){i-=n;var a=r*r-4*t*i;if(a<0)return[];var s=Math.sqrt(a),o=2*t,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},VJe=function(t,r,i,n,a){var s=1e-5;t===0&&(t=s),r/=t,i/=t,n/=t;var o,l,u,h,f,d,p,g;if(l=(3*i-r*r)/9,u=-(27*n)+r*(9*i-2*(r*r)),u/=54,o=l*l*l+u*u,a[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-p+f+d,p+=(f+d)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-d+f)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,o===0){g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),a[0]=-p+2*g,a[4]=a[2]=-(g+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),g=2*Math.sqrt(l),a[0]=-p+g*Math.cos(h/3),a[2]=-p+g*Math.cos((h+2*Math.PI)/3),a[4]=-p+g*Math.cos((h+4*Math.PI)/3)},WJe=function(t,r,i,n,a,s,o,l){var u=1*i*i-4*i*a+2*i*o+4*a*a-4*a*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,h=9*i*a-3*i*i-3*i*o-6*a*a+3*a*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=3*i*i-6*i*a+i*o-i*t+2*a*a+2*a*t-o*t+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,d=1*i*a-i*i+i*t-a*t+n*s-n*n+n*r-s*r,p=[];VJe(u,h,f,d,p);for(var g=1e-7,m=[],y=0;y<6;y+=2)Math.abs(p[y+1])=0&&p[y]<=1&&m.push(p[y]);m.push(1),m.push(0);for(var v=-1,x,T,C,w=0;w=0?Cu?(t-a)*(t-a)+(r-s)*(r-s):h-d},Fs=function(t,r,i){for(var n,a,s,o,l,u=0,h=0;h=t&&t>=s||n<=t&&t<=s)l=(t-n)/(s-n)*(o-a)+a,l>r&&u++;else continue;return u%2!==0},vh=function(t,r,i,n,a,s,o,l,u){var h=new Array(i.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),g=0;g0){var y=pS(h,-u);m=dS(y)}else m=h;return Fs(t,r,m)},HJe=function(t,r,i,n,a,s,o,l){for(var u=new Array(i.length*2),h=0;h=0&&y<=1&&x.push(y),v>=0&&v<=1&&x.push(v),x.length===0)return[];var T=x[0]*l[0]+t,C=x[0]*l[1]+r;if(x.length>1){if(x[0]==x[1])return[T,C];var w=x[1]*l[0]+t,k=x[1]*l[1]+r;return[T,C,w,k]}else return[T,C]},sM=function(t,r,i){return r<=t&&t<=i||i<=t&&t<=r?t:t<=r&&r<=i||i<=r&&r<=t?r:i},fd=function(t,r,i,n,a,s,o,l,u){var h=t-a,f=i-t,d=o-a,p=r-s,g=n-r,m=l-s,y=d*p-m*h,v=f*p-g*h,x=m*f-d*g;if(x!==0){var T=y/x,C=v/x,w=.001,k=0-w,E=1+w;return k<=T&&T<=E&&k<=C&&C<=E?[t+T*f,r+T*g]:u?[t+T*f,r+T*g]:[]}else return y===0||v===0?sM(t,i,o)===o?[o,l]:sM(t,i,a)===a?[a,s]:sM(a,o,i)===i?[i,n]:[]:[]},jJe=function(t,r,i,n,a){var s=[],o=n/2,l=a/2,u=r,h=i;s.push({x:u+o*t[0],y:h+l*t[1]});for(var f=1;f0){var m=pS(f,-l);p=dS(m)}else p=f}else p=i;for(var y,v,x,T,C=0;C2){for(var g=[h[0],h[1]],m=Math.pow(g[0]-t,2)+Math.pow(g[1]-r,2),y=1;yh&&(h=C)},get:function(T){return u[T]}},d=0;d0?D=R.edgesTo(_)[0]:D=_.edgesTo(R)[0];var I=n(D);_=_.id(),E[_]>E[O]+I&&(E[_]=E[O]+I,A.nodes.indexOf(_)<0?A.push(_):A.updateItem(_),k[_]=0,w[_]=[]),E[_]==E[O]+I&&(k[_]=k[_]+k[O],w[_].push(O))}else for(var B=0;B0;){for(var $=C.pop(),G=0;G0&&o.push(i[l]);o.length!==0&&a.push(n.collection(o))}return a},uet=function(t,r){for(var i=0;i5&&arguments[5]!==void 0?arguments[5]:det,o=n,l,u,h=0;h=2?ix(t,r,i,0,gpe,pet):ix(t,r,i,0,ppe)},squaredEuclidean:function(t,r,i){return ix(t,r,i,0,gpe)},manhattan:function(t,r,i){return ix(t,r,i,0,ppe)},max:function(t,r,i){return ix(t,r,i,-1/0,get)}};U1["squared-euclidean"]=U1.squaredEuclidean;U1.squaredeuclidean=U1.squaredEuclidean;met=wa({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),XO=function(t){return met(t)},gS=function(t,r,i,n,a){var s=a!=="kMedoids",o=s?function(f){return i[f]}:function(f){return n[f](i)},l=function(d){return n[d](r)},u=i,h=r;return AS(t,n.length,o,l,u,h)},lM=function(t,r,i){for(var n=i.length,a=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;ui)return!1}return!0},bet=function(t,r,i){for(var n=0;no&&(o=r[u][h],l=h);a[l].push(t[u])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&t.length===1)return!1;var g=r[s],m=r[n[s]],y;a.mode==="dendrogram"?y={left:g,right:m,key:g.key}:y={value:g.value.concat(m.value),key:g.key},t[g.index]=y,t.splice(m.index,1),r[g.key]=y;for(var v=0;vi[m.key][x.key]&&(l=i[m.key][x.key])):a.linkage==="max"?(l=i[g.key][x.key],i[g.key][x.key]0&&n.push(a);return n},Tpe=function(t,r,i){for(var n=[],a=0;ao&&(s=u,o=r[a*t+u])}s>0&&n.push(s)}for(var h=0;hu&&(l=h,u=f)}i[a]=s[l]}return n=Tpe(t,r,i),n},wpe=function(t){for(var r=this.cy(),i=this.nodes(),n=Det(t),a={},s=0;s=O?(L=O,O=R,_=D):R>L&&(L=R);for(var I=0;I0?1:0;E[N%n.minIterations*o+G]=U,$+=U}if($>0&&(N>=n.minIterations-1||N==n.maxIterations-1)){for(var j=0,H=0;H1||k>1)&&(o=!0),f[T]=[],x.outgoers().forEach(function(A){A.isEdge()&&f[T].push(A.id())})}else d[T]=[void 0,x.target().id()]}):s.forEach(function(x){var T=x.id();if(x.isNode()){var C=x.degree(!0);C%2&&(l?u?o=!0:u=T:l=T),f[T]=[],x.connectedEdges().forEach(function(w){return f[T].push(w.id())})}else d[T]=[x.source().id(),x.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(a){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var g=function(T){for(var C=T,w=[T],k,E,A;f[C].length;)k=f[C].shift(),E=d[k][0],A=d[k][1],C!=A?(f[A]=f[A].filter(function(N){return N!=k}),C=A):!a&&C!=E&&(f[E]=f[E].filter(function(N){return N!=k}),C=E),w.unshift(k),w.unshift(C);return w},m=[],y=[];for(y=g(h);y.length!=1;)f[y[0]].length==0?(m.unshift(s.getElementById(y.shift())),m.unshift(s.getElementById(y.shift()))):y=g(y.shift()).concat(y);m.unshift(s.getElementById(y.shift()));for(var v in f)if(f[v].length)return p;return p.found=!0,p.trail=this.spawn(m,!0),p}},V3=function(){var t=this,r={},i=0,n=0,a=[],s=[],o={},l=function(d,p){for(var g=s.length-1,m=[],y=t.spawn();s[g].x!=d||s[g].y!=p;)m.push(s.pop().edge),g--;m.push(s.pop().edge),m.forEach(function(v){var x=v.connectedNodes().intersection(t);y.merge(v),x.forEach(function(T){var C=T.id(),w=T.connectedEdges().intersection(t);y.merge(T),r[C].cutVertex?y.merge(w.filter(function(k){return k.isLoop()})):y.merge(w)})}),a.push(y)},u=function(d,p,g){d===g&&(n+=1),r[p]={id:i,low:i++,cutVertex:!1};var m=t.getElementById(p).connectedEdges().intersection(t);if(m.size()===0)a.push(t.spawn(t.getElementById(p)));else{var y,v,x,T;m.forEach(function(C){y=C.source().id(),v=C.target().id(),x=y===p?v:y,x!==g&&(T=C.id(),o[T]||(o[T]=!0,s.push({x:p,y:x,edge:C})),x in r?r[p].low=Math.min(r[p].low,r[x].id):(u(d,x,p),r[p].low=Math.min(r[p].low,r[x].low),r[p].id<=r[x].low&&(r[p].cutVertex=!0,l(p,x))))})}};t.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(n=0,u(d,d),r[d].cutVertex=n>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return t.getElementById(f)});return{cut:t.spawn(h),components:a}},zet={hopcroftTarjanBiconnected:V3,htbc:V3,htb:V3,hopcroftTarjanBiconnectedComponents:V3},W3=function(){var t=this,r={},i=0,n=[],a=[],s=t.spawn(t),o=function(u){a.push(u),r[u]={index:i,low:i++,explored:!1};var h=t.getElementById(u).connectedEdges().intersection(t);if(h.forEach(function(m){var y=m.target().id();y!==u&&(y in r||o(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var f=t.spawn();;){var d=a.pop();if(f.merge(t.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),g=f.merge(p);n.push(g),s=s.difference(g)}};return t.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},Get={tarjanStronglyConnected:W3,tsc:W3,tscc:W3,tarjanStronglyConnectedComponents:W3},Wge={};[vx,gJe,mJe,vJe,xJe,wJe,SJe,QJe,G1,q1,TO,fet,Eet,Ret,Bet,$et,zet,Get].forEach(function(e){nr(Wge,e)});Uge=0,Hge=1,Yge=2,Ol=function(t){if(!(this instanceof Ol))return new Ol(t);this.id="Thenable/1.0.7",this.state=Uge,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof t=="function"&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Ol.prototype={fulfill:function(t){return kpe(this,Hge,"fulfillValue",t)},reject:function(t){return kpe(this,Yge,"rejectReason",t)},then:function(t,r){var i=this,n=new Ol;return i.onFulfilled.push(Spe(t,n,"fulfill")),i.onRejected.push(Spe(r,n,"reject")),jge(i),n.proxy}};kpe=function(t,r,i,n){return t.state===Uge&&(t.state=r,t[i]=n,jge(t)),t},jge=function(t){t.state===Hge?Cpe(t,"onFulfilled",t.fulfillValue):t.state===Yge&&Cpe(t,"onRejected",t.rejectReason)},Cpe=function(t,r,i){if(t[r].length!==0){var n=t[r];t[r]=[];var a=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,i=r.length!==void 0,n=i?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s0&&this.spawn(n).updateStyle().emit("class"),r},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var r=this[0];return r!=null&&r._private.classes.has(t)},toggleClass:function(t,r){Ci(t)||(t=t.match(/\S+/g)||[]);for(var i=this,n=r===void 0,a=[],s=0,o=i.length;s0&&this.spawn(a).updateStyle().emit("class"),i},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,r){var i=this;if(r==null)r=250;else if(r===0)return i;return i.addClass(t),setTimeout(function(){i.removeClass(t)},r),i}};tS.className=tS.classNames=tS.classes;Xr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:qn,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Xr.variable="(?:[\\w-.]|(?:\\\\"+Xr.metaChar+"))+";Xr.className="(?:[\\w-]|(?:\\\\"+Xr.metaChar+"))+";Xr.value=Xr.string+"|"+Xr.number;Xr.id=Xr.variable;(function(){var e,t,r;for(e=Xr.comparatorOp.split("|"),r=0;r=0)&&t!=="="&&(Xr.comparatorOp+="|\\!"+t)})();xi=function(){return{checks:[]}},zt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},SO=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(e,t){return NQe(e.selector,t.selector)}),Ftt=(function(){for(var e={},t,r=0;r0&&h.edgeCount>0)return fi("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return fi("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&fi("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Wtt=function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=function(h){return h??""},r=function(h){return Qt(h)?'"'+h+'"':t(h)},i=function(h){return" "+h+" "},n=function(h,f){var d=h.type,p=h.value;switch(d){case zt.GROUP:{var g=t(p);return g.substring(0,g.length-1)}case zt.DATA_COMPARE:{var m=h.field,y=h.operator;return"["+m+i(t(y))+r(p)+"]"}case zt.DATA_BOOL:{var v=h.operator,x=h.field;return"["+t(v)+x+"]"}case zt.DATA_EXIST:{var T=h.field;return"["+T+"]"}case zt.META_COMPARE:{var C=h.operator,w=h.field;return"[["+w+i(t(C))+r(p)+"]]"}case zt.STATE:return p;case zt.ID:return"#"+p;case zt.CLASS:return"."+p;case zt.PARENT:case zt.CHILD:return a(h.parent,f)+i(">")+a(h.child,f);case zt.ANCESTOR:case zt.DESCENDANT:return a(h.ancestor,f)+" "+a(h.descendant,f);case zt.COMPOUND_SPLIT:{var k=a(h.left,f),E=a(h.subject,f),A=a(h.right,f);return k+(k.length>0?" ":"")+E+A}case zt.TRUE:return""}},a=function(h,f){return h.checks.reduce(function(d,p,g){return d+(f===h&&g===0?"$":"")+n(p,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(a||o||h)&&(l=!a&&!s?"":""+t,u=""+i),h&&(t=l=l.toLowerCase(),i=u=u.toLowerCase()),r){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=t===i;break;case">":d=!0,n=t>i;break;case">=":d=!0,n=t>=i;break;case"<":d=!0,n=t1&&arguments[1]!==void 0?arguments[1]:!0;return JO(this,e,t,rme)};H1.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return JO(this,e,t,ime)};H1.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return JO(this,e,t,Qtt)};H1.ancestors=H1.parents;Tx=nme={data:hi.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:hi.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:hi.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:hi.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:hi.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:hi.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}};Tx.attr=Tx.data;Tx.removeAttr=Tx.removeData;Jtt=nme,DS={};nr(DS,{degree:sO(function(e,t){return t.source().same(t.target())?2:1}),indegree:sO(function(e,t){return t.target().same(e)?1:0}),outdegree:sO(function(e,t){return t.source().same(e)?1:0})});nr(DS,{minDegree:R1("degree",function(e,t){return et}),minIndegree:R1("indegree",function(e,t){return et}),minOutdegree:R1("outdegree",function(e,t){return et})});nr(DS,{totalDegree:function(t){for(var r=0,i=this.nodes(),n=0;n0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(t,r+p[t]):a!==void 0&&u.position({x:a.x+p.x,y:a.y+p.y})}else{var g=i.position(),m=o?i.parent():null,y=m&&m.length>0,v=y;y&&(m=m[0]);var x=v?m.position():{x:0,y:0};return a={x:g.x-x.x,y:g.y-x.y},t===void 0?a:a[t]}else if(!s)return;return this}};Ml.modelPosition=Ml.point=Ml.position;Ml.modelPositions=Ml.points=Ml.positions;Ml.renderedPoint=Ml.renderedPosition;Ml.relativePoint=Ml.relativePosition;ert=ame;V1=kd={};kd.renderedBoundingBox=function(e){var t=this.boundingBox(e),r=this.cy(),i=r.zoom(),n=r.pan(),a=t.x1*i+n.x,s=t.x2*i+n.x,o=t.y1*i+n.y,l=t.y2*i+n.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}};kd.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var i=r._private;i.compoundBoundsClean=!1,i.bbCache=null,e||r.emitAndNotify("bounds")}}),this)};kd.updateCompoundBounds=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(N,P,O){var L=0,_=0,R=P+O;return N>0&&R>0&&(L=P/R*N,_=O/R*N),{biasDiff:L,biasComplementDiff:_}}function g(N,P,O,L){if(O.units==="%")switch(L){case"width":return N>0?O.pfValue*N:0;case"height":return P>0?O.pfValue*P:0;case"average":return N>0&&P>0?O.pfValue*(N+P)/2:0;case"min":return N>0&&P>0?N>P?O.pfValue*P:O.pfValue*N:0;case"max":return N>0&&P>0?N>P?O.pfValue*N:O.pfValue*P:0;default:return 0}else return O.units==="px"?O.pfValue:0}var m=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(m=m*100/h.width.val);var y=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(y=y*100/h.width.val);var v=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(v=v*100/h.height.val);var x=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(x=x*100/h.height.val);var T=p(h.width.val-f.w,m,y),C=T.biasDiff,w=T.biasComplementDiff,k=p(h.height.val-f.h,v,x),E=k.biasDiff,A=k.biasComplementDiff;o.autoPadding=g(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-C+f.x1+f.x2+w)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-E+f.y1+f.y2+A)/2}for(var i=0;it.x2?n:t.x2,t.y1=it.y2?a:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},cd=function(t,r){return r==null?t:Nl(t,r.x1,r.y1,r.x2,r.y2)},nx=function(t,r,i){return Bs(t,r,i)},U3=function(t,r,i){if(!r.cy().headless()){var n=r._private,a=n.rstyle,s=a.arrowWidth/2,o=r.pstyle(i+"-arrow-shape").value,l,u;if(o!=="none"){i==="source"?(l=a.srcX,u=a.srcY):i==="target"?(l=a.tgtX,u=a.tgtY):(l=a.midX,u=a.midY);var h=n.arrowBounds=n.arrowBounds||{},f=h[i]=h[i]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,J3(f,1),Nl(t,f.x1,f.y1,f.x2,f.y2)}}},oO=function(t,r,i){if(!r.cy().headless()){var n;i?n=i+"-":n="";var a=r._private,s=a.rstyle,o=r.pstyle(n+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=nx(s,"labelWidth",i),f=nx(s,"labelHeight",i),d=nx(s,"labelX",i),p=nx(s,"labelY",i),g=r.pstyle(n+"text-margin-x").pfValue,m=r.pstyle(n+"text-margin-y").pfValue,y=r.isEdge(),v=r.pstyle(n+"text-rotation"),x=r.pstyle("text-outline-width").pfValue,T=r.pstyle("text-border-width").pfValue,C=T/2,w=r.pstyle("text-background-padding").pfValue,k=2,E=f,A=h,N=A/2,P=E/2,O,L,_,R;if(y)O=d-N,L=d+N,_=p-P,R=p+P;else{switch(l.value){case"left":O=d-A,L=d;break;case"center":O=d-N,L=d+N;break;case"right":O=d,L=d+A;break}switch(u.value){case"top":_=p-E,R=p;break;case"center":_=p-P,R=p+P;break;case"bottom":_=p,R=p+E;break}}var D=g-Math.max(x,C)-w-k,I=g+Math.max(x,C)+w+k,B=m-Math.max(x,C)-w-k,M=m+Math.max(x,C)+w+k;O+=D,L+=I,_+=B,R+=M;var F=i||"main",z=a.labelBounds,$=z[F]=z[F]||{};$.x1=O,$.y1=_,$.x2=L,$.y2=R,$.w=L-O,$.h=R-_,$.leftPad=D,$.rightPad=I,$.topPad=B,$.botPad=M;var G=y&&v.strValue==="autorotate",U=v.pfValue!=null&&v.pfValue!==0;if(G||U){var j=G?nx(a.rstyle,"labelAngle",i):v.pfValue,H=Math.cos(j),Q=Math.sin(j),Y=(O+L)/2,se=(_+R)/2;if(!y){switch(l.value){case"left":Y=L;break;case"right":Y=O;break}switch(u.value){case"top":se=R;break;case"bottom":se=_;break}}var J=function(ke,Ce){return ke=ke-Y,Ce=Ce-se,{x:ke*H-Ce*Q+Y,y:ke*Q+Ce*H+se}},re=J(O,_),ie=J(O,R),te=J(L,_),xe=J(L,R);O=Math.min(re.x,ie.x,te.x,xe.x),L=Math.max(re.x,ie.x,te.x,xe.x),_=Math.min(re.y,ie.y,te.y,xe.y),R=Math.max(re.y,ie.y,te.y,xe.y)}var fe=F+"Rot",Se=z[fe]=z[fe]||{};Se.x1=O,Se.y1=_,Se.x2=L,Se.y2=R,Se.w=L-O,Se.h=R-_,Nl(t,O,_,L,R),Nl(a.labelBounds.all,O,_,L,R)}return t}},C0e=function(t,r){if(!r.cy().headless()){var i=r.pstyle("outline-opacity").value,n=r.pstyle("outline-width").value,a=r.pstyle("outline-offset").value,s=n+a;ome(t,r,i,s,"outside",s/2)}},ome=function(t,r,i,n,a,s){if(!(i===0||n<=0||a==="inside")){var o=r.cy(),l=o.renderer(),u=l.nodeShapes[l.getNodeShape(r)];if(u){var h=r.position(),f=h.x,d=h.y,p=r.width(),g=r.height();if(u.hasMiterBounds){a==="center"&&(n/=2);var m=u.miterBounds(f,d,p,g,n);cd(t,m)}else s!=null&&s>0&&eS(t,[s,s,s,s])}}},trt=function(t,r){if(!r.cy().headless()){var i=r.pstyle("border-opacity").value,n=r.pstyle("border-width").pfValue,a=r.pstyle("border-position").value;ome(t,r,i,n,a)}},rrt=function(t,r){var i=t._private.cy,n=i.styleEnabled(),a=i.headless(),s=os(),o=t._private,l=t.isNode(),u=t.isEdge(),h,f,d,p,g,m,y=o.rstyle,v=l&&n?t.pstyle("bounds-expansion").pfValue:[0],x=function(Me){return Me.pstyle("display").value!=="none"},T=!n||x(t)&&(!u||x(t.source())&&x(t.target()));if(T){var C=0,w=0;n&&r.includeOverlays&&(C=t.pstyle("overlay-opacity").value,C!==0&&(w=t.pstyle("overlay-padding").value));var k=0,E=0;n&&r.includeUnderlays&&(k=t.pstyle("underlay-opacity").value,k!==0&&(E=t.pstyle("underlay-padding").value));var A=Math.max(w,E),N=0,P=0;if(n&&(N=t.pstyle("width").pfValue,P=N/2),l&&r.includeNodes){var O=t.position();g=O.x,m=O.y;var L=t.outerWidth(),_=L/2,R=t.outerHeight(),D=R/2;h=g-_,f=g+_,d=m-D,p=m+D,Nl(s,h,d,f,p),n&&C0e(s,t),n&&r.includeOutlines&&!a&&C0e(s,t),n&&trt(s,t)}else if(u&&r.includeEdges)if(n&&!a){var I=t.pstyle("curve-style").strValue;if(h=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),d=Math.min(y.srcY,y.midY,y.tgtY),p=Math.max(y.srcY,y.midY,y.tgtY),h-=P,f+=P,d-=P,p+=P,Nl(s,h,d,f,p),I==="haystack"){var B=y.haystackPts;if(B&&B.length===2){if(h=B[0].x,d=B[0].y,f=B[1].x,p=B[1].y,h>f){var M=h;h=f,f=M}if(d>p){var F=d;d=p,p=F}Nl(s,h-P,d-P,f+P,p+P)}}else if(I==="bezier"||I==="unbundled-bezier"||ud(I,"segments")||ud(I,"taxi")){var z;switch(I){case"bezier":case"unbundled-bezier":z=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":z=y.linePts;break}if(z!=null)for(var $=0;$f){var Y=h;h=f,f=Y}if(d>p){var se=d;d=p,p=se}h-=P,f+=P,d-=P,p+=P,Nl(s,h,d,f,p)}if(n&&r.includeEdges&&u&&(U3(s,t,"mid-source"),U3(s,t,"mid-target"),U3(s,t,"source"),U3(s,t,"target")),n){var J=t.pstyle("ghost").value==="yes";if(J){var re=t.pstyle("ghost-offset-x").pfValue,ie=t.pstyle("ghost-offset-y").pfValue;Nl(s,s.x1+re,s.y1+ie,s.x2+re,s.y2+ie)}}var te=o.bodyBounds=o.bodyBounds||{};cpe(te,s),eS(te,v),J3(te,1),n&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,Nl(s,h-A,d-A,f+A,p+A));var xe=o.overlayBounds=o.overlayBounds||{};cpe(xe,s),eS(xe,v),J3(xe,1);var fe=o.labelBounds=o.labelBounds||{};fe.all!=null?OJe(fe.all):fe.all=os(),n&&r.includeLabels&&(r.includeMainLabels&&oO(s,t,null),u&&(r.includeSourceLabels&&oO(s,t,"source"),r.includeTargetLabels&&oO(s,t,"target")))}return s.x1=Yo(s.x1),s.y1=Yo(s.y1),s.x2=Yo(s.x2),s.y2=Yo(s.y2),s.w=Yo(s.x2-s.x1),s.h=Yo(s.y2-s.y1),s.w>0&&s.h>0&&T&&(eS(s,v),J3(s,1)),s},lme=function(t){var r=0,i=function(s){return(s?1:0)<=0;o--)s(o);return this};xd.removeAllListeners=function(){return this.removeListener("*")};xd.emit=xd.trigger=function(e,t,r){var i=this.listeners,n=i.length;return this.emitting++,Ci(t)||(t=[t]),vrt(this,function(a,s){r!=null&&(i=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],n=i.length);for(var o=function(){var h=i[l];if(h.type===s.type&&(!h.namespace||h.namespace===s.namespace||h.namespace===mrt)&&a.eventMatches(a.context,h,s)){var f=[s];t!=null&&sJe(f,t),a.beforeEmit(a.context,h,s),h.conf&&h.conf.one&&(a.listeners=a.listeners.filter(function(g){return g!==h}));var d=a.callbackContext(a.context,h,s),p=h.callback.apply(d,f);a.afterEmit(a.context,h,s),p===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[t]=l,a.set(u,{ele:l,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var r=this._private,i=t._private.data.id,n=r.map,a=n.get(i);if(!a)return this;var s=a.index;return this.unmergeAt(s),this},unmerge:function(t){var r=this._private.cy;if(!t)return this;if(t&&Qt(t)){var i=t;t=r.mutableElements().filter(i)}for(var n=0;n=0;r--){var i=this[r];t(i)&&this.unmergeAt(r)}return this},map:function(t,r){for(var i=[],n=this,a=0;ai&&(i=l,n=o)}return{value:i,ele:n}},min:function(t,r){for(var i=1/0,n,a=this,s=0;s=0&&a"u"?"undefined":Vn(Symbol))!=t&&Vn(Symbol.iterator)!=t;r&&(mS[Symbol.iterator]=function(){var i=this,n={value:void 0,done:!1},a=0,s=this.length;return gge({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,i=this[0],n=i.cy();if(n.styleEnabled()&&i){i._private.styleDirty&&(i._private.styleDirty=!1,n.style().apply(i));var a=i._private.style[t];return a??(r?n.style().getDefaultProperty(t):null)}},numericStyle:function(t){var r=this[0];if(r.cy().styleEnabled()&&r){var i=r.pstyle(t);return i.pfValue!==void 0?i.pfValue:i.value}},numericStyleUnits:function(t){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(t).units},renderedStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var i=this[0];if(i)return r.style().getRenderedStyle(i,t)},style:function(t,r){var i=this.cy();if(!i.styleEnabled())return this;var n=!1,a=i.style();if(Kr(t)){var s=t;a.applyBypass(this,s,n),this.emitAndNotify("style")}else if(Qt(t))if(r===void 0){var o=this[0];return o?a.getStylePropertyValue(o,t):void 0}else a.applyBypass(this,t,r,n),this.emitAndNotify("style");else if(t===void 0){var l=this[0];return l?a.getRawStyle(l):void 0}return this},removeStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var i=!1,n=r.style(),a=this;if(t===void 0)for(var s=0;s0&&t.push(h[0]),t.push(o[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}});Pa.neighbourhood=Pa.neighborhood;Pa.closedNeighbourhood=Pa.closedNeighborhood;Pa.openNeighbourhood=Pa.openNeighborhood;nr(Pa,{source:jo(function(t){var r=this[0],i;return r&&(i=r._private.source||r.cy().collection()),i&&t?i.filter(t):i},"source"),target:jo(function(t){var r=this[0],i;return r&&(i=r._private.target||r.cy().collection()),i&&t?i.filter(t):i},"target"),sources:O0e({attr:"source"}),targets:O0e({attr:"target"})});nr(Pa,{edgesWith:jo(P0e(),"edgesWith"),edgesTo:jo(P0e({thisIsSrc:!0}),"edgesTo")});nr(Pa,{connectedEdges:jo(function(e){for(var t=[],r=this,i=0;i0);return s},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}});Pa.componentsOf=Pa.components;Ta=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0){Wi("A collection must have a reference to the core");return}var a=new mh,s=!1;if(!r)r=[];else if(r.length>0&&Kr(r[0])&&!Ax(r[0])){s=!0;for(var o=[],l=new Y1,u=0,h=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=r.cy(),n=i._private,a=[],s=[],o,l=0,u=r.length;l0){for(var F=o.length===r.length?r:new Ta(i,o),z=0;z0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=[],n={},a=r._private.cy;function s(R){for(var D=R._private.edges,I=0;I0&&(e?O.emitAndNotify("remove"):t&&O.emit("remove"));for(var L=0;Lh&&Math.abs(g.v)>h;);return d?function(m){return l[m*(l.length-1)|0]}:u}})(),Ei=function(t,r,i,n){var a=_rt(t,r,i,n);return function(s,o,l){return s+(o-s)*a(l)}},iS={linear:function(t,r,i){return t+(r-t)*i},ease:Ei(.25,.1,.25,1),"ease-in":Ei(.42,0,1,1),"ease-out":Ei(0,0,.58,1),"ease-in-out":Ei(.42,0,.58,1),"ease-in-sine":Ei(.47,0,.745,.715),"ease-out-sine":Ei(.39,.575,.565,1),"ease-in-out-sine":Ei(.445,.05,.55,.95),"ease-in-quad":Ei(.55,.085,.68,.53),"ease-out-quad":Ei(.25,.46,.45,.94),"ease-in-out-quad":Ei(.455,.03,.515,.955),"ease-in-cubic":Ei(.55,.055,.675,.19),"ease-out-cubic":Ei(.215,.61,.355,1),"ease-in-out-cubic":Ei(.645,.045,.355,1),"ease-in-quart":Ei(.895,.03,.685,.22),"ease-out-quart":Ei(.165,.84,.44,1),"ease-in-out-quart":Ei(.77,0,.175,1),"ease-in-quint":Ei(.755,.05,.855,.06),"ease-out-quint":Ei(.23,1,.32,1),"ease-in-out-quint":Ei(.86,0,.07,1),"ease-in-expo":Ei(.95,.05,.795,.035),"ease-out-expo":Ei(.19,1,.22,1),"ease-in-out-expo":Ei(1,0,0,1),"ease-in-circ":Ei(.6,.04,.98,.335),"ease-out-circ":Ei(.075,.82,.165,1),"ease-in-out-circ":Ei(.785,.135,.15,.86),spring:function(t,r,i){if(i===0)return iS.linear;var n=Lrt(t,r,i);return function(a,s,o){return a+(s-a)*n(o)}},"cubic-bezier":Ei};Drt={animate:hi.animate(),animation:hi.animation(),animated:hi.animated(),clearQueue:hi.clearQueue(),delay:hi.delay(),delayAnimation:hi.delayAnimation(),stop:hi.stop(),addToAnimationPool:function(t){var r=this;r.styleEnabled()&&r._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function r(){t._private.animationsRunning&&hS(function(a){z0e(a,t),r()})}var i=t.renderer();i&&i.beforeRender?i.beforeRender(function(a,s){z0e(s,t)},i.beforeRenderPriorities.animations):r()}},Nrt={qualifierCompare:function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},eventMatches:function(t,r,i){var n=r.qualifier;return n!=null?t!==i.target&&Ax(i.target)&&n.matches(i.target):!0},addEventFields:function(t,r){r.cy=t,r.target=t},callbackContext:function(t,r,i){return r.qualifier!=null?i.target:t}},j3=function(t){return Qt(t)?new vd(t):t},bme={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new NS(Nrt,this)),this},emitter:function(){return this._private.emitter},on:function(t,r,i){return this.emitter().on(t,j3(r),i),this},removeListener:function(t,r,i){return this.emitter().removeListener(t,j3(r),i),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,r,i){return this.emitter().one(t,j3(r),i),this},once:function(t,r,i){return this.emitter().one(t,j3(r),i),this},emit:function(t,r){return this.emitter().emit(t,r),this},emitAndNotify:function(t,r){return this.emit(t),this.notify(t,r),this}};hi.eventAliasesOn(bme);AO={png:function(t){var r=this._private.renderer;return t=t||{},r.png(t)},jpg:function(t){var r=this._private.renderer;return t=t||{},t.bg=t.bg||"#fff",r.jpg(t)}};AO.jpeg=AO.jpg;nS={layout:function(t){var r=this;if(t==null){Wi("Layout options must be specified to make a layout");return}if(t.name==null){Wi("A `name` must be specified to make a layout");return}var i=t.name,n=r.extension("layout",i);if(n==null){Wi("No such layout `"+i+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;Qt(t.eles)?a=r.$(t.eles):a=t.eles!=null?t.eles:r.$();var s=new n(nr({},t,{cy:r,eles:a}));return s}};nS.createLayout=nS.makeLayout=nS.layout;Mrt={notify:function(t,r){var i=this._private;if(this.batching()){i.batchNotifications=i.batchNotifications||{};var n=i.batchNotifications[t]=i.batchNotifications[t]||this.collection();r!=null&&n.merge(r);return}if(i.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(t,r)}},notifications:function(t){var r=this._private;return t===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return t.batchCount==null&&(t.batchCount=0),t.batchCount===0&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(t.batchCount===0)return this;if(t.batchCount--,t.batchCount===0){t.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(t.batchNotifications).forEach(function(i){var n=t.batchNotifications[i];n.empty()?r.notify(i):r.notify(i,n)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var r=this;return this.batch(function(){for(var i=Object.keys(t),n=0;n0;)r.removeChild(r.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(i){var n=i._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};_O.invalidateDimensions=_O.resize;aS={collection:function(t,r){return Qt(t)?this.$(t):po(t)?t.collection():Ci(t)?(r||(r={}),new Ta(this,t,r.unique,r.removed)):new Ta(this)},nodes:function(t){var r=this.$(function(i){return i.isNode()});return t?r.filter(t):r},edges:function(t){var r=this.$(function(i){return i.isEdge()});return t?r.filter(t):r},$:function(t){var r=this._private.elements;return t?r.filter(t):r.spawnSelf()},mutableElements:function(){return this._private.elements}};aS.elements=aS.filter=aS.$;sa={},dx="t",Prt="f";sa.apply=function(e){for(var t=this,r=t._private,i=r.cy,n=i.collection(),a=0;a0;if(d||f&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var m=0;m1&&(C=1),o.color){var k=i.valueMin[0],E=i.valueMax[0],A=i.valueMin[1],N=i.valueMax[1],P=i.valueMin[2],O=i.valueMax[2],L=i.valueMin[3]==null?1:i.valueMin[3],_=i.valueMax[3]==null?1:i.valueMax[3],R=[Math.round(k+(E-k)*C),Math.round(A+(N-A)*C),Math.round(P+(O-P)*C),Math.round(L+(_-L)*C)];a={bypass:i.bypass,name:i.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(o.number){var D=i.valueMin+(i.valueMax-i.valueMin)*C;a=this.parse(i.name,D,i.bypass,d)}else return!1;if(!a)return m(),!1;a.mapping=i,i=a;break}case s.data:{for(var I=i.field.split("."),B=f.data,M=0;M0&&a>0){for(var o={},l=!1,u=0;u0?e.delayAnimation(s).play().promise().then(T):T()}).then(function(){return e.animation({style:o,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(e,n),e.emitAndNotify("style"),i.transitioning=!1})}else i.transitioning&&(this.removeBypasses(e,n),e.emitAndNotify("style"),i.transitioning=!1)};sa.checkTrigger=function(e,t,r,i,n,a){var s=this.properties[t],o=n(s);e.removed()||o!=null&&o(r,i,e)&&a(s)};sa.checkZOrderTrigger=function(e,t,r,i){var n=this;this.checkTrigger(e,t,r,i,function(a){return a.triggersZOrder},function(){n._private.cy.notify("zorder",e)})};sa.checkBoundsTrigger=function(e,t,r,i){this.checkTrigger(e,t,r,i,function(n){return n.triggersBounds},function(n){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})};sa.checkConnectedEdgesBoundsTrigger=function(e,t,r,i){this.checkTrigger(e,t,r,i,function(n){return n.triggersBoundsOfConnectedEdges},function(n){e.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};sa.checkParallelEdgesBoundsTrigger=function(e,t,r,i){this.checkTrigger(e,t,r,i,function(n){return n.triggersBoundsOfParallelEdges},function(n){e.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};sa.checkTriggers=function(e,t,r,i){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,i),this.checkBoundsTrigger(e,t,r,i),this.checkConnectedEdgesBoundsTrigger(e,t,r,i),this.checkParallelEdgesBoundsTrigger(e,t,r,i)};Mx={};Mx.applyBypass=function(e,t,r,i){var n=this,a=[],s=!0;if(t==="*"||t==="**"){if(r!==void 0)for(var o=0;on.length?i=i.substr(n.length):i=""}function l(){a.length>s.length?a=a.substr(s.length):a=""}for(;;){var u=i.match(/^\s*$/);if(u)break;var h=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){fi("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}n=h[0];var f=h[1];if(f!=="core"){var d=new vd(f);if(d.invalid){fi("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],g=!1;a=p;for(var m=[];;){var y=a.match(/^\s*$/);if(y)break;var v=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!v){fi("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),g=!0;break}s=v[0];var x=v[1],T=v[2],C=t.properties[x];if(!C){fi("Skipping property: Invalid property name in: "+s),l();continue}var w=r.parse(x,T);if(!w){fi("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:x,val:T}),l()}if(g){o();break}r.selector(f);for(var k=0;k=7&&t[0]==="d"&&(h=new RegExp(o.data.regex).exec(t))){if(r)return!1;var d=o.data;return{name:e,value:h,strValue:""+t,mapped:d,field:h[1],bypass:r}}else if(t.length>=10&&t[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(t))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var g=this.parse(e,f[4]);if(!g||g.mapped)return!1;var m=this.parse(e,f[5]);if(!m||m.mapped)return!1;if(g.pfValue===m.pfValue||g.strValue===m.strValue)return fi("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(u.color){var y=g.value,v=m.value,x=y[0]===v[0]&&y[1]===v[1]&&y[2]===v[2]&&(y[3]===v[3]||(y[3]==null||y[3]===1)&&(v[3]==null||v[3]===1));if(x)return!1}return{name:e,value:f,strValue:""+t,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:g.value,valueMax:m.value,bypass:r}}}if(u.multiple&&i!=="multiple"){var T;if(l?T=t.split(/\s+/):Ci(t)?T=t:T=[t],u.evenMultiple&&T.length%2!==0)return null;for(var C=[],w=[],k=[],E="",A=!1,N=0;N0?" ":"")+P.strValue}return u.validate&&!u.validate(C,w)?null:u.singleEnum&&A?C.length===1&&Qt(C[0])?{name:e,value:C[0],strValue:C[0],bypass:r}:null:{name:e,value:C,pfValue:k,strValue:E,bypass:r,units:w}}var O=function(){for(var J=0;Ju.max||u.strictMax&&t===u.max))return null;var I={name:e,value:t,strValue:""+t+(L||""),units:L,bypass:r};return u.unitless||L!=="px"&&L!=="em"?I.pfValue=t:I.pfValue=L==="px"||!L?t:this.getEmSizeInPixels()*t,(L==="ms"||L==="s")&&(I.pfValue=L==="ms"?t:1e3*t),(L==="deg"||L==="rad")&&(I.pfValue=L==="rad"?t:IJe(t)),L==="%"&&(I.pfValue=t/100),I}else if(u.propList){var B=[],M=""+t;if(M!=="none"){for(var F=M.split(/\s*,\s*|\s+/),z=0;z0&&o>0&&!isNaN(i.w)&&!isNaN(i.h)&&i.w>0&&i.h>0){l=Math.min((s-2*r)/i.w,(o-2*r)/i.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=i.minZoom&&(i.maxZoom=r),this},minZoom:function(t){return t===void 0?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return t===void 0?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var r=this._private,i=r.pan,n=r.zoom,a,s,o=!1;if(r.zoomingEnabled||(o=!0),Lt(t)?s=t:Kr(t)&&(s=t.level,t.position!=null?a=ES(t.position,n,i):t.renderedPosition!=null&&(a=t.renderedPosition),a!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,a.push("zoom"))}if(n&&(!s||!t.cancelOnFailedZoom)&&r.panningEnabled){var u=t.pan;Lt(u.x)&&(r.pan.x=u.x,o=!1),Lt(u.y)&&(r.pan.y=u.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(t){var r=this.getCenterPan(t);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,r){if(this._private.panningEnabled){if(Qt(t)){var i=t;t=this.mutableElements().filter(i)}else po(t)||(t=this.mutableElements());if(t.length!==0){var n=t.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(a-r*(n.x1+n.x2))/2,y:(s-r*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t=this._private,r=t.container,i=this;return t.sizeCache=t.sizeCache||(r?(function(){var n=i.window().getComputedStyle(r),a=function(o){return parseFloat(n.getPropertyValue(o))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}})():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,r=this._private.zoom,i=this.renderedExtent(),n={x1:(i.x1-t.x)/r,x2:(i.x2-t.x)/r,y1:(i.y1-t.y)/r,y2:(i.y2-t.y)/r};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var t=this.width(),r=this.height();return{x1:0,y1:0,x2:t,y2:r,w:t,h:r}},multiClickDebounceTime:function(t){if(t)this._private.multiClickDebounceTime=t;else return this._private.multiClickDebounceTime;return this}};A0.centre=A0.center;A0.autolockNodes=A0.autolock;A0.autoungrabifyNodes=A0.autoungrabify;kx={data:hi.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:hi.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:hi.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:hi.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};kx.attr=kx.data;kx.removeAttr=kx.removeData;Cx=function(t){var r=this;t=nr({},t);var i=t.container;i&&!uS(i)&&uS(i[0])&&(i=i[0]);var n=i?i._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var a=n.readies=n.readies||[];i&&(i._cyreg=n),n.cy=r;var s=Gn!==void 0&&i!==void 0&&!t.headless,o=t;o.layout=nr({name:s?"grid":"null"},o.layout),o.renderer=nr({name:s?"canvas":"null"},o.renderer);var l=function(g,m,y){return m!==void 0?m:y!==void 0?y:g},u=this._private={container:i,ready:!1,options:o,elements:new Ta(this),listeners:[],aniEles:new Ta(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:Lt(o.zoom)?o.zoom:1,pan:{x:Kr(o.pan)&&Lt(o.pan.x)?o.pan.x:0,y:Kr(o.pan)&&Lt(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(g,m){var y=g.some(SQe);if(y)return j1.all(g).then(m);m(g)};u.styleEnabled&&r.setStyle([]);var f=nr({},o,o.renderer);r.initRenderer(f);var d=function(g,m,y){r.notifications(!1);var v=r.mutableElements();v.length>0&&v.remove(),g!=null&&(Kr(g)||Ci(g))&&r.add(g),r.one("layoutready",function(T){r.notifications(!0),r.emit(T),r.one("load",m),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",y),r.emit("done")});var x=nr({},r._private.options.layout);x.eles=r.elements(),r.layout(x).run()};h([o.style,o.elements],function(p){var g=p[0],m=p[1];u.styleEnabled&&r.style().append(g),d(m,function(){r.startAnimationLoop(),u.ready=!0,Xi(o.ready)&&r.on("ready",o.ready);for(var y=0;y0,o=!!e.boundingBox,l=os(o?e.boundingBox:structuredClone(t.extent())),u;if(po(e.roots))u=e.roots;else if(Ci(e.roots)){for(var h=[],f=0;f0;){var R=_(),D=N(R,O);if(D)R.outgoers().filter(function(Ie){return Ie.isNode()&&r.has(Ie)}).forEach(L);else if(D===null){fi("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(e.avoidOverlap)for(var B=0;B0&&v[0].length<=3?Be/2:0),nt=2*Math.PI/v[Je].length*Te;return Je===0&&v[0].length===1&&(He=1),{x:te.x+He*Math.cos(nt),y:te.y+He*Math.sin(nt)}}else{var qe=v[Je].length,Ue=Math.max(qe===1?0:o?(l.w-e.padding*2-xe.w)/((e.grid?Se:qe)-1):(l.w-e.padding*2-xe.w)/((e.grid?Se:qe)+1),I),ge={x:te.x+(Te+1-(qe+1)/2)*Ue,y:te.y+(Je+1-(H+1)/2)*fe};return ge}},ke={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(ke).indexOf(e.direction)===-1&&Wi("Invalid direction '".concat(e.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(ke).join(", ")));var Ce=function(Pe){return eJe(Me(Pe),l,ke[e.direction])};return r.nodes().layoutPositions(this,e,Ce),this};Grt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};Tme.prototype.run=function(){var e=this.options,t=e,r=e.cy,i=t.eles,n=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,a=i.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var s=os(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep,u=l/Math.max(1,a.length-1),h,f=0,d=0;d1&&t.avoidOverlap){f*=1.75;var v=Math.cos(u)-Math.cos(0),x=Math.sin(u)-Math.sin(0),T=Math.sqrt(f*f/(v*v+x*x));h=Math.max(T,h)}var C=function(k,E){var A=t.startAngle+E*u*(n?1:-1),N=h*Math.cos(A),P=h*Math.sin(A),O={x:o.x+N,y:o.y+P};return O};return i.nodes().layoutPositions(this,t,C),this};qrt={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};wme.prototype.run=function(){for(var e=this.options,t=e,r=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,i=e.cy,n=t.eles,a=n.nodes().not(":parent"),s=os(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:i.width(),h:i.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h0){var w=Math.abs(x[0].value-C.value);w>=y&&(x=[],v.push(x))}x.push(C)}var k=u+t.minNodeSpacing;if(!t.avoidOverlap){var E=v.length>0&&v[0].length>1,A=Math.min(s.w,s.h)/2-k,N=A/(v.length+E?1:0);k=Math.min(k,N)}for(var P=0,O=0;O1&&t.avoidOverlap){var D=Math.cos(R)-Math.cos(0),I=Math.sin(R)-Math.sin(0),B=Math.sqrt(k*k/(D*D+I*I));P=Math.max(B,P)}L.r=P,P+=k}if(t.equidistant){for(var M=0,F=0,z=0;z=e.numIter||(Xrt(i,e),i.temperature=i.temperature*e.coolingFactor,i.temperature=e.animationThreshold&&a(),hS(h)}};h()}else{for(;u;)u=s(l),l++;V0e(i,e),o()}return this};FS.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};FS.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};Wrt=function(t,r,i){for(var n=i.eles.edges(),a=i.eles.nodes(),s=os(i.boundingBox?i.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:i.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=i.eles.components(),u={},h=0;h0){o.graphSet.push(A);for(var h=0;hn.count?0:n.graph},kme=function(t,r,i,n){var a=n.graphSet[i];if(-10)var f=n.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,g=f*l/d;else var m=vS(t,o,l),y=vS(r,-1*o,-1*l),v=y.x-m.x,x=y.y-m.y,T=v*v+x*x,d=Math.sqrt(T),f=(t.nodeRepulsion+r.nodeRepulsion)/T,p=f*v/d,g=f*x/d;t.isLocked||(t.offsetX-=p,t.offsetY-=g),r.isLocked||(r.offsetX+=p,r.offsetY+=g)}},Qrt=function(t,r,i,n){if(i>0)var a=t.maxX-r.minX;else var a=r.maxX-t.minX;if(n>0)var s=t.maxY-r.minY;else var s=r.maxY-t.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0},vS=function(t,r,i){var n=t.positionX,a=t.positionY,s=t.height||1,o=t.width||1,l=i/r,u=s/o,h={};return r===0&&0i?(h.x=n,h.y=a+s/2,h):0r&&-1*u<=l&&l<=u?(h.x=n-o/2,h.y=a-o*i/2/r,h):0=u)?(h.x=n+s*r/2/i,h.y=a+s/2,h):(0>i&&(l<=-1*u||l>=u)&&(h.x=n-s*r/2/i,h.y=a-s/2),h)},Jrt=function(t,r){for(var i=0;ii){var y=r.gravity*p/m,v=r.gravity*g/m;d.offsetX+=y,d.offsetY+=v}}}}},tit=function(t,r){var i=[],n=0,a=-1;for(i.push.apply(i,t.graphSet[0]),a+=t.graphSet[0].length;n<=a;){var s=i[n++],o=t.idToIndex[s],l=t.layoutNodes[o],u=l.children;if(0i)var a={x:i*t/n,y:i*r/n};else var a={x:t,y:r};return a},Sme=function(t,r){var i=t.parentId;if(i!=null){var n=r.layoutNodes[r.idToIndex[i]],a=!1;if((n.maxX==null||t.maxX+n.padRight>n.maxX)&&(n.maxX=t.maxX+n.padRight,a=!0),(n.minX==null||t.minX-n.padLeftn.maxY)&&(n.maxY=t.maxY+n.padBottom,a=!0),(n.minY==null||t.minY-n.padTopv&&(g+=y+r.componentSpacing,p=0,m=0,y=0)}}},nit={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};Eme.prototype.run=function(){var e=this.options,t=e,r=e.cy,i=t.eles,n=i.nodes().not(":parent");t.sort&&(n=n.sort(t.sort));var a=os(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)i.nodes().layoutPositions(this,t,function(U){return{x:a.x1,y:a.y1}});else{var s=n.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),u=Math.round(a.w/a.h*o),h=function(j){if(j==null)return Math.min(l,u);var H=Math.min(l,u);H==l?l=j:u=j},f=function(j){if(j==null)return Math.max(l,u);var H=Math.max(l,u);H==l?l=j:u=j},d=t.rows,p=t.cols!=null?t.cols:t.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var g=h(),m=f();(g-1)*m>=s?h(g-1):(m-1)*g>=s&&f(m-1)}else for(;u*l=s?f(v+1):h(y+1)}var x=a.w/u,T=a.h/l;if(t.condense&&(x=0,T=0),t.avoidOverlap)for(var C=0;C=u&&(D=0,R++)},B={},M=0;M(D=UJe(e,t,I[B],I[B+1],I[B+2],I[B+3])))return y(E,D),!0}else if(N.edgeType==="bezier"||N.edgeType==="multibezier"||N.edgeType==="self"||N.edgeType==="compound"){for(var I=N.allpts,B=0;B+5(D=WJe(e,t,I[B],I[B+1],I[B+2],I[B+3],I[B+4],I[B+5])))return y(E,D),!0}for(var M=M||A.source,F=F||A.target,z=n.getArrowWidth(P,O),$=[{name:"source",x:N.arrowStartX,y:N.arrowStartY,angle:N.srcArrowAngle},{name:"target",x:N.arrowEndX,y:N.arrowEndY,angle:N.tgtArrowAngle},{name:"mid-source",x:N.midX,y:N.midY,angle:N.midsrcArrowAngle},{name:"mid-target",x:N.midX,y:N.midY,angle:N.midtgtArrowAngle}],B=0;B<$.length;B++){var G=$[B],U=a.arrowShapes[E.pstyle(G.name+"-arrow-shape").value],j=E.pstyle("width").pfValue;if(U.roughCollide(e,t,z,G.angle,{x:G.x,y:G.y},j,h)&&U.collide(e,t,z,G.angle,{x:G.x,y:G.y},j,h))return y(E),!0}u&&o.length>0&&(v(M),v(F))}function T(E,A,N){return Bs(E,A,N)}function C(E,A){var N=E._private,P=d,O;A?O=A+"-":O="",E.boundingBox();var L=N.labelBounds[A||"main"],_=E.pstyle(O+"label").value,R=E.pstyle("text-events").strValue==="yes";if(!(!R||!_)){var D=T(N.rscratch,"labelX",A),I=T(N.rscratch,"labelY",A),B=T(N.rscratch,"labelAngle",A),M=E.pstyle(O+"text-margin-x").pfValue,F=E.pstyle(O+"text-margin-y").pfValue,z=L.x1-P-M,$=L.x2+P-M,G=L.y1-P-F,U=L.y2+P-F;if(B){var j=Math.cos(B),H=Math.sin(B),Q=function(xe,fe){return xe=xe-D,fe=fe-I,{x:xe*j-fe*H+D,y:xe*H+fe*j+I}},Y=Q(z,G),se=Q(z,U),J=Q($,G),re=Q($,U),ie=[Y.x+M,Y.y+F,J.x+M,J.y+F,re.x+M,re.y+F,se.x+M,se.y+F];if(Fs(e,t,ie))return y(E),!0}else if(hd(L,e,t))return y(E),!0}}for(var w=s.length-1;w>=0;w--){var k=s[w];k.isNode()?v(k)||C(k):x(k)||C(k)||C(k,"source")||C(k,"target")}return o};L0.getAllInBox=function(e,t,r,i){var n=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),s=2/a,o=[],l=Math.min(e,r),u=Math.max(e,r),h=Math.min(t,i),f=Math.max(t,i);e=l,r=u,t=h,i=f;var d=os({x1:e,y1:t,x2:r,y2:i}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],g=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function m(xe,fe,Se){return Bs(xe,fe,Se)}function y(xe,fe){var Se=xe._private,Me=s,ke="";xe.boundingBox();var Ce=Se.labelBounds.main;if(!Ce)return null;var Ie=m(Se.rscratch,"labelX",fe),Pe=m(Se.rscratch,"labelY",fe),pe=m(Se.rscratch,"labelAngle",fe),Je=xe.pstyle(ke+"text-margin-x").pfValue,Te=xe.pstyle(ke+"text-margin-y").pfValue,Be=Ce.x1-Me-Je,He=Ce.x2+Me-Je,nt=Ce.y1-Me-Te,qe=Ce.y2+Me-Te;if(pe){var Ue=Math.cos(pe),ge=Math.sin(pe),ce=function(le,X){return le=le-Ie,X=X-Pe,{x:le*Ue-X*ge+Ie,y:le*ge+X*Ue+Pe}};return[ce(Be,nt),ce(He,nt),ce(He,qe),ce(Be,qe)]}else return[{x:Be,y:nt},{x:He,y:nt},{x:He,y:qe},{x:Be,y:qe}]}function v(xe,fe,Se,Me){function ke(Ce,Ie,Pe){return(Pe.y-Ce.y)*(Ie.x-Ce.x)>(Ie.y-Ce.y)*(Pe.x-Ce.x)}return ke(xe,Se,Me)!==ke(fe,Se,Me)&&ke(xe,fe,Se)!==ke(xe,fe,Me)}for(var x=0;x0?-(Math.PI-t.ang):Math.PI+t.ang},uit=function(t,r,i,n,a){if(t!==j0e?X0e(r,t,Kc):cit(Ho,Kc),X0e(r,i,Ho),H0e=Kc.nx*Ho.ny-Kc.ny*Ho.nx,Y0e=Kc.nx*Ho.nx-Kc.ny*-Ho.ny,ph=Math.asin(Math.max(-1,Math.min(1,H0e))),Math.abs(ph)<1e-6){LO=r.x,RO=r.y,x0=N1=0;return}w0=1,sS=!1,Y0e<0?ph<0?ph=Math.PI+ph:(ph=Math.PI-ph,w0=-1,sS=!0):ph>0&&(w0=-1,sS=!0),r.radius!==void 0?N1=r.radius:N1=n,m0=ph/2,X3=Math.min(Kc.len/2,Ho.len/2),a?(jc=Math.abs(Math.cos(m0)*N1/Math.sin(m0)),jc>X3?(jc=X3,x0=Math.abs(jc*Math.sin(m0)/Math.cos(m0))):x0=N1):(jc=Math.min(X3,N1),x0=Math.abs(jc*Math.sin(m0)/Math.cos(m0))),IO=r.x+Ho.nx*jc,DO=r.y+Ho.ny*jc,LO=IO-Ho.ny*x0*w0,RO=DO+Ho.nx*x0*w0,Rme=r.x+Kc.nx*jc,Ime=r.y+Kc.ny*jc,j0e=r};Sx=.01,hit=Math.sqrt(2*Sx),Fa={};Fa.findMidptPtsEtc=function(e,t){var r=t.posPts,i=t.intersectionPts,n=t.vectorNormInverse,a,s=e.pstyle("source-endpoint"),o=e.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(w,k,E,A){var N=A-k,P=E-w,O=Math.sqrt(P*P+N*N);return{x:-N/O,y:P/O}},h=e.pstyle("edge-distances").value;switch(h){case"node-position":a=r;break;case"intersection":a=i;break;case"endpoints":{if(l){var f=this.manualEndptToPx(e.source()[0],s),d=Rn(f,2),p=d[0],g=d[1],m=this.manualEndptToPx(e.target()[0],o),y=Rn(m,2),v=y[0],x=y[1],T={x1:p,y1:g,x2:v,y2:x};n=u(p,g,v,x),a=T}else fi("Edge ".concat(e.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=i;break}}return{midptPts:a,vectorNormInverse:n}};Fa.findHaystackPoints=function(e){for(var t=0;t0?Math.max(X-he,0):Math.min(X+he,0)},_=L(P,A),R=L(O,N),D=!1;x===u?v=Math.abs(_)>Math.abs(R)?n:i:x===l||x===o?(v=i,D=!0):(x===a||x===s)&&(v=n,D=!0);var I=v===i,B=I?R:_,M=I?O:P,F=HO(M),z=!1;!(D&&(C||k))&&(x===o&&M<0||x===l&&M>0||x===a&&M>0||x===s&&M<0)&&(F*=-1,B=F*Math.abs(B),z=!0);var $;if(C){var G=w<0?1+w:w;$=G*B}else{var U=w<0?B:0;$=U+w*F}var j=function(X){return Math.abs(X)=Math.abs(B)},H=j($),Q=j(Math.abs(B)-Math.abs($)),Y=H||Q;if(Y&&!z)if(I){var se=Math.abs(M)<=d/2,J=Math.abs(P)<=p/2;if(se){var re=(h.x1+h.x2)/2,ie=h.y1,te=h.y2;r.segpts=[re,ie,re,te]}else if(J){var xe=(h.y1+h.y2)/2,fe=h.x1,Se=h.x2;r.segpts=[fe,xe,Se,xe]}else r.segpts=[h.x1,h.y2]}else{var Me=Math.abs(M)<=f/2,ke=Math.abs(O)<=g/2;if(Me){var Ce=(h.y1+h.y2)/2,Ie=h.x1,Pe=h.x2;r.segpts=[Ie,Ce,Pe,Ce]}else if(ke){var pe=(h.x1+h.x2)/2,Je=h.y1,Te=h.y2;r.segpts=[pe,Je,pe,Te]}else r.segpts=[h.x2,h.y1]}else if(I){var Be=h.y1+$+(y?d/2*F:0),He=h.x1,nt=h.x2;r.segpts=[He,Be,nt,Be]}else{var qe=h.x1+$+(y?f/2*F:0),Ue=h.y1,ge=h.y2;r.segpts=[qe,Ue,qe,ge]}if(r.isRound){var ce=e.pstyle("taxi-radius").value,V=e.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ce),r.isArcRadius=new Array(r.segpts.length/2).fill(V)}};Fa.tryToCorrectInvalidPoints=function(e,t){var r=e._private.rscratch;if(r.edgeType==="bezier"){var i=t.srcPos,n=t.tgtPos,a=t.srcW,s=t.srcH,o=t.tgtW,l=t.tgtH,u=t.srcShape,h=t.tgtShape,f=t.srcCornerRadius,d=t.tgtCornerRadius,p=t.srcRs,g=t.tgtRs,m=!Lt(r.startX)||!Lt(r.startY),y=!Lt(r.arrowStartX)||!Lt(r.arrowStartY),v=!Lt(r.endX)||!Lt(r.endY),x=!Lt(r.arrowEndX)||!Lt(r.arrowEndY),T=3,C=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth,w=T*C,k=S0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),E=kM.poolIndex()){var F=B;B=M,M=F}var z=_.srcPos=B.position(),$=_.tgtPos=M.position(),G=_.srcW=B.outerWidth(),U=_.srcH=B.outerHeight(),j=_.tgtW=M.outerWidth(),H=_.tgtH=M.outerHeight(),Q=_.srcShape=r.nodeShapes[t.getNodeShape(B)],Y=_.tgtShape=r.nodeShapes[t.getNodeShape(M)],se=_.srcCornerRadius=B.pstyle("corner-radius").value==="auto"?"auto":B.pstyle("corner-radius").pfValue,J=_.tgtCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,re=_.tgtRs=M._private.rscratch,ie=_.srcRs=B._private.rscratch;_.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var te=0;te<_.eles.length;te++){var xe=_.eles[te],fe=xe[0]._private.rscratch,Se=xe.pstyle("curve-style").value,Me=Se==="unbundled-bezier"||ud(Se,"segments")||ud(Se,"taxi"),ke=!B.same(xe.source());if(!_.calculatedIntersection&&B!==M&&(_.hasBezier||_.hasUnbundled)){_.calculatedIntersection=!0;var Ce=Q.intersectLine(z.x,z.y,G,U,$.x,$.y,0,se,ie),Ie=_.srcIntn=Ce,Pe=Y.intersectLine($.x,$.y,j,H,z.x,z.y,0,J,re),pe=_.tgtIntn=Pe,Je=_.intersectionPts={x1:Ce[0],x2:Pe[0],y1:Ce[1],y2:Pe[1]},Te=_.posPts={x1:z.x,x2:$.x,y1:z.y,y2:$.y},Be=Pe[1]-Ce[1],He=Pe[0]-Ce[0],nt=Math.sqrt(He*He+Be*Be);Lt(nt)&&nt>=hit||(nt=Math.sqrt(Math.max(He*He,Sx)+Math.max(Be*Be,Sx)));var qe=_.vector={x:He,y:Be},Ue=_.vectorNorm={x:qe.x/nt,y:qe.y/nt},ge={x:-Ue.y,y:Ue.x};_.nodesOverlap=!Lt(nt)||Y.checkPoint(Ce[0],Ce[1],0,j,H,$.x,$.y,J,re)||Q.checkPoint(Pe[0],Pe[1],0,G,U,z.x,z.y,se,ie),_.vectorNormInverse=ge,R={nodesOverlap:_.nodesOverlap,dirCounts:_.dirCounts,calculatedIntersection:!0,hasBezier:_.hasBezier,hasUnbundled:_.hasUnbundled,eles:_.eles,srcPos:$,srcRs:re,tgtPos:z,tgtRs:ie,srcW:j,srcH:H,tgtW:G,tgtH:U,srcIntn:pe,tgtIntn:Ie,srcShape:Y,tgtShape:Q,posPts:{x1:Te.x2,y1:Te.y2,x2:Te.x1,y2:Te.y1},intersectionPts:{x1:Je.x2,y1:Je.y2,x2:Je.x1,y2:Je.y1},vector:{x:-qe.x,y:-qe.y},vectorNorm:{x:-Ue.x,y:-Ue.y},vectorNormInverse:{x:-ge.x,y:-ge.y}}}var ce=ke?R:_;fe.nodesOverlap=ce.nodesOverlap,fe.srcIntn=ce.srcIntn,fe.tgtIntn=ce.tgtIntn,fe.isRound=Se.startsWith("round"),n&&(B.isParent()||B.isChild()||M.isParent()||M.isChild())&&(B.parents().anySame(M)||M.parents().anySame(B)||B.same(M)&&B.isParent())?t.findCompoundLoopPoints(xe,ce,te,Me):B===M?t.findLoopPoints(xe,ce,te,Me):Se.endsWith("segments")?t.findSegmentsPoints(xe,ce):Se.endsWith("taxi")?t.findTaxiPoints(xe,ce):Se==="straight"||!Me&&_.eles.length%2===1&&te===Math.floor(_.eles.length/2)?t.findStraightEdgePoints(xe):t.findBezierPoints(xe,ce,te,Me,ke),t.findEndpoints(xe),t.tryToCorrectInvalidPoints(xe,ce),t.checkForInvalidEdgeWarning(xe),t.storeAllpts(xe),t.storeEdgeProjections(xe),t.calculateArrowAngles(xe),t.recalculateEdgeLabelProjections(xe),t.calculateLabelAngles(xe)}},E=0;E0){var Ce=u,Ie=b0(Ce,B1(s)),Pe=b0(Ce,B1(ke)),pe=Ie;if(Pe2){var Je=b0(Ce,{x:ke[2],y:ke[3]});Je0){var Z=h,Ve=b0(Z,B1(s)),ve=b0(Z,B1(he)),Oe=Ve;if(ve2){var Ae=b0(Z,{x:he[2],y:he[3]});Ae=g||E){y={cp:C,segment:k};break}}if(y)break}var A=y.cp,N=y.segment,P=(g-v)/N.length,O=N.t1-N.t0,L=p?N.t0+O*P:N.t1-O*P;L=bx(0,L,1),t=z1(A.p0,A.p1,A.p2,L),d=dit(A.p0,A.p1,A.p2,L);break}case"straight":case"segments":case"haystack":{for(var _=0,R,D,I,B,M=i.allpts.length,F=0;F+3=g));F+=2);var z=g-D,$=z/R;$=bx(0,$,1),t=NJe(I,B,$),d=Ome(I,B);break}}s("labelX",f,t.x),s("labelY",f,t.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(e)}};Jc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))};Jc.applyPrefixedLabelDimensions=function(e,t){var r=e._private,i=this.getLabelText(e,t),n=C0(i,e._private.labelDimsKey);if(Bs(r.rscratch,"prefixedLabelDimsKey",t)!==n){gh(r.rscratch,"prefixedLabelDimsKey",t,n);var a=this.calculateLabelDimensions(e,i),s=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,l=Bs(r.rscratch,"labelWrapCachedLines",t)||[],u=o!=="wrap"?1:Math.max(l.length,1),h=a.height/u,f=h*s,d=a.width,p=a.height+(u-1)*(s-1)*h;gh(r.rstyle,"labelWidth",t,d),gh(r.rscratch,"labelWidth",t,d),gh(r.rstyle,"labelHeight",t,p),gh(r.rscratch,"labelHeight",t,p),gh(r.rscratch,"labelLineHeight",t,f)}};Jc.getLabelText=function(e,t){var r=e._private,i=t?t+"-":"",n=e.pstyle(i+"label").strValue,a=e.pstyle("text-transform").value,s=function(U,j){return j?(gh(r.rscratch,U,t,j),j):Bs(r.rscratch,U,t)};if(!n)return"";a=="none"||(a=="uppercase"?n=n.toUpperCase():a=="lowercase"&&(n=n.toLowerCase()));var o=e.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=n.split(` -`),f=e.pstyle("text-max-width").pfValue,d=e.pstyle("text-overflow-wrap").value,p=d==="anywhere",g=[],m=/[\s\u200b]+|$/g,y=0;yf){var w=v.matchAll(m),k="",E=0,A=$s(w),N;try{for(A.s();!(N=A.n()).done;){var P=N.value,O=P[0],L=v.substring(E,P.index);E=P.index+O.length;var _=k.length===0?L:k+L+O,R=this.calculateLabelDimensions(e,_),D=R.width;D<=f?k+=L+O:(k&&g.push(k),k=L+O)}}catch(G){A.e(G)}finally{A.f()}k.match(/^[\s\u200b]+$/)||g.push(k)}else g.push(v)}s("labelWrapCachedLines",g),n=s("labelWrapCachedText",g.join(` -`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var I=e.pstyle("text-max-width").pfValue,B="",M="\u2026",F=!1;if(this.calculateLabelDimensions(e,n).widthI)break;B+=n[z],z===n.length-1&&(F=!0)}return F||(B+=M),B}return n};Jc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;if(t==="auto")if(e.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return t};Jc.calculateLabelDimensions=function(e,t){var r=this,i=r.cy.window(),n=i.document,a=0,s=e.pstyle("font-style").strValue,o=e.pstyle("font-size").pfValue,l=e.pstyle("font-family").strValue,u=e.pstyle("font-weight").strValue,h=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=h.getContext("2d");var d=h.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var p=0,g=0,m=t.split(` -`),y=0;y1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(s),o)for(var l=0;l=e.desktopTapThreshold2}var vt=a(V);Tt&&(e.hoverData.tapholdCancelled=!0);var ut=function(){var Mt=e.hoverData.dragDelta=e.hoverData.dragDelta||[];Mt.length===0?(Mt.push(Ye[0]),Mt.push(Ye[1])):(Mt[0]+=Ye[0],Mt[1]+=Ye[1])};X=!0,n(Re,["mousemove","vmousemove","tapdrag"],V,{x:ve[0],y:ve[1]});var oe=function(Mt){return{originalEvent:V,type:Mt,position:{x:ve[0],y:ve[1]}}},ot=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||he.emit(oe("boxstart")),Fe[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(e.hoverData.which===3){if(Tt){var ct=oe("cxtdrag");De?De.emit(ct):he.emit(ct),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||Re!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(oe("cxtdragout")),e.hoverData.cxtOver=Re,Re&&Re.emit(oe("cxtdragover")))}}else if(e.hoverData.dragging){if(X=!0,he.panningEnabled()&&he.userPanningEnabled()){var et;if(e.hoverData.justStartedPan){var me=e.hoverData.mdownPos;et={x:(ve[0]-me[0])*Z,y:(ve[1]-me[1])*Z},e.hoverData.justStartedPan=!1}else et={x:Ye[0]*Z,y:Ye[1]*Z};he.panBy(et),he.emit(oe("dragpan")),e.hoverData.dragged=!0}ve=e.projectIntoViewport(V.clientX,V.clientY)}else if(Fe[4]==1&&(De==null||De.pannable())){if(Tt){if(!e.hoverData.dragging&&he.boxSelectionEnabled()&&(vt||!he.panningEnabled()||!he.userPanningEnabled()))ot();else if(!e.hoverData.selecting&&he.panningEnabled()&&he.userPanningEnabled()){var Ze=s(De,e.hoverData.downs);Ze&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,Fe[4]=0,e.data.bgActivePosistion=B1(Oe),e.redrawHint("select",!0),e.redraw())}De&&De.pannable()&&De.active()&&De.unactivate()}}else{if(De&&De.pannable()&&De.active()&&De.unactivate(),(!De||!De.grabbed())&&Re!=We&&(We&&n(We,["mouseout","tapdragout"],V,{x:ve[0],y:ve[1]}),Re&&n(Re,["mouseover","tapdragover"],V,{x:ve[0],y:ve[1]}),e.hoverData.last=Re),De)if(Tt){if(he.boxSelectionEnabled()&&vt)De&&De.grabbed()&&(m(ue),De.emit(oe("freeon")),ue.emit(oe("free")),e.dragData.didDrag&&(De.emit(oe("dragfreeon")),ue.emit(oe("dragfree")))),ot();else if(De&&De.grabbed()&&e.nodeIsDraggable(De)){var rt=!e.dragData.didDrag;rt&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||p(ue,{inDragLayer:!0});var at={x:0,y:0};if(Lt(Ye[0])&&Lt(Ye[1])&&(at.x+=Ye[0],at.y+=Ye[1],rt)){var _t=e.hoverData.dragDelta;_t&&Lt(_t[0])&&Lt(_t[1])&&(at.x+=_t[0],at.y+=_t[1])}e.hoverData.draggingEles=!0,ue.silentShift(at).emit(oe("position")).emit(oe("drag")),e.redrawHint("drag",!0),e.redraw()}}else ut();X=!0}if(Fe[2]=ve[0],Fe[3]=ve[1],X)return V.stopPropagation&&V.stopPropagation(),V.preventDefault&&V.preventDefault(),!1}},!1);var P,O,L;e.registerBinding(t,"mouseup",function(V){if(!(e.hoverData.which===1&&V.which!==1&&e.hoverData.capture)){var le=e.hoverData.capture;if(le){e.hoverData.capture=!1;var X=e.cy,he=e.projectIntoViewport(V.clientX,V.clientY),Z=e.selection,Ve=e.findNearestElement(he[0],he[1],!0,!1),ve=e.dragData.possibleDragElements,Oe=e.hoverData.down,Ae=a(V);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,Oe&&Oe.unactivate();var Fe=function(be){return{originalEvent:V,type:be,position:{x:he[0],y:he[1]}}};if(e.hoverData.which===3){var Re=Fe("cxttapend");if(Oe?Oe.emit(Re):X.emit(Re),!e.hoverData.cxtDragged){var We=Fe("cxttap");Oe?Oe.emit(We):X.emit(We)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(n(Ve,["mouseup","tapend","vmouseup"],V,{x:he[0],y:he[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(n(Oe,["click","tap","vclick"],V,{x:he[0],y:he[1]}),O=!1,V.timeStamp-L<=X.multiClickDebounceTime()?(P&&clearTimeout(P),O=!0,L=null,n(Oe,["dblclick","dbltap","vdblclick"],V,{x:he[0],y:he[1]})):(P=setTimeout(function(){O||n(Oe,["oneclick","onetap","voneclick"],V,{x:he[0],y:he[1]})},X.multiClickDebounceTime()),L=V.timeStamp)),Oe==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(V)&&(X.$(r).unselect(["tapunselect"]),ve.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=ve=X.collection()),Ve==Oe&&!e.dragData.didDrag&&!e.hoverData.selecting&&Ve!=null&&Ve._private.selectable&&(e.hoverData.dragging||(X.selectionType()==="additive"||Ae?Ve.selected()?Ve.unselect(["tapunselect"]):Ve.select(["tapselect"]):Ae||(X.$(r).unmerge(Ve).unselect(["tapunselect"]),Ve.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var De=X.collection(e.getAllInBox(Z[0],Z[1],Z[2],Z[3]));e.redrawHint("select",!0),De.length>0&&e.redrawHint("eles",!0),X.emit(Fe("boxend"));var Ye=function(be){return be.selectable()&&!be.selected()};X.selectionType()==="additive"||Ae||X.$(r).unmerge(De).unselect(),De.emit(Fe("box")).stdFilter(Ye).select().emit(Fe("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!Z[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var ue=Oe&&Oe.grabbed();m(ve),ue&&(Oe.emit(Fe("freeon")),ve.emit(Fe("free")),e.dragData.didDrag&&(Oe.emit(Fe("dragfreeon")),ve.emit(Fe("dragfree"))))}}Z[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}},!1);var _=[],R=4,D,I=1e5,B=function(V,le){for(var X=0;X=R){var he=_;if(D=B(he,5),!D){var Z=Math.abs(he[0]);D=M(he)&&Z>5}if(D)for(var Ve=0;Ve5&&(X=HO(X)*5),We=X/-250,D&&(We/=I,We*=3),We=We*e.wheelSensitivity;var De=V.deltaMode===1;De&&(We*=33);var Ye=ve.zoom()*Math.pow(10,We);V.type==="gesturechange"&&(Ye=e.gestureStartZoom*V.scale),ve.zoom({level:Ye,renderedPosition:{x:Re[0],y:Re[1]}}),ve.emit({type:V.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:V,position:{x:Fe[0],y:Fe[1]}})}}}};e.registerBinding(e.container,"wheel",F,!0),e.registerBinding(t,"scroll",function(V){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(V){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||V.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(ce){e.hasTouchStarted||F(ce)},!0),e.registerBinding(e.container,"mouseout",function(V){var le=e.projectIntoViewport(V.clientX,V.clientY);e.cy.emit({originalEvent:V,type:"mouseout",position:{x:le[0],y:le[1]}})},!1),e.registerBinding(e.container,"mouseover",function(V){var le=e.projectIntoViewport(V.clientX,V.clientY);e.cy.emit({originalEvent:V,type:"mouseover",position:{x:le[0],y:le[1]}})},!1);var z,$,G,U,j,H,Q,Y,se,J,re,ie,te,xe=function(V,le,X,he){return Math.sqrt((X-V)*(X-V)+(he-le)*(he-le))},fe=function(V,le,X,he){return(X-V)*(X-V)+(he-le)*(he-le)},Se;e.registerBinding(e.container,"touchstart",Se=function(V){if(e.hasTouchStarted=!0,!!A(V)){v(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var le=e.cy,X=e.touchData.now,he=e.touchData.earlier;if(V.touches[0]){var Z=e.projectIntoViewport(V.touches[0].clientX,V.touches[0].clientY);X[0]=Z[0],X[1]=Z[1]}if(V.touches[1]){var Z=e.projectIntoViewport(V.touches[1].clientX,V.touches[1].clientY);X[2]=Z[0],X[3]=Z[1]}if(V.touches[2]){var Z=e.projectIntoViewport(V.touches[2].clientX,V.touches[2].clientY);X[4]=Z[0],X[5]=Z[1]}var Ve=function(vt){return{originalEvent:V,type:vt,position:{x:X[0],y:X[1]}}};if(V.touches[1]){e.touchData.singleTouchMoved=!0,m(e.dragData.touchDragEles);var ve=e.findContainerClientCoords();se=ve[0],J=ve[1],re=ve[2],ie=ve[3],z=V.touches[0].clientX-se,$=V.touches[0].clientY-J,G=V.touches[1].clientX-se,U=V.touches[1].clientY-J,te=0<=z&&z<=re&&0<=G&&G<=re&&0<=$&&$<=ie&&0<=U&&U<=ie;var Oe=le.pan(),Ae=le.zoom();j=xe(z,$,G,U),H=fe(z,$,G,U),Q=[(z+G)/2,($+U)/2],Y=[(Q[0]-Oe.x)/Ae,(Q[1]-Oe.y)/Ae];var Fe=200,Re=Fe*Fe;if(H=1){for(var it=e.touchData.startPosition=[null,null,null,null,null,null],ft=0;ft=e.touchTapThreshold2}if(le&&e.touchData.cxt){V.preventDefault();var ft=V.touches[0].clientX-se,Dt=V.touches[0].clientY-J,mt=V.touches[1].clientX-se,vt=V.touches[1].clientY-J,ut=fe(ft,Dt,mt,vt),oe=ut/H,ot=150,ct=ot*ot,et=1.5,me=et*et;if(oe>=me||ut>=ct){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var Ze=Ae("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(Ze),e.touchData.start=null):he.emit(Ze)}}if(le&&e.touchData.cxt){var Ze=Ae("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(Ze):he.emit(Ze),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var rt=e.findNearestElement(Z[0],Z[1],!0,!0);(!e.touchData.cxtOver||rt!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(Ae("cxtdragout")),e.touchData.cxtOver=rt,rt&&rt.emit(Ae("cxtdragover")))}else if(le&&V.touches[2]&&he.boxSelectionEnabled())V.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||he.emit(Ae("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,X[4]=1,!X||X.length===0||X[0]===void 0?(X[0]=(Z[0]+Z[2]+Z[4])/3,X[1]=(Z[1]+Z[3]+Z[5])/3,X[2]=(Z[0]+Z[2]+Z[4])/3+1,X[3]=(Z[1]+Z[3]+Z[5])/3+1):(X[2]=(Z[0]+Z[2]+Z[4])/3,X[3]=(Z[1]+Z[3]+Z[5])/3),e.redrawHint("select",!0),e.redraw();else if(le&&V.touches[1]&&!e.touchData.didSelect&&he.zoomingEnabled()&&he.panningEnabled()&&he.userZoomingEnabled()&&he.userPanningEnabled()){V.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var at=e.dragData.touchDragEles;if(at){e.redrawHint("drag",!0);for(var _t=0;_t0&&!e.hoverData.draggingEles&&!e.swipePanning&&e.data.bgActivePosistion!=null&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1);var ke;e.registerBinding(t,"touchcancel",ke=function(V){var le=e.touchData.start;e.touchData.capture=!1,le&&le.unactivate()});var Ce,Ie,Pe,pe;if(e.registerBinding(t,"touchend",Ce=function(V){var le=e.touchData.start,X=e.touchData.capture;if(X)V.touches.length===0&&(e.touchData.capture=!1),V.preventDefault();else return;var he=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var Z=e.cy,Ve=Z.zoom(),ve=e.touchData.now,Oe=e.touchData.earlier;if(V.touches[0]){var Ae=e.projectIntoViewport(V.touches[0].clientX,V.touches[0].clientY);ve[0]=Ae[0],ve[1]=Ae[1]}if(V.touches[1]){var Ae=e.projectIntoViewport(V.touches[1].clientX,V.touches[1].clientY);ve[2]=Ae[0],ve[3]=Ae[1]}if(V.touches[2]){var Ae=e.projectIntoViewport(V.touches[2].clientX,V.touches[2].clientY);ve[4]=Ae[0],ve[5]=Ae[1]}var Fe=function(ct){return{originalEvent:V,type:ct,position:{x:ve[0],y:ve[1]}}};le&&le.unactivate();var Re;if(e.touchData.cxt){if(Re=Fe("cxttapend"),le?le.emit(Re):Z.emit(Re),!e.touchData.cxtDragged){var We=Fe("cxttap");le?le.emit(We):Z.emit(We)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw();return}if(!V.touches[2]&&Z.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var De=Z.collection(e.getAllInBox(he[0],he[1],he[2],he[3]));he[0]=void 0,he[1]=void 0,he[2]=void 0,he[3]=void 0,he[4]=0,e.redrawHint("select",!0),Z.emit(Fe("boxend"));var Ye=function(ct){return ct.selectable()&&!ct.selected()};De.emit(Fe("box")).stdFilter(Ye).select().emit(Fe("boxselect")),De.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(le?.unactivate(),V.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(!V.touches[1]){if(!V.touches[0]){if(!V.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var ue=e.dragData.touchDragEles;if(le!=null){var Tt=le._private.grabbed;m(ue),e.redrawHint("drag",!0),e.redrawHint("eles",!0),Tt&&(le.emit(Fe("freeon")),ue.emit(Fe("free")),e.dragData.didDrag&&(le.emit(Fe("dragfreeon")),ue.emit(Fe("dragfree")))),n(le,["touchend","tapend","vmouseup","tapdragout"],V,{x:ve[0],y:ve[1]}),le.unactivate(),e.touchData.start=null}else{var be=e.findNearestElement(ve[0],ve[1],!0,!0);n(be,["touchend","tapend","vmouseup","tapdragout"],V,{x:ve[0],y:ve[1]})}var it=e.touchData.startPosition[0]-ve[0],ft=it*it,Dt=e.touchData.startPosition[1]-ve[1],mt=Dt*Dt,vt=ft+mt,ut=vt*Ve*Ve;e.touchData.singleTouchMoved||(le||Z.$(":selected").unselect(["tapunselect"]),n(le,["tap","vclick"],V,{x:ve[0],y:ve[1]}),Ie=!1,V.timeStamp-pe<=Z.multiClickDebounceTime()?(Pe&&clearTimeout(Pe),Ie=!0,pe=null,n(le,["dbltap","vdblclick"],V,{x:ve[0],y:ve[1]})):(Pe=setTimeout(function(){Ie||n(le,["onetap","voneclick"],V,{x:ve[0],y:ve[1]})},Z.multiClickDebounceTime()),pe=V.timeStamp)),le!=null&&!e.dragData.didDrag&&le._private.selectable&&ut"u"){var Je=[],Te=function(V){return{clientX:V.clientX,clientY:V.clientY,force:1,identifier:V.pointerId,pageX:V.pageX,pageY:V.pageY,radiusX:V.width/2,radiusY:V.height/2,screenX:V.screenX,screenY:V.screenY,target:V.target}},Be=function(V){return{event:V,touch:Te(V)}},He=function(V){Je.push(Be(V))},nt=function(V){for(var le=0;le0)return G[0]}return null},g=Object.keys(d),m=0;m0?p:Bge(a,s,t,r,i,n,o,l)},checkPoint:function(t,r,i,n,a,s,o,l){l=l==="auto"?yd(n,a):l;var u=2*l;if(vh(t,r,this.points,s,o,n,a-u,[0,-1],i)||vh(t,r,this.points,s,o,n-u,a,[0,-1],i))return!0;var h=n/2+2*i,f=a/2+2*i,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(Fs(t,r,d)||k0(t,r,u,u,s+n/2-l,o+a/2-l,i)||k0(t,r,u,u,s-n/2+l,o+a/2-l,i))}}};bh.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",ss(3,0)),this.generateRoundPolygon("round-triangle",ss(3,0)),this.generatePolygon("rectangle",ss(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ss(5,0)),this.generateRoundPolygon("round-pentagon",ss(5,0)),this.generatePolygon("hexagon",ss(6,0)),this.generateRoundPolygon("round-hexagon",ss(6,0)),this.generatePolygon("heptagon",ss(7,0)),this.generateRoundPolygon("round-heptagon",ss(7,0)),this.generatePolygon("octagon",ss(8,0)),this.generateRoundPolygon("round-octagon",ss(8,0));var i=new Array(20);{var n=bO(5,0),a=bO(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=t.deqFastCost*C)break}else if(u){if(x>=t.deqCost*p||x>=t.deqAvgCost*d)break}else if(T>=t.deqNoDrawCost*uO)break;var w=t.deq(i,y,m);if(w.length>0)for(var k=0;k0&&(t.onDeqd(i,g),!u&&t.shouldRedraw(i,g,y,m)&&a())},o=t.priority||VO;n.beforeRender(s,o(i))}}}},yit=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fS;Td(this,e),this.idsByKey=new mh,this.keyForId=new mh,this.cachesByLvl=new mh,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r}return wd(e,[{key:"getIdsFor",value:function(r){r==null&&Wi("Can not get id list for null key");var i=this.idsByKey,n=this.idsByKey.get(r);return n||(n=new Y1,i.set(r,n)),n}},{key:"addIdForKey",value:function(r,i){r!=null&&this.getIdsFor(r).add(i)}},{key:"deleteIdForKey",value:function(r,i){r!=null&&this.getIdsFor(r).delete(i)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var i=r.id(),n=this.keyForId.get(i),a=this.getKey(r);this.deleteIdForKey(n,i),this.addIdForKey(a,i),this.keyForId.set(i,a)}},{key:"deleteKeyMappingFor",value:function(r){var i=r.id(),n=this.keyForId.get(i);this.deleteIdForKey(n,i),this.keyForId.delete(i)}},{key:"keyHasChangedFor",value:function(r){var i=r.id(),n=this.keyForId.get(i),a=this.getKey(r);return n!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var i=this.cachesByLvl,n=this.lvls,a=i.get(r);return a||(a=new mh,i.set(r,a),n.push(r)),a}},{key:"getCache",value:function(r,i){return this.getCachesAt(i).get(r)}},{key:"get",value:function(r,i){var n=this.getKey(r),a=this.getCache(n,i);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,i){var n=this.keyForId.get(r.id()),a=this.getCache(n,i);return a}},{key:"hasCache",value:function(r,i){return this.getCachesAt(i).has(r)}},{key:"has",value:function(r,i){var n=this.getKey(r);return this.hasCache(n,i)}},{key:"setCache",value:function(r,i,n){n.key=r,this.getCachesAt(i).set(r,n)}},{key:"set",value:function(r,i,n){var a=this.getKey(r);this.setCache(a,i,n),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,i){this.getCachesAt(i).delete(r)}},{key:"delete",value:function(r,i){var n=this.getKey(r);this.deleteCache(n,i)}},{key:"invalidateKey",value:function(r){var i=this;this.lvls.forEach(function(n){return i.deleteCache(r,n)})}},{key:"invalidate",value:function(r){var i=r.id(),n=this.keyForId.get(i);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(n),a||this.getNumberOfIdsForKey(n)===0}}])})(),J0e=25,K3=50,oS=-4,NO=3,qme=7.99,vit=8,bit=1024,xit=1024,Tit=1024,wit=.2,kit=.8,Cit=10,Sit=.15,Eit=.1,Ait=.9,_it=.9,Lit=100,Rit=1,$1={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Iit=wa({getKey:null,doesEleInvalidateKey:fS,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Rge,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),fx=function(t,r){var i=this;i.renderer=t,i.onDequeues=[];var n=Iit(r);nr(i,n),i.lookup=new yit(n.getKey,n.doesEleInvalidateKey),i.setupDequeueing()},Wn=fx.prototype;Wn.reasons=$1;Wn.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]};Wn.getRetiredTextureQueue=function(e){var t=this,r=t.eleImgCaches.retired=t.eleImgCaches.retired||{},i=r[e]=r[e]||[];return i};Wn.getElementQueue=function(){var e=this,t=e.eleCacheQueue=e.eleCacheQueue||new Dx(function(r,i){return i.reqs-r.reqs});return t};Wn.getElementKeyToQueue=function(){var e=this,t=e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{};return t};Wn.getElement=function(e,t,r,i,n){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(i==null&&(i=Math.ceil(UO(o*r))),i=qme||i>NO)return null;var u=Math.pow(2,i),h=t.h*u,f=t.w*u,d=s.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p=l.get(e,i);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var g;if(h<=J0e?g=J0e:h<=K3?g=K3:g=Math.ceil(h/K3)*K3,h>Tit||f>xit)return null;var m=a.getTextureQueue(g),y=m[m.length-2],v=function(){return a.recycleTexture(g,f)||a.addTexture(g,f)};y||(y=m[m.length-1]),y||(y=v()),y.width-y.usedWidthi;O--)N=a.getElement(e,t,r,O,$1.downscale);P()}else return a.queueElement(e,k.level-1),k;else{var L;if(!T&&!C&&!w)for(var _=i-1;_>=oS;_--){var R=l.get(e,_);if(R){L=R;break}}if(x(L))return a.queueElement(e,i),L;y.context.translate(y.usedWidth,0),y.context.scale(u,u),this.drawElement(y.context,e,t,d,!1),y.context.scale(1/u,1/u),y.context.translate(-y.usedWidth,0)}return p={x:y.usedWidth,texture:y,level:i,scale:u,width:f,height:h,scaledLabelShown:d},y.usedWidth+=Math.ceil(f+vit),y.eleCaches.push(p),l.set(e,i,p),a.checkTextureFullness(y),p};Wn.invalidateElements=function(e){for(var t=0;t=wit*e.width&&this.retireTexture(e)};Wn.checkTextureFullness=function(e){var t=this,r=t.getTextureQueue(e.height);e.usedWidth/e.width>kit&&e.fullnessChecks>=Cit?md(r,e):e.fullnessChecks++};Wn.retireTexture=function(e){var t=this,r=e.height,i=t.getTextureQueue(r),n=this.lookup;md(i,e),e.retired=!0;for(var a=e.eleCaches,s=0;s=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,WO(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),md(n,s),i.push(s),s}};Wn.queueElement=function(e,t){var r=this,i=r.getElementQueue(),n=r.getElementKeyToQueue(),a=this.getKey(e),s=n[a];if(s)s.level=Math.max(s.level,t),s.eles.merge(e),s.reqs++,i.updateItem(s);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};i.push(o),n[a]=o}};Wn.dequeue=function(e){for(var t=this,r=t.getElementQueue(),i=t.getElementKeyToQueue(),n=[],a=t.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=a.hasCache(u,o.level);if(i[l]=null,h)continue;n.push(o);var f=t.getBoundingBox(u);t.getElement(u,f,e,o.level,$1.dequeue)}return n};Wn.removeFromQueue=function(e){var t=this,r=t.getElementQueue(),i=t.getElementKeyToQueue(),n=this.getKey(e),a=i[n];a!=null&&(a.eles.length===1?(a.reqs=qO,r.updateItem(a),r.pop(),i[n]=null):a.eles.unmerge(e))};Wn.onDequeue=function(e){this.onDequeues.push(e)};Wn.offDequeue=function(e){md(this.onDequeues,e)};Wn.setupDequeueing=Gme.setupDequeueing({deqRedrawThreshold:Lit,deqCost:Sit,deqAvgCost:Eit,deqNoDrawCost:Ait,deqFastCost:_it,deq:function(t,r,i){return t.dequeue(r,i)},onDeqd:function(t,r){for(var i=0;i=Nit||r>xS)return null}i.validateLayersElesOrdering(r,e);var l=i.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=i.levelIsComplete(r,e),p,g=function(){var P=function(D){if(i.validateLayersElesOrdering(D,e),i.levelIsComplete(D,e))return p=l[D],!0},O=function(D){if(!p)for(var I=r+D;px<=I&&I<=xS&&!P(I);I+=D);};O(1),O(-1);for(var L=h.length-1;L>=0;L--){var _=h[L];_.invalid&&md(h,_)}};if(!d)g();else return h;var m=function(){if(!f){f=os();for(var P=0;Ptge||_>tge)return null;var R=L*_;if(R>Git)return null;var D=i.makeLayer(f,r);if(O!=null){var I=h.indexOf(O)+1;h.splice(I,0,D)}else(P.insert===void 0||P.insert)&&h.unshift(D);return D};if(i.skipping&&!o)return null;for(var v=null,x=e.length/Dit,T=!o,C=0;C=x||!Pge(v.bb,w.boundingBox()))&&(v=y({insert:!0,after:v}),!v))return null;p||T?i.queueLayer(v,w):i.drawEleInLayer(v,w,r,t),v.eles.push(w),E[r]=v}return p||(T?null:h)};ka.getEleLevelForLayerLevel=function(e,t){return e};ka.drawEleInLayer=function(e,t,r,i){var n=this,a=this.renderer,s=e.context,o=t.boundingBox();o.w===0||o.h===0||!t.visible()||(r=n.getEleLevelForLayerLevel(r,i),a.setImgSmoothing(s,!1),a.drawCachedElement(s,t,null,null,r,qit),a.setImgSmoothing(s,!0))};ka.levelIsComplete=function(e,t){var r=this,i=r.layersByLevel[e];if(!i||i.length===0)return!1;for(var n=0,a=0;a0||s.invalid)return!1;n+=s.eles.length}return n===t.length};ka.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var i=0;i0){t=!0;break}}return t};ka.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=yh(),!(e.length===0||!t.haveLayers())&&t.updateElementsInLayers(e,function(i,n,a){t.invalidateLayer(i)}))};ka.invalidateLayer=function(e){if(this.lastInvalidationTime=yh(),!e.invalid){var t=e.level,r=e.eles,i=this.layersByLevel[t];md(i,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=t._private.rscratch;if(!(a&&!t.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,h=a?t.pstyle("line-opacity").value:1,f=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,m=t.pstyle("line-outline-width").value,y=t.pstyle("line-outline-color").value,v=u*h,x=u*h,T=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;f==="straight-triangle"?(s.eleStrokeStyle(e,t,D),s.drawEdgeTrianglePath(t,e,o.allpts)):(e.lineWidth=p,e.lineCap=g,s.eleStrokeStyle(e,t,D),s.drawEdgePath(t,e,o.allpts,d),e.lineCap="butt")},C=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;if(e.lineWidth=p+m,e.lineCap=g,m>0)s.colorStrokeStyle(e,y[0],y[1],y[2],D);else{e.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(t,e,o.allpts):(s.drawEdgePath(t,e,o.allpts,d),e.lineCap="butt")},w=function(){n&&s.drawEdgeOverlay(e,t)},k=function(){n&&s.drawEdgeUnderlay(e,t)},E=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;s.drawArrowheads(e,t,D)},A=function(){s.drawElementText(e,t,null,i)};e.lineJoin="round";var N=t.pstyle("ghost").value==="yes";if(N){var P=t.pstyle("ghost-offset-x").pfValue,O=t.pstyle("ghost-offset-y").pfValue,L=t.pstyle("ghost-opacity").value,_=v*L;e.translate(P,O),T(_),E(_),e.translate(-P,-O)}else C();k(),T(),E(),w(),A(),r&&e.translate(l.x1,l.y1)}};Ume=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,i){if(i.visible()){var n=i.pstyle("".concat(t,"-opacity")).value;if(n!==0){var a=this,s=a.usePaths(),o=i._private.rscratch,l=i.pstyle("".concat(t,"-padding")).pfValue,u=2*l,h=i.pstyle("".concat(t,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,h[0],h[1],h[2],n),a.drawEdgePath(i,r,o.allpts,"solid")}}}};xh.drawEdgeOverlay=Ume("overlay");xh.drawEdgeUnderlay=Ume("underlay");xh.drawEdgePath=function(e,t,r,i){var n=e._private.rscratch,a=t,s,o=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,h=e.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=n.pathCacheKey&&n.pathCacheKey===f;d?(s=t=n.pathCache,o=!0):(s=t=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(a.setLineDash)switch(i){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=h;break;case"solid":a.setLineDash([]);break}if(!o&&!n.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(i==null){if(a&&!s.eleTextBiggerThanMin(t))return}else if(i===!1)return;if(t.isNode()){var o=t.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,h=t.pstyle("label"),f=t.pstyle("source-label"),d=t.pstyle("target-label");if(u||(!h||!h.value)&&(!f||!f.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var p=!r,g;r&&(g=r,e.translate(-g.x1,-g.y1)),n==null?(s.drawText(e,t,null,p,a),t.isEdge()&&(s.drawText(e,t,"source",p,a),s.drawText(e,t,"target",p,a))):s.drawText(e,t,n,p,a),r&&e.translate(g.x1,g.y1)};R0.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,i=t.pstyle("font-style").strValue,n=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,o=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*o,u=t.pstyle("color").value,h=t.pstyle("text-outline-color").value;e.font=i+" "+s+" "+n+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],o),this.colorStrokeStyle(e,h[0],h[1],h[2],l)};R0.getTextAngle=function(e,t){var r,i=e._private,n=i.rscratch,a=t?t+"-":"",s=e.pstyle(a+"text-rotation");if(s.strValue==="autorotate"){var o=Bs(n,"labelAngle",t);r=e.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};R0.drawText=function(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private,s=a.rscratch,o=n?t.effectiveOpacity():1;if(!(n&&(o===0||t.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Bs(s,"labelX",r),u=Bs(s,"labelY",r),h,f,d=this.getLabelText(t,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(e,t,n);var p=r?r+"-":"",g=Bs(s,"labelWidth",r),m=Bs(s,"labelHeight",r),y=t.pstyle(p+"text-margin-x").pfValue,v=t.pstyle(p+"text-margin-y").pfValue,x=t.isEdge(),T=t.pstyle("text-halign").value,C=t.pstyle("text-valign").value;x&&(T="center",C="center"),l+=y,u+=v;var w;switch(i?w=this.getTextAngle(t,r):w=0,w!==0&&(h=l,f=u,e.translate(h,f),e.rotate(w),l=0,u=0),C){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var k=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,A=t.pstyle("text-border-width").pfValue,N=t.pstyle("text-background-padding").pfValue,P=t.pstyle("text-background-shape").strValue,O=P==="round-rectangle"||P==="roundrectangle",L=P==="circle",_=2;if(k>0||A>0&&E>0){var R=e.fillStyle,D=e.strokeStyle,I=e.lineWidth,B=t.pstyle("text-background-color").value,M=t.pstyle("text-border-color").value,F=t.pstyle("text-border-style").value,z=k>0,$=A>0&&E>0,G=l-N;switch(T){case"left":G-=g;break;case"center":G-=g/2;break}var U=u-m-N,j=g+2*N,H=m+2*N;if(z&&(e.fillStyle="rgba(".concat(B[0],",").concat(B[1],",").concat(B[2],",").concat(k*o,")")),$&&(e.strokeStyle="rgba(".concat(M[0],",").concat(M[1],",").concat(M[2],",").concat(E*o,")"),e.lineWidth=A,e.setLineDash))switch(F){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=A/4,e.setLineDash([]);break;default:e.setLineDash([]);break}if(O?(e.beginPath(),age(e,G,U,j,H,_)):L?(e.beginPath(),Jit(e,G,U,j,H)):(e.beginPath(),e.rect(G,U,j,H)),z&&e.fill(),$&&e.stroke(),$&&F==="double"){var Q=A/2;e.beginPath(),O?age(e,G+Q,U+Q,j-2*Q,H-2*Q,_):e.rect(G+Q,U+Q,j-2*Q,H-2*Q),e.stroke()}e.fillStyle=R,e.strokeStyle=D,e.lineWidth=I,e.setLineDash&&e.setLineDash([])}var Y=2*t.pstyle("text-outline-width").pfValue;if(Y>0&&(e.lineWidth=Y),t.pstyle("text-wrap").value==="wrap"){var se=Bs(s,"labelWrapCachedLines",r),J=Bs(s,"labelLineHeight",r),re=g/2,ie=this.getLabelJustification(t);switch(ie==="auto"||(T==="left"?ie==="left"?l+=-g:ie==="center"&&(l+=-re):T==="center"?ie==="left"?l+=-re:ie==="right"&&(l+=re):T==="right"&&(ie==="center"?l+=re:ie==="right"&&(l+=g))),C){case"top":u-=(se.length-1)*J;break;case"center":case"bottom":u-=(se.length-1)*J;break}for(var te=0;te0&&e.strokeText(se[te],l,u),e.fillText(se[te],l,u),u+=J}else Y>0&&e.strokeText(d,l,u),e.fillText(d,l,u);w!==0&&(e.rotate(-w),e.translate(-h,-f))}}};Cd={};Cd.drawNode=function(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=t._private,h=u.rscratch,f=t.position();if(!(!Lt(f.x)||!Lt(f.y))&&!(a&&!t.visible())){var d=a?t.effectiveOpacity():1,p=s.usePaths(),g,m=!1,y=t.padding();o=t.width()+2*y,l=t.height()+2*y;var v;r&&(v=r,e.translate(-v.x1,-v.y1));for(var x=t.pstyle("background-image"),T=x.value,C=new Array(T.length),w=new Array(T.length),k=0,E=0;E0&&arguments[0]!==void 0?arguments[0]:_;s.eleFillStyle(e,t,V)},J=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;s.colorStrokeStyle(e,R[0],R[1],R[2],V)},re=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H;s.colorStrokeStyle(e,U[0],U[1],U[2],V)},ie=function(V,le,X,he){var Z=s.nodePathCache=s.nodePathCache||[],Ve=Lge(X==="polygon"?X+","+he.join(","):X,""+le,""+V,""+Y),ve=Z[Ve],Oe,Ae=!1;return ve!=null?(Oe=ve,Ae=!0,h.pathCache=Oe):(Oe=new Path2D,Z[Ve]=h.pathCache=Oe),{path:Oe,cacheHit:Ae}},te=t.pstyle("shape").strValue,xe=t.pstyle("shape-polygon-points").pfValue;if(p){e.translate(f.x,f.y);var fe=ie(o,l,te,xe);g=fe.path,m=fe.cacheHit}var Se=function(){if(!m){var V=f;p&&(V={x:0,y:0}),s.nodeShapes[s.getNodeShape(t)].draw(g||e,V.x,V.y,o,l,Y,h)}p?e.fill(g):e.fill()},Me=function(){for(var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,X=u.backgrounding,he=0,Z=0;Z0&&arguments[0]!==void 0?arguments[0]:!1,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(t)&&(s.drawPie(e,t,le),V&&(p||s.nodeShapes[s.getNodeShape(t)].draw(e,f.x,f.y,o,l,Y,h)))},Ce=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasStripe(t)&&(e.save(),p?e.clip(h.pathCache):(s.nodeShapes[s.getNodeShape(t)].draw(e,f.x,f.y,o,l,Y,h),e.clip()),s.drawStripe(e,t,le),e.restore(),V&&(p||s.nodeShapes[s.getNodeShape(t)].draw(e,f.x,f.y,o,l,Y,h)))},Ie=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,le=(O>0?O:-O)*V,X=O>0?0:255;O!==0&&(s.colorFillStyle(e,X,X,X,le),p?e.fill(g):e.fill())},Pe=function(){if(L>0){if(e.lineWidth=L,e.lineCap=B,e.lineJoin=I,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(F),e.lineDashOffset=z;break;case"solid":case"double":e.setLineDash([]);break}if(M!=="center"){if(e.save(),e.lineWidth*=2,M==="inside")p?e.clip(g):e.clip();else{var V=new Path2D;V.rect(-o/2-L,-l/2-L,o+2*L,l+2*L),V.addPath(g),e.clip(V,"evenodd")}p?e.stroke(g):e.stroke(),e.restore()}else p?e.stroke(g):e.stroke();if(D==="double"){e.lineWidth=L/3;var le=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",p?e.stroke(g):e.stroke(),e.globalCompositeOperation=le}e.setLineDash&&e.setLineDash([])}},pe=function(){if(G>0){if(e.lineWidth=G,e.lineCap="butt",e.setLineDash)switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([]);break}var V=f;p&&(V={x:0,y:0});var le=s.getNodeShape(t),X=L;M==="inside"&&(X=0),M==="outside"&&(X*=2);var he=(o+X+(G+Q))/o,Z=(l+X+(G+Q))/l,Ve=o*he,ve=l*Z,Oe=s.nodeShapes[le].points,Ae;if(p){var Fe=ie(Ve,ve,le,Oe);Ae=Fe.path}if(le==="ellipse")s.drawEllipsePath(Ae||e,V.x,V.y,Ve,ve);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(le)){var Re=0,We=0,De=0;le==="round-diamond"?Re=(X+Q+G)*1.4:le==="round-heptagon"?(Re=(X+Q+G)*1.075,De=-(X/2+Q+G)/35):le==="round-hexagon"?Re=(X+Q+G)*1.12:le==="round-pentagon"?(Re=(X+Q+G)*1.13,De=-(X/2+Q+G)/15):le==="round-tag"?(Re=(X+Q+G)*1.12,We=(X/2+G+Q)*.07):le==="round-triangle"&&(Re=(X+Q+G)*(Math.PI/2),De=-(X+Q/2+G)/Math.PI),Re!==0&&(he=(o+Re)/o,Ve=o*he,["round-hexagon","round-tag"].includes(le)||(Z=(l+Re)/l,ve=l*Z)),Y=Y==="auto"?$ge(Ve,ve):Y;for(var Ye=Ve/2,ue=ve/2,Tt=Y+(X+G+Q)/2,be=new Array(Oe.length/2),it=new Array(Oe.length/2),ft=0;ft0){if(n=n||i.position(),a==null||s==null){var p=i.padding();a=i.width()+2*p,s=i.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,n.x,n.y,a+l*2,s+l*2,d),r.fill()}}}};Cd.drawNodeOverlay=Hme("overlay");Cd.drawNodeUnderlay=Hme("underlay");Cd.hasPie=function(e){return e=e[0],e._private.hasPie};Cd.hasStripe=function(e){return e=e[0],e._private.hasStripe};Cd.drawPie=function(e,t,r,i){t=t[0],i=i||t.position();var n=t.cy().style(),a=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),o=t.pstyle("pie-start-angle").pfValue,l=i.x,u=i.y,h=t.width(),f=t.height(),d=Math.min(h,f)/2,p,g=0,m=this.usePaths();if(m&&(l=0,u=0),a.units==="%"?d=d*a.pfValue:a.pfValue!==void 0&&(d=a.pfValue/2),s.units==="%"?p=d*s.pfValue:s.pfValue!==void 0&&(p=s.pfValue/2),!(p>=d))for(var y=1;y<=n.pieBackgroundN;y++){var v=t.pstyle("pie-"+y+"-background-size").value,x=t.pstyle("pie-"+y+"-background-color").value,T=t.pstyle("pie-"+y+"-background-opacity").value*r,C=v/100;C+g>1&&(C=1-g);var w=1.5*Math.PI+2*Math.PI*g;w+=o;var k=2*Math.PI*C,E=w+k;v===0||g>=1||g+C>1||(p===0?(e.beginPath(),e.moveTo(l,u),e.arc(l,u,d,w,E),e.closePath()):(e.beginPath(),e.arc(l,u,d,w,E),e.arc(l,u,p,E,w,!0),e.closePath()),this.colorFillStyle(e,x[0],x[1],x[2],T),e.fill(),g+=C)}};Cd.drawStripe=function(e,t,r,i){t=t[0],i=i||t.position();var n=t.cy().style(),a=i.x,s=i.y,o=t.width(),l=t.height(),u=0,h=this.usePaths();e.save();var f=t.pstyle("stripe-direction").value,d=t.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":e.rotate(-Math.PI/2);break}var p=o,g=l;d.units==="%"?(p=p*d.pfValue,g=g*d.pfValue):d.pfValue!==void 0&&(p=d.pfValue,g=d.pfValue),h&&(a=0,s=0),s-=p/2,a-=g/2;for(var m=1;m<=n.stripeBackgroundN;m++){var y=t.pstyle("stripe-"+m+"-background-size").value,v=t.pstyle("stripe-"+m+"-background-color").value,x=t.pstyle("stripe-"+m+"-background-opacity").value*r,T=y/100;T+u>1&&(T=1-u),!(y===0||u>=1||u+T>1)&&(e.beginPath(),e.rect(a,s+g*u,p,g*T),e.closePath(),this.colorFillStyle(e,v[0],v[1],v[2],x),e.fill(),u+=T)}e.restore()};ls={},ent=100;ls.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),r=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/r};ls.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],r=!0,i,n=0;nt.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(h[t.NODE]=!0,h[t.SELECT_BOX]=!0);var x=r.style(),T=r.zoom(),C=s!==void 0?s:T,w=r.pan(),k={x:w.x,y:w.y},E={zoom:T,pan:{x:w.x,y:w.y}},A=t.prevViewport,N=A===void 0||E.zoom!==A.zoom||E.pan.x!==A.pan.x||E.pan.y!==A.pan.y;!N&&!(m&&!g)&&(t.motionBlurPxRatio=1),o&&(k=o),C*=l,k.x*=l,k.y*=l;var P=t.getCachedZSortedEles();function O(J,re,ie,te,xe){var fe=J.globalCompositeOperation;J.globalCompositeOperation="destination-out",t.colorFillStyle(J,255,255,255,t.motionBlurTransparency),J.fillRect(re,ie,te,xe),J.globalCompositeOperation=fe}function L(J,re){var ie,te,xe,fe;!t.clearingMotionBlur&&(J===u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||J===u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(ie={x:w.x*p,y:w.y*p},te=T*p,xe=t.canvasWidth*p,fe=t.canvasHeight*p):(ie=k,te=C,xe=t.canvasWidth,fe=t.canvasHeight),J.setTransform(1,0,0,1,0,0),re==="motionBlur"?O(J,0,0,xe,fe):!i&&(re===void 0||re)&&J.clearRect(0,0,xe,fe),n||(J.translate(ie.x,ie.y),J.scale(te,te)),o&&J.translate(o.x,o.y),s&&J.scale(s,s)}if(f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=r.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var _=t.data.bufferContexts[t.TEXTURE_BUFFER];_.setTransform(1,0,0,1,0,0),_.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:_,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult});var E=t.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:t.canvasWidth,height:t.canvasHeight};E.mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}h[t.DRAG]=!1,h[t.NODE]=!1;var R=u.contexts[t.NODE],D=t.textureCache.texture,E=t.textureCache.viewport;R.setTransform(1,0,0,1,0,0),d?O(R,0,0,E.width,E.height):R.clearRect(0,0,E.width,E.height);var I=x.core("outside-texture-bg-color").value,B=x.core("outside-texture-bg-opacity").value;t.colorFillStyle(R,I[0],I[1],I[2],B),R.fillRect(0,0,E.width,E.height);var T=r.zoom();L(R,!1),R.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/l,E.height/E.zoom/l),R.drawImage(D,E.mpan.x,E.mpan.y,E.width/E.zoom/l,E.height/E.zoom/l)}else t.textureOnViewport&&!i&&(t.textureCache=null);var M=r.extent(),F=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),z=t.hideEdgesOnViewport&&F,$=[];if($[t.NODE]=!h[t.NODE]&&d&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,$[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),$[t.DRAG]=!h[t.DRAG]&&d&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,$[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),h[t.NODE]||n||a||$[t.NODE]){var G=d&&!$[t.NODE]&&p!==1,R=i||(G?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]),U=d&&!G?"motionBlur":void 0;L(R,U),z?t.drawCachedNodes(R,P.nondrag,l,M):t.drawLayeredElements(R,P.nondrag,l,M),t.debug&&t.drawDebugPoints(R,P.nondrag),!n&&!d&&(h[t.NODE]=!1)}if(!a&&(h[t.DRAG]||n||$[t.DRAG])){var G=d&&!$[t.DRAG]&&p!==1,R=i||(G?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]);L(R,d&&!G?"motionBlur":void 0),z?t.drawCachedNodes(R,P.drag,l,M):t.drawCachedElements(R,P.drag,l,M),t.debug&&t.drawDebugPoints(R,P.drag),!n&&!d&&(h[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,L),d&&p!==1){var j=u.contexts[t.NODE],H=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],Q=u.contexts[t.DRAG],Y=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],se=function(re,ie,te){re.setTransform(1,0,0,1,0,0),te||!v?re.clearRect(0,0,t.canvasWidth,t.canvasHeight):O(re,0,0,t.canvasWidth,t.canvasHeight);var xe=p;re.drawImage(ie,0,0,t.canvasWidth*xe,t.canvasHeight*xe,0,0,t.canvasWidth,t.canvasHeight)};(h[t.NODE]||$[t.NODE])&&(se(j,H,$[t.NODE]),h[t.NODE]=!1),(h[t.DRAG]||$[t.DRAG])&&(se(Q,Y,$[t.DRAG]),h[t.DRAG]=!1)}t.prevViewport=E,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),d&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,h[t.NODE]=!0,h[t.DRAG]=!0,t.redraw()},ent)),i||r.emit("render")};ls.drawSelectionRectangle=function(e,t){var r=this,i=r.cy,n=r.data,a=i.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=n.canvasNeedsRedraw,u=e.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var h=u||n.contexts[r.SELECT_BOX];if(t(h),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),d=a.core("selection-box-border-width").value/f;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(n.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),p=n.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),h.fill()}var g=r.lastRedrawTime;if(r.showFps&&g){g=Math.round(g);var m=Math.round(1e3/g),y="1 frame = "+g+" ms = "+m+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!ox){var v=h.measureText(y);ox=v.actualBoundingBoxAscent}h.fillText(y,0,ox);var x=60;h.strokeRect(0,ox+10,250,20),h.fillRect(0,ox+10,250*Math.min(m/x,1),20)}o||(l[r.SELECT_BOX]=!1)}};oge=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});gnt=(function(){function e(t,r,i,n){Td(this,e),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=r,this.texRows=i,this.texHeight=Math.floor(r/i),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=n(t,r,r),this.scratch=n(t,r,this.texHeight,"scratch")}return wd(e,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var i=r.w,n=r.h,a=this.texHeight,s=this.texSize,o=a/n,l=i*o,u=n*o;return l>s&&(o=s/i,l=i*o,u=n*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,i,n){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(i),h=u.scale,f=u.texW,d=u.texH,p=function(T,C){if(n&&C){var w=C.context,k=T.x,E=T.row,A=k,N=l*E;w.save(),w.translate(A,N),w.scale(h,h),n(w,i),w.restore()}},g=[null,null],m=function(){p(a.freePointer,a.canvas),g[0]={x:a.freePointer.x,y:a.freePointer.row*l,w:f,h:d},g[1]={x:a.freePointer.x+f,y:a.freePointer.row*l,w:0,h:d},a.freePointer.x+=f,a.freePointer.x==s&&(a.freePointer.x=0,a.freePointer.row++)},y=function(){var T=a.scratch,C=a.canvas;T.clear(),p({x:0,row:0},T);var w=s-a.freePointer.x,k=f-w,E=l;{var A=a.freePointer.x,N=a.freePointer.row*l,P=w;C.context.drawImage(T,0,0,P,E,A,N,P,E),g[0]={x:A,y:N,w:P,h:d}}{var O=w,L=(a.freePointer.row+1)*l,_=k;C&&C.context.drawImage(T,O,0,_,E,0,L,_,E),g[1]={x:0,y:L,w:_,h:d}}a.freePointer.x=k,a.freePointer.row++},v=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+f<=s)m();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(v(),m()):this.enableWrapping?y():(v(),m())}return this.keyToLocation.set(r,g),this.needsBuffer=!0,g}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var i=this.texSize,n=this.texRows,a=this.getScale(r),s=a.texW;return this.freePointer.x+s>i?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=n.forceRedraw,s=a===void 0?!1:a,o=n.filterEle,l=o===void 0?function(){return!0}:o,u=n.filterType,h=u===void 0?function(){return!0}:u,f=!1,d=!1,p=$s(r),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(l(m)){var y=$s(this.renderTypes.values()),v;try{var x=function(){var C=v.value,w=C.type;if(h(w)){var k=i.collections.get(C.collection),E=C.getKey(m),A=Array.isArray(E)?E:[E];if(s)A.forEach(function(L){return k.markKeyForGC(L)}),d=!0;else{var N=C.getID?C.getID(m):m.id(),P=i._key(w,N),O=i.typeAndIdToKey.get(P);O!==void 0&&!snt(A,O)&&(f=!0,i.typeAndIdToKey.delete(P),O.forEach(function(L){return k.markKeyForGC(L)}))}}};for(y.s();!(v=y.n()).done;)x()}catch(T){y.e(T)}finally{y.f()}}}}catch(T){p.e(T)}finally{p.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var r=$s(this.collections.values()),i;try{for(r.s();!(i=r.n()).done;){var n=i.value;n.gc()}}catch(a){r.e(a)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,i,n,a){var s=this.renderTypes.get(i),o=this.collections.get(s.collection),l=!1,u=o.draw(a,n,function(d){s.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,n.w,n.h),d.clip(),s.drawElement(d,r,n,!0,!0),d.restore()):s.drawElement(d,r,n,!0,!0),l=!0});if(l){var h=s.getID?s.getID(r):r.id(),f=this._key(i,h);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return u}},{key:"getAtlasInfo",value:function(r,i){var n=this,a=this.renderTypes.get(i),s=a.getKey(r),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=a.getBoundingBox(r,l),h=n.getOrCreateAtlas(r,i,u,l),f=h.getOffsets(l),d=Rn(f,2),p=d[0],g=d[1];return{atlas:h,tex:p,tex1:p,tex2:g,bb:u}})}},{key:"getDebugInfo",value:function(){var r=[],i=$s(this.collections),n;try{for(i.s();!(n=i.n()).done;){var a=Rn(n.value,2),s=a[0],o=a[1],l=o.getCounts(),u=l.keyCount,h=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:h})}}catch(f){i.e(f)}finally{i.f()}return r}}])})(),bnt=(function(){function e(t){Td(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return wd(e,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,i){return i})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var i=this.batchAtlases.indexOf(r);if(i<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),i=this.batchAtlases.length-1}return i}}])})(),xnt=` + data=`,x.height,` +Parent cluster`,i.height),t.setNode(i.id,x),t.parent(m)||(fe.trace("Setting parent",m,i.id),t.setParent(m,i.id,x))}if(fe.info("(Insert) Node XXX"+m+": "+JSON.stringify(t.node(m))),y?.clusterNode){fe.info("Cluster identified XBX",m,y.width,t.node(m));let{ranksep:x,nodesep:b}=t.graph();y.graph.setGraph({...y.graph.graph(),ranksep:x+25,nodesep:b});let T=await _it({element:h,graph:y.graph,diagramType:r,id:n,parentCluster:t.node(m),siteConfig:a}),k=T.elem;Vt(y,k),y.diff=T.diff||0,fe.info("New compound node after recursive render XAX",m,"width",y.width,"height",y.height),sce(k,y)}else t.children(m).length>0?(fe.trace("Cluster - the non recursive path XBX",m,y.id,y,y.width,"Graph:",t),fe.trace(lg(y.id,t)),Gr.set(y.id,{id:lg(y.id,t),node:y})):(fe.trace("Node - the non recursive path XAX",m,h,t.node(m),s),await $5(h,t.node(m),{config:a,dir:s}))})),await v(async()=>{let m=t.edges().map(async function(y){let x=t.edge(y.v,y.w,y.name);if(fe.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(y)),fe.info("Edge "+y.v+" -> "+y.w+": ",y," ",JSON.stringify(t.edge(y))),fe.info("Fix",Gr,"ids:",y.v,y.w,"Translating: ",Gr.get(y.v),Gr.get(y.w)),d&&x.selfLoop){if(x.selfLoop.order!==1)return;let b={...x.originalEdge,...x,id:x.selfLoop.id,startLabelLeft:x.originalEdge?.startLabelLeft??x.startLabelLeft,startLabelRight:x.originalEdge?.startLabelRight??x.startLabelRight,endLabelLeft:x.originalEdge?.endLabelLeft??x.endLabelLeft,endLabelRight:x.originalEdge?.endLabelRight??x.endLabelRight};await vu(u,b),x.width=b.width,x.height=b.height,x.labelStyle=b.labelStyle;return}await vu(u,x)});await Promise.all(m)},"processEdges")();let{subGraphTitleTotalMargin:g}=Gh(a);return{elem:f,graph:t,groups:{clusters:o,edgePaths:l,edgeLabels:u,nodes:h,rootGroups:f},diagramType:r,id:n,mergeSelfLoops:d,subGraphTitleTotalMargin:g}},"measureDagreGraph"),Mme=v(e=>{fe.info("############################################# XXX"),fe.info("### Layout ### XXX"),fe.info("############################################# XXX"),TT(e)},"runDagreGraphLayout"),Sit=v((e,t,r)=>{let n=e.node(t);if(!n)return;let i={...n};return n?.clusterNode?i.y=(n.y??0)+r:e.children(t).length>0?i.height=(n.height??0)+r:i.y=(n.y??0)+r/2,i},"normalizeDagreNode"),Lme=v((e,t)=>{Tit.forEach(r=>{t[r]!==void 0&&(e[r]=t[r])})},"applyDagreNodeLayout"),Eit=v((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(i=>({...i,y:typeof i.y=="number"?i.y+n:i.y}))}),"normalizeDagreEdge"),Dme=v((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(o=>[o.id,o]));F5(r).forEach(o=>{let l=Sit(r,o,i);if(!l)return;Lme(r.node(o),l);let u=a.get(o);u&&Lme(u,l)});let s=i/2;return e.edges=iP(r,s,{mergeSelfLoops:n}).map(({edge:o,start:l,end:u})=>Eit(o,l,u,s)),e},"applyDagreLayoutResult"),Ait=v(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:i,id:a,mergeSelfLoops:s,subGraphTitleTotalMargin:o})=>{let l=0;await Promise.all(F5(t).map(async function(f){let d=t.node(f);if(fe.info("Position XBX => "+f+": ("+d.x,","+d.y,") width: ",d.width," height: ",d.height),d?.clusterNode)d.y+=o,fe.info("A tainted cluster node XBX1",f,d.id,d.width,d.height,d.x,d.y,t.parent(f)),Gr.get(d.id).node=d,yu(d);else if(t.children(f).length>0){fe.info("A pure cluster node XBX1",f,d.id,d.x,d.y,d.width,d.height,t.parent(f)),d.height+=o,t.node(d.parentId);let p=d?.padding/2||0,g=d?.labelBBox?.height||0,m=g-p||0;fe.debug("OffsetY",m,"labelHeight",g,"halfPadding",p),await wd(r,d),Gr.get(d.id).node=d}else{let p=t.node(d.parentId);d.y+=o/2,fe.info("A regular node XBX1 - using the padding",d.id,"parent",d.parentId,d.width,d.height,d.x,d.y,"offsetY",d.offsetY,"parent",p,p?.offsetY,d),yu(d)}}));let u=o/2;return iP(t,u,{mergeSelfLoops:s}).forEach(function({edge:f,start:d,end:p}){fe.info("Edge "+d+" -> "+p+": "+JSON.stringify(f),f),f.points.forEach(x=>x.y+=u);let g=t.node(d),m=t.node(p),y=Cd(n,f,Gr,i,g,m,a);e1(f,y)}),t.nodes().forEach(function(f){let d=t.node(f);fe.info(f,d.type,d.diff),d.isGroup&&(l=d.diff)}),fe.warn("Returning from recursive render XAX",e,l),{elem:e,diff:l}},"paintDagreLayoutCore"),_it=v(async e=>{let t=await Ime(e);return Mme(t.graph),await Ait(t)},"renderDagreSubgraph"),aP=v(e=>{let t=new Rn({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{t.setNode(r.id,{...r}),r.parentId&&t.setParent(r.id,r.parentId)}),fe.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){let n=r.start,i=n+"---"+n+"---1",a=n+"---"+n+"---2",s=t.node(n);t.setNode(i,{domId:i,id:i,parentId:s.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(i,s.parentId),t.setNode(a,{domId:a,id:a,parentId:s.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(a,s.parentId);let o=structuredClone(r),l=structuredClone(r),u=structuredClone(r),h=structuredClone(r);l.originalEdge=o,l.selfLoop={id:o.id,order:0},u.originalEdge=o,u.selfLoop={id:o.id,order:1},h.originalEdge=o,h.selfLoop={id:o.id,order:2},l.label="",l.arrowTypeEnd="none",l.endLabelLeft="",l.endLabelRight="",l.startLabelLeft="",l.id=n+"-cyclic-special-1",u.startLabelRight="",u.startLabelLeft="",u.endLabelLeft="",u.endLabelRight="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.id=n+"-cyclic-special-mid",h.label="",h.startLabelRight="",h.startLabelLeft="",h.arrowTypeStart="none",s.isGroup&&(l.fromCluster=n,h.toCluster=n),h.id=n+"-cyclic-special-2",h.arrowTypeStart="none",t.setEdge(n,i,l,n+"-cyclic-special-0"),t.setEdge(i,a,u,n+"-cyclic-special-1"),t.setEdge(a,n,h,n+"-cyclic-special-2")}else t.setEdge(r.start,r.end,{...r},r.id)}),T0e(t),{graph:t}},"prepareLayoutForDagre"),Nme=v(async(e,{element:t,preparedLayout:r})=>{let n=r??aP(e),i=ze(),a=await Ime({element:t,graph:n.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return n.measuredLayout=a,a},"measureDagreLayout"),Ome=v((e,t)=>{let r=t.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return Mme(r.graph),Dme(e,r),r},"runDagreLayoutCore"),Rit=v((e,{measure:t})=>F5(t.graph).map(r=>t.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),Lit=v((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),Iit=_1({prepareLayout:aP,measureLayout:Nme,runLayoutCore:Ome,paintOptions:{clusterDb:Gr,getNodes:Rit,getEdgeNode:Lit,skipNode:v((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:v((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})});var C1e={};cr(C1e,{render:()=>Vit});function t3(e){let t=[];for(let r=0;r=1-j5||d<=j5||d>=1-j5?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:d}}function uP(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function Ume(e){let t=[];for(let r=0;r=Math.abs(r)?t>=0?1:0:r>=0?1:0}function Yme(e,t){if(e.length<2)return e.map(a=>({...a}));let r=e.map(a=>({...a})),n=t.arrowTypeStart&&ga[t.arrowTypeStart];if(n){let a=e[0],s=e[1],o=Math.atan2(s.y-a.y,s.x-a.x);r[0].x=a.x+n*Math.cos(o),r[0].y=a.y+n*Math.sin(o)}let i=t.arrowTypeEnd&&ga[t.arrowTypeEnd];if(i){let a=e.length,s=e[a-2],o=e[a-1],l=Math.atan2(o.y-s.y,o.x-s.x);r[a-1].x=o.x-i*Math.cos(l),r[a-1].y=o.y-i*Math.sin(l)}return r}function Xme(e,t,r,n,i){let a=e.point.x,s=e.point.y,o={x:a-t*e.r,y:s-r*e.r},l={x:a+t*e.r,y:s+r*e.r},u=[`L${M1(o)}`];return i==="arc"?u.push(`A${dc(e.r)},${dc(e.r)} 0 0 ${n} ${M1(l)}`):u.push(`M${M1(l)}`),u}function hP(e,t,r,n){let i=t.x-e.x,a=t.y-e.y,s=r.x-t.x,o=r.y-t.y,l=Math.hypot(i,a),u=Math.hypot(s,o);if(l0){let T=hP(i[u-1],i[u],i[u+1]??i[u],$me);T&&(m=T.cutLen)}let y=f,x=null;a&&uT.t-k.t);for(let T of b)T.r=Math.min(T.r,T.d-m,y-T.d);for(let T=0;Tk){let w=k/2;b[T].r=Math.min(b[T].r,w),b[T+1].r=Math.min(b[T+1].r,w)}}for(let T of b)T.r=2?n:null}catch{return null}}function Jme(e,t,r){if(!r.enabled)return;let n=e.node();if(!n)return;let i=new Map;for(let u of t)i.set(u.id,u);let a=[],s=new Map;for(let u of t){let h=typeof CSS<"u"&&CSS.escape?CSS.escape(u.id):u.id,f=n.querySelector(`path[data-id="${h}"]`);if(!f)continue;s.set(u.id,f);let p=Qme(f.getAttribute("data-points"))??u.points;a.push({...u,points:p})}let o=Ume(a);if(o.length===0)return;let l=new Map;for(let u of o){let h=l.get(u.jumpEdgeId)??[];h.push(u),l.set(u.jumpEdgeId,h)}for(let u of a){let h=l.get(u.id);if(!h||h.length===0)continue;let d=i.get(u.id)?.curve;if(d!==void 0&&!Zme(d))continue;let p=s.get(u.id);if(!p)continue;if(d===void 0){let T=p.getAttribute("d")??"";if(!Kme(T))continue}let g=p.getAttribute("style")??"",m=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(g),y=m?Number.parseFloat(m[1]):null,x=m?Number.parseFloat(m[2]):null,b=jme(u,h,r);if(p.setAttribute("d",b),y!==null&&x!==null&&typeof p.getTotalLength=="function"){let T=p.getTotalLength(),k=Math.max(0,T-y-x),w=`0 ${y} ${k} ${x}`,C=g.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${w};`).replace(/;\s*;+/g,";");p.setAttribute("style",C)}}}function eye(e,{measure:t}){let r=e.config?.swimlane?.lineHops;if(r===!1)return;let n=r==="gap"?"gap":"arc",i=e.edges.filter(a=>Array.isArray(a.points)&&a.points.length>=2).map(a=>({id:a.id,points:a.points,curve:a.curve,arrowTypeStart:a.arrowTypeStart,arrowTypeEnd:a.arrowTypeEnd}));Jme(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}function fP(e){return Math.max(e.padding??Fme,Fme)}function tye(e){let{x:t,y:r,width:n,height:i}=e,a=e.swimlaneContentTop;if(typeof t!="number"||typeof r!="number"||typeof n!="number"||typeof i!="number"||typeof a!="number"||!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(i)||!Number.isFinite(a)||n<=0||i<=0){delete e.groupTitleRect;return}let s=r-i/2,o=Math.min(a,r+i/2),l=Math.min(Dit,Math.max(0,o-s)),u=s+l;if(u<=s){delete e.groupTitleRect;return}e.groupTitleRect={left:t-n/2,right:t+n/2,top:s,bottom:u}}function rye(e){let t=e.direction,r=e.nodes??=[];for(let a of e.nodes??[])a.isGroup&&!a.parentId&&(a.shape="swimlane",t&&(a.direction=t));let n=r.filter(a=>!a.isGroup&&!a.parentId);if(n.length===0)return;let i=r.find(a=>a.id===sP);i?i.isGroup&&(i.shape="swimlane",t&&(i.direction=t)):(i={id:sP,label:"",isGroup:!0,shape:"swimlane",padding:20,...t?{direction:t}:{}},r.push(i));for(let a of n)a.parentId=sP}function nye(e){let t=new Map;for(let l of e.nodes??[])t.set(l.id,l);let r=[];for(let l of e.edges??[]){let u=typeof l.start=="string"?l.start:void 0,h=typeof l.end=="string"?l.end:void 0;!u||!h||l.labelNodeId||r.push({id:l.id,src:u,dst:h,ref:l})}let n=e.nodes??[],i=n.filter(l=>l.isGroup),a=n.filter(l=>!l.isGroup);return{nodes:[...[...i].reverse(),...a].map(l=>l.id),edges:r,layout:e,nodeById:t}}function iye(e,t,r,n){let{layout:i}=e,a=e.nodeById,s=n?.layerGap??100,o=n?.nodeGap??40,l=0;for(let d of t.layers){let p=0;for(let g of d){let m=a.get(g);if(!m){p++;continue}m.layer=l,m.order=p;let y=r.x[g]??p*o,x=r.y[g]??l*s;m.x=y,m.y=x,p++}l++}let u=i.nodes??[],h=new Map,f=[];for(let d of u){if(!d?.isGroup)continue;d.parentId||f.push(d);let p=u.filter(b=>b.parentId===d.id),g=1/0,m=-1/0,y=1/0,x=-1/0;for(let b of p){let T=b.x??r.x[b.id],k=b.y??r.y[b.id],w=b.width??0,C=b.height??0;T!=null&&k!=null&&(g=Math.min(g,T-w/2),m=Math.max(m,T+w/2),y=Math.min(y,k-C/2),x=Math.max(x,k+C/2))}if(g===1/0||y===1/0)d.x=d.x??0,d.y=d.y??0,d.width=d.width??0,d.height=d.height??0;else{let b=d.padding??20,T=d.parentId?b:2*fP(d),k=b,w=Math.max(0,m-g)+T,C=Math.max(0,x-y)+k,S=(g+m)/2,E=(y+x)/2;d.x=S,d.y=E,d.width=w,d.height=C,h.set(d.id,{minX:g,maxX:m,minY:y,maxY:x})}}if(f.length>0&&h.size>0){let d=1/0,p=-1/0,g=0;for(let m of f){let y=m.padding??20;y>g&&(g=y);let x=h.get(m.id);x&&(d=Math.min(d,x.minY),p=Math.max(p,x.maxY))}if(d!==1/0&&p!==-1/0){let m=Math.max(0,p-d),x=Math.max(g,36),b=m+2*x,T=(d+p)/2;for(let L of f)L.y=T,L.height=b,L.swimlaneContentTop=d;let k=[...f].sort((L,N)=>{let O=L.x??0,R=N.x??0;return O-R}),w=[],C=[],S=[];for(let L of k){let N=h.get(L.id);if(!N)continue;let O=Math.max(0,N.maxX-N.minX)+2*fP(L),R=(N.minX+N.maxX)/2;w.push(L.id),C.push(R),S.push(O)}let E=w.length;if(E>0){let L=new Map;if(E===1)L.set(w[0],S[0]);else{let N=[];for(let I=0;I0&&i>0?{cx:t,cy:r,rect:D1(t,r,n,i)}:void 0}function WP(e){if(e.isGroup)return;let t=VP(e);return t?{id:String(e.id??""),cx:t.cx,cy:t.cy,rect:t.rect}:void 0}function Ll(e,t,r=Da){return Math.abs(e.x-t.x)r}function Pi(e,t,r=Da){return tn(e,t,r)&&Math.abs(e.y-t.y)>r}function Fs(e,t,r,n){return Math.max(0,Math.min(Math.max(e,t),Math.max(r,n))-Math.max(Math.min(e,t),Math.min(r,n)))}function Ru(e,t,r=Da){return e.horizontal&&t.horizontal&&sn(e.a,t.a,r)?Fs(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&tn(e.a,t.a,r)?Fs(e.a.y,e.b.y,t.a.y,t.b.y):0}function N1(e,t=Da){let r=[];for(let n=0;n0?r[r.length-1]:void 0;(!i||!Ll(i,n,t))&&r.push({x:n.x,y:n.y})}return r}function UP(e,t=Da){if(!e||e.length!==4)return;let[r,n,i,a]=e;return Oi(r,n,t)&&Pi(n,i,t)&&Oi(i,a,t)?{kind:"HVH",p0:r,p1:n,p2:i,p3:a}:Pi(r,n,t)&&Oi(n,i,t)&&Pi(i,a,t)?{kind:"VHV",p0:r,p1:n,p2:i,p3:a}:void 0}function h3(e,t,r,n=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),s=Math.min(e.y,t.y),o=Math.max(e.y,t.y);return a>r.left-n&&ir.top-n&&st.left+r&&e.xt.top+r&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function r3(e,t){return e.leftt.left&&e.topt.top}function dP(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function D1(e,t,r,n){return{left:e-r/2,right:e+r/2,top:t-n/2,bottom:t+n/2}}function To(e){return VP(e)?.rect}function dg(e,t){switch(t){case"top":return{x:e.cx,y:e.rect.top};case"bottom":return{x:e.cx,y:e.rect.bottom};case"left":return{x:e.rect.left,y:e.cy};case"right":return{x:e.rect.right,y:e.cy}}}function YP(e,t,r,n,i,a=Da){let s=t==="left"||t==="right",o=n==="left"||n==="right";if(s&&o){if(t==="right"&&n==="left"&&e.xr.x){if(sn(e,r,a))return[e,r];let f=(e.x+r.x)/2;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}if(t===n){if(sn(e,r,a))return;let f=t==="left"?Math.min(e.x,r.x)-i:Math.max(e.x,r.x)+i;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}return}if(!s&&!o){if(t===n){if(tn(e,r,a))return;let d=t==="top"?Math.min(e.y,r.y)-i:Math.max(e.y,r.y)+i;return[e,{x:e.x,y:d},{x:r.x,y:d},r]}if(!(t==="bottom"&&n==="top"&&e.yr.y))return;if(tn(e,r,a))return[e,r];let f=(e.y+r.y)/2;return[e,{x:e.x,y:f},{x:r.x,y:f},r]}if(s&&!o){let h=t==="right"&&r.x>e.x||t==="left"&&r.xr.y;return h&&f?[e,{x:r.x,y:e.y},r]:void 0}let l=t==="bottom"&&r.y>e.y||t==="top"&&r.yr.x;return l&&u?[e,{x:e.x,y:r.y},r]:void 0}function XP(e,t,r,n){return t==="left"||t==="right"?[e,{x:n,y:e.y},{x:n,y:r.y},r]:[e,{x:e.x,y:n},{x:r.x,y:n},r]}function f3(e){let t=new Map,r=[];for(let n of e){if(n.isEdgeLabel)continue;let i=WP(n);i&&(t.set(i.id,i),r.push({id:i.id,rect:i.rect}))}return{nodeInfoById:t,realNodeRects:r}}function Zd(e){let t=[],r=[];for(let n of e){let i=WP(n);if(!i)continue;let a={id:i.id,rect:i.rect};n.isEdgeLabel?r.push(a):t.push(a)}return{realNodeRects:t,labelNodeRects:r}}function oye(e,{includeEdgeLabels:t=!0}={}){let r=[];for(let n of e){if(n.isGroup||!t&&n.isEdgeLabel)continue;let i=n.x??0,a=n.y??0,s=n.width??0,o=n.height??0;r.push({nodeId:n.id,...D1(i,a,s,o)})}return r}function jP(e,t,r=Da){let n=e.start,i=e.end;if(!n||!i)return;let a=t.get(n),s=t.get(i);if(!(!a||!s))return{srcId:n,dstId:i,srcInfo:a,dstInfo:s,collinearX:Math.abs(a.cx-s.cx)g||dx)return!1;let b=Math.abs(m-h.a.x)i:a&&o&&sn(e,r,i)?Fs(e.x,t.x,r.x,n.x)>i:!1}function n3(e,t,r,n,{epsilon:i=Da,skipDegenerateOther:a=!1}={}){for(let s of r){if(s===n||s.isLayoutOnly)continue;let o=s.points;if(!(!o||o.length<2))for(let l=0;ld+i&&gm+i&&fn+Da&&e=2?t[t.length-2]:void 0,l=(s?tn(s,i):!1)?{x:i.x,y:a.y}:{x:a.x,y:i.y};t.push(l)}t.push(a)}let r=[];for(let n of t){let i=r[r.length-1];(!i||!Ll(i,n))&&r.push(n)}return r}function Lu(e){if(e.length<3)return e;let t=[...e];for(let r=0;r<32;r++){let n=uye(t);if(t=n.points,!n.changed)break}return t}function ZP(e,t,r){let n=e;if(n.isLayoutOnly||!n.points||n.points.length=0&&i=e.length)return e;let a=i-n;if(a<0||a>=e.length)return e;let s=hye(e[i],e[a],t);return r?[s,...e.slice(i)]:[...e.slice(0,i+1),s]}function fye(e,t){for(let r of e){let n=ZP(r,t,2);if(!n)continue;let i=[...n.points];n.srcRect&&(i=gP(i,n.srcRect,!0)),n.dstRect&&(i=gP(i,n.dstRect,!1)),i=Lu(i3(i)),i=QP(i,n.srcRect,n.dstRect),n.edge.points=Lu(i3(i))}}function mP(e,t,r,n=!1){if(sn(e,t,_r)){if(t.yr.bottom+_r)return t;if(n){if(e.xr.right+_r)return{x:r.right,y:e.y}}return{x:Math.abs(t.x-r.left)<=Math.abs(t.x-r.right)?r.left:r.right,y:e.y}}if(tn(e,t,_r)){if(t.xr.right+_r)return t;if(n){if(e.yr.bottom+_r)return{x:e.x,y:r.bottom}}let i=Math.abs(t.y-r.top)<=Math.abs(t.y-r.bottom);return{x:e.x,y:i?r.top:r.bottom}}return t}function a3(e,t,r){let n=e[t];for(let i=t+r;i>=0&&in.lo)),r=Math.min(...e.map(n=>n.hi));if(!(t>r))return{lo:t,hi:r}}function vP(e,t){return t==="left"||t==="right"?s3(e.top,e.bottom):s3(e.left,e.right)}function o3(e,t,r){let n=e.y>=r.top-_r&&e.y<=r.bottom+_r,i=e.x>=r.left-_r&&e.x<=r.right+_r;if(sn(e,t,_r)&&n){if(Math.abs(e.x-r.left)<_r)return"left";if(Math.abs(e.x-r.right)<_r)return"right"}if(tn(e,t,_r)&&i){if(Math.abs(e.y-r.top)<_r)return"top";if(Math.abs(e.y-r.bottom)<_r)return"bottom"}}function wT(e){return e==="left"||e==="right"}function pye(e,t,r,n,i){let a=[],s=r?o3(e,t,r):void 0,o=n?o3(t,e,n):void 0;return r&&s&&wT(s)===i&&a.push(vP(r,s)),n&&o&&wT(o)===i&&a.push(vP(n,o)),a.length>0?dye(a):void 0}function xP(e,t,r,n,i){let a=pye(e,t,r,n,i);if(!a)return;let s=i?e.y:e.x,o=Math.min(a.hi,Math.max(a.lo,s));if(!(Math.abs(o-s)<_r))return i?[{x:e.x,y:o},{x:t.x,y:o}]:[{x:o,y:e.y},{x:o,y:t.y}]}function QP(e,t,r){if(e.length!==2)return e;let[n,i]=e;return sn(n,i,_r)?xP(n,i,t,r,!0)??e:tn(n,i,_r)?xP(n,i,t,r,!1)??e:e}function gye(e,t,r){return wT(r)?{x:e.x,y:yP(e.y,t.top,t.bottom)}:{x:yP(e.x,t.left,t.right),y:e.y}}function mye(e,t,r,n,i,a){let s=e.map(o=>({...o}));for(let o=t;o>=0&&o=r.left-_r&&Math.max(e.x,t.x)<=r.right+_r,i=Math.min(e.y,t.y)>=r.top-_r&&Math.max(e.y,t.y)<=r.bottom+_r;if(Math.abs(e.y-r.top)<_r&&Math.abs(t.y-r.top)<_r&&n)return"top";if(Math.abs(e.y-r.bottom)<_r&&Math.abs(t.y-r.bottom)<_r&&n)return"bottom";if(Math.abs(e.x-r.left)<_r&&Math.abs(t.x-r.left)<_r&&i)return"left";if(Math.abs(e.x-r.right)<_r&&Math.abs(t.x-r.right)<_r&&i)return"right"}function wP(e,t,r,n){switch(e){case"top":return tn(t,r,_r)&&r.yn.bottom+_r;case"left":return sn(t,r,_r)&&r.xn.right+_r}}function CP(e,t,r){if(e.length<3)return e;if(r){let a=TP(e[0],e[1],t);return a&&wP(a,e[1],e[2],t)?e.slice(1):e}let n=e.length-1,i=TP(e[n-1],e[n],t);return i&&wP(i,e[n-1],e[n-2],t)?e.slice(0,n):e}function yye(e,t,r){let n=e;if(t){let a=a3(n,0,1);if(a){let s=mP(a,n[0],t);s!==n[0]&&(n=[s,...n.slice(1)])}n=CP(n,t,!0)}if(r){let a=n.length-1,s=a3(n,a,-1);if(s){let o=mP(s,n[a],r,!0);o!==n[a]&&(n=[...n.slice(0,a),o])}n=CP(n,r,!1)}let i=QP(n,t,r);return i!==n||n.length===2?i:(t&&(n=bP(n,t,!0)),r&&(n=bP(n,r,!1)),n)}function kP(e,t){for(let r of e){let n=ZP(r,t,2);if(!n)continue;let i=hn(n.points,_r),a=yye(i,n.srcRect,n.dstRect);if(a.length<3){n.edge.points=a;continue}let s=[a[0],{...a[0]},...a.slice(1,-1),a[a.length-1],{...a[a.length-1]}];n.edge.points=s}}function JP(e){return new Map(e.map(t=>[t.id,t]))}function vye(e,t){let r=e.parentId,n=null;for(;r;){let i=t.get(r);if(!i?.isGroup)break;n=i.id,r=i.parentId}return n}function SP(e,t){let r=0,n=e.parentId;for(;n;){let i=t.get(n);if(!i?.isGroup)break;r++,n=i.parentId}return r}function eB(e){let t=1/0,r=-1/0,n=1/0,i=-1/0;for(let a of e){let s=a.x,o=a.y;if(typeof s!="number"||typeof o!="number")continue;let l=a.width??0,u=a.height??0;t=Math.min(t,s-l/2),r=Math.max(r,s+l/2),n=Math.min(n,o-u/2),i=Math.max(i,o+u/2)}return t===1/0||n===1/0?null:{minX:t,maxX:r,minY:n,maxY:i}}function xye(e,t){let r=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+r,e.height=Math.max(0,t.maxY-t.minY)+r}function bye(e){let t=JP(e),r=e.filter(n=>n.isGroup&&n.parentId).sort((n,i)=>SP(i,t)-SP(n,t));for(let n of r){let i=e.filter(s=>s.parentId===n.id),a=eB(i);a&&xye(n,a)}}function l3(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(l=>!l.isGroup),a=1/0,s=-1/0;for(let l of i){let u=l[t];typeof u=="number"&&(a=Math.min(a,u),s=Math.max(s,u))}if(!Number.isFinite(a)||!Number.isFinite(s))return!1;let o=v(l=>a+s-l,"mirror");for(let l of r){let u=l[t];typeof u=="number"&&(l[t]=o(u));let h=l.groupTitleRect;h&&(l.groupTitleRect=t==="x"?{...h,left:o(h.right),right:o(h.left)}:{...h,top:o(h.bottom),bottom:o(h.top)})}for(let l of n)for(let u of l.points??[])u[t]=o(u[t]);return!0}function Tye(e){return(e.nodes??[]).some(r=>!r.isGroup)?l3(e,"y"):!0}function wye(e,t="LR"){let r=e.nodes??[],n=e.edges??[],i=r.filter(_=>!_.isGroup),a=1/0,s=1/0;for(let _ of i){let D=_.x??0,I=_.y??0;D0?Math.max(1,h/f):1;for(let _ of i){let D=_.x??0,M=((_.y??0)-s)*d+o,B=D-a;_.x=M,_.y=B}for(let _ of n)if(_.points)for(let D of _.points){let I=D.x,B=(D.y-s)*d+o,P=I-a;D.x=B,D.y=P}bye(r);let p=r.filter(_=>_.isGroup&&!_.parentId);if(p.length===0)return t==="RL"&&l3(e,"x"),!0;let g=JP(r),m=new Map;for(let _ of r){if(_.isGroup)continue;let D=vye(_,g);if(!D)continue;let I=m.get(D)??[];I.push(_),m.set(D,I)}let y=0;for(let _ of p){let D=_.padding??0;D>y&&(y=D)}let x=[],b=1/0,T=-1/0;for(let _ of p){let D=m.get(_.id)??[],I=eB(D);I&&(b=Math.min(b,I.minX),T=Math.max(T,I.maxX),x.push({lane:_,contentTop:I.minY,contentBottom:I.maxY,centerY:(I.minY+I.maxY)/2}))}if(b===1/0||T===-1/0)return!0;let k=Math.max(0,T-b),w=Math.max(y,10),C=k+2*w,S=o+C,N=(b+T)/2-C/2-o,O=N+S/2,R=Math.max(y,o);x.sort((_,D)=>_.centerY-D.centerY);for(let _=0;_d.cy?x.bottom:x.top,R=d.cx+b;if(R<=x.left+fc||R>=x.right-fc)continue;T={x:R,y:O},k={x:R,y:o.y},w={x:o.x,y:o.y}}else{let O=p.cx>d.cx?x.right:x.left,R=d.cy+b;if(R<=x.top+fc||R>=x.bottom-fc)continue;T={x:O,y:R},k={x:o.x,y:R},w={x:o.x,y:o.y}}let C=Ll(T,k,fc),S=Ll(k,w,fc);if(C&&S||!C&&Hi(T,k,n,[h],1)||!S&&Hi(k,w,n,[f],1))continue;let E=!C&&n3(T,k,e,i,{epsilon:fc,skipDegenerateOther:!0}),L=!S&&n3(k,w,e,i,{epsilon:fc,skipDegenerateOther:!0});if(!(E||L)){C?y=[k,w]:S?y=[T,k]:y=[T,k,w];break}}y&&(i.points=y)}}function kye(e,t){let{realNodeRects:a,labelNodeRects:s}=Zd(t.values());for(let o of e){if(o.isLayoutOnly)continue;let l=o.points;if(!l||l.length<4)continue;let u=hn(l,.001);if(u.length<4)continue;let h=u.length-1,f=u[h],d=u[h-1],p=u[h-2],g=f.x-d.x,m=f.y-d.y,y=Math.hypot(g,m);if(y>=10||y<.001)continue;let x=d.x-p.x,b=d.y-p.y;if(Math.hypot(x,b)<.001)continue;let k=Oi(d,f,.001),w=Pi(d,f,.001),C=Oi(p,d,.001),S=Pi(p,d,.001);if(!(k&&S||w&&C))continue;let E=o.end,L=o.start,N=E?t.get(E):void 0;if(!N)continue;let O=N.x??0,R=N.y??0,_=To(N);if(!_)continue;let D,I;if(S){let z=b<0;D={x:O,y:p.y},I={x:O,y:z?_.bottom:_.top}}else{let z=x>0;D={x:p.x,y:R},I={x:z?_.right:_.left,y:R}}if(Hi(D,I,a,E?[E]:[],-2)||Hi(D,I,s,[],-2))continue;if(L){let z=t.get(L),V=z?To(z):void 0;if(V&&HP(D,V,2))continue}let M=v((z,V)=>`${z.x.toFixed(3)},${z.y.toFixed(3)}|${V.x.toFixed(3)},${V.y.toFixed(3)}`,"ownSegmentKey"),B=new Set;for(let z=0;z{for(let j of e){if(j===o||j.isLayoutOnly)continue;let ee=j.points;if(!(!ee||ee.length<2))for(let ne=0;ne=0){let z=u[h-3],V=[L,E].filter(j=>!!j);if(Hi(z,D,a,V,-2)||P(z,D))continue}let G=[...u.slice(0,h-2),D,I];o.points=G;let q=o.labelNodeId;if(q){let z=t.get(q);if(z){let V=z.width??0,j=z.height??0;if(V>0&&j>0){let ee,ne,Q=-1;for(let pe=0;pe=V+2||Re&&ce>=j+2)&&ce>Q&&(Q=ce,ee=(te.x+de.x)/2,ne=(te.y+de.y)/2)}ee!==void 0&&ne!==void 0&&(z.x=ee,z.y=ne)}}}}}function Sye(e,t){let i=v((p,g)=>{let m=p.x??0,y=p.y??0,x=g.x-m,b=g.y-y,T=(p.width??0)/2,k=(p.height??0)/2;return Math.abs(b)*T>Math.abs(x)*k?(b<0&&(k=-k),{x:m+(b===0?0:k*x/b),y:y+k}):(x<0&&(T=-T),{x:m+T,y:y+(x===0?0:T*b/x)})},"rectIntersect"),a=v((p,g)=>{let m=hn(p.points??[]);if(m.length<2)return;let y=g?p.start:p.end,x=y?t.get(y):void 0,b=x?To(x):void 0;if(!x||!y||!b)return;let T=g?m[0]:m[m.length-1],k=g?m[1]:m[m.length-2],w=i(x,T),C=T;if(oP(k,w)&&(C=k),tn(w,C,Kt))return{edge:p,edgeId:String(p.id??""),nodeId:y,atStart:g,orientation:"V",coord:w.x,min:Math.min(w.y,C.y),max:Math.max(w.y,C.y),boundary:w,railEnd:C,rect:b};if(sn(w,C,Kt))return{edge:p,edgeId:String(p.id??""),nodeId:y,atStart:g,orientation:"H",coord:w.y,min:Math.min(w.x,C.x),max:Math.max(w.x,C.x),boundary:w,railEnd:C,rect:b}},"terminalLaneFor"),s=v((p,g)=>Math.max(0,Math.min(p.max,g.max)-Math.max(p.min,g.min)),"projectedOverlapLength"),o=v((p,g)=>p.nodeId!==g.nodeId||p.orientation!==g.orientation?!1:p.orientation==="H"?(Math.abs(p.boundary.x-p.rect.left)<1||Math.abs(p.boundary.x-p.rect.right)<1)&&tn(p.boundary,g.boundary,1):(Math.abs(p.boundary.y-p.rect.top)<1||Math.abs(p.boundary.y-p.rect.bottom)<1)&&sn(p.boundary,g.boundary,1),"sameTerminalFace"),l=v((p,g)=>p.nodeId!==g.nodeId||p.orientation!==g.orientation?!1:s(p,g)>=Ma&&Math.abs(p.coord-g.coord)<.5,"exactTerminalLaneConflict"),u=v((p,g)=>{if(p.nodeId!==g.nodeId||p.orientation!==g.orientation||p.orientation!=="H"||p.atStart===g.atStart)return!1;let m=s(p,g);if(m2*y?!1:o(p,g)&&Math.abs(p.coord-g.coord)<16},"nearTerminalLaneConflict"),h=v((p,g)=>{let m=hn(p.edge.points??[]);if(m.length<2)return;let y=p.orientation==="V"?{x:p.boundary.x+g,y:p.boundary.y}:{x:p.boundary.x,y:p.boundary.y+g},x=p.orientation==="V"?{x:p.railEnd.x+g,y:p.railEnd.y}:{x:p.railEnd.x,y:p.railEnd.y+g};if(!v(()=>Math.abs(p.boundary.y-p.rect.top)<1||Math.abs(p.boundary.y-p.rect.bottom)<1?sn(y,p.boundary,Kt)&&y.x>=p.rect.left+1&&y.x<=p.rect.right-1:Math.abs(p.boundary.x-p.rect.left)<1||Math.abs(p.boundary.x-p.rect.right)<1?tn(y,p.boundary,Kt)&&y.y>=p.rect.top+1&&y.y<=p.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(p.atStart){let C=m.length>1&&Ll(m[1],p.railEnd,Kt),S=m.slice(C?2:1),E=S[0];return E&&!oP(E,x)?void 0:[y,x,...S]}let T=m.length>1&&Ll(m[m.length-2],p.railEnd,Kt),k=m.slice(0,T?-2:-1),w=k[k.length-1];if(!(w&&!oP(w,x)))return[...k,x,y]},"shiftedCandidate"),f=v(p=>{let g=p.edge,m=hn(g.points??[]);if(m.length!==2)return!1;let y=g.start,x=g.end,b=y?t.get(y):void 0,T=x?t.get(x):void 0;if(!b||!T)return!1;let k=b.x??0,w=b.y??0,C=T.x??0,S=T.y??0,[E,L]=m;return sn(E,L,Kt)&&Math.abs(w-S)<1&&Math.abs(k-C)>1||tn(E,L,Kt)&&Math.abs(k-C)<1&&Math.abs(w-S)>1},"laneIsStraightCollinearConnector"),d=[-7,7,-14,14,-21,21];for(let p=0;p<8;p++){let g=e.filter(y=>!y.isLayoutOnly).flatMap(y=>[a(y,!0),a(y,!1)]).filter(y=>!!y),m=!1;for(let y=0;y{let E=f(C),L=f(S);return E!==L?Number(E)-Number(L):+!S.atStart-+!C.atStart});for(let C of w){for(let S of d){let E=h(C,S);if(!E)continue;let L=a({...C.edge,points:E},C.atStart);if(!(!L||g.some(N=>N.edge!==C.edge&&(l(L,N)||k&&u(L,N))))){C.edge.points=E,m=!0;break}}if(m)break}}if(!m)return}}function Eye(e,t){let{realNodeRects:i,labelNodeRects:a}=Zd(t.values()),s=v((l,u)=>{let h=l.start,f=l.end,d=Yr(u);if(d.length!==u.length-1)return!1;let p=[h,f].filter(g=>!!g);for(let g of d)if(Hi(g.a,g.b,i,p,-2)||Hi(g.a,g.b,a,[],-2))return!1;for(let g of e){if(g===l||g.isLayoutOnly)continue;let m=g.points;if(!(!m||m.length<2)){for(let y of d)for(let x of Yr(hn(m)))if(Ru(y,x,.5)>=Ma||jh(y.a,y.b,x.a,x.b,Kt))return!1}}return!0},"candidateIsSafe"),o=v((l,u)=>{if(u+4>=l.length)return;let h=l[u],f=l[u+1],d=l[u+2],p=l[u+3],g=l[u+4],m=Oi(h,f)&&Pi(f,d)&&Oi(d,p)&&Pi(p,g)&&tn(h,p,Kt)&&tn(h,g,Kt)&&tn(f,d,Kt)&&(f.x-h.x)*(p.x-d.x)<0,y=Pi(h,f)&&Oi(f,d)&&Pi(d,p)&&Oi(p,g)&&sn(h,p,Kt)&&sn(h,g,Kt)&&sn(f,d,Kt)&&(f.y-h.y)*(p.y-d.y)<0;if(m||y)return hn([...l.slice(0,u+1),g,...l.slice(u+5)]);if(u+5>=l.length)return;let x=l[u+5],b=Pi(h,f)&&Oi(f,d)&&Pi(d,p)&&Oi(p,g)&&Pi(g,x)&&tn(h,g,Kt)&&tn(h,x,Kt)&&tn(d,p,Kt)&&(d.x-f.x)*(g.x-p.x)<0,T=Oi(h,f)&&Pi(f,d)&&Oi(d,p)&&Pi(p,g)&&Oi(g,x)&&sn(h,g,Kt)&&sn(h,x,Kt)&&sn(d,p,Kt)&&(d.y-f.y)*(g.y-p.y)<0;if(!(!b&&!T))return hn([...l.slice(0,u+1),x,...l.slice(u+6)])},"withoutDogleg");for(let l=0;l<8;l++){let u=!1;for(let h of e){if(h.isLayoutOnly)continue;let f=hn(h.points??[]);for(let d=0;d<=f.length-5;d++){let p=o(f,d);if(!(!p||!s(h,p))){h.points=p,u=!0;break}}if(u)break}if(!u)return}}function EP(e,t){let{realNodeRects:a,labelNodeRects:s}=Zd(t.values()),o=e.filter(g=>!g.isLayoutOnly),l=v((g,m,y)=>hn(g===m?y??[]:g.points??[]),"pointsFor"),u=v((g,m)=>{let y=0;for(let x=0;x{let m=Yr(g);if(m.length!==3)return;let y=m[1];if(!(m[0].horizontal===y.horizontal||m[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),f=v((g,m)=>{let y=[g.start,g.end].filter(x=>!!x);return a.filter(x=>{if(y.includes(x.id))return!1;let b=x.rect;return m.horizontal?Fs(m.a.x,m.b.x,b.left,b.right)>=Ma&&m.a.y>=b.top-2&&m.a.y<=b.bottom+2:Fs(m.a.y,m.b.y,b.top,b.bottom)>=Ma&&m.a.x>=b.left-2&&m.a.x<=b.right+2})},"blockingRectsFor"),d=v((g,m,y)=>{let x=g.map(T=>({...T}));if(m.horizontal)x[m.index].y=y,x[m.index+1].y=y;else if(m.vertical)x[m.index].x=y,x[m.index+1].x=y;else return;let b=Lu(hn(x));return Yr(b).length===b.length-1?b:void 0},"candidateByMovingRail"),p=v((g,m,y)=>{let x=[g.start,g.end].filter(T=>!!T),b=Yr(m);if(b.length!==m.length-1)return!1;for(let T of b)if(Hi(T.a,T.b,a,x,-2)||Hi(T.a,T.b,s,[],-2))return!1;for(let T of o)if(T!==g){for(let k of b)for(let w of Yr(l(T)))if(Ru(k,w,.5)>=Ma)return!1}return u(g,m)<=y},"candidateIsSafe");for(let g=0;g<8;g++){let m=u(),y=!1;for(let x of o){let b=l(x),T=h(b);if(!T)continue;let k=f(x,T.segment);if(k.length===0)continue;let w=T.horizontal?[Math.min(...k.map(C=>C.rect.top))-20,Math.max(...k.map(C=>C.rect.bottom))+20]:[Math.min(...k.map(C=>C.rect.left))-20,Math.max(...k.map(C=>C.rect.right))+20];for(let C of w){let S=d(b,T.segment,C);if(!(!S||!p(x,S,m))){x.points=S,y=!0;break}}if(y)break}if(!y)return}}function AP(e,t){let n=v(l=>{let u=l.groupTitleRect;if(!(!u||typeof u.left!="number"||typeof u.right!="number"||typeof u.top!="number"||typeof u.bottom!="number"||!Number.isFinite(u.left)||!Number.isFinite(u.right)||!Number.isFinite(u.top)||!Number.isFinite(u.bottom)||u.right<=u.left||u.bottom<=u.top))return{left:u.left,right:u.right,top:u.top,bottom:u.bottom}},"validTitleRect"),i=v(l=>{if(!l.isGroup||l.parentId)return;let u=l.direction,h=typeof u=="string"?u.toUpperCase():"";if(h==="LR"||h==="RL"||h==="BT")return;let f=n(l),d=l.y,p=l.height;if(!f||typeof d!="number"||typeof p!="number"||!Number.isFinite(d)||!Number.isFinite(p)||p<=0)return;let g=f.right-f.left,m=f.bottom-f.top;if(!(m<=0||g{if(!l.horizontal)return!1;let h=l.a.y;return h<=u.top+Kt||h>=u.bottom-Kt?!1:Fs(l.a.x,l.b.x,u.left,u.right)>=Ma},"horizontalSegmentIntersectsTitle"),s=[...t.values()].map(i).filter(l=>!!l);if(s.length===0)return;let o=0;for(let l of e){if(l.isLayoutOnly)continue;let u=hn(l.points??[]);for(let h of Yr(u))for(let f of s)a(h,f.rect)&&(o=Math.max(o,f.rect.bottom-h.a.y+4))}if(!(o<=Kt))for(let l of s){let u=l.node.y,h=l.node.height;typeof u!="number"||typeof h!="number"||!Number.isFinite(u)||!Number.isFinite(h)||h<=0||(l.node.y=u-o/2,l.node.height=h+o,l.node.groupTitleRect={...l.rect,top:l.rect.top-o,bottom:l.rect.bottom-o})}}function _P(e,t){let n=v(u=>{let h=u.groupTitleRect;if(!(!h||typeof h.left!="number"||typeof h.right!="number"||typeof h.top!="number"||typeof h.bottom!="number"||!Number.isFinite(h.left)||!Number.isFinite(h.right)||!Number.isFinite(h.top)||!Number.isFinite(h.bottom)||h.right<=h.left||h.bottom<=h.top))return{left:h.left,right:h.right,top:h.top,bottom:h.bottom}},"validTitleRect"),i=v(u=>{if(!u.isGroup||u.parentId||u.direction!=="LR")return;let f=n(u),d=u.x,p=u.width;if(!f||typeof d!="number"||typeof p!="number"||!Number.isFinite(d)||!Number.isFinite(p)||p<=0)return;let g=f.right-f.left,m=f.bottom-f.top;if(!(g<=0||m{if(!u.vertical)return!1;let f=u.a.x;return f<=h.left+Kt||f>=h.right-Kt?!1:Fs(u.a.y,u.b.y,h.top,h.bottom)>=Ma},"verticalSegmentIntersectsTitle"),s=v((u,h)=>{if(!u.horizontal)return!1;let f=u.a.y;return f<=h.top+Kt||f>=h.bottom-Kt?!1:Fs(u.a.x,u.b.x,h.left,h.right)>=Ma},"horizontalSegmentIntersectsTitle"),o=[...t.values()].map(i).filter(u=>!!u);if(o.length===0)return;let l=0;for(let u of e){if(u.isLayoutOnly)continue;let h=hn(u.points??[]);for(let f of Yr(h))for(let d of o)if(a(f,d.rect))l=Math.max(l,d.rect.right-f.a.x+4);else if(s(f,d.rect)){let p=Math.min(f.a.x,f.b.x);l=Math.max(l,d.rect.right-p+4)}}if(!(l<=Kt))for(let u of o){let h=u.node.x,f=u.node.width;typeof h!="number"||typeof f!="number"||!Number.isFinite(h)||!Number.isFinite(f)||f<=0||(u.node.x=h-l/2,u.node.width=f+l,u.node.groupTitleRect={...u.rect,left:u.rect.left-l,right:u.rect.right-l})}}function Aye(e,t){let{realNodeRects:i}=Zd(t.values()),a=e.filter(m=>!m.isLayoutOnly),s=v((m,y=new Map)=>hn(y.get(m)??m.points??[]),"replacementPointsFor"),o=v((m=new Map)=>{let y=0;for(let x=0;xa.reduce((y,x)=>y+nl(s(x,m)),0),"totalBends"),u=v(m=>{let y=s(m);if(y.length<4)return;let x=y[y.length-2],b=y[y.length-1];if(!(!Oi(x,b,Kt)&&!Pi(x,b,Kt)))return{tailStart:x,terminal:b}},"terminalTailFor"),h=v((m,y)=>{let x=s(m);if(x.length<3)return;let b=x[0],T=x[1],k;if(Oi(b,T,Kt))k={x:T.x,y:y.tailStart.y};else if(Pi(b,T,Kt))k={x:y.tailStart.x,y:T.y};else return;let w=Lu(hn([b,T,k,y.tailStart,y.terminal]));return Yr(w).length===w.length-1?w:void 0},"candidateWithDestinationTail"),f=v((m,y)=>{let x=[m.start,m.end].filter(b=>!!b);for(let b of Yr(y))if(Hi(b.a,b.b,i,x,-2))return!0;return!1},"pathHasNodeHit"),d=v((m,y,x)=>{for(let b of a)if(b!==m){for(let T of Yr(y))for(let k of Yr(s(b,x)))if(Ru(T,k,.5)>=Ma)return!0}return!1},"pathHasSharedTrack"),p=v((m,y,x)=>!f(m,y)&&!d(m,y,x),"candidateIsSafe"),g=v(()=>{let m=new Map;for(let y of a){let x=y.end;if(!x||!t.has(x)||s(y).length<4)continue;let T=m.get(x)??[];T.push(y),m.set(x,T)}return m},"edgesByDestination");for(let m=0;m<4;m++){let y=o();if(y===0)return;let x=l(),b,T=y,k=x;for(let w of g().values())for(let C=0;C=y||I>T||I===T&&M>=k||(b=D,T=I,k=M)}if(!b)return;for(let[w,C]of b)w.points=C}}function _ye(e,t){let{realNodeRects:s,labelNodeRects:o}=Zd(t.values()),l=e.filter(w=>!w.isLayoutOnly),u=v((w,C=new Map)=>hn(C.get(w)??w.points??[]),"replacementPointsFor"),h=v((w=new Map)=>{let C=0;for(let S=0;Sl.reduce((C,S)=>C+nl(u(S,w)),0),"totalBends"),d=v(w=>{let C=w.start,S=w.end,E=C?t.get(C):void 0,L=S?t.get(S):void 0,N=E?To(E):void 0,O=L?To(L):void 0;return N&&O?{src:N,dst:O}:void 0},"endpointRectsFor"),p=v((w,C,S)=>{if(S.index<=0||S.index+1>=C.length-1)return;let E=d(w);if(E){if(S.vertical){let L=S.a.x,N=Math.min(E.src.left,E.dst.left),O=Math.max(E.src.right,E.dst.right),R=LO+Kt?"right":void 0;return R?{edge:w,points:C,segmentIndex:S.index,axis:"vertical",side:R,coord:L,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){let L=S.a.y,N=Math.min(E.src.top,E.dst.top),O=Math.max(E.src.bottom,E.dst.bottom),R=LO+Kt?"bottom":void 0;return R?{edge:w,points:C,segmentIndex:S.index,axis:"horizontal",side:R,coord:L,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),g=v(()=>{let w=[];for(let C of l){let S=u(C);for(let E of Yr(S)){let L=p(C,S,E);L&&w.push(L)}}return w},"collectExternalRails"),m=v((w,C)=>w.edge!==C.edge&&w.axis===C.axis&&w.side===C.side&&Fs(w.min,w.max,C.min,C.max)>=Ma,"railsInteract"),y=v(w=>{let C=[],S=new Set;for(let E of w){if(S.has(E))continue;let L=[E],N=[];for(S.add(E);L.length>0;){let O=L.pop();N.push(O);for(let R of w)!S.has(R)&&m(O,R)&&(S.add(R),L.push(R))}N.length>1&&C.push(N)}return C},"connectedComponents"),x=v(w=>{let C=[];for(let S of w)C.some(E=>Math.abs(E-S.coord){let C=w.map(L=>L.coord),S=x(w),E=[];if(w.length<=6){let L=new Array(S.length).fill(!1),N=[],O=v(()=>{if(N.length===w.length){N.some((R,_)=>Math.abs(R-C[_])>=Kt)&&E.push([...N]);return}for(let[R,_]of S.entries())L[R]||(L[R]=!0,N.push(_),O(),N.pop(),L[R]=!1)},"visit");return O(),E}for(let L=0;L{let S=new Map;for(let[L,N]of w.entries()){let O=C[L],R=S.get(N.edge)??N.points.map(_=>({x:_.x,y:_.y}));N.axis==="vertical"?(R[N.segmentIndex].x=O,R[N.segmentIndex+1].x=O):(R[N.segmentIndex].y=O,R[N.segmentIndex+1].y=O),S.set(N.edge,R)}let E=new Map;for(let[L,N]of S){let O=Lu(hn(N));if(Yr(O).length!==O.length-1)return;E.set(L,O)}return E},"replacementsForAssignment"),k=v(w=>{for(let[C,S]of w){let E=[C.start,C.end].filter(L=>!!L);for(let L of Yr(S))if(Hi(L.a,L.b,s,E,-2)||Hi(L.a,L.b,o,[],-2))return!1}for(let C=0;C=Ma)return!1}}return!0},"candidateIsSafe");for(let w=0;w<4;w++){let C=h();if(C===0)return;let S,E=C,L=f(),N=Number.POSITIVE_INFINITY;for(let O of y(g()))for(let R of b(O)){let _=T(O,R);if(!_||!k(_))continue;let D=h(_);if(D>=C)continue;let I=f(_),M=O.reduce((B,P,$)=>B+Math.abs(R[$]-P.coord),0);D>E||D===E&&(I>L||I===L&&M>=N)||(S=_,E=D,L=I,N=M)}if(!S)return;for(let[O,R]of S)O.points=R}}function Rye(e,t){let{realNodeRects:i,labelNodeRects:a}=Zd(t.values()),s=e.filter(g=>!g.isLayoutOnly),o=v((g,m,y)=>hn(g===m?y??[]:g.points??[]),"pointsFor"),l=v(g=>Yr(g).reduce((m,y)=>{let x=y.a.x-y.b.x,b=y.a.y-y.b.y;return m+Math.hypot(x,b)},0),"pathLength"),u=v((g,m)=>{let y=0;for(let x=0;x{if(g.horizontal){let y=g.a.y;return(Math.abs(y-m.top)<1||Math.abs(y-m.bottom)<1)&&Fs(g.a.x,g.b.x,m.left,m.right)>=Ma}if(g.vertical){let y=g.a.x;return(Math.abs(y-m.left)<1||Math.abs(y-m.right)<1)&&Fs(g.a.y,g.b.y,m.top,m.bottom)>=Ma}return!1},"segmentRunsAlongRectBorder"),f=v(g=>{let m=[g.start,g.end].filter(x=>!!x),y=[];for(let x of m){let b=t.get(x),T=b?To(b):void 0;T&&y.push(T)}return y},"endpointRectsFor"),d=v((g,m)=>{if(m+3>=g.length)return[];let y=g[m],x=g[m+1],b=g[m+2],T=g[m+3],k=Oi(y,x,Kt)&&Pi(x,b,Kt)&&Oi(b,T,Kt),w=Pi(y,x,Kt)&&Oi(x,b,Kt)&&Pi(b,T,Kt);if(!k&&!w)return[];if(!(k?Math.sign(x.x-y.x)!==Math.sign(T.x-b.x):Math.sign(x.y-y.y)!==Math.sign(T.y-b.y)))return[];let S=tn(y,T,Kt)||sn(y,T,Kt)?[]:[{x:y.x,y:T.y},{x:T.x,y:y.y}],E=S.length===0?[[...g.slice(0,m+1),...g.slice(m+3)]]:S.map(N=>[...g.slice(0,m+1),N,...g.slice(m+3)]),L=new Set;return E.map(N=>Lu(hn(N))).filter(N=>{if(Yr(N).length!==N.length-1||!N.some(R=>Ll(R,T,Kt)))return!1;let O=N.map(R=>`${R.x.toFixed(3)},${R.y.toFixed(3)}`).join("|");return L.has(O)?!1:(L.add(O),!0)})},"shortcutCandidatesAt"),p=v((g,m,y)=>{let x=[g.start,g.end].filter(T=>!!T),b=f(g);for(let T of Yr(m))if(Hi(T.a,T.b,i,x,-2)||Hi(T.a,T.b,a,[],-2)||b.some(k=>h(T,k)))return!1;for(let T of s)if(T!==g){for(let k of Yr(m))for(let w of Yr(o(T)))if(Ru(k,w,.5)>=Ma)return!1}return u(g,m)<=y},"candidateIsSafe");for(let g=0;g<8;g++){let m=u(),y,x,b=m,T=Number.POSITIVE_INFINITY,k=Number.POSITIVE_INFINITY;for(let w of s){let C=o(w),S=nl(C,Kt),E=l(C);for(let L=0;L<=C.length-4;L++)for(let N of d(C,L)){let O=nl(N,Kt),R=l(N);if(!(Ob||D===b&&(O>T||O===T&&R>=k)||(y=w,x=N,b=D,T=O,k=R)}}if(!y||!x)return;y.points=x}}function Lye(e,t){let s=[];for(let me of t.values()){if(me.isGroup||me.isEdgeLabel)continue;let De=me.x??0,Ie=me.y??0,Me=To(me);Me&&s.push({id:String(me.id??""),cx:De,cy:Ie,rect:Me})}if(s.length===0)return;let o=new Map(s.map(me=>[me.id,me])),l=s.map(me=>({id:me.id,rect:me.rect})),u=["top","bottom","left","right"],h={top:Math.min(...s.map(me=>me.rect.top))-20,bottom:Math.max(...s.map(me=>me.rect.bottom))+20,left:Math.min(...s.map(me=>me.rect.left))-20,right:Math.max(...s.map(me=>me.rect.right))+20},f=e.filter(me=>!me.isLayoutOnly),d=new Map(f.map((me,De)=>[me,De])),p=v(me=>{let De=me==="left"||me==="top"?-1:1,Ie=[];for(let Me=0;Me<=2;Me++)Ie.push(h[me]+De*20*Me);return Ie},"outwardTracksForSide"),g=v((me,De=new Map)=>hn(De.get(me)??me.points??[]),"replacementPointsFor"),m=v((me,De)=>{let Ie=0;for(let Me of me)for(let re of De)jh(Me.a,Me.b,re.a,re.b,Kt)&&Ie++;return Ie},"crossingCountBetweenSegments"),y=v((me,De)=>m(Yr(me),Yr(De)),"crossingCountBetweenPaths"),x=v((me=new Map)=>{let De=0,Ie=[],Me=new Set,re=[],le=v(oe=>{Me.has(oe)||(Me.add(oe),re.push(oe))},"addEdge");for(let oe=0;oe0&&(De+=H,Ie.push({first:he,second:F,count:H}),le(he),le(F))}}return re.sort((oe,he)=>(d.get(oe)??0)-(d.get(he)??0)),{count:De,pairs:Ie,edgeSet:Me,edges:re}},"crossingSnapshot"),b=v((me,De)=>{let Ie=new Set(De.keys());if(Ie.size===0)return me.count;let Me=0;for(let le of me.pairs)(Ie.has(le.first)||Ie.has(le.second))&&(Me+=le.count);let re=0;for(let le=0;le{let De=new Map;for(let re of me.pairs){let le=De.get(re.first)??new Set;le.add(re.second),De.set(re.first,le);let oe=De.get(re.second)??new Set;oe.add(re.first),De.set(re.second,oe)}let Ie=[],Me=new Set;for(let re of me.edges){if(Me.has(re))continue;let le=[re],oe=[];for(Me.add(re);le.length>0;){let he=le.pop();oe.push(he);for(let xe of De.get(he)??[])Me.has(xe)||(Me.add(xe),le.push(xe))}oe.sort((he,xe)=>(d.get(he)??0)-(d.get(xe)??0)),oe.length>1&&Ie.push(oe)}return Ie},"crossingComponents"),k=v(me=>[me.start,me.end].filter(De=>!!De),"endpointIdsFor"),w=v(me=>{let De=[];for(let Ie of T(me)){let Me=new Set(Ie),re=new Set(Ie.flatMap(oe=>k(oe))),le=[...Ie];for(let oe of f)Me.has(oe)||k(oe).some(he=>re.has(he))&&le.push(oe);le.sort((oe,he)=>(d.get(oe)??0)-(d.get(he)??0)),De.push(le)}return De},"pairSearchGroups"),C=v((me,De,Ie)=>b(me,new Map([[De,Ie]])),"crossingCountWithSingleReplacement"),S=v(me=>{let De=new Map;for(let Ie of me.pairs)De.set(Ie.first,(De.get(Ie.first)??0)+Ie.count),De.set(Ie.second,(De.get(Ie.second)??0)+Ie.count);return De},"currentCrossingsByEdge"),E=v(me=>me.slice(1).reduce((De,Ie,Me)=>{let re=me[Me];return De+Math.abs(Ie.x-re.x)+Math.abs(Ie.y-re.y)},0),"pathLength"),L=v((me=new Map)=>f.reduce((De,Ie)=>De+nl(g(Ie,me)),0),"totalBends"),N=v((me=new Map)=>f.reduce((De,Ie)=>De+E(g(Ie,me)),0),"totalLength"),O=v((me,De,Ie=new Map)=>{let Me=Yr(De);for(let re of f)if(re!==me){for(let le of Me)for(let oe of Yr(g(re,Ie)))if(Ru(le,oe,.5)>=Ma)return!0}return!1},"pathHasSegmentConflict"),R=v((me,De)=>{let Ie=[me.start,me.end].filter(Me=>!!Me);for(let Me of Yr(De))if(Hi(Me.a,Me.b,l,Ie,-2))return!0;return!1},"pathHitsNode"),_=v((me,De)=>{let Ie=Lu(hn(De));Yr(Ie).length===Ie.length-1&&me.push(Ie)},"pushOrthogonalCandidate"),D=v(me=>me==="left"||me==="right","sideIsHorizontal"),I=v((me,De,Ie)=>{switch(De){case"left":return Math.min(me.x,Ie.x)-20;case"right":return Math.max(me.x,Ie.x)+20;case"top":return Math.min(me.y,Ie.y)-20;case"bottom":return Math.max(me.y,Ie.y)+20}},"localTrackForSameSide"),M=v((me,De,Ie,Me)=>{let re=Ie==="left"||Ie==="top"?-1:1,le=[I(De,Ie,Me),h[Ie]];for(let oe of le)for(let he=0;he<=2;he++)_(me,XP(De,Ie,Me,oe+re*20*he))},"addSameSideCandidates"),B=v((me,De,Ie,Me,re)=>{for(let le of p(Ie))for(let oe of p(re))_(me,[De,{x:le,y:De.y},{x:le,y:oe},{x:Me.x,y:oe},Me])},"addHorizontalToVerticalCandidates"),P=v((me,De,Ie,Me,re)=>{for(let le of p(Ie))for(let oe of p(re))_(me,[De,{x:De.x,y:le},{x:oe,y:le},{x:oe,y:Me.y},Me])},"addVerticalToHorizontalCandidates"),$=v((me,De,Ie,Me,re)=>{let le=[...p("top"),...p("bottom")];for(let oe of p(Ie))for(let he of p(re))for(let xe of le)_(me,[De,{x:oe,y:De.y},{x:oe,y:xe},{x:he,y:xe},{x:he,y:Me.y},Me])},"addHorizontalPairCandidates"),G=v((me,De,Ie,Me,re)=>{let le=[...p("left"),...p("right")];for(let oe of p(Ie))for(let he of p(re))for(let xe of le)_(me,[De,{x:De.x,y:oe},{x:xe,y:oe},{x:xe,y:he},{x:Me.x,y:he},Me])},"addVerticalPairCandidates"),q=v(me=>{let De=new Set;return me.map(Ie=>hn(Ie)).filter(Ie=>{let Me=Ie.map(re=>`${re.x.toFixed(3)},${re.y.toFixed(3)}`).join("|");return De.has(Me)||Ie.length<2?!1:(De.add(Me),!0)})},"dedupeCandidatePaths"),z=v((me,De,Ie,Me)=>{let re=[],le=YP(me,De,Ie,Me,20,Kt);le&&_(re,le),De===Me&&M(re,me,De,Ie);let oe=D(De),he=D(Me);return oe&&!he?B(re,me,De,Ie,Me):!oe&&he?P(re,me,De,Ie,Me):oe?$(re,me,De,Ie,Me):G(re,me,De,Ie,Me),q(re)},"buildCandidatesForSides"),V=v((me,De,Ie,Me)=>{let re=[...p("left"),...p("right")],le=[...p("top"),...p("bottom")];for(let oe of u){let he=dg(Me,oe),xe=oe==="top"||oe==="bottom"?p(oe):le;for(let se of re){_(me,[De,Ie,{x:se,y:Ie.y},{x:se,y:he.y},he]);for(let F of xe)_(me,[De,Ie,{x:se,y:Ie.y},{x:se,y:F},{x:he.x,y:F},he])}}},"addVerticalDepartureOuterTrackCandidates"),j=v((me,De,Ie,Me)=>{let re=[...p("left"),...p("right")],le=[...p("top"),...p("bottom")];for(let oe of u){let he=dg(Me,oe),xe=oe==="left"||oe==="right"?p(oe):re;for(let se of le){_(me,[De,Ie,{x:Ie.x,y:se},{x:he.x,y:se},he]);for(let F of xe)_(me,[De,Ie,{x:Ie.x,y:se},{x:F,y:se},{x:F,y:he.y},he])}}},"addHorizontalDepartureOuterTrackCandidates"),ee=v(me=>{let De=me.start,Ie=me.end,Me=Ie?o.get(Ie):void 0;if(!De||!Me)return[];let re=hn(me.points??[]);if(re.length<4)return[];let le=re[0],oe=re[1],he=[];return Pi(le,oe,Kt)?V(he,le,oe,Me):Oi(le,oe,Kt)&&j(he,le,oe,Me),he},"terminalPreservingOuterTrackCandidates"),ne=v(me=>{let De=me.start,Ie=me.end,Me=De?o.get(De):void 0,re=Ie?o.get(Ie):void 0;if(!Me||!re)return[];let le=[];for(let oe of u){let he=dg(Me,oe);for(let xe of u)le.push(...z(he,oe,dg(re,xe),xe))}return le.push(...ee(me)),le},"candidatePathsFor"),Q=v(()=>new Map(f.map(me=>[me,Yr(g(me))])),"currentSegmentsByEdge"),pe=v((me,De,Ie)=>{let Me=new Set;for(let re of f){if(re===me)continue;let le=Ie.get(re)??Yr(g(re));De.some(oe=>le.some(he=>Ru(oe,he,.5)>=Ma))&&Me.add(re)}return Me},"sharedTrackConflictsFor"),te=v((me,De,Ie,Me)=>{let re=new Set;return ne(me).map(oe=>Lu(hn(oe))).filter(oe=>{if(R(me,oe))return!1;let he=oe.map(xe=>`${xe.x.toFixed(3)},${xe.y.toFixed(3)}`).join("|");return re.has(he)||oe.length<2?!1:(re.add(he),!0)}).map(oe=>{let he=Yr(oe),xe=0;for(let se of f)se!==me&&(xe+=m(he,Ie.get(se)??Yr(g(se))));return{candidate:oe,candidateSegments:he,crossings:De.count-(Me.get(me)??0)+xe,bends:nl(oe,Kt),totalBends:nl(oe),length:E(oe)}}).filter(({crossings:oe})=>oe<=De.count).sort((oe,he)=>oe.crossings-he.crossings||oe.bends-he.bends||oe.length-he.length).slice(0,48).map(oe=>({path:oe.candidate,segments:oe.candidateSegments,sharedTrackConflicts:pe(me,oe.candidateSegments,Ie),totalBends:oe.totalBends,length:oe.length}))},"pairCandidatesFor"),de=v((me,De,Ie,Me,re,le)=>{let oe=0;for(let xe of me.pairs)(xe.first===De||xe.second===De||xe.first===Me||xe.second===Me)&&(oe+=xe.count);let he=m(Ie.segments,re.segments);for(let xe of f){if(xe===De||xe===Me)continue;let se=le.get(xe)??Yr(g(xe));he+=m(Ie.segments,se)+m(re.segments,se)}return me.count-oe+he},"pairCrossingCount"),ce=v((me,De)=>{for(let Ie of me.sharedTrackConflicts)if(Ie!==De)return!1;return!0},"conflictsOnlyWith"),ue=v((me,De)=>me.segments.some(Ie=>De.segments.some(Me=>Ru(Ie,Me,.5)>=Ma)),"candidatesShareTrack"),Re=v((me,De,Ie,Me)=>ce(De,Ie.edge)&&ce(Me,me.edge)&&!ue(De,Me),"pairCandidatesAreCompatible"),ve=v((me,De,Ie,Me,re)=>{let le=de(me.current,De.edge,Ie,Me.edge,re,me.baseSegments);if(!(le>=me.current.count))return{replacements:new Map([[De.edge,Ie.path],[Me.edge,re.path]]),crossings:le,bends:me.currentBends-(me.baseBendsByEdge.get(De.edge)??0)-(me.baseBendsByEdge.get(Me.edge)??0)+Ie.totalBends+re.totalBends,length:me.currentLength-(me.baseLengthByEdge.get(De.edge)??0)-(me.baseLengthByEdge.get(Me.edge)??0)+Ie.length+re.length}},"scorePairReplacement"),Ge=v((me,De)=>me.crossings{let re=Me;for(let le of De.candidates)for(let oe of Ie.candidates){if(!Re(De,le,Ie,oe))continue;let he=ve(me,De,le,Ie,oe);he&&Ge(he,re)&&(re=he)}return re},"bestScoreForOptionPair"),Ue=v(me=>{let De=L(),Ie=N(),Me=Q(),re=S(me),le=new Map(f.map(H=>[H,nl(g(H))])),oe=new Map(f.map(H=>[H,E(g(H))])),he=new Map,xe=w(me);for(let H of xe)for(let W of H){if(he.has(W))continue;let U=te(W,me,Me,re);U.length>0&&he.set(W,{edge:W,candidates:U})}let se={replacements:new Map,crossings:me.count,bends:De,length:Ie},F={current:me,currentBends:De,currentLength:Ie,baseBendsByEdge:le,baseLengthByEdge:oe,baseSegments:Me};for(let H of xe){let W=new Set(H.filter(ae=>me.edgeSet.has(ae))),U=H.map(ae=>he.get(ae)).filter(ae=>!!ae);for(let ae=0;ae0?se.replacements:void 0},"bestPairedReplacement");for(let me=0;me<4;me++){let De=x(),Ie=De.count;if(Ie===0)return;let Me,re,le=Ie,oe=Number.POSITIVE_INFINITY;for(let xe of De.edges){let se=nl(g(xe),Kt);for(let F of ne(xe)){let H=R(xe,F),W=!H&&O(xe,F),U=C(De,xe,F),ae=nl(F,Kt);H||W||!(Ule||U===le&&ae>=oe||(Me=xe,re=F,le=U,oe=ae)}}if(Me&&re){Me.points=re;continue}let he=Ue(De);if(!he)return;for(let[xe,se]of he)xe.points=se}}function Iye(e,t){let{nodeInfoById:r,realNodeRects:n}=f3(t),i=["top","bottom","left","right"],a=20,s={top:Math.min(...n.map(m=>m.rect.top))-a,bottom:Math.max(...n.map(m=>m.rect.bottom))+a,left:Math.min(...n.map(m=>m.rect.left))-a,right:Math.max(...n.map(m=>m.rect.right))+a},o=v((m,y,x,b)=>{let T=[],k=YP(m,y,x,b,a,Kd);return k&&T.push(k),y===b&&T.push(XP(m,y,x,s[y])),T},"buildOrthogonalPathCandidates"),l=v((m,y)=>{for(let x=0;x{let b=0,T=N1(m,Kd),k=y.start,w=y.end;for(let C of e){if(C===y||C.isLayoutOnly)continue;let S=C.start,E=C.end;if(!x&&k&&w&&(S===k||S===w||E===k||E===w))continue;let L=C.points;if(!(!L||L.length<2))for(let N of T)for(let O of N1(L,Kd)){if(KP(N.a,N.b,O.a,O.b,Kd,Kd)){b++;continue}Ru(N,O,Kd)>=$it&&b++}}return b},"pathConflictCount"),h=4,f=v((m,y)=>{let x=Math.abs(m.y-y.rect.top),b=Math.abs(m.y-y.rect.bottom),T=Math.abs(m.x-y.rect.left),k=Math.abs(m.x-y.rect.right),w="top",C=x;return b{let b=d.get(m)??[];b.push({side:y,edgeId:x}),d.set(m,b)},"addFaceClaim");for(let m of e){if(m.isLayoutOnly)continue;let y=m.points??[];if(y.length<1)continue;let x=m.id??"",b=m.start,T=m.end;if(b){let k=r.get(b);k&&p(b,f(y[0],k),x)}if(T){let k=r.get(T);k&&p(T,f(y[y.length-1],k),x)}}let g=v((m,y,x)=>d.get(m)?.some(b=>b.edgeId!==x&&b.side===y)??!1,"faceIsClaimed");for(let m of e){if(m.isLayoutOnly)continue;let y=m.points;if(!y||y.length<2)continue;let x=nl(y,Kd);if(x0){let P=u(M,m,!0);if(P>N||P===N&&B>=O)continue;N=P,O=B,L=M;continue}u(M,m)>E||BD.edgeId!==C));let _=d.get(T);_&&d.set(T,_.filter(D=>D.edgeId!==C)),p(b,f(L[0],k),C),p(T,f(L[L.length-1],w),C)}}}function RP(e,t){let r=t?0:e.length-1,n=t?1:-1,i=e[r],a=e[r+n];if(!i||!a)return;let s=a.x-i.x,o=a.y-i.y;if(!(Math.abs(s)+Math.abs(o)a&&r3(e,Mye(a)))}function J5(e,t){let r=[];for(let g of e){if(g.isLayoutOnly)continue;let m=g.points;if(!(!m||m.length<2))for(let y=0;y{let y=dP(m,a);for(let{nodeId:x,rect:b}of n)if(x!==g&&r3(y,b))return!0;return!1},"labelOverlapsForeignNode"),u=v((g,m)=>{let y=dP(m,a);for(let x of r)if(x.edgeId!==g&&h3(x.p1,x.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),h=v((g,m,y)=>l(g,y)||u(m,y),"labelOverlapsAnything"),f=[],d=v(g=>{for(let{id:m,rect:y}of i)if(sye(y,g))return m},"findContainingLane"),p=v((g,m)=>f.some(y=>y.labelId!==g&&r3(m,y.rect)),"overlapsPlacedLabel");for(let g of e){if(g.isLayoutOnly)continue;let m=g.labelNodeId;if(!m)continue;let y=t.get(m);if(!y)continue;let x=g.points;if(!x||x.length<2)continue;let b=y.width??0,T=y.height??0;if(b<=0||T<=0)continue;let k=[];for(let q=0;q=bo&&ee>=bo||k.push({idx:q,length:j+ee,orientation:j>=bo?"horizontal":"vertical",midX:(z.x+V.x)/2,midY:(z.y+V.y)/2})}if(k.length===0)continue;let w=k.length>=3?k.filter(q=>q.idx>0&&q.idx0?w:k,S=b>=T?"horizontal":"vertical",E=v(q=>[...q].sort((z,V)=>{let j=z.orientation===S,ee=V.orientation===S;if(j!==ee)return j?-1:1;let ne=z.length>=(z.orientation==="horizontal"?b:T)+2,Q=V.length>=(V.orientation==="horizontal"?b:T)+2;return ne!==Q?ne?-1:1:V.length-z.length}),"rankSegments"),L=k[0],N=k[k.length-1],O=[.5,.25,.75,.05,.95,.15,.85,.1,.9],R=v((q,z)=>{let V=x[q.idx],j=x[q.idx+1];return{midX:V.x+(j.x-V.x)*z,midY:V.y+(j.y-V.y)*z}},"anchorAtT"),_=v((q,z,V)=>Math.min(V,Math.max(z,q)),"clamp"),D=v((q,z)=>q.midX>=z.left-bo&&q.midX<=z.right+bo&&q.midY>=z.top-bo&&q.midY<=z.bottom+bo,"pointInsideRectInclusive"),I=v(q=>{let z=D1(q.midX,q.midY,b,T),V=d(z);if(V)return{laneId:V,anchor:q,rect:z};let j=i.find(({rect:ce})=>D(q,ce));if(!j)return;let ee=j.rect.left+b/2+s,ne=j.rect.right-b/2-s,Q=j.rect.top+T/2+s,pe=j.rect.bottom-T/2-s;if(ee>ne||Q>pe)return;let te={midX:_(q.midX,ee,ne),midY:_(q.midY,Q,pe)},de=D1(te.midX,te.midY,b,T);return D(q,de)?{laneId:j.id,anchor:te,rect:de}:void 0},"placementForAnchor"),M=v((q,z,V)=>q.orientation==="horizontal"?Math.abs(z.midX-V.x):Math.abs(z.midY-V.y),"distanceAlongSegment"),B=v((q,z)=>{let j=(q.orientation==="horizontal"?b/2:T/2)+o;if(q===L){let ee=x[q.idx];if(M(q,z,ee)+bo{let z=E(q);for(let V of z)for(let j of O){let ee=R(V,j);if(!B(V,ee))continue;let ne=I(ee);if(ne&&!LP(ne.rect,x)&&!p(m,ne.rect)&&!h(m,g.id,ne.rect))return{laneId:ne.laneId,anchor:ne.anchor}}},"tryPool"),$=v((q,z,V=!1)=>{let j=E(q);for(let ee of j){let ne={midX:ee.midX,midY:ee.midY};if(z&&!B(ee,ne))continue;let Q=I(ne);if(Q&&!LP(Q.rect,x)&&!p(m,Q.rect)&&!l(m,Q.rect)&&(V||!u(g.id,Q.rect)))return{laneId:Q.laneId,anchor:Q.anchor}}},"findLaneContainingFallback"),G=P(C)??(C.lengthV.labelId===m);z>=0?f[z]={labelId:m,rect:q}:f.push({labelId:m,rect:q})}}}function IP(e,t){return e{let h=IP(o,l),f=0,d=v(p=>{if(!p)return;let g=i.get(p);if(!g)return;let m=u==="x"?g.w/2:g.h/2;m>f&&(f=m)},"consider");d(s.labelNodeId);for(let p of e){if(p===s||p.isLayoutOnly)continue;let g=p.start,m=p.end;!g||!m||IP(g,m)===h&&d(p.labelNodeId)}return f>0?f+zit:0},"labelClearanceFor");for(let s of e){if(s.isLayoutOnly)continue;let o=s.points;if(!UP(o,lP))continue;let l=jP(s,r,lP);if(!l)continue;let{srcId:u,dstId:h,srcInfo:f,dstInfo:d,collinearX:p,collinearY:g}=l;if(p===g)continue;let m,y;if(p){let w=d.cy>f.cy;m={x:f.cx,y:w?f.rect.bottom:f.rect.top},y={x:d.cx,y:w?d.rect.top:d.rect.bottom}}else{let w=d.cx>f.cx;m={x:w?f.rect.right:f.rect.left,y:f.cy},y={x:w?d.rect.left:d.rect.right,y:d.cy}}if(Hi(m,y,n,[u,h],1))continue;let b=a(s,u,h,p?"x":"y"),T=b>qme?b:qme,k=[0,T,-T];for(let w of k){let C={...m},S={...y};if(p){if(C.x+=w,S.x+=w,C.x<=f.rect.left||C.x>=f.rect.right||S.x<=d.rect.left||S.x>=d.rect.right)continue}else if(C.y+=w,S.y+=w,C.y<=f.rect.top||C.y>=f.rect.bottom||S.y<=d.rect.top||S.y>=d.rect.bottom)continue;if(!Hi(C,S,n,[u,h],1)&&!n3(C,S,e,s,{epsilon:lP})){s.points=[C,S];break}}}}function MP(e,t){let{realNodeRects:u,labelNodeRects:h}=Zd(t.values()),f=v((C,S)=>N1(S,.001).map(E=>({...E,edge:C,interior:E.index>=1&&E.index<=S.length-3})),"segmentsFor"),d=v(()=>{let C=[];for(let S of e){if(S.isLayoutOnly)continue;let E=S.points;!E||E.length<2||C.push(...f(S,hn(E)))}return C},"allSegments"),p=v((C,S)=>C.horizontal&&S.horizontal?Fs(C.a.x,C.b.x,S.a.x,S.b.x)>=8&&Math.abs(C.a.y-S.a.y)<7:C.vertical&&S.vertical?Fs(C.a.y,C.b.y,S.a.y,S.b.y)>=8&&Math.abs(C.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),g=v((C,S)=>{let E=C.start,L=C.end,N=f(C,S);if(N.length!==S.length-1)return!1;let O=[E,L].filter(_=>!!_),R=C.labelNodeId?[C.labelNodeId]:[];for(let _ of N)if(Hi(_.a,_.b,u,O,-2)||Hi(_.a,_.b,h,R,-2))return!1;for(let _ of e){if(_===C||_.isLayoutOnly)continue;let D=_.points;if(!(!D||D.length<2)){for(let I of N)for(let M of f(_,hn(D)))if(p(I,M)||jh(I.a,I.b,M.a,M.b,.001))return!1}}return!0},"candidateIsSafe"),m=v((C,S)=>{let E=hn(C.edge.points??[]);if(E.length<4||C.index>=E.length-1)return;let L=E.map(N=>({...N}));if(C.horizontal)L[C.index].y+=S,L[C.index+1].y+=S;else if(C.vertical)L[C.index].x+=S,L[C.index+1].x+=S;else return;return f(C.edge,L).length===L.length-1?L:void 0},"shiftedCandidate"),y=v((C,S)=>({x:C.x??(S.left+S.right)/2,y:C.y??(S.top+S.bottom)/2}),"nodeCenter"),x=v(C=>{let S=C.edge,E=hn(S.points??[]);if(E.length!==4||C.index!==1)return;let L=S.start?t.get(S.start):void 0,N=S.end?t.get(S.end):void 0,O=L?To(L):void 0,R=N?To(N):void 0,_=E.slice(C.index+2);if(!(!L||!N||!O||!R||_.length===0))return{sourceCenter:y(L,O),targetCenter:y(N,R),sourceRect:O,tail:_}},"sourceDetourContextFor"),b=v((C,S,E,L,N,O)=>{let R=L.y>=E.y,_=R?N.bottom:N.top,D=_+(R?20:-20);if(R&&C.b.y<=D+.001||!R&&C.b.y>=D-.001)return;let I=C.a.x+S;return hn([{x:E.x,y:_},{x:E.x,y:D},{x:I,y:D},{x:I,y:C.b.y},...O],.001)},"verticalSourceDetour"),T=v((C,S,E,L,N,O)=>{let R=L.x>=E.x,_=R?N.right:N.left,D=_+(R?20:-20);if(R&&C.b.x<=D+.001||!R&&C.b.x>=D-.001)return;let I=C.a.y+S;return hn([{x:_,y:E.y},{x:D,y:E.y},{x:D,y:I},{x:C.b.x,y:I},...O],.001)},"horizontalSourceDetour"),k=v((C,S)=>{let E=x(C);if(E){if(C.vertical)return b(C,S,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail);if(C.horizontal)return T(C,S,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail)}},"sourceDetourCandidate"),w=[-7,7,-14,14,-21,21];for(let C=0;C<12;C++){let S=d(),E=!1;for(let L=0;LD.interior);for(let D of _){for(let I of w){let M=m(D,I);if(M&&g(D.edge,M)){D.edge.points=M,E=!0;break}let B=k(D,I);if(B&&g(D.edge,B)){D.edge.points=B,E=!0;break}}if(E)break}}if(!E)return}}function Nye(e,t,r,n){let i=t.x-e.x,a=t.y-e.y,s=n.x-r.x,o=n.y-r.y,l=i*o-a*s;if(Math.abs(l)<1e-10)return!1;let u=r.x-e.x,h=r.y-e.y,f=(u*o-h*s)/l,d=(u*a-h*i)/l,p=.01;return f>p&&f<1-p&&d>p&&d<1-p}function Oye(e){let t=e.nodes??[],r=e.edges??[],n=[];if(!r.length||!t.length)return n;let i=oye(t),a=1,s=[];for(let l of r){if(l.isLayoutOnly)continue;let u=l.points;if(!u||u.length<2)continue;let h=l.start,f=l.end,d=l.labelNodeId,p=l.id??`${h}->${f}`;for(let g of i)if(!(g.nodeId===h||g.nodeId===f)&&!(d&&g.nodeId===d)){for(let m=0;m0){let l=n.filter(h=>h.type==="edge-node-overlap").length,u=n.filter(h=>h.type==="edge-edge-crossing").length;fe.warn(`[SWIMLANE_VALIDATE] ${n.length} issue(s) detected: ${l} edge-node overlap(s), ${u} edge crossing(s)`);for(let h of n)fe.warn(`[SWIMLANE_VALIDATE] ${h.type}: ${h.detail}`)}return n}function Pye(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(o=>!o.isGroup);if((t==="LR"||t==="RL")&&i.length>0&&!wye(e,t)||t==="BT"&&i.length>0&&!Tye(e))return;for(let o of n){if(o.isLayoutOnly)continue;let l=o.points;!l||l.length<2||(o.points=Lu(i3(l)))}Iye(n,r),Dye(n,r),Cye(n,r);let a=new Map;for(let o of r)a.set(String(o.id),o);J5(n,a),fye(n,a),kye(n,a),MP(n,a),Sye(n,a),Eye(n,a),EP(n,a),Aye(n,a);let s=v(()=>{Lye(n,a),_ye(n,a),Rye(n,a),J5(n,a),kP(n,a),EP(n,a),J5(n,a),kP(n,a)},"finalizeRenderedEdges");s(),MP(n,a),s(),AP(n,a),_P(n,a),AP(n,a),_P(n,a)}function Qd(e){let t=new Map(e.nodeById),r=new Set,n=[];for(let a of e.edges){if(!t.has(a.src)||!t.has(a.dst))continue;let s=`${a.id}:${a.src}->${a.dst}`;r.has(s)||(r.add(s),n.push(a))}return{nodes:[...t.keys()],edges:n,layout:e.layout,nodeById:t}}function tB(e,t){return e.edges.filter(r=>r.dst===t)}function Bye(e){let t=new Map;for(let r of e.nodes)t.set(r,[]);for(let r of e.edges)t.get(r.src).push(r.dst);return t}function rB(e){let t=Bye(e);for(let r of t.values())r.sort((n,i)=>n.localeCompare(i));return t}function nB(e){let t=new Map;for(let r of e.nodes)t.set(r,0);for(let r of e.edges)t.set(r.dst,(t.get(r.dst)??0)+1);return t}function iB(e){return[...e.entries()].filter(([,t])=>t===0).map(([t])=>t).sort((t,r)=>t.localeCompare(r))}function d3(e,t=()=>!0){let r=new Map,n=new Map;for(let i of e.nodes)r.set(i,[]),n.set(i,[]);for(let i of e.edges)t(i)&&(n.get(i.src).push(i.dst),r.get(i.dst).push(i.src));return{preds:r,succs:n}}function aB(e,t,r,n){let i=0;for(let s of e.nodes)n?.skipGroups&&e.nodeById.get(s)?.isGroup||(i=Math.max(i,r[s]??0));let a=Array.from({length:i+1},()=>[]);for(let s of t)n?.skipGroups&&e.nodeById.get(s)?.isGroup||a[Math.max(0,r[s]??0)].push(s);return a}function CT(e){let t=nB(e),r=iB(t),n=[],i=rB(e);for(;r.length;){let a=r.shift();n.push(a);for(let s of i.get(a)??[])if(t.set(s,(t.get(s)??0)-1),(t.get(s)??0)===0){let o=0;for(;o{if(i-n<=1)return 0;let a=n+i>>1,s=r(n,a)+r(a,i),o=n,l=a,u=n;for(;o=i||of.dst===d.dst?f.id.localeCompare(d.id):f.dst.localeCompare(d.dst));let n=Object.create(null);for(let h of t.nodes)n[h]=0;let i=[],a=v(h=>{n[h]=1;for(let f of r.get(h)??[]){let d=f.dst;n[d]===0?a(d):n[d]===1&&i.push(f)}n[h]=2},"dfs"),s=[...t.nodes].sort((h,f)=>h.localeCompare(f));for(let h of s)n[h]===0&&a(h);let o=new Set(i.map(h=>`${h.id}:${h.src}->${h.dst}`)),l=t.edges.map(h=>o.has(`${h.id}:${h.src}->${h.dst}`)?{id:h.id,src:h.dst,dst:h.src,weight:h.weight,ref:h.ref}:h);return{acyclic:{nodes:[...t.nodes],edges:l,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:i}}function Fye(e){let t=new Map,r=v(n=>{if(t.has(n))return t.get(n);let i=e.nodeById.get(n);if(!i)return t.set(n,null),null;let a=i.parentId;if(!a)return t.set(n,null),null;let o=r(a)??a;return t.set(n,o),o},"resolve");for(let n of e.nodes)r(n);return t}function Kh(e){let t=Fye(e);return r=>t.get(r)??null}function p3(e){let t=[];for(let r of e.layout.nodes??[])r.isGroup&&!r.parentId&&t.push(r.id);return[...new Set(t)].reverse()}function oB(e,t){let r=p3(e);if(!t||t.length===0)return r;let n=new Set(r),i=new Set,a=[];for(let s of t)!n.has(s)||i.has(s)||(i.add(s),a.push(s));for(let s of r)i.has(s)||a.push(s);return a}function zye(e,t){let r=Qd(e),n=t?.laneOf??(()=>null),i=t?.rankHint,{preds:a}=d3(r);for(let w of a.values())w.sort((C,S)=>C.localeCompare(S));let s=CT(r)??[...r.nodes].sort((w,C)=>w.localeCompare(C)),o=new Map;for(let[w,C]of s.entries())o.set(C,w);let l=new Map,u=new Map;for(let w of r.nodes)u.set(w,[]);for(let w of s){let C=(a.get(w)??[]).filter(S=>l.has(S));if(C.length>0){let S=Gye(w,C,{laneOf:n,rankHint:i,topoIndex:o});l.set(w,S),u.get(S).push(w)}else l.has(w)||l.set(w,null)}for(let w of r.nodes)l.has(w)||l.set(w,null);let h=new Set;for(let w of r.nodes)(l.get(w)??null)===null&&h.add(w);let f=[...h].sort((w,C)=>{let S=o.get(w)??0,E=o.get(C)??0;return S===E?w.localeCompare(C):S-E}),d=qye(r),p=new Map;for(let[w,C]of d.entries())p.set(w,[...C].sort((S,E)=>S.localeCompare(E)));let g=Vye(p),m=Wye(p),y=new Map;for(let w of r.nodes)y.set(w,[]);for(let w of m)for(let C of w.nodes){let S=y.get(C);S?S.push(w.id):y.set(C,[w.id])}let x=[],b=[],T=new Set,k=v(w=>{if(!T.has(w)){T.add(w),x.push(w);for(let C of u.get(w)??[])k(C);b.push(w)}},"walk");for(let w of f)k(w);for(let w of s)k(w);return{parent:l,children:u,roots:f,componentOf:g,blocks:m,nodeBlocks:y,adjacency:p,preorder:x,postorder:b,topologicalOrder:s}}function Gye(e,t,r){let n=r.laneOf(e);return[...t].sort((a,s)=>{let o=r.laneOf(a),l=r.laneOf(s),u=o!=null&&o===n,h=l!=null&&l===n;if(u!==h)return u?-1:1;let f=r.rankHint?.[a],d=r.rankHint?.[s];if(f!=null&&d!=null&&f!==d)return d-f;let p=r.topoIndex.get(a)??0,g=r.topoIndex.get(s)??0;return p!==g?p-g:a.localeCompare(s)})[0]}function qye(e){let t=new Map;for(let r of e.nodes)t.set(r,new Set);for(let r of e.edges)t.get(r.src).add(r.dst),t.get(r.dst).add(r.src);return t}function Vye(e){let t=new Map,r=0;for(let n of e.keys()){if(t.has(n))continue;let i=[n];for(;i.length>0;){let a=i.pop();if(!t.has(a)){t.set(a,r);for(let s of e.get(a)??[])t.has(s)||i.push(s)}}r++}return t}function Wye(e){let t=new Map,r=new Map,n=[],i=[],a=0,s=v((o,l)=>{t.set(o,++a),r.set(o,a);for(let u of e.get(o)??[])u!==l&&(t.has(u)?(t.get(u)??0)<(t.get(o)??0)&&(n.push([o,u]),r.set(o,Math.min(r.get(o)??a,t.get(u)??a))):(n.push([o,u]),s(u,o),r.set(o,Math.min(r.get(o)??a,r.get(u)??a)),(r.get(u)??0)>=(t.get(o)??0)&&i.push(Uye(o,u,n,i.length))))},"visit");for(let o of e.keys())t.has(o)||s(o,null);return i}function Uye(e,t,r,n){let i=[],a=new Set;for(;r.length>0;){let s=r.pop();if(i.push(s),a.add(s[0]),a.add(s[1]),s[0]===e&&s[1]===t||s[0]===t&&s[1]===e)break}return{id:n,edges:i,nodes:[...a]}}function Hye(e,t,r){let n=[...e.nodes],i=new Map;for(let[b,T]of n.entries())i.set(T,b);let a=n.length,s=new Array(a).fill(-1),o=new Array(a).fill(0),l=[],u=new Set;for(let b of n){let T=r.parent.get(b)??null,k=i.get(b);k!=null&&T==null&&(s[k]=-1,o[k]=0,u.has(b)||(u.add(b),l.push(b)))}for(;l.length>0;){let b=l.shift(),T=i.get(b);if(T==null)continue;let k=r.children.get(b)??[];for(let w of k){if(u.has(w))continue;let C=i.get(w);C!=null&&(s[C]=T,o[C]=o[T]+1,u.add(w),l.push(w))}}for(let b of n){if(u.has(b))continue;let T=i.get(b);T!=null&&(s[T]=-1,o[T]=0,u.add(b))}let h=Math.max(1,Math.ceil(Math.log2(Math.max(1,a)))+1),f=Array.from({length:h},()=>new Array(a).fill(-1));for(let b=0;b{if(b===-1||T===-1)return-1;o[b]>w&1&&(b=f[w][b],b===-1))return-1;if(b===T)return b;for(let w=h-1;w>=0;w--){let C=f[w][b],S=f[w][T];C===-1||S===-1||C!==S&&(b=C,T=S)}return f[0][b]},"lcaIndex"),p=Array.from({length:a},()=>new Map);for(let b of e.edges){let T=b.src,k=b.dst,w=t[T],C=t[k];if(w==null||C==null||(w>C&&([T,k]=[k,T],[w,C]=[C,w]),w==null||C==null||w===C))continue;let S=i.get(T),E=i.get(k);if(S==null||E==null)continue;let L=d(S,E);if(L===-1)continue;let N=p[L];for(let O=w;O{if(T.size!==0)for(let[k,w]of T)b.set(k,(b.get(k)??0)+w)},"mergeInto"),y=new Set,x=v(b=>{let T=i.get(b);y.add(b);let k=T==null?void 0:p[T],w=k?new Map(k):new Map,C=r.children.get(b)??[];for(let S of C){let E=x(S),L=t[b];if(L!=null){let N=g.get(b);N||(N=new Map,g.set(b,N));let O=E.get(L)??0,R=t[S];R!=null&&R>L&&(O+=1),N.set(S,O)}m(w,E)}return w},"dfs");for(let b of r.roots)y.has(b)||x(b);for(let b of n)y.has(b)||x(b);return g}function Yye(e,t,r){let n=new Map,i=v(a=>{let s=r[a]??0,o=[...t.get(a)??[]];o.sort(lB(r));for(let l of o){i(l);let u=n.get(l);u!=null&&(s=Math.min(s,u))}n.set(a,s)},"annotate");for(let a of e)i(a);return n}function lB(e){return(t,r)=>{let n=e[t]??0,i=e[r]??0;return n===i?t.localeCompare(r):n-i}}function Xye(e,t,r,n){let i=0;for(let l of t){let u=r[l]??0;u>i&&(i=u)}let a=Array.from({length:i+1},()=>[]),s=new Set,o=v(l=>{if(s.has(l))return;s.add(l);let u=r[l]??0;a[u]||(a[u]=[]),a[u].push(l);for(let h of n(l))o(h)},"emit");for(let l of e)o(l);for(let l of t)if(!s.has(l)){let u=r[l]??0;a[u]||(a[u]=[]),a[u].push(l),s.add(l)}return a}function jye(e){let t=[];for(let r of e){let n=new Set,i=[];for(let a of r)n.has(a)||(n.add(a),i.push(a));t.push(i)}return t}function Kye(e,t,r,n){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let s=t[i]??0,o=[],l=[],u=r.get(i);for(let h of a){let f=n.get(h)??s;f>s?o.push({child:h,min:f}):l.push(h)}return o.sort((h,f)=>h.min===f.min?h.child.localeCompare(f.child):h.min-f.min),l.sort((h,f)=>{let d=u?.get(h)??0,p=u?.get(f)??0;if(d!==p)return d-p;let g=n.get(h)??s,m=n.get(f)??s;return g!==m?g-m:h.localeCompare(f)}),[...o.map(h=>h.child),...l]}}function u3(e,t,r){let n=zye(e,{rankHint:t,laneOf:r}),{children:i,roots:a}=n;for(let f of e.nodes)i.has(f)||i.set(f,[]);let s=Hye(e,t,n),o=[...a].sort(lB(t)),l=Yye(o,i,t),u=Kye(i,t,s,l),h=Xye(o,e.nodes,t,u);return h=jye(h),h}function Zye(e,t,r){let n=new Set(e),i=new Set(t),a=O1(t),s=[];for(let o of r)n.has(o.src)&&i.has(o.dst)&&s.push(a.get(o.dst));return sB(s)}function DP(e,t,r){let n=[];for(let a of t){let s=r[a.src],o=r[a.dst];if(s==null||o==null||s===o)continue;let l=a.src,u=a.dst,h=s,f=o;s>o&&(l=a.dst,u=a.src,h=o,f=s);for(let d=h;d(r[d]??0)-(r[f]??0));for(let f of h){let d=r[f]??0;if(d===0)continue;let p=0;for(let x of n.get(f)??[])p=Math.max(p,(r[x]??0)+1);if(p>=d)continue;let g=d;r[f]=p;let m=u3(e,r,i),y=DP(m,e.edges,r);y(t[i]??0)-(t[a]??0)||i.localeCompare(a));for(let i of n){let a=r(i);if(!a)continue;let s=e.edges.filter(m=>m.src===i);if(s.length===0)continue;let o=!1,l=0;for(let m of s){let y=r(m.dst);y==null||y===a?o=!0:l++}if(l===0||o)continue;let u=0,h=!1;for(let m of e.edges){if(m.dst!==i)continue;let y=r(m.src);y&&(y===a?h=!0:u++)}if(u>0||!h)continue;let f=t[i]??0,d=f+l,p=0;for(let m of e.edges)m.dst===i&&(p=Math.max(p,(t[m.src]??0)+1));let g=Math.max(f,p,d);g!==f&&(t[i]=g)}}function e1e(e,t){let r=Qd(e),n=CT(r)??[...r.nodes].sort(),i=t?.compactSingleInput??!1,a=Kh(r),s=Object.create(null);for(let l of n){let u=tB(r,l),h=t?.ignoreCrossLaneEdges?u.filter(f=>{let d=a(f.src),p=a(l);return!d||!p?!0:d===p}):u;if(h.length===0)s[l]=0;else if(i&&h.length===1){let f=h[0].src,d=a(f),p=a(l);d!==p?s[l]=s[f]??0:s[l]=(s[f]??0)+1}else{let f=-1/0;for(let d of h)f=Math.max(f,(s[d.src]??0)+1);s[l]=f===-1/0?0:f}}return(t?.optimizeRanksByCrossings??!1)&&(s=Qye(r,s)),t?.ignoreCrossLaneEdges&&Jye(r,s),{layers:u3(r,s,a),rankOf:s,dummy:new Set}}function t1e(e,t){let r=Qd(e),i={...e1e(r,{compactSingleInput:t?.compactSingleInput,ignoreCrossLaneEdges:t?.ignoreCrossLaneEdges,optimizeRanksByCrossings:t?.optimizeRanksByCrossings}).rankOf},a=Kh(r),{preds:s,succs:o}=d3(r,g=>{if(t?.ignoreCrossLaneEdges){let m=a(g.src),y=a(g.dst);if(m&&y&&m!==y)return!1}return!0}),l=CT(r)??[...r.nodes],u=[...l].reverse(),h=v((g,m)=>{let y=0;for(let T of s.get(g)??[])y=Math.max(y,(i[T]??0)+1);let x=Number.POSITIVE_INFINITY,b=o.get(g)??[];return b.length>0&&(x=Math.min(...b.map(T=>(i[T]??0)-1))),Number.isFinite(x)||(x=Math.max(y,m)),Math.min(Math.max(m,y),x)},"clampFeasible"),f=c3.GRAVITY_ITERATIONS,d=v(g=>{let m=!1;for(let y of g){let x=s.get(y)??[],b=o.get(y)??[];if(x.length===0&&b.length===0)continue;let T=x.length>0?x.reduce((S,E)=>S+(i[E]??0)+1,0)/x.length:i[y]??0,k=b.length>0?b.reduce((S,E)=>S+(i[E]??0)-1,0)/b.length:i[y]??0,w=Math.round((T+k)/2),C=h(y,w);C!==i[y]&&(i[y]=C,m=!0)}return m},"relaxOrder");for(let g=0;g0){let y=Math.min(...m.map(x=>(i[x]??0)-1));(i[g]??0)>y&&(i[g]=y)}}return{layers:aB(r,l,i),rankOf:i,dummy:new Set}}function r1e(e){let t=nB(e),r=rB(e),n=iB(t),i=[];for(;n.length>0;){let a=[];for(let s of n){i.push(s);for(let o of r.get(s)??[])t.set(o,(t.get(o)??0)-1),(t.get(o)??0)===0&&a.push(o)}n=a.sort((s,o)=>s.localeCompare(o))}return i.length===e.nodes.length?i:null}function n1e(e,t){let r=Qd(e),n=t?.direction==="LR"?r1e(r)??[...r.nodes].sort():CT(r)??[...r.nodes].sort(),i=Kh(r),a=v(h=>i(h)??h,"laneOf"),s=Object.create(null),o=new Map,l=v((h,f)=>t?.ignoreCrossLaneEdges??!0?a(h)===a(f)?1:0:1,"edgeWeight");for(let h of n){if(r.nodeById.get(h)?.isGroup)continue;let d=tB(r,h),p=0;if(d.length>0)for(let x of d){let b=x.src,T=s[b]??0;p=Math.max(p,T+l(b,h))}let g=a(h),m=o.get(g)??0,y=Math.max(p,m);s[h]=y,o.set(g,y+1)}return{layers:aB(r,n,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}function i1e(e,t){let r=Qd(t),{rankOf:n}=e,i=e.layers.map(p=>[...p]),a=new Set(e.dummy?[...e.dummy]:[]),s=0,o=new Map(r.nodeById),l=v(p=>{let g=`placeholder-${s++}`,m={id:g,isGroup:!1,isDummy:!0,width:0,height:0};for(o.set(g,m),a.add(g);i.length<=p;)i.push([]);return i[p].push(g),n[g]=p,g},"addDummyAt"),u=[...r.edges].sort((p,g)=>p.id===g.id?p.src===g.src?p.dst.localeCompare(g.dst):p.src.localeCompare(g.src):p.id.localeCompare(g.id)),h=[];for(let p of u){let g=n[p.src]??0,m=n[p.dst]??0;if(m-g<=1){h.push(p);continue}let y=p.src;for(let b=g+1,T=0;b!r.nodes.includes(p))],edges:h,layout:r.layout,nodeById:o};return{layering:{layers:i,rankOf:n,dummy:a},graphWithDummies:d}}function NP(e){let t=e.length;if(t===0)return Number.POSITIVE_INFINITY;let r=[...e].sort((n,i)=>n-i);return t%2===1?r[(t-1)/2]:.5*(r[t/2-1]+r[t/2])}function OP(e){return e.length===0?Number.POSITIVE_INFINITY:e.reduce((r,n)=>r+n,0)/e.length}function a1e(e,t,r,n){let i=new Map;for(let a of e)i.set(a,[]);for(let a of r)n==="down"?t.has(a.src)&&i.has(a.dst)&&i.get(a.dst).push(t.get(a.src)):t.has(a.dst)&&i.has(a.src)&&i.get(a.src).push(t.get(a.dst));return i}function s1e(e,t,r){let n=r.get(e)??0,i=r.get(t)??0;return n!==i?n-i:e.localeCompare(t)}function PP(e,t,r){let n=new Set(e),i=new Set(t),a=O1(e),s=O1(t),o=[];for(let u of r)n.has(u.src)&&i.has(u.dst)&&o.push({u:a.get(u.src),v:s.get(u.dst)});o.sort((u,h)=>u.u===h.u?u.v-h.v:u.u-h.u);let l=o.map(u=>u.v);return sB(l)}function e3(e,t,r){return[...e].sort((n,i)=>{let a=NP(t.get(n)??[]),s=NP(t.get(i)??[]);return a===s?s1e(n,i,r):isFinite(a)?isFinite(s)?a-s:-1:1})}function BP(e,t,r,n,i,a){let s=O1(e),o=O1(t),l=a1e(t,s,r,n);if(!i||!a||a.length===0)return e3(t,l,o);let u=new Map;for(let d of t){let p=i(d),g=u.get(p)??[];g.push(d),u.set(p,g)}let h=[];for(let d of a){let p=u.get(d);if(!p||p.length===0)continue;let g=e3(p,l,o);h.push(...g)}let f=u.get(null);if(f&&f.length>0){let d=e3(f,l,o);for(let p of d){let g=OP(l.get(p)??[]),m=h.length;if(isFinite(g))for(let[y,x]of h.entries()){let b=OP(l.get(x)??[]);if(gs.has(m.src)&&o.has(m.dst)),h=l?r.filter(m=>o.has(m.src)&&l.has(m.dst)):void 0,f=v(m=>{let y=PP(e,m,u);return h&&n&&(y+=PP(m,n,h)),y},"crossingScore"),d=i?new Map:null;if(i&&d)for(let m of t)d.set(m,i(m));let p=!0,g=f(a);for(;p;){p=!1;for(let m=0;m+1[...o]),i=t.edges,a=Kh(t),s=oB(t,r?.laneOrder);for(let o=0;o<3;o++){for(let l=1;l=0;l--)n[l]=BP(n[l+1],n[l],i,"up",a,s),n[l]=$P(n[l+1],n[l],i,n[l-1],a)}return{layers:n}}function l1e(e,t,r){let n=r?.layerGap??Vme.DEFAULT_LAYER_GAP,i=r?.nodeGap??Vme.DEFAULT_NODE_GAP,a=r?.laneGap??i*2,s=r?.direction??"TB",o=s==="LR"||s==="RL",l=e.layers,u=Object.create(null),h=Object.create(null),f=v(N=>t.nodeById.get(N),"getNode"),d=v(N=>f(N)?.width??0,"getWidth"),p=v(N=>f(N)?.height??0,"getHeight"),g=Kh(t),m=oB(t,r?.laneOrder),y=l.map(N=>N.reduce((O,R)=>Math.max(O,p(R)),0)),x=[];if(o)for(let N=0;N+1Math.max(P,d($)),0),R=l[N+1].reduce((P,$)=>Math.max(P,d($)),0),_=y[N],D=y[N+1],I=_/2+D/2,M=(O+R)/2,B=Math.max(0,M-I-n);x.push(B)}let b=new Set;for(let N of l)for(let O of N)b.add(g(O));let T=b.has(null),k=m.filter(N=>b.has(N)),w=[...T?[null]:[],...k],C=Object.create(null);for(let N of k)C[N]=0;T&&(C.null=0);for(let N of l){let O=Object.create(null),R=[];for(let _ of N){let D=g(_);D===null?R.push(_):(O[D]||=[]).push(_)}for(let[_,D]of Object.entries(O)){let I=D.reduce((M,B)=>M+d(B),0)+i*Math.max(0,D.length-1);C[_]=Math.max(C[_]??0,I)}if(T&&R.length){let _=R.reduce((D,I)=>D+d(I),0)+i*Math.max(0,R.length-1);C.null=Math.max(C.null??0,_)}}let S=new Map;{let N=w.map(_=>(_===null?C.null:C[_])??0),R=-(N.reduce((_,D)=>_+D,0)+a*Math.max(0,w.length-1))/2;for(let _=0;_d(q)),$=P.reduce((q,z)=>q+z,0)+i*(M.length-1),G=B-$/2;for(let[q,z]of M.entries()){let V=P[q];u[z]=G+V/2,h[z]=E+R/2,G+=V+i}}}let D=x[N]??0;E+=R+n+D}let L=new Map;for(let N of t.edges){let O=N.ref.id;L.has(O)||L.set(O,[]),L.get(O).push(N)}for(let[,N]of L){if(N.length===0)continue;let O=N[0].ref,R=O.start,_=O.end;if(R==null||_==null)continue;let D=Math.round(((u[R]??0)+(u[_]??0))/2),I=new Set;for(let M of N)I.add(M.src),I.add(M.dst);for(let M of I){if(M===R||M===_)continue;t.nodeById.get(M)?.isDummy&&(u[M]=D)}}return{x:u,y:h}}function u1e(e){let t=2166136261;for(let r=0;r>>0}function h1e(e){let t=e>>>0;return()=>{t+=1831565813;let r=t;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}}function f1e(e,t){let r=[...e],n=h1e(t);for(let i=r.length-1;i>0;i--){let a=Math.floor(n()*(i+1));[r[i],r[a]]=[r[a],r[i]]}return r}function d1e(e,t){let r=0;for(let[n,i]of e.entries())r+=Math.abs(n-(t.get(i)??n));return r}function FP(e,t){let r=new Map;for(let[i,a]of e.entries())r.set(a,i);let n=0;for(let{a:i,b:a,weight:s}of t){let o=r.get(i),l=r.get(a);o==null||l==null||(n+=s*Math.abs(o-l))}return n}function p1e(e){let t=p3(e);if(t.length<2)return[];let r=new Map(t.map((a,s)=>[a,s])),n=Kh(e),i=new Map;for(let a of e.layout.edges??[]){if(a.isLayoutOnly)continue;let s=typeof a.start=="string"?a.start:void 0,o=typeof a.end=="string"?a.end:void 0;if(!s||!o||!e.nodeById.has(s)||!e.nodeById.has(o))continue;let l=n(s),u=n(o);if(!l||!u||l===u)continue;let h=r.get(l),f=r.get(u);if(h==null||f==null)continue;let[d,p]=h<=f?[l,u]:[u,l],g=`${d}\0${p}`,m=i.get(g);m?m.weight++:i.set(g,{a:d,b:p,weight:1})}return[...i.values()]}function zP(e,t,r){let n=[...e],i=FP(n,t),a=!0,s=0,o=Math.max(1,n.length);for(;a&&si.a===a.a?i.b.localeCompare(a.b):i.a.localeCompare(a.a)).map(({a:i,b:a,weight:s})=>`${i}:${a}:${s}`).join("|");return u1e(`${e.join("|")}#${n}#${r}`)}function y1e(e,t={}){let r=p3(e);if(r.length<2)return r;let n=p1e(e);if(n.length===0)return r;let i=new Map(r.map((o,l)=>[o,l])),a=zP(r,n,i),s=Math.max(0,t.restarts??c1e);for(let o=0;oKr&&l*3>=o?s>0?"bottom":"top":o>Kr?a>0?"right":"left":r}function qP(e,t){return Math.abs(e.to-t.from)re.isGroup&&!re.parentId);for(let re of u){let le={id:re.id},oe=v(he=>{s.set(he.id,le),r.filter(xe=>xe.parentId===he.id).forEach(oe)},"assignLane");oe(re)}let h=r.filter(re=>!re.isGroup&&!re.isEdgeLabel).map(re=>{let le=re.width??10,oe=re.height??10,he=re.x??0,xe=re.y??0,se=qit;return{nodeId:re.id,minX:he-le/2-se,maxX:he+le/2+se,minY:xe-oe/2-se,maxY:xe+oe/2+se,visualXHalfExtent:l?oe/2+se:le/2+se}}),f=v((re,le,oe,he)=>{let xe=o.find(se=>se.orientation===re&&Math.abs(se.coord-le)<1);return xe||(xe={id:`pipe-${re}-${le.toFixed(0)}`,orientation:re,coord:le,spanMin:oe,spanMax:he,tracks:[]},o.push(xe)),xe.spanMin=Math.min(xe.spanMin,oe),xe.spanMax=Math.max(xe.spanMax,he),xe},"getOrAddPipe"),d=v((re,le)=>{let oe=re.width??10,he=re.height??10,xe=re.x??0,se=re.y??0;switch(le){case"top":return{x:xe,y:se-he/2};case"bottom":return{x:xe,y:se+he/2};case"left":return{x:xe-oe/2,y:se};case"right":return{x:xe+oe/2,y:se}}},"portForSide"),p=v((re,le,oe)=>d(re,GP(re,le,oe?"bottom":"top")),"getOrthogonalPort"),g=[],m=[],y=new Set,x=1e3,b=v((re,le,oe)=>{if(g.length===0)return 0;let he=Math.abs(le.y-oe.y)W||U.from-Kr<=F&&U.to+Kr>=F&&(se+=x)}else if(xe){let F=le.x,H=Math.min(le.y,oe.y)-Kr,W=Math.max(le.y,oe.y)+Kr;if(W<=H)return 0;for(let U of g)U.edgeIndex===re||U.orientation!=="horizontal"||U.pipe.coordW||U.from-Kr<=F&&U.to+Kr>=F&&(se+=x)}return se},"crossingPenalty"),T=i.map((re,le)=>{if(!re.start||!re.end)return{idx:le,crossLane:0,dx:0,dy:0};let oe=a.get(re.start),he=a.get(re.end),xe=s.get(re.start),se=s.get(re.end),F=xe&&se&&xe.id!==se.id?1:0,H=oe&&he?Math.abs((he.x??0)-(oe.x??0)):0,W=oe&&he?Math.abs((he.y??0)-(oe.y??0)):0;return{idx:le,crossLane:F,dx:H,dy:W}}).sort((re,le)=>{if(re.crossLane!==le.crossLane)return le.crossLane-re.crossLane;let oe=re.dx+re.dy,he=le.dx+le.dy;return Math.abs(oe-he)>1?oe-he:re.idx-le.idx}).map(re=>re.idx),k=v((re,le,oe,he)=>{let xe=Math.min(re.x,le.x),se=Math.max(re.x,le.x),F=Math.min(re.y,le.y),H=Math.max(re.y,le.y);return!!h.find(U=>oe&&U.nodeId===oe||he&&U.nodeId===he?!1:Math.abs(re.x-le.x)>Kr?U.minYre.y&&U.maxX>xe&&U.minXre.x&&U.maxY>F&&U.minYGP(re,le,"bottom"),"determineSide"),E=new Map;for(let[re,le]of i.entries()){if(!le.start||!le.end||le.start===le.end||le.points&&le.points.length>0)continue;let oe=a.get(le.start),he=a.get(le.end);if(!oe||!he)continue;let xe=(he.x??0)-(oe.x??0),se=(he.y??0)-(oe.y??0);E.set(re,{edgeIdx:re,srcId:le.start,dstId:le.end,srcSide:S(oe,{x:he.x??0,y:he.y??0}),dstSide:S(he,{x:oe.x??0,y:oe.y??0}),absDx:Math.abs(xe),absDy:Math.abs(se),dxSign:Math.sign(xe),dySign:Math.sign(se)})}let L=v(re=>re.srcSide==="top"||re.srcSide==="bottom"?re.absDx===0?1/0:re.absDy/re.absDx:re.absDy===0?1/0:re.absDx/re.absDy,"preferenceStrength"),N=v(re=>re.srcSide==="top"||re.srcSide==="bottom"?re.dxSign>=0?"right":"left":re.dySign>=0?"bottom":"top","secondarySide"),O=new Map;for(let re of E.values()){let le=`${re.srcId}:${re.srcSide}`;O.has(le)||O.set(le,[]),O.get(le).push(re)}let R=new Map,_=v((re,le)=>`${re}:${le}`,"loadKey");for(let re of E.values())R.set(_(re.srcId,re.srcSide),(R.get(_(re.srcId,re.srcSide))??0)+1),R.set(_(re.dstId,re.dstSide),(R.get(_(re.dstId,re.dstSide))??0)+1);for(let re of O.values())if(!(re.length<2)){re.sort((le,oe)=>{let he=L(le),xe=L(oe);return Math.abs(he-xe)>1e-9?xe-he:le.edgeIdx-oe.edgeIdx});for(let le=1;le=xe||(R.set(_(oe.srcId,oe.srcSide),xe-1),R.set(_(oe.srcId,he),se+1),oe.srcSide=he)}}let D=v(re=>{let le=re?.shape;return le==="question"||le==="diamond"},"isDiamondNode"),I=new Map;for(let re of E.values())I.has(re.dstId)||I.set(re.dstId,new Set),I.get(re.dstId).add(re.dstSide);for(let re of E.values()){if(!D(a.get(re.srcId)))continue;let le=I.get(re.srcId);if(!le?.has(re.srcSide))continue;let oe=N(re);if(le.has(oe)||(R.get(_(re.srcId,oe))??0)>0)continue;let he=R.get(_(re.srcId,re.srcSide))??0;R.set(_(re.srcId,re.srcSide),Math.max(0,he-1)),R.set(_(re.srcId,oe),1),re.srcSide=oe}for(let re of E.values()){let{edgeIdx:le,srcId:oe,dstId:he,srcSide:xe,dstSide:se}=re,F=a.get(oe),H=a.get(he),W=`${oe}:${xe}:src`,U=xe==="top"||xe==="bottom"?H.x??0:H.y??0;w.has(W)||w.set(W,[]),w.get(W).push({edgeIdx:le,oppositeCoord:U});let ae=`${he}:${se}:dst`,K=se==="top"||se==="bottom"?F.x??0:F.y??0;w.has(ae)||w.set(ae,[]),w.get(ae).push({edgeIdx:le,oppositeCoord:K})}let M=new Map,B=8;for(let[re,le]of w){if(le.length<2)continue;le.sort((ke,Se)=>ke.oppositeCoord-Se.oppositeCoord);let oe=re.split(":"),he=oe.slice(0,-2).join(":"),xe=oe[oe.length-2],se=oe[oe.length-1],F=a.get(he);if(!F)continue;let W=xe==="left"||xe==="right"?F.height??10:F.width??10,U=F.shape,K=U==="question"||U==="diamond"?W*.3:W,Z=Math.min(20,Math.max(B,K/(le.length+1))),we=-(Z*(le.length-1))/2;for(let[ke,Se]of le.entries()){let Ne=we+ke*Z,Ae=`${Se.edgeIdx}:${se}`;M.set(Ae,Ne)}}let P=v(re=>!!i[re]?.labelNodeId,"edgeHasLabelNode"),$=v((re,le)=>re?(w.get(`${re}:${le}:src`)??[]).some(({edgeIdx:oe})=>P(oe))||(w.get(`${re}:${le}:dst`)??[]).some(({edgeIdx:oe})=>P(oe)):!1,"faceHasLabelNode"),G=v((re,le,oe)=>le==="top"||le==="bottom"?{x:re.x+oe,y:re.y}:{x:re.x,y:re.y+oe},"applyPortOffset"),q=v((re,le,oe)=>{let he=E.get(re),xe={x:oe.x??0,y:oe.y??0},se={x:le.x??0,y:le.y??0},F=he?.srcSide??S(le,xe),H=he?.dstSide??S(oe,se),W=he?d(le,he.srcSide):p(le,xe,!0),U=he?d(oe,he.dstSide):p(oe,se,!1),ae=M.get(`${re}:src`),K=M.get(`${re}:dst`);return ae!==void 0&&(W=G(W,F,ae)),K!==void 0&&(U=G(U,H,K)),{pSrcPort:W,pDstPort:U,srcSide:F,dstSide:H}},"portsForEdge");for(let re of T){let le=i[re];if(m[re]=[],!le.start||!le.end||le.points&&le.points.length>0||le.start===le.end)continue;let oe=a.get(le.start),he=a.get(le.end);if(!oe||!he)continue;let{pSrcPort:xe,pDstPort:se,srcSide:F,dstSide:H}=q(re,oe,he),W={...xe},U={...se},ae=F==="top"||F==="bottom",K=H==="top"||H==="bottom";if(ae){let Je=xe.y>(oe.y??0);W.y=Je?xe.y+Rl:xe.y-Rl}else{let Je=xe.x>(oe.x??0);W.x=Je?xe.x+Rl:xe.x-Rl}if(K){let Je=se.y>(he.y??0);U.y=Je?se.y+Rl:se.y-Rl}else{let Je=se.x>(he.x??0);U.x=Je?se.x+Rl:se.x-Rl}let Y=v((Je,ut)=>{for(let kt of h)if(!ut.includes(kt.nodeId)&&Je.x>kt.minX&&Je.xkt.minY&&Je.y{if(ir){let br=Je.y>(ut.y??0);return{x:(kt.x??0)>=Je.x?lr.maxX+hg:lr.minX-hg,y:br?lr.maxY+I1:lr.minY-I1,leavesPositiveSide:br}}let xr=Je.x>(ut.x??0),cn=(kt.y??0)>=Je.y;return{x:xr?lr.maxX+hg:lr.minX-hg,y:cn?lr.maxY+I1:lr.minY-I1,leavesPositiveSide:xr}},"obstacleDetour"),Ce=[],we=[le.start,le.end],ke=Y(W,we);if(ke.inside&&ke.obstacle){let Je=ke.obstacle;if(ae){let ut=Z(xe,oe,he,Je,!0);W.x=ut.x,W.y=ut.y;let kt=ut.leavesPositiveSide?Math.min(Je.minY-2,xe.y+Rl):Math.max(Je.maxY+2,xe.y-Rl);Ce=[{x:xe.x,y:kt},{x:ut.x,y:kt},{x:ut.x,y:ut.y}]}else{let ut=Z(xe,oe,he,Je,!1),kt=ut.leavesPositiveSide?Math.min(Je.minX-2,xe.x+Rl):Math.max(Je.maxX+2,xe.x-Rl);W.x=ut.x,W.y=ut.y,Ce=[{x:kt,y:xe.y},{x:kt,y:ut.y},{x:ut.x,y:ut.y}]}}let Se=[],Ne=Y(U,we);if(Ne.inside&&Ne.obstacle){let Je=Ne.obstacle;if(K){let ut=Z(se,he,oe,Je,!0);U.x=ut.x,U.y=ut.y,Se=[{x:ut.x,y:ut.y},{x:se.x,y:ut.y}]}else{let ut=Z(se,he,oe,Je,!1);U.x=ut.x,U.y=ut.y,Se=[{x:ut.x,y:ut.y},{x:ut.x,y:se.y}]}}if(Ce.length===0&&Se.length===0){let Je=hg,ut=Math.abs(W.x-U.x)1||xr>1,br=C.get(le.start??"")??0,At=C.get(le.end??"")??0,dt=ir>1&&$(le.start,F)||xr>1&&$(le.end,H),Nt=ir<=1||br<=2,Dt=xr<=1||At<=2;if((ut||kt)&&!lr&&(!cn||cn&&!dt&&Nt&&Dt)&&!k(xe,se,le.start,le.end)){le.points=[{...xe},{...W},{...U},{...se}],y.add(re);let Le=kt?"horizontal":"vertical",Pn=kt?xe.y:xe.x,Be=kt?Math.min(xe.x,se.x):Math.min(xe.y,se.y),Tr=kt?Math.max(xe.x,se.x):Math.max(xe.y,se.y),oi={id:`fast-path-${Le}-${Pn.toFixed(0)}-${re}`,orientation:Le,coord:Pn,spanMin:Be,spanMax:Tr,tracks:[]};g.push({edgeIndex:re,segmentIndex:0,orientation:Le,pipe:oi,trackIndex:0,from:Be,to:Tr});continue}}let Ae=f("vertical",W.x,W.y,W.y);W.x=Ae.coord;let Fe=f("vertical",U.x,U.y,U.y);U.x=Fe.coord;let Pe=Math.min(W.x,U.x)-50,We=Math.max(W.x,U.x)+50,be=Math.min(W.y,U.y)-50,lt=Math.max(W.y,U.y)+50;for(let Je of h){let ut=Math.min(W.x,U.x),kt=Math.max(W.x,U.x),lr=Math.min(W.y,U.y),ir=Math.max(W.y,U.y);Je.minXut&&Je.minYlr&&(Pe=Math.min(Pe,Je.minX-Q5),We=Math.max(We,Je.maxX+Q5),be=Math.min(be,Je.minY-Q5),lt=Math.max(lt,Je.maxY+Q5))}for(let Je of h){if(Je.maxXWe||Je.maxYlt)continue;let ut=hg;f("horizontal",Je.minY-ut,Pe,We),f("horizontal",Je.maxY+ut,Pe,We);let kt=I1;f("vertical",Je.minX-kt,be,lt),f("vertical",Je.maxX+kt,be,lt)}f("horizontal",W.y,Pe,We),f("horizontal",U.y,Pe,We);let $e=o.filter(Je=>Je.orientation==="horizontal"&&Je.coord>=be&&Je.coord<=lt),at=o.filter(Je=>Je.orientation==="vertical"&&Je.coord>=Pe&&Je.coord<=We),bt=v((Je,ut)=>`${Je.toFixed(1)},${ut.toFixed(1)}`,"getKey"),Et=bt(W.x,W.y),pt=bt(U.x,U.y),Ct=new Map,ht=new Map,Te=new Map,ot=new Set,gt=[];Ct.set(Et,0),Te.set(Et,"n"),gt.push({key:Et,f:Math.hypot(U.x-W.x,U.y-W.y),pt:W}),ot.add(Et);let Qe=[],_e=v((Je,ut)=>k(Je,ut,le.start,le.end),"checkSegmentBlocked"),Ze={x:U.x,y:W.y},nt=_e(W,Ze),ft=_e(Ze,U),jt=nt||ft,yt={x:W.x,y:U.y},Ht=_e(W,yt),Er=_e(yt,U);if(jt?Ht||Er||(Math.abs(W.x-U.x)0;){gt.sort((At,dt)=>At.f-dt.f);let Je=gt.shift();if(ot.delete(Je.key),Je.key===pt){let At=pt,dt=U;for(Qe=[dt];ht.has(At);){let Nt=ht.get(At);Qe.unshift(Nt),dt=Nt,At=bt(Nt.x,Nt.y)}break}let ut=Je.pt.x,kt=Je.pt.y,lr=at.sort((At,dt)=>At.coord-dt.coord),ir=lr.findIndex(At=>Math.abs(At.coord-ut)<1),xr=$e.sort((At,dt)=>At.coord-dt.coord),cn=xr.findIndex(At=>Math.abs(At.coord-kt)<1),br=[];ir>0&&br.push({x:lr[ir-1].coord,y:kt}),ir>=0&&ir0&&br.push({x:ut,y:xr[cn-1].coord}),cn>=0&&cnqa.nodeId===le.start||qa.nodeId===le.end?!1:dt!==Nt?qa.minYkt&&qa.maxX>dt&&qa.minXut&&qa.maxY>Dt&&qa.minY10&&Wf<-5||As<-10&&Wf>5)&&(Tr=Math.abs(Wf)*100),(oi>10&&Ga<-5||oi<-10&&Ga>5)&&(Tr+=Math.abs(Ga)*50);let yh=0,mi=Te.get(Je.key)??"n",zo=Math.abs(Ga)>Kr?"h":"v";mi!=="n"&&mi!==zo&&(yh=50);let Uf=Pn+Be+Tr+yh,jl=(Ct.get(Je.key)??1/0)+Uf,o0=Math.abs(U.x-At.x)+Math.abs(U.y-At.y);if(jl<(Ct.get(Le)??1/0))if(ht.set(Le,Je.pt),Ct.set(Le,jl),Te.set(Le,zo),!ot.has(Le))gt.push({key:Le,f:jl+o0,pt:At}),ot.add(Le);else{let qa=gt.findIndex(l0=>l0.key===Le);qa!==-1&&(gt[qa].f=jl+o0)}}}if(Qe.length===0&&(Qe=[W,{x:W.x,y:U.y},U]),Qe.length>4){let Je=Qe[0],ut=Qe[Qe.length-1],kt=Math.min(Je.x,ut.x),lr=Math.max(Je.x,ut.x),ir=Math.min(Je.y,ut.y),xr=Math.max(Je.y,ut.y);for(let Dt of Qe)kt=Math.min(kt,Dt.x),lr=Math.max(lr,Dt.x),ir=Math.min(ir,Dt.y),xr=Math.max(xr,Dt.y);let cn=lr>Math.max(Je.x,ut.x),br=ktBe.minXxt&&Be.minYJt);if(Pn.length>0){let Be=Math.max(Je.x,ut.x);for(let Tr of Pn){let oi=(Tr.minX+Tr.maxX)/2;if(Tr.visualXHalfExtent===void 0||isNaN(Tr.visualXHalfExtent))continue;let As=oi+Tr.visualXHalfExtent+Dt;Be=Math.max(Be,As)}isNaN(Be)||(lr=Be)}}if(br){let xt=h.filter(Jt=>Jt.minXMath.min(Je.y,ut.y));if(xt.length>0){let Jt=Math.min(Je.x,ut.x);for(let Le of xt){let Be=(Le.minX+Le.maxX)/2-Le.visualXHalfExtent-Dt;Jt=Math.min(Jt,Be)}kt=Jt}}}let At=v(Dt=>{let xt=ut.y>Je.y,Jt=h.filter(Be=>{let Tr=Math.min(Je.x,ut.x)Be.minX,oi=Math.min(Je.y,ut.y)Be.minY;return Tr&&oi}),Le=Jt;if(l&&Jt.length>0){let Be=Jt.filter(Tr=>Tr.minXDt);Be.length>0&&(Le=Be)}if(Le.length===0)return ut.y;let Pn=hg;if(xt){let Tr=Math.max(...Le.map(oi=>oi.maxY))+Pn;if(Troi.minY))-Pn;if(Tr>ut.y+Kr)return Tr}return ut.y},"findBestReturnY"),dt=v(Dt=>{let xt=At(Dt),Jt={x:Dt,y:Je.y},Le={x:Dt,y:xt},Pn={x:ut.x,y:xt},Be=_e(Je,Jt),Tr=_e(Jt,Le),oi=_e(Le,Pn),As=xt!==ut.y?_e(Pn,ut):!1;return!Be&&!Tr&&!oi&&!As?Math.abs(xt-ut.y)=3){let Je=Ot[Ot.length-1],ut=Ot[Ot.length-2],kt=Ot[Ot.length-3],lr=Math.abs(kt.y-ut.y)Math.abs(Je.x-kt.x)&&Ot.splice(-2,1)}else if(ir){let xr=Math.sign(ut.y-kt.y),cn=Math.sign(Je.y-kt.y);xr!==0&&xr===cn&&Math.abs(ut.y-kt.y)>Math.abs(Je.y-kt.y)&&Ot.splice(-2,1)}}let Zt=[Ot[0]];for(let Je=1;Jeut.x,xr=lr.x>kt.x;if(ir!==xr){Zt.push(kt);continue}continue}if(Math.abs(ut.x-kt.x)ut.y,xr=lr.y>kt.y;if(ir!==xr){Zt.push(kt);continue}continue}Zt.push(kt)}Zt.push(Ot[Ot.length-1]);for(let Je=0;Jere.from{let xe=!he.segments.some(F=>(F.edgeIndex!==le.edgeIndex||F.segmentIndex!==le.segmentIndex)&&z(F,re)),se=!oe.segments.some(F=>(F.edgeIndex!==re.edgeIndex||F.segmentIndex!==re.segmentIndex)&&z(F,le));return xe&&se?(re.trackIndex=he.index,le.trackIndex=oe.index,oe.segments=[...oe.segments.filter(F=>F.edgeIndex!==re.edgeIndex||F.segmentIndex!==re.segmentIndex),{edgeIndex:le.edgeIndex,segmentIndex:le.segmentIndex,from:le.from,to:le.to}],he.segments=[...he.segments.filter(F=>F.edgeIndex!==le.edgeIndex||F.segmentIndex!==le.segmentIndex),{edgeIndex:re.edgeIndex,segmentIndex:re.segmentIndex,from:re.from,to:re.to}],!0):!1},"trySwapSegmentsAcrossTracks"),j=v(re=>{let le=re.tracks.length;return re.tracks[le]={index:le,coord:re.coord,segments:[]},le},"createNewTrack"),ee=v((re,le)=>{let oe=re.pipe.tracks[re.trackIndex];oe.segments=oe.segments.filter(xe=>xe.edgeIndex!==re.edgeIndex||xe.segmentIndex!==re.segmentIndex),re.trackIndex=le,re.pipe.tracks[le].segments.push({edgeIndex:re.edgeIndex,segmentIndex:re.segmentIndex,from:re.from,to:re.to})},"moveSegmentToTrack"),ne=v((re,le)=>{let oe=m[re.edgeIndex];for(let he of oe){let xe=g[he];xe.pipe===re.pipe&&ee(xe,le)}},"moveSegmentChainToTrack"),Q=v(re=>{let le=m[re.edgeIndex],oe=le.indexOf(g.indexOf(re)),he=[];return oe>0&&he.push(g[le[oe-1]]),oe{if(re.orientation===le.orientation)return!1;let oe=re.orientation==="horizontal"?re:le,he=re.orientation==="horizontal"?le:re;return he.pipe.coord>oe.from&&he.pipe.coordhe.from&&oe.pipe.coord{for(let oe of re.tracks)if(!oe.segments.some(xe=>(xe.edgeIndex!==le.edgeIndex||xe.segmentIndex!==le.segmentIndex)&&z(xe,le)))return oe.index;return-1},"findAvailableTrack"),de=v((re,le)=>{if(re.trackIndex===le.trackIndex)return z(re,le);let oe=Q(re),he=Q(le);return oe.some(xe=>he.some(se=>pe(xe,se)))},"segmentsConflict"),ce=v((re,le,oe)=>{if(V(re,le,re.pipe.tracks[re.trackIndex],le.pipe.tracks[le.trackIndex]))return;let he=te(re.pipe,le);oe(le,he!==-1?he:j(re.pipe))},"resolveTrackConflict"),ue=v(re=>{let le=0;for(let oe=0;oe{if(Re.has(re))return Re.get(re);let le=m[re];if(le.length===0){let H={dest:0,deviation:0,base:0,delta:0};return Re.set(re,H),H}let he=g[le[0]].pipe.coord,xe=he;for(let H=1;HMath.abs(ae-he)?U:ae;break}}let se=Math.abs(xe-he),F={dest:xe,deviation:se,base:he,delta:xe-he};return Re.set(re,F),F},"getDestInfo"),Ge=v(()=>{let re=0,le=new Map;for(let[he,xe]of i.entries())m[he].length!==0&&xe.start&&(le.has(xe.start)||le.set(xe.start,[]),le.get(xe.start).push(he));let oe=v(he=>{let xe=i[he];if(!xe.start||!xe.end)return 0;let se=a.get(xe.start),F=a.get(xe.end);if(!se||!F)return 0;let H=(F.x??0)-(se.x??0),W=(F.y??0)-(se.y??0);return Math.abs(H)+Math.abs(W)},"getEdgeDistance");for(let he of le.values()){he.sort((se,F)=>{let H=ve(se),W=ve(F);if(Math.abs(H.deviation-W.deviation)>1)return H.deviation-W.deviation;if(Math.abs(H.dest-W.dest)>1)return H.dest-W.dest;let U=oe(se),ae=oe(F);if(Math.abs(U-ae)>1)return ae-U;let K=m[se].length,Y=m[F].length;if(K!==Y)return K-Y;if(K===1){let Z=m[se][0],Ce=m[F][0];if(g[Z]&&g[Ce]){let we=g[Z],ke=g[Ce],Se=Math.abs(we.to-we.from),Ne=Math.abs(ke.to-ke.from);if(Math.abs(Se-Ne)>1)return Se-Ne}}return 0});let xe=he.map(se=>g[m[se][0]]);re+=ue(xe)}return re},"fixSourceHandleCrossings"),He=v(()=>{let re=0,le=new Map;for(let[oe,he]of i.entries())m[oe].length!==0&&he.end&&(le.has(he.end)||le.set(he.end,[]),le.get(he.end).push(oe));for(let oe of le.values()){oe.sort((xe,se)=>{let F=v(U=>{let ae=m[U];if(ae.length<2)return 0;let K=g[ae[ae.length-2]];return Math.abs(K.to-K.from)},"getDist"),H=F(xe),W=F(se);return Math.abs(H-W)>.1?H-W:xe-se});let he=oe.map(xe=>g[m[xe][m[xe].length-1]]);re+=ue(he)}return re},"fixTargetHandleCrossings"),Ue=v(()=>{let re=0;for(let le of o){let oe=[];for(let he of le.tracks)for(let xe of he.segments){let se=m[xe.edgeIndex].find(F=>g[F].segmentIndex===xe.segmentIndex);se!==void 0&&oe.push(g[se])}oe.sort((he,xe)=>he.edgeIndex-xe.edgeIndex||he.segmentIndex-xe.segmentIndex);for(let he=0;he{he.segments.forEach(xe=>{le.push({edgeIndex:xe.edgeIndex,segmentIndex:xe.segmentIndex,trackIndex:he.index,from:xe.from,to:xe.to})})}),le.sort((he,xe)=>he.from-xe.from);let oe=[];if(le.length>0){let he=[le[0]],xe=le[0].to;for(let se=1;sexe.add(Z.trackIndex));let se=new Map;he.forEach(Z=>{let Ce=ve(Z.edgeIndex);se.set(Z.trackIndex,(se.get(Z.trackIndex)??0)+Ce.delta)});let F=[...xe].filter(Z=>(se.get(Z)??0)<-1),H=[...xe].filter(Z=>(se.get(Z)??0)>1),W=[...xe].filter(Z=>Math.abs(se.get(Z)??0)<=1);F.sort((Z,Ce)=>(se.get(Ce)??0)-(se.get(Z)??0)),H.sort((Z,Ce)=>(se.get(Z)??0)-(se.get(Ce)??0));let U=v((Z,Ce)=>{he.filter(we=>we.trackIndex===Z).forEach(we=>{let ke=y.has(we.edgeIndex)?re.coord:Ce;Ie.set(`${we.edgeIndex}-${we.segmentIndex}`,ke)})},"assignCoord"),ae=0;for(let Z of F)ae++,U(Z,re.coord-ae*cP);if(W.length===0&&xe.size>0){let Z=[...xe].sort((ke,Se)=>Math.abs(se.get(ke)??0)-Math.abs(se.get(Se)??0))[0],Ce=F.indexOf(Z);Ce!==-1&&F.splice(Ce,1);let we=H.indexOf(Z);we!==-1&&H.splice(we,1),W.push(Z)}let K=0;for(let Z of W){if(K===0)U(Z,re.coord);else{let Ce=K%2===1?1:-1,we=Math.ceil(K/2);U(Z,re.coord+Ce*we*cP*.5)}K++}let Y=0;for(let Z of H)Y++,U(Z,re.coord+Y*cP)}}for(let[re,le]of i.entries()){let oe=m[re]??[];if(oe.length===0)continue;let he=[],xe=a.get(le.start),se=a.get(le.end),{pSrcPort:F,pDstPort:H}=q(re,xe,se),W=oe.map(K=>{let Y=g[K],Z=Ie.get(`${Y.edgeIndex}-${Y.segmentIndex}`)??Y.pipe.coord;return{orient:Y.orientation,coord:Z,from:Y.from,to:Y.to}});he.push(F);for(let K=0;KKr&&he.push(fg(Y,Ce)),Se&&ke.orient===Y.orient)if(Math.abs(Y.coord-ke.coord)>Kr){let Ne=Y.orient==="vertical"?(Ce+ke.from)/2:qP(Y,ke);he.push(fg(Y,Ne),fg(ke,Ne))}else(K===0||K===W.length-2)&&he.push(fg(Y,qP(Y,ke)));else if(Se)he.push(fg(Y,ke.coord));else{let Ne=Math.abs(Y.from-Ce)Kr||Math.abs(U.y-H.y)>Kr)&&he.push(H);let ae=[];he.length>0&&ae.push(he[0]);for(let K=1;KKr||Math.abs(Y.y-Z.y)>Kr)&&ae.push(Y)}le.points=ae}for(let re of i){let le=re.__originalEdge;le&&re.points&&(le.points=re.points)}e.edges=(e.edges??[]).filter(re=>!re.isLayoutOnly);let Me=v((re,le)=>{let oe=le.x??0,he=le.y??0,xe=le.width??0,se=le.height??0;if(xe<=0||se<=0)return re;let F=oe-xe/2,H=oe+xe/2,W=he-se/2,U=he+se/2;if(re.xH||re.yU)return re;let ae=re.x-F,K=H-re.x,Y=re.y-W,Z=U-re.y,Ce=Math.min(ae,K,Y,Z);return Ce===ae?{x:F,y:re.y}:Ce===K?{x:H,y:re.y}:Ce===Y?{x:re.x,y:W}:{x:re.x,y:U}},"nodeBoundaryClamp");for(let re of e.edges){let le=re.points;if(!le||le.length<2)continue;let oe=re.start,he=re.end,xe=oe?a.get(oe):void 0,se=he?a.get(he):void 0;xe&&(le[0]=Me(le[0],xe)),se&&(le[le.length-1]=Me(le[le.length-1],se))}return e}function b1e(e){return e.direction??"TB"}function T1e(e){let t=nye(e),r=e.config.flowchart?.nodeSpacing??40,n=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,s=e.config.swimlane?.automaticLaneOrdering??!1,o=b1e(e),{ordered:l,coordinates:u}=v1e(t,{nodeGap:r,layerGap:n,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:s,direction:o});iye(t,l,u,{nodeGap:r,layerGap:n});for(let h of e.edges??[])delete h.points;x1e(e,o);for(let h of e.edges??[])(!h.curve||h.curve==="basis")&&(h.curve="rounded");return Pye(e,o),Oye(e),o}function w1e(e){rye(e);let t=aye(e);e.nodes=t.nodes,e.edges=t.edges}var $me,X5,j5,Mit,sP,Dit,Fme,Nit,Da,_r,Oit,zme,fc,Pit,K5,Bit,Kt,Ma,Yr,oP,Kd,$it,bo,Gme,Z5,lP,Fit,qme,zit,Git,c3,Vme,c1e,Kr,qit,hg,I1,Q5,Rl,cP,Vit,k1e=X(()=>{z5();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();$me=5,X5=1e-5,j5=1e-6;v(t3,"buildSegmentList");v(Wme,"segmentIntersection");v(uP,"isHorizontalSeg");v(Ume,"findEdgeIntersections");v(dc,"fmt");v(M1,"pointToString");v(Hme,"getArcSweepFlag");Mit=.001;v(Yme,"applyMarkerOffsets");v(Xme,"emitJump");v(hP,"computeRoundedCorner");v(jme,"rewriteEdgePath");v(Kme,"isStraightPath");v(Zme,"curveSupportsLineHops");v(Qme,"decodeDataPoints");v(Jme,"applyLineJumpsToSvg");v(eye,"applySwimlaneLineJumps");sP="__swimlane_default__",Dit=21,Fme=20;v(fP,"topLaneHorizontalPadding");v(tye,"assignTopLaneTitleRect");v(rye,"prepareLayoutForSwimlanes");v(nye,"toGraphView");v(iye,"writeBackToLayoutData");Nit="[EdgeLabelNodes]";v(aye,"createEdgeLabelNodes");Da=.001;v(VP,"measuredNodeRect");v(WP,"nodeBoundsInfoFor");v(Ll,"samePoint");v(tn,"sameX");v(sn,"sameY");v(Oi,"isHorizontalSegment");v(Pi,"isVerticalSegment");v(Fs,"overlapLength");v(Ru,"sameAxisSegmentOverlapLength");v(N1,"orthogonalSegmentsForPoints");v(nl,"countOrthogonalBends");v(hn,"dedupeConsecutivePoints");v(UP,"classifyThreeSegmentRoute");v(h3,"segmentBoundsOverlapRect");v(HP,"pointInsideRect");v(sye,"rectContainsRect");v(r3,"rectsOverlap");v(dP,"inflateRect");v(D1,"rectFromCenterSize");v(To,"rectOfNodeBounds");v(dg,"portForRectSide");v(YP,"buildOrthogonalPortPath");v(XP,"buildSameSideTrackPath");v(f3,"collectRealNodeBounds");v(Zd,"collectNodeRectEntries");v(oye,"collectLayoutNodeRects");v(jP,"getNodePairGeometry");v(Hi,"segmentHitsAnyRect");v(KP,"orthogonalSegmentsCross");v(lye,"sameAxisSegmentsOverlap");v(n3,"segmentConflictsWithAnyEdge");v(jh,"orthogonalSegmentsStrictlyCross");v(pP,"strictlyBetween");v(cye,"isCollinearIntermediate");v(uye,"simplifyPolylineOnce");v(i3,"orthogonalizePolyline");v(Lu,"simplifyPolyline");_r=.001,Oit=.5,zme=4;v(ZP,"endpointContextFor");v(hye,"segmentEnterPoint");v(gP,"clipEndpoint");v(fye,"clipEdgeEndpointsToNodeBoundaries");v(mP,"snapEndpointToBoundary");v(a3,"firstDistinctAdjacent");v(s3,"cornerClearanceRange");v(yP,"clampToCornerClearance");v(dye,"intersectRanges");v(vP,"clearanceRangeForSide");v(o3,"terminalSideForSegment");v(wT,"isHorizontalSide");v(pye,"straightClearanceRange");v(xP,"clearStraightEndpointCornerAxis");v(QP,"clearStraightEndpointCornerConnections");v(gye,"cornerClearedEndpoint");v(mye,"moveCollinearEndpointRun");v(bP,"clearEndpointCornerConnection");v(TP,"borderSideForSegment");v(wP,"leavesOutward");v(CP,"collapseOwnBorderStub");v(yye,"snapAndCollapseEndpoints");v(kP,"prepareEdgeEndpointsForRenderer");v(JP,"buildNodeMap");v(vye,"resolveTopLevelGroupId");v(SP,"groupDepth");v(eB,"boundsForChildren");v(xye,"applyGroupBounds");v(bye,"recomputeNestedGroupBounds");v(l3,"mirrorAxis");v(Tye,"applyBtDirectionTransform");v(wye,"applyLrDirectionTransform");fc=1e-6,Pit=8,K5=Pit,Bit=[0,K5,-K5,2*K5,-2*K5];v(Cye,"portSwapToLShape");v(kye,"collapseShortTerminalStub");Kt=.001,Ma=8,Yr=N1,oP=v((e,t)=>tn(e,t,Kt)||sn(e,t,Kt),"orthogonallyAligned");v(Sye,"separateSharedRenderedTerminalLanes");v(Eye,"collapseRedundantRectangularDoglegs");v(EP,"liftObstacleHuggingSameSideRails");v(AP,"liftTopLaneTitleBandsAboveRails");v(_P,"shiftLeftLaneTitleBandsLeftOfRails");v(Aye,"swapDestinationTerminalTailsToReduceCrossings");v(_ye,"reassignCrossingExternalRailChannels");v(Rye,"shortcutRedundantOrthogonalJogs");v(Lye,"resolveRenderedOrthogonalCrossings");Kd=.001,$it=8;v(Iye,"simplifyDetouredEdges");bo=.001,Gme=10,Z5=7;v(RP,"markerClearanceRectFor");v(Mye,"normalizeRect");v(LP,"labelOverlapsOwnMarker");v(J5,"anchorLabelsToPolyline");lP=1e-6,Fit=8,qme=Fit/2,zit=3;v(IP,"pairKey");v(Dye,"straightenCollinearSiblingDetours");v(MP,"nudgeSharedInteriorSubpaths");v(Nye,"segmentsIntersect");v(Oye,"validateSwimlanesLayout");v(Pye,"postProcessSwimlaneLayout");v(Qd,"normalizeGraph");v(tB,"incoming");v(Bye,"buildSuccessorMap");v(rB,"buildSortedSuccessorMap");v(nB,"buildInDegreeMap");v(iB,"sortedZeroInDegreeNodes");v(d3,"buildPredecessorSuccessorMaps");v(aB,"buildLayersFromRanks");v(CT,"topoSortIfAcyclic");v(O1,"buildLayerIndex");v(sB,"countInversions");v($ye,"removeCycles_DFS");v(Fye,"buildTopLaneMap");v(Kh,"createTopLaneResolver");v(p3,"buildTopLaneOrder");v(oB,"resolveTopLaneOrder");Git={EPSILON:1e-6},c3={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Vme={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};v(zye,"buildDrivingTree");v(Gye,"chooseParent");v(qye,"buildAdjacency");v(Vye,"assignComponents");v(Wye,"computeBlocks");v(Uye,"popBlock");v(Hye,"computeSubtreeCrossCounts");v(Yye,"annotateMinimumLayers");v(lB,"compareByRankThenId");v(Xye,"emitNodesInTreeOrder");v(jye,"deduplicateLayers");v(Kye,"createChildOrderer");v(u3,"buildMultitreeLayerOrder");v(Zye,"countCrossingsBetweenAdjacent");v(DP,"totalCrossings");v(Qye,"optimizeRanksByCrossings");v(Jye,"adjustCrossLaneSources");v(e1e,"assignLayers_LongestPath");v(t1e,"assignLayers_Gravity");v(r1e,"topoSortByGenerationIfAcyclic");v(n1e,"assignLayers_LaneAwareCompact");v(i1e,"makeProperLayering");v(NP,"median");v(OP,"barycenter");v(a1e,"neighborPositionsFor");v(s1e,"currentOrderTieBreak");v(PP,"countCrossingsBetweenAdjacent");v(e3,"sortByHeuristic");v(BP,"reorderLayer");v($P,"transposeImprove");v(o1e,"orderLayers");v(l1e,"assignCoordinates");c1e=8;v(u1e,"hashString");v(h1e,"mulberry32");v(f1e,"deterministicShuffle");v(d1e,"sourceDistance");v(FP,"laneArrangementCost");v(p1e,"buildWeightedLaneEdges");v(zP,"greedySwitch");v(g1e,"isBetterCandidate");v(m1e,"seedForRestart");v(y1e,"optimizeTopLaneOrder");v(v1e,"sugiyamaLayout");Kr=Git.EPSILON,qit=8,hg=15,I1=15,Q5=25,Rl=20,cP=10;v(GP,"chooseOrthogonalSide");v(qP,"sharedLineEndpointCoord");v(fg,"pointOnLine");v(x1e,"routeEdgesOrthogonal");v(b1e,"getSwimlaneDirection");v(T1e,"runSwimlaneLayoutCore");v(w1e,"prepareSwimlaneLayout");Vit=_1({prepareLayout:w1e,runLayoutCore:T1e,afterPaint:eye})});function F$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,a=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw a}}}}function Jxe(e,t,r){return(t=ebe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yit(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xit(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(h){u=!0,i=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function jit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kit(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ia(e,t){return Wit(e)||Xit(e,t)||aF(e,t)||jit()}function F3(e){return Uit(e)||Yit(e)||aF(e)||Kit()}function Zit(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ebe(e){var t=Zit(e,"string");return typeof t=="symbol"?t:t+""}function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}function aF(e,t){if(e){if(typeof e=="string")return F$(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F$(e,t):void 0}}function jT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function KT(){if(A1e)return cB;A1e=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return cB=e,cB}function xat(){if(_1e)return uB;_1e=1;var e=typeof g3=="object"&&g3&&g3.Object===Object&&g3;return uB=e,uB}function eA(){if(R1e)return hB;R1e=1;var e=xat(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return hB=r,hB}function bat(){if(L1e)return fB;L1e=1;var e=eA(),t=function(){return e.Date.now()};return fB=t,fB}function Tat(){if(I1e)return dB;I1e=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return dB=t,dB}function wat(){if(M1e)return pB;M1e=1;var e=Tat(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return pB=r,pB}function lF(){if(D1e)return gB;D1e=1;var e=eA(),t=e.Symbol;return gB=t,gB}function Cat(){if(N1e)return mB;N1e=1;var e=lF(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(s){var o=r.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var h=n.call(s);return u&&(o?s[i]=l:delete s[i]),h}return mB=a,mB}function kat(){if(O1e)return yB;O1e=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return yB=r,yB}function ube(){if(P1e)return vB;P1e=1;var e=lF(),t=Cat(),r=kat(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?i:n:a&&a in Object(o)?t(o):r(o)}return vB=s,vB}function Sat(){if(B1e)return xB;B1e=1;function e(t){return t!=null&&typeof t=="object"}return xB=e,xB}function ZT(){if($1e)return bB;$1e=1;var e=ube(),t=Sat(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return bB=n,bB}function Eat(){if(F1e)return TB;F1e=1;var e=wat(),t=KT(),r=ZT(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=t(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?n:+u}return TB=l,TB}function Aat(){if(z1e)return wB;z1e=1;var e=KT(),t=bat(),r=Eat(),n="Expected a function",i=Math.max,a=Math.min;function s(o,l,u){var h,f,d,p,g,m,y=0,x=!1,b=!1,T=!0;if(typeof o!="function")throw new TypeError(n);l=r(l)||0,e(u)&&(x=!!u.leading,b="maxWait"in u,d=b?i(r(u.maxWait)||0,l):d,T="trailing"in u?!!u.trailing:T);function k(_){var D=h,I=f;return h=f=void 0,y=_,p=o.apply(I,D),p}function w(_){return y=_,g=setTimeout(E,l),x?k(_):p}function C(_){var D=_-m,I=_-y,M=l-D;return b?a(M,d-I):M}function S(_){var D=_-m,I=_-y;return m===void 0||D>=l||D<0||b&&I>=d}function E(){var _=t();if(S(_))return L(_);g=setTimeout(E,C(_))}function L(_){return g=void 0,T&&h?k(_):(h=f=void 0,p)}function N(){g!==void 0&&clearTimeout(g),y=0,h=m=f=g=void 0}function O(){return g===void 0?p:L(t())}function R(){var _=t(),D=S(_);if(h=arguments,f=this,m=_,D){if(g===void 0)return w(m);if(b)return clearTimeout(g),g=setTimeout(E,l),k(m)}return g===void 0&&(g=setTimeout(E,l)),p}return R.cancel=N,R.flush=O,R}return wB=s,wB}function Mat(e,t,r,n,i){var a=i*Math.PI/180,s=Math.cos(a)*(e-r)-Math.sin(a)*(t-n)+r,o=Math.sin(a)*(e-r)+Math.cos(a)*(t-n)+n;return{x:s,y:o}}function Nat(e,t,r){if(r===0)return e;var n=(t.x1+t.x2)/2,i=(t.y1+t.y2)/2,a=t.w/t.h,s=1/a,o=Mat(e.x,e.y,n,i,r),l=Dat(o.x,o.y,n,i,a,s);return{x:l.x,y:l.y}}function Uat(){return U1e||(U1e=1,(function(e,t){(function(){var r,n,i,a,s,o,l,u,h,f,d,p,g,m,y;i=Math.floor,f=Math.min,n=function(x,b){return xb?1:0},h=function(x,b,T,k,w){var C;if(T==null&&(T=0),w==null&&(w=n),T<0)throw new Error("lo must be non-negative");for(k==null&&(k=x.length);TN;0<=N?L++:L--)E.push(L);return E}).apply(this).reverse(),S=[],k=0,w=C.length;kO;0<=O?++E:--E)R.push(s(x,T));return R},m=function(x,b,T,k){var w,C,S;for(k==null&&(k=n),w=x[T];T>b;){if(S=T-1>>1,C=x[S],k(w,C)<0){x[T]=C,T=S;continue}break}return x[T]=w},y=function(x,b,T){var k,w,C,S,E;for(T==null&&(T=n),w=x.length,E=b,C=x[b],k=2*b+1;k-1}return ZB=t,ZB}function Fot(){if(Mve)return QB;Mve=1;var e=sA();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return QB=t,QB}function zot(){if(Dve)return JB;Dve=1;var e=Oot(),t=Pot(),r=Bot(),n=$ot(),i=Fot();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&n%1==0&&n0;){var h=i.shift();t(h),a.add(h.id()),o&&n(i,a,h)}return e}function qbe(e,t,r){if(r.isParent())for(var n=r._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:Zlt,t=arguments.length>1?arguments[1]:void 0,r=0;r0?R=D:O=D;while(Math.abs(_)>s&&++I=a?b(N,I):M===0?I:k(N,O,O+u)}var C=!1;function S(){C=!0,(e!==t||r!==n)&&T()}var E=function(O){return C||S(),e===t&&r===n?O:O===0?0:O===1?1:y(w(O),t,n)};E.getControlPoints=function(){return[{x:e,y:t},{x:r,y:n}]};var L="generateBezier("+[e,t,r,n]+")";return E.toString=function(){return L},E}function wxe(e,t,r,n,i){if(n===1||t===r)return r;var a=i(t,r,n);return e==null||((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max))),a}function Cxe(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!=="%")?e.pfValue:e.value:e}function $1(e,t,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var s=Cxe(e,i),o=Cxe(t,i);if(Pt(s)&&Pt(o))return wxe(a,s,o,r,n);if(Xn(s)&&Xn(o)){for(var l=[],u=0;u0?(p==="spring"&&g.push(s.duration),s.easingImpl=D3[p].apply(null,g)):s.easingImpl=D3[p]}var m=s.easingImpl,y;if(s.duration===0?y=1:y=(r-l)/s.duration,s.applying&&(y=s.progress),y<0?y=0:y>1&&(y=1),s.delay==null){var x=s.startPosition,b=s.position;if(b&&i&&!e.locked()){var T={};AT(x.x,b.x)&&(T.x=$1(x.x,b.x,y,m)),AT(x.y,b.y)&&(T.y=$1(x.y,b.y,y,m)),e.position(T)}var k=s.startPan,w=s.pan,C=a.pan,S=w!=null&&n;S&&(AT(k.x,w.x)&&(C.x=$1(k.x,w.x,y,m)),AT(k.y,w.y)&&(C.y=$1(k.y,w.y,y,m)),e.emit("pan"));var E=s.startZoom,L=s.zoom,N=L!=null&&n;N&&(AT(E,L)&&(a.zoom=zT(a.minZoom,$1(E,L,y,m),a.maxZoom)),e.emit("zoom")),(S||N)&&e.emit("viewport");var O=s.style;if(O&&O.length>0&&i){for(var R=0;R=0;S--){var E=C[S];E()}C.splice(0,C.length)},b=p.length-1;b>=0;b--){var T=p[b],k=T._private;if(k.stopped){p.splice(b,1),k.hooked=!1,k.playing=!1,k.started=!1,x(k.frames);continue}!k.playing&&!k.applying||(k.playing&&k.applying&&(k.applying=!1),k.started||hct(h,T,e),uct(h,T,e,f),k.applying&&(k.applying=!1),x(k.frames),k.step!=null&&k.step(e),T.completed()&&(p.splice(b,1),k.hooked=!1,k.playing=!1,k.started=!1,x(k.completes)),m=!0)}return!f&&p.length===0&&g.length===0&&n.push(h),m}for(var a=!1,s=0;s0?t.notify("draw",r):t.notify("draw")),r.unmerge(n),t.emit("step")}function s2e(e){this.options=yr({},xct,bct,e)}function o2e(e){this.options=yr({},Tct,e)}function l2e(e){this.options=yr({},wct,e)}function pA(e){this.options=yr({},Cct,e),this.options.layout=this;var t=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),s=i.target().data("id"),o=t.some(function(u){return u.data("id")===a}),l=t.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(n)}function f2e(e){this.options=yr({},$ct,e)}function kF(e){this.options=yr({},Fct,e)}function d2e(e){this.options=yr({},zct,e)}function p2e(e){this.options=yr({},Gct,e)}function g2e(e){this.options=e,this.notifications=0}function v2e(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function EF(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Wct(e,t,r,n,i),{cx:K$,cy:Z$,radius:vg,startX:m2e,startY:y2e,stopX:Q$,stopY:J$,startAngle:Du.ang+Math.PI/2*bg,endAngle:Il.ang-Math.PI/2*bg,counterClockwise:P3})}function x2e(e){var t=[];if(e!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(a,n/2,i/2);e.beginPath(),e.moveTo(t+s,r),e.lineTo(t+n-s,r),e.quadraticCurveTo(t+n,r,t+n,r+s),e.lineTo(t+n,r+i-s),e.quadraticCurveTo(t+n,r+i,t+n-s,r+i),e.lineTo(t+s,r+i),e.quadraticCurveTo(t,r+i,t,r+i-s),e.lineTo(t,r+s),e.quadraticCurveTo(t,r,t+s,r),e.closePath()}function Wxe(e,t,r){var n=e.createShader(t);if(e.shaderSource(n,r),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(n));return n}function Out(e,t,r){var n=Wxe(e,e.VERTEX_SHADER,t),i=Wxe(e,e.FRAGMENT_SHADER,r),a=e.createProgram();if(e.attachShader(a,n),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function Put(e,t,r){r===void 0&&(r=t);var n=e.makeOffscreenCanvas(t,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function RF(e){var t=e.pixelRatio,r=e.cy.zoom(),n=e.cy.pan();return{zoom:r*t,pan:{x:n.x*t,y:n.y*t}}}function But(e){var t=e.pixelRatio,r=e.cy.zoom();return r*t}function $ut(e,t,r,n,i){var a=n*r+t.x,s=i*r+t.y;return s=Math.round(e.canvasHeight-s),[a,s]}function Fut(e,t){return t.picking?!0:e.pstyle("background-fill").value!=="solid"||e.pstyle("background-image").strValue!=="none"?!1:e.pstyle("border-width").value===0||e.pstyle("border-opacity").value===0?!0:e.pstyle("border-style").value==="solid"}function zut(e,t){if(e.length!==t.length)return!1;for(var r=0;r>0&255)/255,r[1]=(e>>8&255)/255,r[2]=(e>>16&255)/255,r[3]=(e>>24&255)/255,r}function Gut(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function qut(e,t){var r=e.createTexture();return r.buffer=function(n){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function D2e(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function N2e(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function Vut(e,t,r,n,i,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*n,i);case e.INT:return new Int32Array(r.buffer,a*n,i)}}function Wut(e,t,r,n){var i=D2e(e,t),a=ia(i,2),s=a[0],o=a[1],l=N2e(e,o,n),u=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,l,e.STATIC_DRAW),o===e.FLOAT?e.vertexAttribPointer(r,s,o,!1,0,0):o===e.INT&&e.vertexAttribIPointer(r,s,o,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),u}function Mu(e,t,r,n){var i=D2e(e,r),a=ia(i,3),s=a[0],o=a[1],l=a[2],u=N2e(e,o,t*s),h=s*l,f=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,f),e.bufferData(e.ARRAY_BUFFER,t*h,e.DYNAMIC_DRAW),e.enableVertexAttribArray(n),o===e.FLOAT?e.vertexAttribPointer(n,s,o,!1,h,0):o===e.INT&&e.vertexAttribIPointer(n,s,o,h,0),e.vertexAttribDivisor(n,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var d=new Array(t),p=0;p_2e?(oht(e),t.call(e,a)):(lht(e),$2e(e,a,PT.SCREEN)))}}{var r=e.matchCanvasSize;e.matchCanvasSize=function(a){r.call(e,a),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0}}e.findNearestElements=function(a,s,o,l){return pht(e,a,s)};{var n=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){n.call(e),e.pickingFrameBuffer.needsDraw=!0}}{var i=e.notify;e.notify=function(a,s){i.call(e,a,s),a==="viewport"||a==="bounds"?e.pickingFrameBuffer.needsDraw=!0:a==="background"&&e.drawing.invalidate(s,{type:"node-body"})}}}function oht(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function lht(e){var t=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.canvasWidth,e.canvasHeight),n.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function cht(e){var t=e.canvasWidth,r=e.canvasHeight,n=RF(e),i=n.pan,a=n.zoom,s=D$();$3(s,s,[i.x,i.y]),tF(s,s,[a,a]);var o=D$();Xut(o,t,r);var l=D$();return Yut(l,o,s),l}function B2e(e,t){var r=e.canvasWidth,n=e.canvasHeight,i=RF(e),a=i.pan,s=i.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,n),t.translate(a.x,a.y),t.scale(s,s)}function uht(e,t){e.drawSelectionRectangle(t,function(r){return B2e(e,r)})}function hht(e){var t=e.data.contexts[e.NODE];t.save(),B2e(e,t),t.strokeStyle="rgba(0, 0, 0, 0.3)",t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function fht(e){var t=function(i,a,s){for(var o=i.atlasManager.getAtlasCollection(a),l=e.data.contexts[e.NODE],u=o.atlases,h=0;h=0&&k.add(S)}return k}function pht(e,t,r){var n=dht(e,t,r),i=e.getCachedZSortedEles(),a,s,o=Co(n),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,h=i[u];if(!a&&h.isNode()&&(a=h),!s&&h.isEdge()&&(s=h),a&&s)break}}catch(f){o.e(f)}finally{o.f()}return[a,s].filter(Boolean)}function $$(e,t,r){var n=e.drawing;t+=1,r.isNode()?(n.drawNode(r,t,"node-underlay"),n.drawNode(r,t,"node-body"),n.drawTexture(r,t,"label"),n.drawNode(r,t,"node-overlay")):(n.drawEdgeLine(r,t),n.drawEdgeArrow(r,t,"source"),n.drawEdgeArrow(r,t,"target"),n.drawTexture(r,t,"label"),n.drawTexture(r,t,"edge-source-label"),n.drawTexture(r,t,"edge-target-label"))}function $2e(e,t,r){var n;e.webglDebug&&(n=performance.now());var i=e.drawing,a=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&uht(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var s=e.data.contexts[e.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=cht(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(o,r),r.screen){for(var u=0;u{ma=typeof window>"u"?null:window,S1e=ma?ma.navigator:null;ma&&ma.document;Qit=va(""),tbe=va({}),Jit=va(function(){}),eat=typeof HTMLElement>"u"?"undefined":va(HTMLElement),YT=function(t){return t&&t.instanceString&&Ci(t.instanceString)?t.instanceString():null},fr=function(t){return t!=null&&va(t)==Qit},Ci=function(t){return t!=null&&va(t)===Jit},Xn=function(t){return!il(t)&&(Array.isArray?Array.isArray(t):t!=null&&t instanceof Array)},dn=function(t){return t!=null&&va(t)===tbe&&!Xn(t)&&t.constructor===Object},tat=function(t){return t!=null&&va(t)===tbe},Pt=function(t){return t!=null&&va(t)===va(1)&&!isNaN(t)},rbe=function(t){return Pt(t)&&Math.floor(t)===t},z3=function(t){if(eat!=="undefined")return t!=null&&t instanceof HTMLElement},il=function(t){return XT(t)||nbe(t)},XT=function(t){return YT(t)==="collection"&&t._private.single},nbe=function(t){return YT(t)==="collection"&&!t._private.single},sF=function(t){return YT(t)==="core"},ibe=function(t){return YT(t)==="stylesheet"},rat=function(t){return YT(t)==="event"},op=function(t){return t==null?!0:!!(t===""||t.match(/^\s+$/))},nat=function(t){return typeof HTMLElement>"u"?!1:t instanceof HTMLElement},iat=function(t){return dn(t)&&Pt(t.x1)&&Pt(t.x2)&&Pt(t.y1)&&Pt(t.y2)},aat=function(t){return tat(t)&&Ci(t.then)},sat=function(){return S1e&&S1e.userAgent.match(/msie|trident|edge/i)},Z1=function(t,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;sr?1:0},dat=function(t,r){return-1*sbe(t,r)},yr=Object.assign!=null?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r1&&(y-=1),y<1/6?g+(m-g)*6*y:y<1/2?m:y<2/3?g+(m-g)*(2/3-y)*6:g}var f=new RegExp("^"+cat+"$").exec(t);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(i===0)o=l=u=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,p=2*a-d;o=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),u=Math.round(255*h(p,d,n-1/3))}r=[o,l,u,s]}return r},mat=function(t){var r,n=new RegExp("^"+oat+"$").exec(t);if(n){r=[];for(var i=[],a=1;a<=3;a++){var s=n[a];if(s[s.length-1]==="%"&&(i[a]=!0),s=parseFloat(s),i[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=i[1]||i[2]||i[3],l=i[1]&&i[2]&&i[3];if(o&&!l)return;var u=n[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},yat=function(t){return vat[t.toLowerCase()]},obe=function(t){return(Xn(t)?t:null)||yat(t)||pat(t)||mat(t)||gat(t)},vat={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},lbe=function(t){for(var r=t.map,n=t.keys,i=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:xg,n=r,i;i=t.next(),!i.done;)n=n*fbe+i.value|0;return n},BT=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xg;return r*fbe+t|0},$T=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:V1;return(r<<5)+r+t|0},Lat=function(t,r){return t*2097152+r},Jd=function(t){return t[0]*2097152+t[1]},m3=function(t,r){return[BT(t[0],r[0]),$T(t[1],r[1])]},G1e=function(t,r){var n={value:0,done:!1},i=0,a=t.length,s={next:function(){return i=0;i--)t[i]===r&&t.splice(i,1)},hF=function(t){t.splice(0,t.length)},zat=function(t,r){for(var n=0;n"u"?"undefined":va(Set))!==qat?Set:Vat,tA=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(t===void 0||r===void 0||!sF(t)){gi("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){gi("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:t,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new rv,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=t.pan(),l=t.zoom();a.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Xn(r.classes)?u=r.classes:fr(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,f=u.length;h0;){var C=b.pop(),S=y(C),E=C.id();if(d[E]=S,S!==1/0)for(var L=C.neighborhood().intersect(g),N=0;N0)for(P.unshift(B);f[G];){var q=f[G];P.unshift(q.edge),P.unshift(q.node),$=q.node,G=$.id()}return o.spawn(P)}}}},Kat={kruskal:function(t){t=t||function(T){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,s=new Array(a),o=n,l=function(k){for(var w=0;w0;){if(w(),S++,k===h){for(var E=[],L=a,N=h,O=x[N];E.unshift(L),O!=null&&E.unshift(O),L=y[N],L!=null;)N=L.id(),O=x[N];return{found:!0,distance:f[k],path:this.spawn(E),steps:S}}p[k]=!0;for(var R=T._private.edges,_=0;_O&&(g[N]=O,b[N]=L,T[N]=w),!a){var R=L*h+E;!a&&g[R]>O&&(g[R]=O,b[R]=E,T[R]=w)}}}for(var _=0;_1&&arguments[1]!==void 0?arguments[1]:s,Ie=T(me),Me=[],re=Ie;;){if(re==null)return r.spawn();var le=b(re),oe=le.edge,he=le.pred;if(Me.unshift(re[0]),re.same(De)&&Me.length>0)break;oe!=null&&Me.unshift(oe),re=he}return l.spawn(Me)},C=0;C=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var g=0;gi;){var a=Math.floor(Math.random()*r.length);r=ist(a,t,r),n--}return r},ast={kargerStein:function(){var t=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(P){return P.isLoop()});var a=n.length,s=i.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),l=Math.floor(a/nst);if(a<2){gi("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=0,a=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?t=t.slice(r,n):(n0&&t.splice(0,r));for(var o=0,l=t.length-1;l>=0;l--){var u=t[l];s?isFinite(u)||(t[l]=-1/0,o++):t.splice(l,1)}a&&t.sort(function(d,p){return d-p});var h=t.length,f=Math.floor(h/2);return h%2!==0?t[f+1+o]:(t[f-1+o]+t[f+o])/2},bbe=function(t,r){return r===0?t:bbe(r,t%r)},hst=function(t){for(var r=t[0],n=0;n0&&(r=bbe(r,t[n]));else return 0;return r},fst=function(t){return Math.PI*t/180},y3=function(t,r){return Math.atan2(r,t)-Math.PI/2},fF=Math.log2||function(e){return Math.log(e)/Math.log(2)},dF=function(t){return t>0?1:t<0?-1:0},Cg=function(t,r){return Math.sqrt(yg(t,r))},yg=function(t,r){var n=r.x-t.x,i=r.y-t.y;return n*n+i*i},dst=function(t){for(var r=t.length,n=0,i=0;i=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(t.w!=null&&t.h!=null&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},gst=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},mst=function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},yst=function(t,r){t.x1=Math.min(t.x1,r.x1),t.x2=Math.max(t.x2,r.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r.y1),t.y2=Math.max(t.y2,r.y2),t.h=t.y2-t.y1},Tbe=function(t,r,n){t.x1=Math.min(t.x1,r),t.x2=Math.max(t.x2,r),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1},R3=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.x1-=r,t.x2+=r,t.y1-=r,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},L3=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,s;if(r.length===1)n=i=a=s=r[0];else if(r.length===2)n=a=r[0],s=i=r[1];else if(r.length===4){var o=ia(r,4);n=o[0],i=o[1],a=o[2],s=o[3]}return t.x1-=s,t.x2+=i,t.y1-=n,t.y2+=a,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},Y1e=function(t,r){t.x1=r.x1,t.y1=r.y1,t.x2=r.x2,t.y2=r.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},pF=function(t,r){return!(t.x1>r.x2||r.x1>t.x2||t.x2r.y2||r.y1>t.y2)},np=function(t,r,n){return t.x1<=r&&r<=t.x2&&t.y1<=n&&n<=t.y2},X1e=function(t,r){return np(t,r.x,r.y)},wbe=function(t,r){return np(t,r.x1,r.y1)&&np(t,r.x2,r.y2)},vst=(EB=Math.hypot)!==null&&EB!==void 0?EB:function(e,t){return Math.sqrt(e*e+t*t)};Cbe=function(t,r,n,i,a,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?cp(a,s):l,h=a/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,g;if(d){var m=n-h+u-o,y=i-f-o,x=n+h-u+o,b=y;if(g=ip(t,r,n,i,m,y,x,b,!1),g.length>0)return g}if(p){var T=n+h+o,k=i-f+u-o,w=T,C=i+f-u+o;if(g=ip(t,r,n,i,T,k,w,C,!1),g.length>0)return g}if(d){var S=n-h+u-o,E=i+f+o,L=n+h-u+o,N=E;if(g=ip(t,r,n,i,S,E,L,N,!1),g.length>0)return g}if(p){var O=n-h-o,R=i-f+u-o,_=O,D=i+f-u+o;if(g=ip(t,r,n,i,O,R,_,D,!1),g.length>0)return g}var I;{var M=n-h+u,B=i-f+u;if(I=IT(t,r,n,i,M,B,u+o),I.length>0&&I[0]<=M&&I[1]<=B)return[I[0],I[1]]}{var P=n+h-u,$=i-f+u;if(I=IT(t,r,n,i,P,$,u+o),I.length>0&&I[0]>=P&&I[1]<=$)return[I[0],I[1]]}{var G=n+h-u,q=i+f-u;if(I=IT(t,r,n,i,G,q,u+o),I.length>0&&I[0]>=G&&I[1]>=q)return[I[0],I[1]]}{var z=n-h+u,V=i+f-u;if(I=IT(t,r,n,i,z,V,u+o),I.length>0&&I[0]<=z&&I[1]>=V)return[I[0],I[1]]}return[]},Tst=function(t,r,n,i,a,s,o){var l=o,u=Math.min(n,a),h=Math.max(n,a),f=Math.min(i,s),d=Math.max(i,s);return u-l<=t&&t<=h+l&&f-l<=r&&r<=d+l},wst=function(t,r,n,i,a,s,o,l,u){var h={x1:Math.min(n,o,a)-u,x2:Math.max(n,o,a)+u,y1:Math.min(i,l,s)-u,y2:Math.max(i,l,s)+u};return!(th.x2||rh.y2)},Cst=function(t,r,n,i){n-=i;var a=r*r-4*t*n;if(a<0)return[];var s=Math.sqrt(a),o=2*t,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},kst=function(t,r,n,i,a){var s=1e-5;t===0&&(t=s),r/=t,n/=t,i/=t;var o,l,u,h,f,d,p,g;if(l=(3*n-r*r)/9,u=-(27*i)+r*(9*n-2*(r*r)),u/=54,o=l*l*l+u*u,a[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-p+f+d,p+=(f+d)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-d+f)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,o===0){g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),a[0]=-p+2*g,a[4]=a[2]=-(g+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),g=2*Math.sqrt(l),a[0]=-p+g*Math.cos(h/3),a[2]=-p+g*Math.cos((h+2*Math.PI)/3),a[4]=-p+g*Math.cos((h+4*Math.PI)/3)},Sst=function(t,r,n,i,a,s,o,l){var u=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+i*i-4*i*s+2*i*l+4*s*s-4*s*l+l*l,h=9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*i*s-3*i*i-3*i*l-6*s*s+3*s*l,f=3*n*n-6*n*a+n*o-n*t+2*a*a+2*a*t-o*t+3*i*i-6*i*s+i*l-i*r+2*s*s+2*s*r-l*r,d=1*n*a-n*n+n*t-a*t+i*s-i*i+i*r-s*r,p=[];kst(u,h,f,d,p);for(var g=1e-7,m=[],y=0;y<6;y+=2)Math.abs(p[y+1])=0&&p[y]<=1&&m.push(p[y]);m.push(1),m.push(0);for(var x=-1,b,T,k,w=0;w=0?ku?(t-a)*(t-a)+(r-s)*(r-s):h-d},wo=function(t,r,n){for(var i,a,s,o,l,u=0,h=0;h=t&&t>=s||i<=t&&t<=s)l=(t-i)/(s-i)*(o-a)+a,l>r&&u++;else continue;return u%2!==0},ef=function(t,r,n,i,a,s,o,l,u){var h=new Array(n.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),g=0;g0){var y=W3(h,-u);m=V3(y)}else m=h;return wo(t,r,m)},Ast=function(t,r,n,i,a,s,o,l){for(var u=new Array(n.length*2),h=0;h=0&&y<=1&&b.push(y),x>=0&&x<=1&&b.push(x),b.length===0)return[];var T=b[0]*l[0]+t,k=b[0]*l[1]+r;if(b.length>1){if(b[0]==b[1])return[T,k];var w=b[1]*l[0]+t,C=b[1]*l[1]+r;return[T,k,w,C]}else return[T,k]},AB=function(t,r,n){return r<=t&&t<=n||n<=t&&t<=r?t:t<=r&&r<=n||n<=r&&r<=t?r:n},ip=function(t,r,n,i,a,s,o,l,u){var h=t-a,f=n-t,d=o-a,p=r-s,g=i-r,m=l-s,y=d*p-m*h,x=f*p-g*h,b=m*f-d*g;if(b!==0){var T=y/b,k=x/b,w=.001,C=0-w,S=1+w;return C<=T&&T<=S&&C<=k&&k<=S?[t+T*f,r+T*g]:u?[t+T*f,r+T*g]:[]}else return y===0||x===0?AB(t,n,o)===o?[o,l]:AB(t,n,a)===a?[a,s]:AB(a,o,n)===n?[n,i]:[]:[]},Rst=function(t,r,n,i,a){var s=[],o=i/2,l=a/2,u=r,h=n;s.push({x:u+o*t[0],y:h+l*t[1]});for(var f=1;f0){var m=W3(f,-l);p=V3(m)}else p=f}else p=n;for(var y,x,b,T,k=0;k2){for(var g=[h[0],h[1]],m=Math.pow(g[0]-t,2)+Math.pow(g[1]-r,2),y=1;yh&&(h=k)},get:function(T){return u[T]}},d=0;d0?I=D.edgesTo(_)[0]:I=_.edgesTo(D)[0];var M=i(I);_=_.id(),S[_]>S[O]+M&&(S[_]=S[O]+M,E.nodes.indexOf(_)<0?E.push(_):E.updateItem(_),C[_]=0,w[_]=[]),S[_]==S[O]+M&&(C[_]=C[_]+C[O],w[_].push(O))}else for(var B=0;B0;){for(var q=k.pop(),z=0;z0&&o.push(n[l]);o.length!==0&&a.push(i.collection(o))}return a},Wst=function(t,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:Yst,o=i,l,u,h=0;h=2?kT(t,r,n,0,J1e,Xst):kT(t,r,n,0,Q1e)},squaredEuclidean:function(t,r,n){return kT(t,r,n,0,J1e)},manhattan:function(t,r,n){return kT(t,r,n,0,Q1e)},max:function(t,r,n){return kT(t,r,n,-1/0,jst)}};Q1["squared-euclidean"]=Q1.squaredEuclidean;Q1.squaredeuclidean=Q1.squaredEuclidean;Kst=Ja({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),mF=function(t){return Kst(t)},U3=function(t,r,n,i,a){var s=a!=="kMedoids",o=s?function(f){return n[f]}:function(f){return i[f](n)},l=function(d){return i[d](r)},u=n,h=r;return nA(t,i.length,o,l,u,h)},RB=function(t,r,n){for(var i=n.length,a=new Array(i),s=new Array(i),o=new Array(r),l=null,u=0;un)return!1}return!0},Jst=function(t,r,n){for(var i=0;io&&(o=r[u][h],l=h);a[l].push(t[u])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&t.length===1)return!1;var g=r[s],m=r[i[s]],y;a.mode==="dendrogram"?y={left:g,right:m,key:g.key}:y={value:g.value.concat(m.value),key:g.key},t[g.index]=y,t.splice(m.index,1),r[g.key]=y;for(var x=0;xn[m.key][b.key]&&(l=n[m.key][b.key])):a.linkage==="max"?(l=n[g.key][b.key],n[g.key][b.key]0&&i.push(a);return i},ave=function(t,r,n){for(var i=[],a=0;ao&&(s=u,o=r[a*t+u])}s>0&&i.push(s)}for(var h=0;hu&&(l=h,u=f)}n[a]=s[l]}return i=ave(t,r,n),i},sve=function(t){for(var r=this.cy(),n=this.nodes(),i=hot(t),a={},s=0;s=O?(R=O,O=D,_=I):D>R&&(R=D);for(var M=0;M0?1:0;S[L%i.minIterations*o+z]=V,q+=V}if(q>0&&(L>=i.minIterations-1||L==i.maxIterations-1)){for(var j=0,ee=0;ee1||C>1)&&(o=!0),f[T]=[],b.outgoers().forEach(function(E){E.isEdge()&&f[T].push(E.id())})}else d[T]=[void 0,b.target().id()]}):s.forEach(function(b){var T=b.id();if(b.isNode()){var k=b.degree(!0);k%2&&(l?u?o=!0:u=T:l=T),f[T]=[],b.connectedEdges().forEach(function(w){return f[T].push(w.id())})}else d[T]=[b.source().id(),b.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(a){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var g=function(T){for(var k=T,w=[T],C,S,E;f[k].length;)C=f[k].shift(),S=d[C][0],E=d[C][1],k!=E?(f[E]=f[E].filter(function(L){return L!=C}),k=E):!a&&k!=S&&(f[S]=f[S].filter(function(L){return L!=C}),k=S),w.unshift(C),w.unshift(k);return w},m=[],y=[];for(y=g(h);y.length!=1;)f[y[0]].length==0?(m.unshift(s.getElementById(y.shift())),m.unshift(s.getElementById(y.shift()))):y=g(y.shift()).concat(y);m.unshift(s.getElementById(y.shift()));for(var x in f)if(f[x].length)return p;return p.found=!0,p.trail=this.spawn(m,!0),p}},x3=function(){var t=this,r={},n=0,i=0,a=[],s=[],o={},l=function(d,p){for(var g=s.length-1,m=[],y=t.spawn();s[g].x!=d||s[g].y!=p;)m.push(s.pop().edge),g--;m.push(s.pop().edge),m.forEach(function(x){var b=x.connectedNodes().intersection(t);y.merge(x),b.forEach(function(T){var k=T.id(),w=T.connectedEdges().intersection(t);y.merge(T),r[k].cutVertex?y.merge(w.filter(function(C){return C.isLoop()})):y.merge(w)})}),a.push(y)},u=function(d,p,g){d===g&&(i+=1),r[p]={id:n,low:n++,cutVertex:!1};var m=t.getElementById(p).connectedEdges().intersection(t);if(m.size()===0)a.push(t.spawn(t.getElementById(p)));else{var y,x,b,T;m.forEach(function(k){y=k.source().id(),x=k.target().id(),b=y===p?x:y,b!==g&&(T=k.id(),o[T]||(o[T]=!0,s.push({x:p,y:b,edge:k})),b in r?r[p].low=Math.min(r[p].low,r[b].id):(u(d,b,p),r[p].low=Math.min(r[p].low,r[b].low),r[p].id<=r[b].low&&(r[p].cutVertex=!0,l(p,b))))})}};t.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(i=0,u(d,d),r[d].cutVertex=i>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return t.getElementById(f)});return{cut:t.spawn(h),components:a}},xot={hopcroftTarjanBiconnected:x3,htbc:x3,htb:x3,hopcroftTarjanBiconnectedComponents:x3},b3=function(){var t=this,r={},n=0,i=[],a=[],s=t.spawn(t),o=function(u){a.push(u),r[u]={index:n,low:n++,explored:!1};var h=t.getElementById(u).connectedEdges().intersection(t);if(h.forEach(function(m){var y=m.target().id();y!==u&&(y in r||o(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var f=t.spawn();;){var d=a.pop();if(f.merge(t.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),g=f.merge(p);i.push(g),s=s.difference(g)}};return t.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:i}},bot={tarjanStronglyConnected:b3,tsc:b3,tscc:b3,tarjanStronglyConnectedComponents:b3},Lbe={};[FT,jat,Kat,Qat,est,rst,ast,Dst,X1,j1,q$,Hst,aot,cot,mot,vot,xot,bot].forEach(function(e){yr(Lbe,e)});Ibe=0,Mbe=1,Dbe=2,mc=function(t){if(!(this instanceof mc))return new mc(t);this.id="Thenable/1.0.7",this.state=Ibe,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof t=="function"&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};mc.prototype={fulfill:function(t){return ove(this,Mbe,"fulfillValue",t)},reject:function(t){return ove(this,Dbe,"rejectReason",t)},then:function(t,r){var n=this,i=new mc;return n.onFulfilled.push(cve(t,i,"fulfill")),n.onRejected.push(cve(r,i,"reject")),Nbe(n),i.proxy}};ove=function(t,r,n,i){return t.state===Ibe&&(t.state=r,t[n]=i,Nbe(t)),t},Nbe=function(t){t.state===Mbe?lve(t,"onFulfilled",t.fulfillValue):t.state===Dbe&&lve(t,"onRejected",t.rejectReason)},lve=function(t,r,n){if(t[r].length!==0){var i=t[r];t[r]=[];var a=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s0&&this.spawn(i).updateStyle().emit("class"),r},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var r=this[0];return r!=null&&r._private.classes.has(t)},toggleClass:function(t,r){Xn(t)||(t=t.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],s=0,o=n.length;s0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(t),setTimeout(function(){n.removeClass(t)},r),n}};I3.className=I3.classNames=I3.classes;fn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:ya,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};fn.variable="(?:[\\w-.]|(?:\\\\"+fn.metaChar+"))+";fn.className="(?:[\\w-]|(?:\\\\"+fn.metaChar+"))+";fn.value=fn.string+"|"+fn.number;fn.id=fn.variable;(function(){var e,t,r;for(e=fn.comparatorOp.split("|"),r=0;r=0)&&t!=="="&&(fn.comparatorOp+="|\\!"+t)})();Vn=function(){return{checks:[]}},Xt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},H$=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(e,t){return dat(e.selector,t.selector)}),ylt=(function(){for(var e={},t,r=0;r0&&h.edgeCount>0)return Nn("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return Nn("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&Nn("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Clt=function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=function(h){return h??""},r=function(h){return fr(h)?'"'+h+'"':t(h)},n=function(h){return" "+h+" "},i=function(h,f){var d=h.type,p=h.value;switch(d){case Xt.GROUP:{var g=t(p);return g.substring(0,g.length-1)}case Xt.DATA_COMPARE:{var m=h.field,y=h.operator;return"["+m+n(t(y))+r(p)+"]"}case Xt.DATA_BOOL:{var x=h.operator,b=h.field;return"["+t(x)+b+"]"}case Xt.DATA_EXIST:{var T=h.field;return"["+T+"]"}case Xt.META_COMPARE:{var k=h.operator,w=h.field;return"[["+w+n(t(k))+r(p)+"]]"}case Xt.STATE:return p;case Xt.ID:return"#"+p;case Xt.CLASS:return"."+p;case Xt.PARENT:case Xt.CHILD:return a(h.parent,f)+n(">")+a(h.child,f);case Xt.ANCESTOR:case Xt.DESCENDANT:return a(h.ancestor,f)+" "+a(h.descendant,f);case Xt.COMPOUND_SPLIT:{var C=a(h.left,f),S=a(h.subject,f),E=a(h.right,f);return C+(C.length>0?" ":"")+S+E}case Xt.TRUE:return""}},a=function(h,f){return h.checks.reduce(function(d,p,g){return d+(f===h&&g===0?"$":"")+i(p,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(a||o||h)&&(l=!a&&!s?"":""+t,u=""+n),h&&(t=l=l.toLowerCase(),n=u=u.toLowerCase()),r){case"*=":i=l.indexOf(u)>=0;break;case"$=":i=l.indexOf(u,l.length-u.length)>=0;break;case"^=":i=l.indexOf(u)===0;break;case"=":i=t===n;break;case">":d=!0,i=t>n;break;case">=":d=!0,i=t>=n;break;case"<":d=!0,i=t1&&arguments[1]!==void 0?arguments[1]:!0;return bF(this,e,t,qbe)};J1.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return bF(this,e,t,Vbe)};J1.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return bF(this,e,t,Ilt)};J1.ancestors=J1.parents;qT=Wbe={data:Dn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Dn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Dn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Dn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Dn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Dn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}};qT.attr=qT.data;qT.removeAttr=qT.removeData;Mlt=Wbe,lA={};yr(lA,{degree:A$(function(e,t){return t.source().same(t.target())?2:1}),indegree:A$(function(e,t){return t.target().same(e)?1:0}),outdegree:A$(function(e,t){return t.source().same(e)?1:0})});yr(lA,{minDegree:B1("degree",function(e,t){return et}),minIndegree:B1("indegree",function(e,t){return et}),minOutdegree:B1("outdegree",function(e,t){return et})});yr(lA,{totalDegree:function(t){for(var r=0,n=this.nodes(),i=0;i0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(t,r+p[t]):a!==void 0&&u.position({x:a.x+p.x,y:a.y+p.y})}else{var g=n.position(),m=o?n.parent():null,y=m&&m.length>0,x=y;y&&(m=m[0]);var b=x?m.position():{x:0,y:0};return a={x:g.x-b.x,y:g.y-b.y},t===void 0?a:a[t]}else if(!s)return;return this}};gc.modelPosition=gc.point=gc.position;gc.modelPositions=gc.points=gc.positions;gc.renderedPoint=gc.renderedPosition;gc.relativePoint=gc.relativePosition;Dlt=Ube,ev=function(t){switch(t){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},tv=function(t){switch(t){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},Nlt=function(t){switch(t){case"left":return"right";case"right":return"left";case"left-inside":return"left";case"right-inside":return"right";default:return"center"}};K1=gp={};gp.renderedBoundingBox=function(e){var t=this.boundingBox(e),r=this.cy(),n=r.zoom(),i=r.pan(),a=t.x1*n+i.x,s=t.x2*n+i.x,o=t.y1*n+i.y,l=t.y2*n+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}};gp.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,e||r.emitAndNotify("bounds")}}),this)};gp.updateCompoundBounds=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(L,N,O){var R=0,_=0,D=N+O;return L>0&&D>0&&(R=N/D*L,_=O/D*L),{biasDiff:R,biasComplementDiff:_}}function g(L,N,O,R){if(O.units==="%")switch(R){case"width":return L>0?O.pfValue*L:0;case"height":return N>0?O.pfValue*N:0;case"average":return L>0&&N>0?O.pfValue*(L+N)/2:0;case"min":return L>0&&N>0?L>N?O.pfValue*N:O.pfValue*L:0;case"max":return L>0&&N>0?L>N?O.pfValue*L:O.pfValue*N:0;default:return 0}else return O.units==="px"?O.pfValue:0}var m=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(m=m*100/h.width.val);var y=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(y=y*100/h.width.val);var x=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(x=x*100/h.height.val);var b=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(b=b*100/h.height.val);var T=p(h.width.val-f.w,m,y),k=T.biasDiff,w=T.biasComplementDiff,C=p(h.height.val-f.h,x,b),S=C.biasDiff,E=C.biasComplementDiff;o.autoPadding=g(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-k+f.x1+f.x2+w)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-S+f.y1+f.y2+E)/2}for(var n=0;nt.x2?i:t.x2,t.y1=nt.y2?a:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},tp=function(t,r){return r==null?t:pc(t,r.x1,r.y1,r.x2,r.y2)},ST=function(t,r,n){return Gs(t,r,n)},T3=function(t,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,s=a.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,l,u;if(o!=="none"){n==="source"?(l=a.srcX,u=a.srcY):n==="target"?(l=a.tgtX,u=a.tgtY):(l=a.midX,u=a.midY);var h=i.arrowBounds=i.arrowBounds||{},f=h[n]=h[n]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,R3(f,1),pc(t,f.x1,f.y1,f.x2,f.y2)}}},_$=function(t,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,s=a.rstyle,o=r.pstyle(i+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=ST(s,"labelWidth",n),f=ST(s,"labelHeight",n),d=ST(s,"labelX",n),p=ST(s,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,m=r.pstyle(i+"text-margin-y").pfValue,y=r.isEdge(),x=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,T=r.pstyle("text-border-width").pfValue,k=T/2,w=r.pstyle("text-background-padding").pfValue,C=2,S=f,E=h,L=E/2,N=S/2,O,R,_,D;if(y)O=d-L,R=d+L,_=p-N,D=p+N;else{switch(ev(l.value)){case"left":O=d-E,R=d;break;case"center":O=d-L,R=d+L;break;case"right":O=d,R=d+E;break}switch(tv(u.value)){case"top":_=p-S,D=p;break;case"center":_=p-N,D=p+N;break;case"bottom":_=p,D=p+S;break}}var I=g-Math.max(b,k)-w-C,M=g+Math.max(b,k)+w+C,B=m-Math.max(b,k)-w-C,P=m+Math.max(b,k)+w+C;O+=I,R+=M,_+=B,D+=P;var $=n||"main",G=a.labelBounds,q=G[$]=G[$]||{};q.x1=O,q.y1=_,q.x2=R,q.y2=D,q.w=R-O,q.h=D-_,q.leftPad=I,q.rightPad=M,q.topPad=B,q.botPad=P;var z=y&&x.strValue==="autorotate",V=x.pfValue!=null&&x.pfValue!==0;if(z||V){var j=z?ST(a.rstyle,"labelAngle",n):x.pfValue,ee=Math.cos(j),ne=Math.sin(j),Q=(O+R)/2,pe=(_+D)/2;if(!y){switch(ev(l.value)){case"left":Q=R;break;case"right":Q=O;break}switch(tv(u.value)){case"top":pe=D;break;case"bottom":pe=_;break}}var te=function(Ue,me){return Ue=Ue-Q,me=me-pe,{x:Ue*ee-me*ne+Q,y:Ue*ne+me*ee+pe}},de=te(O,_),ce=te(O,D),ue=te(R,_),Re=te(R,D);O=Math.min(de.x,ce.x,ue.x,Re.x),R=Math.max(de.x,ce.x,ue.x,Re.x),_=Math.min(de.y,ce.y,ue.y,Re.y),D=Math.max(de.y,ce.y,ue.y,Re.y)}var ve=$+"Rot",Ge=G[ve]=G[ve]||{};Ge.x1=O,Ge.y1=_,Ge.x2=R,Ge.y2=D,Ge.w=R-O,Ge.h=D-_,pc(t,O,_,R,D),pc(a.labelBounds.all,O,_,R,D)}return t}},lxe=function(t,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value,a=r.pstyle("outline-offset").value,s=i+a;Ybe(t,r,n,s,"outside",s/2)}},Ybe=function(t,r,n,i,a,s){if(!(n===0||i<=0||a==="inside")){var o=r.cy(),l=o.renderer(),u=l.nodeShapes[l.getNodeShape(r)];if(u){var h=r.position(),f=h.x,d=h.y,p=r.width(),g=r.height();if(u.hasMiterBounds){a==="center"&&(i/=2);var m=u.miterBounds(f,d,p,g,i);tp(t,m)}else s!=null&&s>0&&L3(t,[s,s,s,s])}}},Olt=function(t,r){if(!r.cy().headless()){var n=r.pstyle("border-opacity").value,i=r.pstyle("border-width").pfValue,a=r.pstyle("border-position").value;Ybe(t,r,n,i,a)}},Plt=function(t,r){var n=t._private.cy,i=n.styleEnabled(),a=n.headless(),s=qs(),o=t._private,l=t.isNode(),u=t.isEdge(),h,f,d,p,g,m,y=o.rstyle,x=l&&i?t.pstyle("bounds-expansion").pfValue:[0],b=function(He){return He.pstyle("display").value!=="none"},T=!i||b(t)&&(!u||b(t.source())&&b(t.target()));if(T){var k=0,w=0;i&&r.includeOverlays&&(k=t.pstyle("overlay-opacity").value,k!==0&&(w=t.pstyle("overlay-padding").value));var C=0,S=0;i&&r.includeUnderlays&&(C=t.pstyle("underlay-opacity").value,C!==0&&(S=t.pstyle("underlay-padding").value));var E=Math.max(w,S),L=0,N=0;if(i&&(L=t.pstyle("width").pfValue,N=L/2),l&&r.includeNodes){var O=t.position();g=O.x,m=O.y;var R=t.outerWidth(),_=R/2,D=t.outerHeight(),I=D/2;h=g-_,f=g+_,d=m-I,p=m+I,pc(s,h,d,f,p),i&&lxe(s,t),i&&r.includeOutlines&&!a&&lxe(s,t),i&&Olt(s,t)}else if(u&&r.includeEdges)if(i&&!a){var M=t.pstyle("curve-style").strValue;if(h=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),d=Math.min(y.srcY,y.midY,y.tgtY),p=Math.max(y.srcY,y.midY,y.tgtY),h-=N,f+=N,d-=N,p+=N,pc(s,h,d,f,p),M==="haystack"){var B=y.haystackPts;if(B&&B.length===2){if(h=B[0].x,d=B[0].y,f=B[1].x,p=B[1].y,h>f){var P=h;h=f,f=P}if(d>p){var $=d;d=p,p=$}pc(s,h-N,d-N,f+N,p+N)}}else if(M==="bezier"||M==="unbundled-bezier"||rp(M,"segments")||rp(M,"taxi")){var G;switch(M){case"bezier":case"unbundled-bezier":G=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=y.linePts;break}if(G!=null)for(var q=0;qf){var Q=h;h=f,f=Q}if(d>p){var pe=d;d=p,p=pe}h-=N,f+=N,d-=N,p+=N,pc(s,h,d,f,p)}if(i&&r.includeEdges&&u&&(T3(s,t,"mid-source"),T3(s,t,"mid-target"),T3(s,t,"source"),T3(s,t,"target")),i){var te=t.pstyle("ghost").value==="yes";if(te){var de=t.pstyle("ghost-offset-x").pfValue,ce=t.pstyle("ghost-offset-y").pfValue;pc(s,s.x1+de,s.y1+ce,s.x2+de,s.y2+ce)}}var ue=o.bodyBounds=o.bodyBounds||{};Y1e(ue,s),L3(ue,x),R3(ue,1),i&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,pc(s,h-E,d-E,f+E,p+E));var Re=o.overlayBounds=o.overlayBounds||{};Y1e(Re,s),L3(Re,x),R3(Re,1);var ve=o.labelBounds=o.labelBounds||{};ve.all!=null?mst(ve.all):ve.all=qs(),i&&r.includeLabels&&(r.includeMainLabels&&_$(s,t,null),u&&(r.includeSourceLabels&&_$(s,t,"source"),r.includeTargetLabels&&_$(s,t,"target")))}return s.x1=Ml(s.x1),s.y1=Ml(s.y1),s.x2=Ml(s.x2),s.y2=Ml(s.y2),s.w=Ml(s.x2-s.x1),s.h=Ml(s.y2-s.y1),s.w>0&&s.h>0&&T&&(L3(s,x),R3(s,1)),s},Xbe=function(t){var r=0,n=function(s){return(s?1:0)<=0;o--)s(o);return this};fp.removeAllListeners=function(){return this.removeListener("*")};fp.emit=fp.trigger=function(e,t,r){var n=this.listeners,i=n.length;return this.emitting++,Xn(t)||(t=[t]),Qlt(this,function(a,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],i=n.length);for(var o=function(){var h=n[l];if(h.type===s.type&&(!h.namespace||h.namespace===s.namespace||h.namespace===Klt)&&a.eventMatches(a.context,h,s)){var f=[s];t!=null&&zat(f,t),a.beforeEmit(a.context,h,s),h.conf&&h.conf.one&&(a.listeners=a.listeners.filter(function(g){return g!==h}));var d=a.callbackContext(a.context,h,s),p=h.callback.apply(d,f);a.afterEmit(a.context,h,s),p===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[t]=l,a.set(u,{ele:l,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var r=this._private,n=t._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var s=a.index;return this.unmergeAt(s),this},unmerge:function(t){var r=this._private.cy;if(!t)return this;if(t&&fr(t)){var n=t;t=r.mutableElements().filter(n)}for(var i=0;i=0;r--){var n=this[r];t(n)&&this.unmergeAt(r)}return this},map:function(t,r){for(var n=[],i=this,a=0;an&&(n=l,i=o)}return{value:n,ele:i}},min:function(t,r){for(var n=1/0,i,a=this,s=0;s=0&&a"u"?"undefined":va(Symbol))!=t&&va(Symbol.iterator)!=t;r&&(H3[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,s=this.length;return Jxe({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[t];return a??(r?i.style().getDefaultProperty(t):null)}},numericStyle:function(t){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(t);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(t){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(t).units},renderedStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,t)},style:function(t,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(dn(t)){var s=t;a.applyBypass(this,s,i),this.emitAndNotify("style")}else if(fr(t))if(r===void 0){var o=this[0];return o?a.getStylePropertyValue(o,t):void 0}else a.applyBypass(this,t,r,i),this.emitAndNotify("style");else if(t===void 0){var l=this[0];return l?a.getRawStyle(l):void 0}return this},removeStyle:function(t){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(t===void 0)for(var s=0;s0&&t.push(h[0]),t.push(o[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}});Ts.neighbourhood=Ts.neighborhood;Ts.closedNeighbourhood=Ts.closedNeighborhood;Ts.openNeighbourhood=Ts.openNeighborhood;yr(Ts,{source:Dl(function(t){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&t?n.filter(t):n},"source"),target:Dl(function(t){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&t?n.filter(t):n},"target"),sources:xxe({attr:"source"}),targets:xxe({attr:"target"})});yr(Ts,{edgesWith:Dl(bxe(),"edgesWith"),edgesTo:Dl(bxe({thisIsSrc:!0}),"edgesTo")});yr(Ts,{connectedEdges:Dl(function(e){for(var t=[],r=this,n=0;n0);return s},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}});Ts.componentsOf=Ts.components;Qa=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0){gi("A collection must have a reference to the core");return}var a=new Qh,s=!1;if(!r)r=[];else if(r.length>0&&dn(r[0])&&!XT(r[0])){s=!0;for(var o=[],l=new rv,u=0,h=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],s=[],o,l=0,u=r.length;l0){for(var $=o.length===r.length?r:new Qa(n,o),G=0;G<$.length;G++){var q=$[G];q.isNode()||(q.parallelEdges().clearTraversalCache(),q.source().clearTraversalCache(),q.target().clearTraversalCache())}var z;i.hasCompoundNodes?z=n.collection().merge($).merge($.connectedNodes()).merge($.parent()):z=$,z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e),e?$.emitAndNotify("add"):t&&$.emit("add")}return r};Zn.removed=function(){var e=this[0];return e&&e._private.removed};Zn.inside=function(){var e=this[0];return e&&!e._private.removed};Zn.remove=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function s(D){for(var I=D._private.edges,M=0;M0&&(e?O.emitAndNotify("remove"):t&&O.emit("remove"));for(var R=0;Rh&&Math.abs(g.v)>h;);return d?function(m){return l[m*(l.length-1)|0]}:u}})(),Kn=function(t,r,n,i){var a=lct(t,r,n,i);return function(s,o,l){return s+(o-s)*a(l)}},D3={linear:function(t,r,n){return t+(r-t)*n},ease:Kn(.25,.1,.25,1),"ease-in":Kn(.42,0,1,1),"ease-out":Kn(0,0,.58,1),"ease-in-out":Kn(.42,0,.58,1),"ease-in-sine":Kn(.47,0,.745,.715),"ease-out-sine":Kn(.39,.575,.565,1),"ease-in-out-sine":Kn(.445,.05,.55,.95),"ease-in-quad":Kn(.55,.085,.68,.53),"ease-out-quad":Kn(.25,.46,.45,.94),"ease-in-out-quad":Kn(.455,.03,.515,.955),"ease-in-cubic":Kn(.55,.055,.675,.19),"ease-out-cubic":Kn(.215,.61,.355,1),"ease-in-out-cubic":Kn(.645,.045,.355,1),"ease-in-quart":Kn(.895,.03,.685,.22),"ease-out-quart":Kn(.165,.84,.44,1),"ease-in-out-quart":Kn(.77,0,.175,1),"ease-in-quint":Kn(.755,.05,.855,.06),"ease-out-quint":Kn(.23,1,.32,1),"ease-in-out-quint":Kn(.86,0,.07,1),"ease-in-expo":Kn(.95,.05,.795,.035),"ease-out-expo":Kn(.19,1,.22,1),"ease-in-out-expo":Kn(1,0,0,1),"ease-in-circ":Kn(.6,.04,.98,.335),"ease-out-circ":Kn(.075,.82,.165,1),"ease-in-out-circ":Kn(.785,.135,.15,.86),spring:function(t,r,n){if(n===0)return D3.linear;var i=cct(t,r,n);return function(a,s,o){return a+(s-a)*i(o)}},"cubic-bezier":Kn};fct={animate:Dn.animate(),animation:Dn.animation(),animated:Dn.animated(),clearQueue:Dn.clearQueue(),delay:Dn.delay(),delayAnimation:Dn.delayAnimation(),stop:Dn.stop(),addToAnimationPool:function(t){var r=this;r.styleEnabled()&&r._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function r(){t._private.animationsRunning&&G3(function(a){kxe(a,t),r()})}var n=t.renderer();n&&n.beforeRender?n.beforeRender(function(a,s){kxe(s,t)},n.beforeRenderPriorities.animations):r()}},dct={qualifierCompare:function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},eventMatches:function(t,r,n){var i=r.qualifier;return i!=null?t!==n.target&&XT(n.target)&&i.matches(n.target):!0},addEventFields:function(t,r){r.cy=t,r.target=t},callbackContext:function(t,r,n){return r.qualifier!=null?n.target:t}},k3=function(t){return fr(t)?new up(t):t},a2e={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new cA(dct,this)),this},emitter:function(){return this._private.emitter},on:function(t,r,n){return this.emitter().on(t,k3(r),n),this},removeListener:function(t,r,n){return this.emitter().removeListener(t,k3(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,r,n){return this.emitter().one(t,k3(r),n),this},once:function(t,r,n){return this.emitter().one(t,k3(r),n),this},emit:function(t,r){return this.emitter().emit(t,r),this},emitAndNotify:function(t,r){return this.emit(t),this.notify(t,r),this}};Dn.eventAliasesOn(a2e);X$={png:function(t){var r=this._private.renderer;return t=t||{},r.png(t)},jpg:function(t){var r=this._private.renderer;return t=t||{},t.bg=t.bg||"#fff",r.jpg(t)}};X$.jpeg=X$.jpg;N3={layout:function(t){var r=this;if(t==null){gi("Layout options must be specified to make a layout");return}if(t.name==null){gi("A `name` must be specified to make a layout");return}var n=t.name,i=r.extension("layout",n);if(i==null){gi("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;fr(t.eles)?a=r.$(t.eles):a=t.eles!=null?t.eles:r.$();var s=new i(yr({},t,{cy:r,eles:a}));return s}};N3.createLayout=N3.makeLayout=N3.layout;pct={notify:function(t,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(t,r)}},notifications:function(t){var r=this._private;return t===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return t.batchCount==null&&(t.batchCount=0),t.batchCount===0&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(t.batchCount===0)return this;if(t.batchCount--,t.batchCount===0){t.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(t.batchNotifications).forEach(function(n){var i=t.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var r=this;return this.batch(function(){for(var n=Object.keys(t),i=0;i0;)r.removeChild(r.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};j$.invalidateDimensions=j$.resize;O3={collection:function(t,r){return fr(t)?this.$(t):il(t)?t.collection():Xn(t)?(r||(r={}),new Qa(this,t,r.unique,r.removed)):new Qa(this)},nodes:function(t){var r=this.$(function(n){return n.isNode()});return t?r.filter(t):r},edges:function(t){var r=this.$(function(n){return n.isEdge()});return t?r.filter(t):r},$:function(t){var r=this._private.elements;return t?r.filter(t):r.spawnSelf()},mutableElements:function(){return this._private.elements}};O3.elements=O3.filter=O3.$;Pa={},NT="t",mct="f";Pa.apply=function(e){for(var t=this,r=t._private,n=r.cy,i=n.collection(),a=0;a0;if(d||f&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var m=0;m1&&(k=1),o.color){var C=n.valueMin[0],S=n.valueMax[0],E=n.valueMin[1],L=n.valueMax[1],N=n.valueMin[2],O=n.valueMax[2],R=n.valueMin[3]==null?1:n.valueMin[3],_=n.valueMax[3]==null?1:n.valueMax[3],D=[Math.round(C+(S-C)*k),Math.round(E+(L-E)*k),Math.round(N+(O-N)*k),Math.round(R+(_-R)*k)];a={bypass:n.bypass,name:n.name,value:D,strValue:"rgb("+D[0]+", "+D[1]+", "+D[2]+")"}}else if(o.number){var I=n.valueMin+(n.valueMax-n.valueMin)*k;a=this.parse(n.name,I,n.bypass,d)}else return!1;if(!a)return m(),!1;a.mapping=n,n=a;break}case s.data:{for(var M=n.field.split("."),B=f.data,P=0;P0&&a>0){for(var o={},l=!1,u=0;u0?e.delayAnimation(s).play().promise().then(T):T()}).then(function(){return e.animation({style:o,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1)};Pa.checkTrigger=function(e,t,r,n,i,a){var s=this.properties[t],o=i(s);e.removed()||o!=null&&o(r,n,e)&&a(s)};Pa.checkZOrderTrigger=function(e,t,r,n){var i=this;this.checkTrigger(e,t,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",e)})};Pa.checkBoundsTrigger=function(e,t,r,n){this.checkTrigger(e,t,r,n,function(i){return i.triggersBounds},function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})};Pa.checkConnectedEdgesBoundsTrigger=function(e,t,r,n){this.checkTrigger(e,t,r,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){e.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};Pa.checkParallelEdgesBoundsTrigger=function(e,t,r,n){this.checkTrigger(e,t,r,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){e.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};Pa.checkTriggers=function(e,t,r,n){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,n),this.checkBoundsTrigger(e,t,r,n),this.checkConnectedEdgesBoundsTrigger(e,t,r,n),this.checkParallelEdgesBoundsTrigger(e,t,r,n)};tw={};tw.applyBypass=function(e,t,r,n){var i=this,a=[],s=!0;if(t==="*"||t==="**"){if(r!==void 0)for(var o=0;oi.length?n=n.substr(i.length):n=""}function l(){a.length>s.length?a=a.substr(s.length):a=""}for(;;){var u=n.match(/^\s*$/);if(u)break;var h=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){Nn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=h[0];var f=h[1];if(f!=="core"){var d=new up(f);if(d.invalid){Nn("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],g=!1;a=p;for(var m=[];;){var y=a.match(/^\s*$/);if(y)break;var x=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!x){Nn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),g=!0;break}s=x[0];var b=x[1],T=x[2],k=t.properties[b];if(!k){Nn("Skipping property: Invalid property name in: "+s),l();continue}var w=r.parse(b,T);if(!w){Nn("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:b,val:T}),l()}if(g){o();break}r.selector(f);for(var C=0;C=7&&t[0]==="d"&&(h=new RegExp(o.data.regex).exec(t))){if(r)return!1;var d=o.data;return{name:e,value:h,strValue:""+t,mapped:d,field:h[1],bypass:r}}else if(t.length>=10&&t[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(t))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var g=this.parse(e,f[4]);if(!g||g.mapped)return!1;var m=this.parse(e,f[5]);if(!m||m.mapped)return!1;if(g.pfValue===m.pfValue||g.strValue===m.strValue)return Nn("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(u.color){var y=g.value,x=m.value,b=y[0]===x[0]&&y[1]===x[1]&&y[2]===x[2]&&(y[3]===x[3]||(y[3]==null||y[3]===1)&&(x[3]==null||x[3]===1));if(b)return!1}return{name:e,value:f,strValue:""+t,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:g.value,valueMax:m.value,bypass:r}}}if(u.multiple&&n!=="multiple"){var T;if(l?T=t.split(/\s+/):Xn(t)?T=t:T=[t],u.evenMultiple&&T.length%2!==0)return null;for(var k=[],w=[],C=[],S="",E=!1,L=0;L0?" ":"")+N.strValue}return u.validate&&!u.validate(k,w)?null:u.singleEnum&&E?k.length===1&&fr(k[0])?{name:e,value:k[0],strValue:k[0],bypass:r}:null:{name:e,value:k,pfValue:C,strValue:S,bypass:r,units:w}}var O=function(){for(var te=0;teu.max||u.strictMax&&t===u.max))return null;var M={name:e,value:t,strValue:""+t+(R||""),units:R,bypass:r};return u.unitless||R!=="px"&&R!=="em"?M.pfValue=t:M.pfValue=R==="px"||!R?t:this.getEmSizeInPixels()*t,(R==="ms"||R==="s")&&(M.pfValue=R==="ms"?t:1e3*t),(R==="deg"||R==="rad")&&(M.pfValue=R==="rad"?t:fst(t)),R==="%"&&(M.pfValue=t/100),M}else if(u.propList){var B=[],P=""+t;if(P!=="none"){for(var $=P.split(/\s*,\s*|\s+/),G=0;G<$.length;G++){var q=$[G].trim();i.properties[q]?B.push(q):Nn("`"+q+"` is not a valid property name")}if(B.length===0)return null}return{name:e,value:B,strValue:B.length===0?"none":B.join(" "),bypass:r}}else if(u.color){var z=obe(t);return z?{name:e,value:z,pfValue:z,strValue:"rgb("+z[0]+","+z[1]+","+z[2]+")",bypass:r}:null}else if(u.regex||u.regexes){if(u.enums){var V=O();if(V)return V}for(var j=u.regexes?u.regexes:[u.regex],ee=0;ee0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((s-2*r)/n.w,(o-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=n.minZoom&&(n.maxZoom=r),this},minZoom:function(t){return t===void 0?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return t===void 0?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var r=this._private,n=r.pan,i=r.zoom,a,s,o=!1;if(r.zoomingEnabled||(o=!0),Pt(t)?s=t:dn(t)&&(s=t.level,t.position!=null?a=rA(t.position,i,n):t.renderedPosition!=null&&(a=t.renderedPosition),a!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,a.push("zoom"))}if(i&&(!s||!t.cancelOnFailedZoom)&&r.panningEnabled){var u=t.pan;Pt(u.x)&&(r.pan.x=u.x,o=!1),Pt(u.y)&&(r.pan.y=u.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(t){var r=this.getCenterPan(t);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,r){if(this._private.panningEnabled){if(fr(t)){var n=t;t=this.mutableElements().filter(n)}else il(t)||(t=this.mutableElements());if(t.length!==0){var i=t.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(a-r*(i.x1+i.x2))/2,y:(s-r*(i.y1+i.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t=this._private,r=t.container,n=this;return t.sizeCache=t.sizeCache||(r?(function(){var i=n.window().getComputedStyle(r),a=function(o){return parseFloat(i.getPropertyValue(o))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}})():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-t.x)/r,x2:(n.x2-t.x)/r,y1:(n.y1-t.y)/r,y2:(n.y2-t.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},renderedExtent:function(){var t=this.width(),r=this.height();return{x1:0,y1:0,x2:t,y2:r,w:t,h:r}},multiClickDebounceTime:function(t){if(t)this._private.multiClickDebounceTime=t;else return this._private.multiClickDebounceTime;return this}};Sg.centre=Sg.center;Sg.autolockNodes=Sg.autolock;Sg.autoungrabifyNodes=Sg.autoungrabify;WT={data:Dn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Dn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Dn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Dn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};WT.attr=WT.data;WT.removeAttr=WT.removeData;UT=function(t){var r=this;t=yr({},t);var n=t.container;n&&!z3(n)&&z3(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var s=ma!==void 0&&n!==void 0&&!t.headless,o=t;o.layout=yr({name:s?"grid":"null"},o.layout),o.renderer=yr({name:s?"canvas":"null"},o.renderer);var l=function(g,m,y){return m!==void 0?m:y!==void 0?y:g},u=this._private={container:n,ready:!1,options:o,elements:new Qa(this),listeners:[],aniEles:new Qa(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:Pt(o.zoom)?o.zoom:1,pan:{x:dn(o.pan)&&Pt(o.pan.x)?o.pan.x:0,y:dn(o.pan)&&Pt(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(g,m){var y=g.some(aat);if(y)return nv.all(g).then(m);m(g)};u.styleEnabled&&r.setStyle([]);var f=yr({},o,o.renderer);r.initRenderer(f);var d=function(g,m,y){r.notifications(!1);var x=r.mutableElements();x.length>0&&x.remove(),g!=null&&(dn(g)||Xn(g))&&r.add(g),r.one("layoutready",function(T){r.notifications(!0),r.emit(T),r.one("load",m),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",y),r.emit("done")});var b=yr({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()};h([o.style,o.elements],function(p){var g=p[0],m=p[1];u.styleEnabled&&r.style().append(g),d(m,function(){r.startAnimationLoop(),u.ready=!0,Ci(o.ready)&&r.on("ready",o.ready);for(var y=0;y0,o=!!e.boundingBox,l=qs(o?e.boundingBox:structuredClone(t.extent())),u;if(il(e.roots))u=e.roots;else if(Xn(e.roots)){for(var h=[],f=0;f0;){var D=_(),I=L(D,O);if(I)D.outgoers().filter(function(De){return De.isNode()&&r.has(De)}).forEach(R);else if(I===null){Nn("Detected double maximal shift for node `"+D.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var M=0;if(e.avoidOverlap)for(var B=0;B0&&x[0].length<=3?oe/2:0),xe=2*Math.PI/x[re].length*le;return re===0&&x[0].length===1&&(he=1),{x:ue.x+he*Math.cos(xe),y:ue.y+he*Math.sin(xe)}}else{var se=x[re].length,F=Math.max(se===1?0:o?(l.w-e.padding*2-Re.w)/((e.grid?Ge:se)-1):(l.w-e.padding*2-Re.w)/((e.grid?Ge:se)+1),M),H={x:ue.x+(le+1-(se+1)/2)*F,y:ue.y+(re+1-(ee+1)/2)*ve};return H}},Ue={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Ue).indexOf(e.direction)===-1&&gi("Invalid direction '".concat(e.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Ue).join(", ")));var me=function(Ie){return Nat(He(Ie),l,Ue[e.direction])};return r.nodes().layoutPositions(this,e,me),this};Tct={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};o2e.prototype.run=function(){var e=this.options,t=e,r=e.cy,n=t.eles,i=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,a=n.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var s=qs(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep,u=l/Math.max(1,a.length-1),h,f=0,d=0;d1&&t.avoidOverlap){f*=1.75;var x=Math.cos(u)-Math.cos(0),b=Math.sin(u)-Math.sin(0),T=Math.sqrt(f*f/(x*x+b*b));h=Math.max(T,h)}var k=function(C,S){var E=t.startAngle+S*u*(i?1:-1),L=h*Math.cos(E),N=h*Math.sin(E),O={x:o.x+L,y:o.y+N};return O};return n.nodes().layoutPositions(this,t,k),this};wct={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};l2e.prototype.run=function(){for(var e=this.options,t=e,r=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,n=e.cy,i=t.eles,a=i.nodes().not(":parent"),s=qs(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h0){var w=Math.abs(b[0].value-k.value);w>=y&&(b=[],x.push(b))}b.push(k)}var C=u+t.minNodeSpacing;if(!t.avoidOverlap){var S=x.length>0&&x[0].length>1,E=Math.min(s.w,s.h)/2-C,L=E/(x.length+S?1:0);C=Math.min(C,L)}for(var N=0,O=0;O1&&t.avoidOverlap){var I=Math.cos(D)-Math.cos(0),M=Math.sin(D)-Math.sin(0),B=Math.sqrt(C*C/(I*I+M*M));N=Math.max(B,N)}R.r=N,N+=C}if(t.equidistant){for(var P=0,$=0,G=0;G=e.numIter||(Rct(n,e),n.temperature=n.temperature*e.coolingFactor,n.temperature=e.animationThreshold&&a(),G3(h)}};h()}else{for(;u;)u=s(l),l++;Axe(n,e),o()}return this};pA.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};pA.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};kct=function(t,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),s=qs(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=n.eles.components(),u={},h=0;h0){o.graphSet.push(E);for(var h=0;hi.count?0:i.graph},c2e=function(t,r,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,g=f*l/d;else var m=X3(t,o,l),y=X3(r,-1*o,-1*l),x=y.x-m.x,b=y.y-m.y,T=x*x+b*b,d=Math.sqrt(T),f=(t.nodeRepulsion+r.nodeRepulsion)/T,p=f*x/d,g=f*b/d;t.isLocked||(t.offsetX-=p,t.offsetY-=g),r.isLocked||(r.offsetX+=p,r.offsetY+=g)}},Mct=function(t,r,n,i){if(n>0)var a=t.maxX-r.minX;else var a=r.maxX-t.minX;if(i>0)var s=t.maxY-r.minY;else var s=r.maxY-t.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0},X3=function(t,r,n){var i=t.positionX,a=t.positionY,s=t.height||1,o=t.width||1,l=n/r,u=s/o,h={};return r===0&&0n?(h.x=i,h.y=a+s/2,h):0r&&-1*u<=l&&l<=u?(h.x=i-o/2,h.y=a-o*n/2/r,h):0=u)?(h.x=i+s*r/2/n,h.y=a+s/2,h):(0>n&&(l<=-1*u||l>=u)&&(h.x=i-s*r/2/n,h.y=a-s/2),h)},Dct=function(t,r){for(var n=0;nn){var y=r.gravity*p/m,x=r.gravity*g/m;d.offsetX+=y,d.offsetY+=x}}}}},Oct=function(t,r){var n=[],i=0,a=-1;for(n.push.apply(n,t.graphSet[0]),a+=t.graphSet[0].length;i<=a;){var s=n[i++],o=t.idToIndex[s],l=t.layoutNodes[o],u=l.children;if(0n)var a={x:n*t/i,y:n*r/i};else var a={x:t,y:r};return a},h2e=function(t,r){var n=t.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(i.minX==null||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(i.minY==null||t.minY-i.padTopx&&(g+=y+r.componentSpacing,p=0,m=0,y=0)}}},$ct={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,r){return!0},ready:void 0,stop:void 0,transform:function(t,r){return r}};f2e.prototype.run=function(){var e=this.options,t=e,r=e.cy,n=t.eles,i=n.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=qs(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,t,function(V){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),u=Math.round(a.w/a.h*o),h=function(j){if(j==null)return Math.min(l,u);var ee=Math.min(l,u);ee==l?l=j:u=j},f=function(j){if(j==null)return Math.max(l,u);var ee=Math.max(l,u);ee==l?l=j:u=j},d=t.rows,p=t.cols!=null?t.cols:t.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var g=h(),m=f();(g-1)*m>=s?h(g-1):(m-1)*g>=s&&f(m-1)}else for(;u*l=s?f(x+1):h(y+1)}var b=a.w/u,T=a.h/l;if(t.condense&&(b=0,T=0),t.avoidOverlap)for(var k=0;k=u&&(I=0,D++)},B={},P=0;P(I=Est(e,t,M[B],M[B+1],M[B+2],M[B+3])))return y(S,I),!0}else if(L.edgeType==="bezier"||L.edgeType==="multibezier"||L.edgeType==="self"||L.edgeType==="compound"){for(var M=L.allpts,B=0;B+5(I=Sst(e,t,M[B],M[B+1],M[B+2],M[B+3],M[B+4],M[B+5])))return y(S,I),!0}for(var P=P||E.source,$=$||E.target,G=i.getArrowWidth(N,O),q=[{name:"source",x:L.arrowStartX,y:L.arrowStartY,angle:L.srcArrowAngle},{name:"target",x:L.arrowEndX,y:L.arrowEndY,angle:L.tgtArrowAngle},{name:"mid-source",x:L.midX,y:L.midY,angle:L.midsrcArrowAngle},{name:"mid-target",x:L.midX,y:L.midY,angle:L.midtgtArrowAngle}],B=0;B0&&(x(P),x($))}function T(S,E,L){return Gs(S,E,L)}function k(S,E){var L=S._private,N=d,O;E?O=E+"-":O="",S.boundingBox();var R=L.labelBounds[E||"main"],_=S.pstyle(O+"label").value,D=S.pstyle("text-events").strValue==="yes";if(!(!D||!_)){var I=T(L.rscratch,"labelX",E),M=T(L.rscratch,"labelY",E),B=T(L.rscratch,"labelAngle",E),P=S.pstyle(O+"text-margin-x").pfValue,$=S.pstyle(O+"text-margin-y").pfValue,G=R.x1-N-P,q=R.x2+N-P,z=R.y1-N-$,V=R.y2+N-$;if(B){var j=Math.cos(B),ee=Math.sin(B),ne=function(Re,ve){return Re=Re-I,ve=ve-M,{x:Re*j-ve*ee+I,y:Re*ee+ve*j+M}},Q=ne(G,z),pe=ne(G,V),te=ne(q,z),de=ne(q,V),ce=[Q.x+P,Q.y+$,te.x+P,te.y+$,de.x+P,de.y+$,pe.x+P,pe.y+$];if(wo(e,t,ce))return y(S),!0}else if(np(R,e,t))return y(S),!0}}for(var w=s.length-1;w>=0;w--){var C=s[w];C.isNode()?x(C)||k(C):b(C)||k(C)||k(C,"source")||k(C,"target")}return o};Ag.getAllInBox=function(e,t,r,n){var i=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),s=2/a,o=[],l=Math.min(e,r),u=Math.max(e,r),h=Math.min(t,n),f=Math.max(t,n);e=l,r=u,t=h,n=f;var d=qs({x1:e,y1:t,x2:r,y2:n}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],g=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function m(Re,ve,Ge){return Gs(Re,ve,Ge)}function y(Re,ve){var Ge=Re._private,He=s,Ue="";Re.boundingBox();var me=Ge.labelBounds.main;if(!me)return null;var De=m(Ge.rscratch,"labelX",ve),Ie=m(Ge.rscratch,"labelY",ve),Me=m(Ge.rscratch,"labelAngle",ve),re=Re.pstyle(Ue+"text-margin-x").pfValue,le=Re.pstyle(Ue+"text-margin-y").pfValue,oe=me.x1-He-re,he=me.x2+He-re,xe=me.y1-He-le,se=me.y2+He-le;if(Me){var F=Math.cos(Me),H=Math.sin(Me),W=function(ae,K){return ae=ae-De,K=K-Ie,{x:ae*F-K*H+De,y:ae*H+K*F+Ie}};return[W(oe,xe),W(he,xe),W(he,se),W(oe,se)]}else return[{x:oe,y:xe},{x:he,y:xe},{x:he,y:se},{x:oe,y:se}]}function x(Re,ve,Ge,He){function Ue(me,De,Ie){return(Ie.y-me.y)*(De.x-me.x)>(De.y-me.y)*(Ie.x-me.x)}return Ue(Re,Ge,He)!==Ue(ve,Ge,He)&&Ue(Re,ve,Ge)!==Ue(Re,ve,He)}for(var b=0;b0?-(Math.PI-t.ang):Math.PI+t.ang},Wct=function(t,r,n,i,a){if(t!==Mxe?Dxe(r,t,Du):Vct(Il,Du),Dxe(r,n,Il),Lxe=Du.nx*Il.ny-Du.ny*Il.nx,Ixe=Du.nx*Il.nx-Du.ny*-Il.ny,Zh=Math.asin(Math.max(-1,Math.min(1,Lxe))),Math.abs(Zh)<1e-6){K$=r.x,Z$=r.y,vg=z1=0;return}bg=1,P3=!1,Ixe<0?Zh<0?Zh=Math.PI+Zh:(Zh=Math.PI-Zh,bg=-1,P3=!0):Zh>0&&(bg=-1,P3=!0),r.radius!==void 0?z1=r.radius:z1=i,pg=Zh/2,S3=Math.min(Du.len/2,Il.len/2),a?(Iu=Math.abs(Math.cos(pg)*z1/Math.sin(pg)),Iu>S3?(Iu=S3,vg=Math.abs(Iu*Math.sin(pg)/Math.cos(pg))):vg=z1):(Iu=Math.min(S3,z1),vg=Math.abs(Iu*Math.sin(pg)/Math.cos(pg))),Q$=r.x+Il.nx*Iu,J$=r.y+Il.ny*Iu,K$=Q$-Il.ny*vg*bg,Z$=J$+Il.nx*vg*bg,m2e=r.x+Du.nx*Iu,y2e=r.y+Du.ny*Iu,Mxe=r};HT=.01,Uct=Math.sqrt(2*HT),Cs={};Cs.findMidptPtsEtc=function(e,t){var r=t.posPts,n=t.intersectionPts,i=t.vectorNormInverse,a,s=e.pstyle("source-endpoint"),o=e.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(w,C,S,E){var L=E-C,N=S-w,O=Math.sqrt(N*N+L*L);return{x:-L/O,y:N/O}},h=e.pstyle("edge-distances").value;switch(h){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(l){var f=this.manualEndptToPx(e.source()[0],s),d=ia(f,2),p=d[0],g=d[1],m=this.manualEndptToPx(e.target()[0],o),y=ia(m,2),x=y[0],b=y[1],T={x1:p,y1:g,x2:x,y2:b};i=u(p,g,x,b),a=T}else Nn("Edge ".concat(e.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};Cs.findHaystackPoints=function(e){for(var t=0;t0?Math.max(K-Y,0):Math.min(K+Y,0)},_=R(N,E),D=R(O,L),I=!1;b===u?x=Math.abs(_)>Math.abs(D)?i:n:b===l||b===o?(x=n,I=!0):(b===a||b===s)&&(x=i,I=!0);var M=x===n,B=M?D:_,P=M?O:N,$=dF(P),G=!1;!(I&&(k||C))&&(b===o&&P<0||b===l&&P>0||b===a&&P>0||b===s&&P<0)&&($*=-1,B=$*Math.abs(B),G=!0);var q;if(k){var z=w<0?1+w:w;q=z*B}else{var V=w<0?B:0;q=V+w*$}var j=function(K){return Math.abs(K)=Math.abs(B)},ee=j(q),ne=j(Math.abs(B)-Math.abs(q)),Q=ee||ne;if(Q&&!G)if(M){var pe=Math.abs(P)<=d/2,te=Math.abs(N)<=p/2;if(pe){var de=(h.x1+h.x2)/2,ce=h.y1,ue=h.y2;r.segpts=[de,ce,de,ue]}else if(te){var Re=(h.y1+h.y2)/2,ve=h.x1,Ge=h.x2;r.segpts=[ve,Re,Ge,Re]}else r.segpts=[h.x1,h.y2]}else{var He=Math.abs(P)<=f/2,Ue=Math.abs(O)<=g/2;if(He){var me=(h.y1+h.y2)/2,De=h.x1,Ie=h.x2;r.segpts=[De,me,Ie,me]}else if(Ue){var Me=(h.x1+h.x2)/2,re=h.y1,le=h.y2;r.segpts=[Me,re,Me,le]}else r.segpts=[h.x2,h.y1]}else if(M){var oe=h.y1+q+(y?d/2*$:0),he=h.x1,xe=h.x2;r.segpts=[he,oe,xe,oe]}else{var se=h.x1+q+(y?f/2*$:0),F=h.y1,H=h.y2;r.segpts=[se,F,se,H]}if(r.isRound){var W=e.pstyle("taxi-radius").value,U=e.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(W),r.isArcRadius=new Array(r.segpts.length/2).fill(U)}};Cs.tryToCorrectInvalidPoints=function(e,t){var r=e._private.rscratch;if(r.edgeType==="bezier"){var n=t.srcPos,i=t.tgtPos,a=t.srcW,s=t.srcH,o=t.tgtW,l=t.tgtH,u=t.srcShape,h=t.tgtShape,f=t.srcCornerRadius,d=t.tgtCornerRadius,p=t.srcRs,g=t.tgtRs,m=!Pt(r.startX)||!Pt(r.startY),y=!Pt(r.arrowStartX)||!Pt(r.arrowStartY),x=!Pt(r.endX)||!Pt(r.endY),b=!Pt(r.arrowEndX)||!Pt(r.arrowEndY),T=3,k=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth,w=T*k,C=Cg({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),S=CP.poolIndex()){var $=B;B=P,P=$}var G=_.srcPos=B.position(),q=_.tgtPos=P.position(),z=_.srcW=B.outerWidth(),V=_.srcH=B.outerHeight(),j=_.tgtW=P.outerWidth(),ee=_.tgtH=P.outerHeight(),ne=_.srcShape=r.nodeShapes[t.getNodeShape(B)],Q=_.tgtShape=r.nodeShapes[t.getNodeShape(P)],pe=_.srcCornerRadius=B.pstyle("corner-radius").value==="auto"?"auto":B.pstyle("corner-radius").pfValue,te=_.tgtCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,de=_.tgtRs=P._private.rscratch,ce=_.srcRs=B._private.rscratch;_.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ue=0;ue<_.eles.length;ue++){var Re=_.eles[ue],ve=Re[0]._private.rscratch,Ge=Re.pstyle("curve-style").value,He=Ge==="unbundled-bezier"||rp(Ge,"segments")||rp(Ge,"taxi"),Ue=!B.same(Re.source());if(!_.calculatedIntersection&&B!==P&&(_.hasBezier||_.hasUnbundled)){_.calculatedIntersection=!0;var me=ne.intersectLine(G.x,G.y,z,V,q.x,q.y,0,pe,ce),De=_.srcIntn=me,Ie=Q.intersectLine(q.x,q.y,j,ee,G.x,G.y,0,te,de),Me=_.tgtIntn=Ie,re=_.intersectionPts={x1:me[0],x2:Ie[0],y1:me[1],y2:Ie[1]},le=_.posPts={x1:G.x,x2:q.x,y1:G.y,y2:q.y},oe=Ie[1]-me[1],he=Ie[0]-me[0],xe=Math.sqrt(he*he+oe*oe);Pt(xe)&&xe>=Uct||(xe=Math.sqrt(Math.max(he*he,HT)+Math.max(oe*oe,HT)));var se=_.vector={x:he,y:oe},F=_.vectorNorm={x:se.x/xe,y:se.y/xe},H={x:-F.y,y:F.x};_.nodesOverlap=!Pt(xe)||Q.checkPoint(me[0],me[1],0,j,ee,q.x,q.y,te,de)||ne.checkPoint(Ie[0],Ie[1],0,z,V,G.x,G.y,pe,ce),_.vectorNormInverse=H,D={nodesOverlap:_.nodesOverlap,dirCounts:_.dirCounts,calculatedIntersection:!0,hasBezier:_.hasBezier,hasUnbundled:_.hasUnbundled,eles:_.eles,srcPos:q,srcRs:de,tgtPos:G,tgtRs:ce,srcW:j,srcH:ee,tgtW:z,tgtH:V,srcIntn:Me,tgtIntn:De,srcShape:Q,tgtShape:ne,posPts:{x1:le.x2,y1:le.y2,x2:le.x1,y2:le.y1},intersectionPts:{x1:re.x2,y1:re.y2,x2:re.x1,y2:re.y1},vector:{x:-se.x,y:-se.y},vectorNorm:{x:-F.x,y:-F.y},vectorNormInverse:{x:-H.x,y:-H.y}}}var W=Ue?D:_;ve.nodesOverlap=W.nodesOverlap,ve.srcIntn=W.srcIntn,ve.tgtIntn=W.tgtIntn,ve.isRound=Ge.startsWith("round"),i&&(B.isParent()||B.isChild()||P.isParent()||P.isChild())&&(B.parents().anySame(P)||P.parents().anySame(B)||B.same(P)&&B.isParent())?t.findCompoundLoopPoints(Re,W,ue,He):B===P?t.findLoopPoints(Re,W,ue,He):Ge.endsWith("segments")?t.findSegmentsPoints(Re,W):Ge.endsWith("taxi")?t.findTaxiPoints(Re,W):Ge==="straight"||!He&&_.eles.length%2===1&&ue===Math.floor(_.eles.length/2)?t.findStraightEdgePoints(Re):t.findBezierPoints(Re,W,ue,He,Ue),t.findEndpoints(Re),t.tryToCorrectInvalidPoints(Re,W),t.checkForInvalidEdgeWarning(Re),t.storeAllpts(Re),t.storeEdgeProjections(Re),t.calculateArrowAngles(Re),t.recalculateEdgeLabelProjections(Re),t.calculateLabelAngles(Re)}},S=0;S0){var me=u,De=yg(me,W1(s)),Ie=yg(me,W1(Ue)),Me=De;if(Ie2){var re=yg(me,{x:Ue[2],y:Ue[3]});re0){var Z=h,Ce=yg(Z,W1(s)),we=yg(Z,W1(Y)),ke=Ce;if(we2){var Se=yg(Z,{x:Y[2],y:Y[3]});Se=g||S){y={cp:k,segment:C};break}}if(y)break}var E=y.cp,L=y.segment,N=(g-x)/L.length,O=L.t1-L.t0,R=p?L.t0+O*N:L.t1-O*N;R=zT(0,R,1),t=Y1(E.p0,E.p1,E.p2,R),d=Yct(E.p0,E.p1,E.p2,R);break}case"straight":case"segments":case"haystack":{for(var _=0,D,I,M,B,P=n.allpts.length,$=0;$+3=g));$+=2);var G=g-I,q=G/D;q=zT(0,q,1),t=pst(M,B,q),d=T2e(M,B);break}}s("labelX",f,t.x),s("labelY",f,t.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(e)}};Bu.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))};Bu.applyPrefixedLabelDimensions=function(e,t){var r=e._private,n=this.getLabelText(e,t),i=wg(n,e._private.labelDimsKey);if(Gs(r.rscratch,"prefixedLabelDimsKey",t)!==i){Nu(r.rscratch,"prefixedLabelDimsKey",t,i);var a=this.calculateLabelDimensions(e,n),s=e.pstyle("line-height").pfValue,o=e.pstyle("font-size").pfValue,l=e.pstyle("text-wrap").strValue,u=Gs(r.rscratch,"labelWrapCachedLines",t)||[],h=l!=="wrap"?1:Math.max(u.length,1),f=o*s,d=a.width,p=a.height+(h-1)*(s-1)*o;Nu(r.rstyle,"labelWidth",t,d),Nu(r.rscratch,"labelWidth",t,d),Nu(r.rstyle,"labelHeight",t,p),Nu(r.rscratch,"labelHeight",t,p),Nu(r.rscratch,"labelLineHeight",t,f),Nu(r.rscratch,"labelActualDescent",t,a.labelActualDescent)}};Bu.getLabelText=function(e,t){var r=e._private,n=t?t+"-":"",i=e.pstyle(n+"label").strValue,a=e.pstyle("text-transform").value,s=function(V,j){return j?(Nu(r.rscratch,V,t,j),j):Gs(r.rscratch,V,t)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var o=e.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=i.split(` +`),f=e.pstyle("text-max-width").pfValue,d=e.pstyle("text-overflow-wrap").value,p=d==="anywhere",g=[],m=/[\s\u200b]+|$/g,y=0;yf){var w=x.matchAll(m),C="",S=0,E=Co(w),L;try{for(E.s();!(L=E.n()).done;){var N=L.value,O=N[0],R=x.substring(S,N.index);S=N.index+O.length;var _=C.length===0?R:C+R+O,D=this.calculateLabelDimensions(e,_),I=D.width;I<=f?C+=R+O:(C&&g.push(C),C=R+O)}}catch(z){E.e(z)}finally{E.f()}C.match(/^[\s\u200b]+$/)||g.push(C)}else g.push(x)}s("labelWrapCachedLines",g),i=s("labelWrapCachedText",g.join(` +`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var M=e.pstyle("text-max-width").pfValue,B="",P="\u2026",$=!1;if(this.calculateLabelDimensions(e,i).widthM)break;B+=i[G],G===i.length-1&&($=!0)}return $||(B+=P),B}return i};Bu.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;return t==="auto"?e.isNode()?Nlt(r):"center":t};Bu.calculateLabelDimensions=function(e,t){var r=this,n=r.cy.window(),i=n.document,a=0,s=e.pstyle("font-style").strValue,o=e.pstyle("font-size").pfValue,l=e.pstyle("font-family").strValue,u=e.pstyle("font-weight").strValue,h=e.pstyle("text-metrics").strValue||"font",f=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=i.createElement("canvas"),d=this.labelCalcCanvasContext=f.getContext("2d");var p=f.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var g=0,m=0,y=t.split(` +`),x=y.length,b=0,T=0,k=0;k1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(s),o)for(var l=0;l=e.desktopTapThreshold2}var pt=a(W);be&&(e.hoverData.tapholdCancelled=!0);var Ct=function(){var yt=e.hoverData.dragDelta=e.hoverData.dragDelta||[];yt.length===0?(yt.push(Pe[0]),yt.push(Pe[1])):(yt[0]+=Pe[0],yt[1]+=Pe[1])};ae=!0,i(Ne,["mousemove","vmousemove","tapdrag"],W,{x:Ce[0],y:Ce[1]});var ht=function(yt){return{originalEvent:W,type:yt,position:{x:Ce[0],y:Ce[1]}}},Te=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||K.emit(ht("boxstart")),Se[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(e.hoverData.which===3){if(be){var ot=ht("cxtdrag");Fe?Fe.emit(ot):K.emit(ot),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||Ne!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(ht("cxtdragout")),e.hoverData.cxtOver=Ne,Ne&&Ne.emit(ht("cxtdragover")))}}else if(e.hoverData.dragging){if(ae=!0,K.panningEnabled()&&K.userPanningEnabled()){var gt;if(e.hoverData.justStartedPan){var Qe=e.hoverData.mdownPos;gt={x:(Ce[0]-Qe[0])*Y,y:(Ce[1]-Qe[1])*Y},e.hoverData.justStartedPan=!1}else gt={x:Pe[0]*Y,y:Pe[1]*Y};K.panBy(gt),K.emit(ht("dragpan")),e.hoverData.dragged=!0}Ce=e.projectIntoViewport(W.clientX,W.clientY)}else if(Se[4]==1&&(Fe==null||Fe.pannable())){if(be){if(!e.hoverData.dragging&&K.boxSelectionEnabled()&&(pt||!K.panningEnabled()||!K.userPanningEnabled()))Te();else if(!e.hoverData.selecting&&K.panningEnabled()&&K.userPanningEnabled()){var _e=s(Fe,e.hoverData.downs);_e&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,Se[4]=0,e.data.bgActivePosistion=W1(we),e.redrawHint("select",!0),e.redraw())}Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate()}}else{if(Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate(),(!Fe||!Fe.grabbed())&&Ne!=Ae&&(Ae&&i(Ae,["mouseout","tapdragout"],W,{x:Ce[0],y:Ce[1]}),Ne&&i(Ne,["mouseover","tapdragover"],W,{x:Ce[0],y:Ce[1]}),e.hoverData.last=Ne),Fe)if(be){if(K.boxSelectionEnabled()&&pt)Fe&&Fe.grabbed()&&(m(We),Fe.emit(ht("freeon")),We.emit(ht("free")),e.dragData.didDrag&&(Fe.emit(ht("dragfreeon")),We.emit(ht("dragfree")))),Te();else if(Fe&&Fe.grabbed()&&e.nodeIsDraggable(Fe)){var Ze=!e.dragData.didDrag;Ze&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||p(We,{inDragLayer:!0});var nt={x:0,y:0};if(Pt(Pe[0])&&Pt(Pe[1])&&(nt.x+=Pe[0],nt.y+=Pe[1],Ze)){var ft=e.hoverData.dragDelta;ft&&Pt(ft[0])&&Pt(ft[1])&&(nt.x+=ft[0],nt.y+=ft[1])}e.hoverData.draggingEles=!0,We.silentShift(nt).emit(ht("position")).emit(ht("drag")),e.redrawHint("drag",!0),e.redraw()}}else Ct();ae=!0}if(Se[2]=Ce[0],Se[3]=Ce[1],ae)return W.stopPropagation&&W.stopPropagation(),W.preventDefault&&W.preventDefault(),!1}},!1);var N,O,R;e.registerBinding(t,"mouseup",function(W){if(!(e.hoverData.which===1&&W.which!==1&&e.hoverData.capture)){var U=e.hoverData.capture;if(U){e.hoverData.capture=!1;var ae=e.cy,K=e.projectIntoViewport(W.clientX,W.clientY),Y=e.selection,Z=e.findNearestElement(K[0],K[1],!0,!1),Ce=e.dragData.possibleDragElements,we=e.hoverData.down,ke=a(W);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,we&&we.unactivate();var Se=function(lt){return{originalEvent:W,type:lt,position:{x:K[0],y:K[1]}}};if(e.hoverData.which===3){var Ne=Se("cxttapend");if(we?we.emit(Ne):ae.emit(Ne),!e.hoverData.cxtDragged){var Ae=Se("cxttap");we?we.emit(Ae):ae.emit(Ae)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(i(Z,["mouseup","tapend","vmouseup"],W,{x:K[0],y:K[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(i(we,["click","tap","vclick"],W,{x:K[0],y:K[1]}),O=!1,W.timeStamp-R<=ae.multiClickDebounceTime()?(N&&clearTimeout(N),O=!0,R=null,i(we,["dblclick","dbltap","vdblclick"],W,{x:K[0],y:K[1]})):(N=setTimeout(function(){O||i(we,["oneclick","onetap","voneclick"],W,{x:K[0],y:K[1]})},ae.multiClickDebounceTime()),R=W.timeStamp)),we==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(W)&&(ae.$(r).unselect(["tapunselect"]),Ce.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=Ce=ae.collection()),Z==we&&!e.dragData.didDrag&&!e.hoverData.selecting&&Z!=null&&Z._private.selectable&&(e.hoverData.dragging||(ae.selectionType()==="additive"||ke?Z.selected()?Z.unselect(["tapunselect"]):Z.select(["tapselect"]):ke||(ae.$(r).unmerge(Z).unselect(["tapunselect"]),Z.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var Fe=ae.collection(e.getAllInBox(Y[0],Y[1],Y[2],Y[3]));e.redrawHint("select",!0),Fe.length>0&&e.redrawHint("eles",!0),ae.emit(Se("boxend"));var Pe=function(lt){return lt.selectable()&&!lt.selected()};ae.selectionType()==="additive"||ke||ae.$(r).unmerge(Fe).unselect(),Fe.emit(Se("box")).stdFilter(Pe).select().emit(Se("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!Y[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var We=we&&we.grabbed();m(Ce),We&&(we.emit(Se("freeon")),Ce.emit(Se("free")),e.dragData.didDrag&&(we.emit(Se("dragfreeon")),Ce.emit(Se("dragfree"))))}}Y[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}},!1);var _=[],D=4,I,M=1e5,B=function(W){for(var U=Math.abs(W[0]),ae=1;ae=D){I=!1;var K=_;if(K[0]>=5){var Y;B(K)?Y=K[0]:Y=hst(K),Y>1&&(I=!0,M=Y)}}else _.push(Math.abs(ae)),U=!0;else I&&(M=Math.min(Math.abs(ae),M));if(!e.scrollingPage){var Z=e.cy,Ce=Z.zoom(),we=Z.pan(),ke=e.projectIntoViewport(W.clientX,W.clientY),Se=[ke[0]*Ce+we.x,ke[1]*Ce+we.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||S()){W.preventDefault();return}if(Z.panningEnabled()&&Z.userPanningEnabled()&&Z.zoomingEnabled()&&Z.userZoomingEnabled()){W.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout(function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()},150);var Ne;U&&Math.abs(ae)>5&&(ae=dF(ae)*5),Ne=ae/-250,I&&(Ne/=M,Ne*=3),Ne=Ne*e.wheelSensitivity;var Ae=W.deltaMode===1;Ae&&(Ne*=33);var Fe=Z.zoom()*Math.pow(10,Ne);W.type==="gesturechange"&&(Fe=e.gestureStartZoom*W.scale),Z.zoom({level:Fe,renderedPosition:{x:Se[0],y:Se[1]}}),Z.emit({type:W.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:W,position:{x:ke[0],y:ke[1]}})}}}};e.registerBinding(e.container,"wheel",P,!0),e.registerBinding(t,"scroll",function(W){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(W){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||W.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(H){e.hasTouchStarted||P(H)},!0),e.registerBinding(e.container,"mouseout",function(W){var U=e.projectIntoViewport(W.clientX,W.clientY);e.cy.emit({originalEvent:W,type:"mouseout",position:{x:U[0],y:U[1]}})},!1),e.registerBinding(e.container,"mouseover",function(W){var U=e.projectIntoViewport(W.clientX,W.clientY);e.cy.emit({originalEvent:W,type:"mouseover",position:{x:U[0],y:U[1]}})},!1);var $,G,q,z,V,j,ee,ne,Q,pe,te,de,ce,ue=function(W,U,ae,K){return Math.sqrt((ae-W)*(ae-W)+(K-U)*(K-U))},Re=function(W,U,ae,K){return(ae-W)*(ae-W)+(K-U)*(K-U)},ve;e.registerBinding(e.container,"touchstart",ve=function(W){if(e.hasTouchStarted=!0,!!E(W)){x(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var U=e.cy,ae=e.touchData.now,K=e.touchData.earlier;if(W.touches[0]){var Y=e.projectIntoViewport(W.touches[0].clientX,W.touches[0].clientY);ae[0]=Y[0],ae[1]=Y[1]}if(W.touches[1]){var Y=e.projectIntoViewport(W.touches[1].clientX,W.touches[1].clientY);ae[2]=Y[0],ae[3]=Y[1]}if(W.touches[2]){var Y=e.projectIntoViewport(W.touches[2].clientX,W.touches[2].clientY);ae[4]=Y[0],ae[5]=Y[1]}var Z=function(pt){return{originalEvent:W,type:pt,position:{x:ae[0],y:ae[1]}}};if(W.touches[1]){e.touchData.singleTouchMoved=!0,m(e.dragData.touchDragEles);var Ce=e.findContainerClientCoords();Q=Ce[0],pe=Ce[1],te=Ce[2],de=Ce[3],$=W.touches[0].clientX-Q,G=W.touches[0].clientY-pe,q=W.touches[1].clientX-Q,z=W.touches[1].clientY-pe,ce=0<=$&&$<=te&&0<=q&&q<=te&&0<=G&&G<=de&&0<=z&&z<=de;var we=U.pan(),ke=U.zoom();V=ue($,G,q,z),j=Re($,G,q,z),ee=[($+q)/2,(G+z)/2],ne=[(ee[0]-we.x)/ke,(ee[1]-we.y)/ke];var Se=200,Ne=Se*Se;if(j=1){for(var $e=e.touchData.startPosition=[null,null,null,null,null,null],at=0;at=e.touchTapThreshold2}if(U&&e.touchData.cxt){W.preventDefault();var at=W.touches[0].clientX-Q,bt=W.touches[0].clientY-pe,Et=W.touches[1].clientX-Q,pt=W.touches[1].clientY-pe,Ct=Re(at,bt,Et,pt),ht=Ct/j,Te=150,ot=Te*Te,gt=1.5,Qe=gt*gt;if(ht>=Qe||Ct>=ot){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var _e=ke("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(_e),e.touchData.start=null):K.emit(_e)}}if(U&&e.touchData.cxt){var _e=ke("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(_e):K.emit(_e),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var Ze=e.findNearestElement(Y[0],Y[1],!0,!0);(!e.touchData.cxtOver||Ze!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(ke("cxtdragout")),e.touchData.cxtOver=Ze,Ze&&Ze.emit(ke("cxtdragover")))}else if(U&&W.touches[2]&&K.boxSelectionEnabled())W.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||K.emit(ke("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,ae[4]=1,!ae||ae.length===0||ae[0]===void 0?(ae[0]=(Y[0]+Y[2]+Y[4])/3,ae[1]=(Y[1]+Y[3]+Y[5])/3,ae[2]=(Y[0]+Y[2]+Y[4])/3+1,ae[3]=(Y[1]+Y[3]+Y[5])/3+1):(ae[2]=(Y[0]+Y[2]+Y[4])/3,ae[3]=(Y[1]+Y[3]+Y[5])/3),e.redrawHint("select",!0),e.redraw();else if(U&&W.touches[1]&&!e.touchData.didSelect&&K.zoomingEnabled()&&K.panningEnabled()&&K.userZoomingEnabled()&&K.userPanningEnabled()){W.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var nt=e.dragData.touchDragEles;if(nt){e.redrawHint("drag",!0);for(var ft=0;ft0&&!e.hoverData.draggingEles&&!e.swipePanning&&e.data.bgActivePosistion!=null&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1);var He;e.registerBinding(t,"touchcancel",He=function(W){var U=e.touchData.start;e.touchData.capture=!1,U&&U.unactivate()});var Ue,me,De,Ie;if(e.registerBinding(t,"touchend",Ue=function(W){var U=e.touchData.start,ae=e.touchData.capture;if(ae)W.touches.length===0&&(e.touchData.capture=!1),W.preventDefault();else return;var K=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var Y=e.cy,Z=Y.zoom(),Ce=e.touchData.now,we=e.touchData.earlier;if(W.touches[0]){var ke=e.projectIntoViewport(W.touches[0].clientX,W.touches[0].clientY);Ce[0]=ke[0],Ce[1]=ke[1]}if(W.touches[1]){var ke=e.projectIntoViewport(W.touches[1].clientX,W.touches[1].clientY);Ce[2]=ke[0],Ce[3]=ke[1]}if(W.touches[2]){var ke=e.projectIntoViewport(W.touches[2].clientX,W.touches[2].clientY);Ce[4]=ke[0],Ce[5]=ke[1]}var Se=function(ot){return{originalEvent:W,type:ot,position:{x:Ce[0],y:Ce[1]}}};U&&U.unactivate();var Ne;if(e.touchData.cxt){if(Ne=Se("cxttapend"),U?U.emit(Ne):Y.emit(Ne),!e.touchData.cxtDragged){var Ae=Se("cxttap");U?U.emit(Ae):Y.emit(Ae)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw();return}if(!W.touches[2]&&Y.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var Fe=Y.collection(e.getAllInBox(K[0],K[1],K[2],K[3]));K[0]=void 0,K[1]=void 0,K[2]=void 0,K[3]=void 0,K[4]=0,e.redrawHint("select",!0),Y.emit(Se("boxend"));var Pe=function(ot){return ot.selectable()&&!ot.selected()};Fe.emit(Se("box")).stdFilter(Pe).select().emit(Se("boxselect")),Fe.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(U?.unactivate(),W.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(!W.touches[1]){if(!W.touches[0]){if(!W.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var We=e.dragData.touchDragEles;if(U!=null){var be=U._private.grabbed;m(We),e.redrawHint("drag",!0),e.redrawHint("eles",!0),be&&(U.emit(Se("freeon")),We.emit(Se("free")),e.dragData.didDrag&&(U.emit(Se("dragfreeon")),We.emit(Se("dragfree")))),i(U,["touchend","tapend","vmouseup","tapdragout"],W,{x:Ce[0],y:Ce[1]}),U.unactivate(),e.touchData.start=null}else{var lt=e.findNearestElement(Ce[0],Ce[1],!0,!0);i(lt,["touchend","tapend","vmouseup","tapdragout"],W,{x:Ce[0],y:Ce[1]})}var $e=e.touchData.startPosition[0]-Ce[0],at=$e*$e,bt=e.touchData.startPosition[1]-Ce[1],Et=bt*bt,pt=at+Et,Ct=pt*Z*Z;e.touchData.singleTouchMoved||(U||Y.$(":selected").unselect(["tapunselect"]),i(U,["tap","vclick"],W,{x:Ce[0],y:Ce[1]}),me=!1,W.timeStamp-Ie<=Y.multiClickDebounceTime()?(De&&clearTimeout(De),me=!0,Ie=null,i(U,["dbltap","vdblclick"],W,{x:Ce[0],y:Ce[1]})):(De=setTimeout(function(){me||i(U,["onetap","voneclick"],W,{x:Ce[0],y:Ce[1]})},Y.multiClickDebounceTime()),Ie=W.timeStamp)),U!=null&&!e.dragData.didDrag&&U._private.selectable&&Ct"u"){var Me=[],re=function(W){return{clientX:W.clientX,clientY:W.clientY,force:1,identifier:W.pointerId,pageX:W.pageX,pageY:W.pageY,radiusX:W.width/2,radiusY:W.height/2,screenX:W.screenX,screenY:W.screenY,target:W.target}},le=function(W){return{event:W,touch:re(W)}},oe=function(W){Me.push(le(W))},he=function(W){for(var U=0;U0)return z[0]}return null},g=Object.keys(d),m=0;m0?p:Cbe(a,s,t,r,n,i,o,l)},checkPoint:function(t,r,n,i,a,s,o,l){l=l==="auto"?cp(i,a):l;var u=2*l;if(ef(t,r,this.points,s,o,i,a-u,[0,-1],n)||ef(t,r,this.points,s,o,i-u,a,[0,-1],n))return!0;var h=i/2+2*n,f=a/2+2*n,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(wo(t,r,d)||Tg(t,r,u,u,s+i/2-l,o+a/2-l,n)||Tg(t,r,u,u,s-i/2+l,o+a/2-l,n))}}};tf.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",zs(3,0)),this.generateRoundPolygon("round-triangle",zs(3,0)),this.generatePolygon("rectangle",zs(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",zs(5,0)),this.generateRoundPolygon("round-pentagon",zs(5,0)),this.generatePolygon("hexagon",zs(6,0)),this.generateRoundPolygon("round-hexagon",zs(6,0)),this.generatePolygon("heptagon",zs(7,0)),this.generateRoundPolygon("round-heptagon",zs(7,0)),this.generatePolygon("octagon",zs(8,0)),this.generateRoundPolygon("round-octagon",zs(8,0));var n=new Array(20);{var i=z$(5,0),a=z$(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=t.deqFastCost*k)break}else if(u){if(b>=t.deqCost*p||b>=t.deqAvgCost*d)break}else if(T>=t.deqNoDrawCost*I$)break;var w=t.deq(n,y,m);if(w.length>0)for(var C=0;C0&&(t.onDeqd(n,g),!u&&t.shouldRedraw(n,g,y,m)&&a())},o=t.priority||uF;i.beforeRender(s,o(n))}}}},Zct=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q3;dp(this,e),this.idsByKey=new Qh,this.keyForId=new Qh,this.cachesByLvl=new Qh,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r}return pp(e,[{key:"getIdsFor",value:function(r){r==null&&gi("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new rv,n.set(r,i)),i}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Qh,n.set(r,a),i.push(r)),a}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var i=this.getKey(r);return this.hasCache(i,n)}},{key:"setCache",value:function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)}},{key:"set",value:function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var i=this.getKey(r);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})}},{key:"invalidate",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}])})(),Bxe=25,E3=50,B3=-4,eF=3,_2e=7.99,Qct=8,Jct=1024,eut=1024,tut=1024,rut=.2,nut=.8,iut=10,aut=.15,sut=.1,out=.9,lut=.9,cut=100,uut=1,H1={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},hut=Ja({getKey:null,doesEleInvalidateKey:q3,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:gbe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),DT=function(t,r){var n=this;n.renderer=t,n.onDequeues=[];var i=hut(r);yr(n,i),n.lookup=new Zct(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},xa=DT.prototype;xa.reasons=H1;xa.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]};xa.getRetiredTextureQueue=function(e){var t=this,r=t.eleImgCaches.retired=t.eleImgCaches.retired||{},n=r[e]=r[e]||[];return n};xa.getElementQueue=function(){var e=this,t=e.eleCacheQueue=e.eleCacheQueue||new JT(function(r,n){return n.reqs-r.reqs});return t};xa.getElementKeyToQueue=function(){var e=this,t=e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{};return t};xa.getElement=function(e,t,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(n==null&&(n=Math.ceil(fF(o*r))),n=_2e||n>eF)return null;var u=Math.pow(2,n),h=t.h*u,f=t.w*u,d=s.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p=l.get(e,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var g;if(h<=Bxe?g=Bxe:h<=E3?g=E3:g=Math.ceil(h/E3)*E3,h>tut||f>eut)return null;var m=a.getTextureQueue(g),y=m[m.length-2],x=function(){return a.recycleTexture(g,f)||a.addTexture(g,f)};y||(y=m[m.length-1]),y||(y=x()),y.width-y.usedWidthn;O--)L=a.getElement(e,t,r,O,H1.downscale);N()}else return a.queueElement(e,C.level-1),C;else{var R;if(!T&&!k&&!w)for(var _=n-1;_>=B3;_--){var D=l.get(e,_);if(D){R=D;break}}if(b(R))return a.queueElement(e,n),R;y.context.translate(y.usedWidth,0),y.context.scale(u,u),this.drawElement(y.context,e,t,d,!1),y.context.scale(1/u,1/u),y.context.translate(-y.usedWidth,0)}return p={x:y.usedWidth,texture:y,level:n,scale:u,width:f,height:h,scaledLabelShown:d},y.usedWidth+=Math.ceil(f+Qct),y.eleCaches.push(p),l.set(e,n,p),a.checkTextureFullness(y),p};xa.invalidateElements=function(e){for(var t=0;t=rut*e.width&&this.retireTexture(e)};xa.checkTextureFullness=function(e){var t=this,r=t.getTextureQueue(e.height);e.usedWidth/e.width>nut&&e.fullnessChecks>=iut?lp(r,e):e.fullnessChecks++};xa.retireTexture=function(e){var t=this,r=e.height,n=t.getTextureQueue(r),i=this.lookup;lp(n,e),e.retired=!0;for(var a=e.eleCaches,s=0;s=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,hF(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),lp(i,s),n.push(s),s}};xa.queueElement=function(e,t){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(e),s=i[a];if(s)s.level=Math.max(s.level,t),s.eles.merge(e),s.reqs++,n.updateItem(s);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),i[a]=o}};xa.dequeue=function(e){for(var t=this,r=t.getElementQueue(),n=t.getElementKeyToQueue(),i=[],a=t.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=a.hasCache(u,o.level);if(n[l]=null,h)continue;i.push(o);var f=t.getBoundingBox(u);t.getElement(u,f,e,o.level,H1.dequeue)}return i};xa.removeFromQueue=function(e){var t=this,r=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(e),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=cF,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(e))};xa.onDequeue=function(e){this.onDequeues.push(e)};xa.offDequeue=function(e){lp(this.onDequeues,e)};xa.setupDequeueing=A2e.setupDequeueing({deqRedrawThreshold:cut,deqCost:aut,deqAvgCost:sut,deqNoDrawCost:out,deqFastCost:lut,deq:function(t,r,n){return t.dequeue(r,n)},onDeqd:function(t,r){for(var n=0;n=dut||r>K3)return null}n.validateLayersElesOrdering(r,e);var l=n.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=n.levelIsComplete(r,e),p,g=function(){var N=function(I){if(n.validateLayersElesOrdering(I,e),n.levelIsComplete(I,e))return p=l[I],!0},O=function(I){if(!p)for(var M=r+I;OT<=M&&M<=K3&&!N(M);M+=I);};O(1),O(-1);for(var R=h.length-1;R>=0;R--){var _=h[R];_.invalid&&lp(h,_)}};if(!d)g();else return h;var m=function(){if(!f){f=qs();for(var N=0;NFxe||_>Fxe)return null;var D=R*_;if(D>Tut)return null;var I=n.makeLayer(f,r);if(O!=null){var M=h.indexOf(O)+1;h.splice(M,0,I)}else(N.insert===void 0||N.insert)&&h.unshift(I);return I};if(n.skipping&&!o)return null;for(var x=null,b=e.length/fut,T=!o,k=0;k=b||!wbe(x.bb,w.boundingBox()))&&(x=y({insert:!0,after:x}),!x))return null;p||T?n.queueLayer(x,w):n.drawEleInLayer(x,w,r,t),x.eles.push(w),S[r]=x}return p||(T?null:h)};es.getEleLevelForLayerLevel=function(e,t){return e};es.drawEleInLayer=function(e,t,r,n){var i=this,a=this.renderer,s=e.context,o=t.boundingBox();o.w===0||o.h===0||!t.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(s,!1),a.drawCachedElement(s,t,null,null,r,wut),a.setImgSmoothing(s,!0))};es.levelIsComplete=function(e,t){var r=this,n=r.layersByLevel[e];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||s.invalid)return!1;i+=s.eles.length}return i===t.length};es.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var n=0;n0){t=!0;break}}return t};es.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=Jh(),!(e.length===0||!t.haveLayers())&&t.updateElementsInLayers(e,function(n,i,a){t.invalidateLayer(n)}))};es.invalidateLayer=function(e){if(this.lastInvalidationTime=Jh(),!e.invalid){var t=e.level,r=e.eles,n=this.layersByLevel[t];lp(n,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=t._private.rscratch;if(!(a&&!t.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,h=a?t.pstyle("line-opacity").value:1,f=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,m=t.pstyle("line-outline-width").value,y=t.pstyle("line-outline-color").value,x=u*h,b=u*h,T=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;f==="straight-triangle"?(s.eleStrokeStyle(e,t,I),s.drawEdgeTrianglePath(t,e,o.allpts)):(e.lineWidth=p,e.lineCap=g,s.eleStrokeStyle(e,t,I),s.drawEdgePath(t,e,o.allpts,d),e.lineCap="butt")},k=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;if(e.lineWidth=p+m,e.lineCap=g,m>0)s.colorStrokeStyle(e,y[0],y[1],y[2],I);else{e.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(t,e,o.allpts):(s.drawEdgePath(t,e,o.allpts,d),e.lineCap="butt")},w=function(){i&&s.drawEdgeOverlay(e,t)},C=function(){i&&s.drawEdgeUnderlay(e,t)},S=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(e,t,I)},E=function(){s.drawElementText(e,t,null,n)};e.lineJoin="round";var L=t.pstyle("ghost").value==="yes";if(L){var N=t.pstyle("ghost-offset-x").pfValue,O=t.pstyle("ghost-offset-y").pfValue,R=t.pstyle("ghost-opacity").value,_=x*R;e.translate(N,O),T(_),S(_),e.translate(-N,-O)}else k();C(),T(),S(),w(),E(),r&&e.translate(l.x1,l.y1)}};I2e=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(t,"-opacity")).value;if(i!==0){var a=this,s=a.usePaths(),o=n._private.rscratch,l=n.pstyle("".concat(t,"-padding")).pfValue,u=2*l,h=n.pstyle("".concat(t,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,h[0],h[1],h[2],i),a.drawEdgePath(n,r,o.allpts,"solid")}}}};rf.drawEdgeOverlay=I2e("overlay");rf.drawEdgeUnderlay=I2e("underlay");rf.drawEdgePath=function(e,t,r,n){var i=e._private.rscratch,a=t,s,o=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,h=e.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(s=t=i.pathCache,o=!0):(s=t=new Path2D,i.pathCacheKey=f,i.pathCache=s)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=h;break;case"solid":a.setLineDash([]);break}if(!o&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(a&&!s.eleTextBiggerThanMin(t))return}else if(n===!1)return;if(t.isNode()){var o=t.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(t),u=t.pstyle("text-metrics").strValue==="glyph";e.textAlign=l,e.textBaseline=u?"alphabetic":"bottom"}else{var h=t.element()._private.rscratch.badLine,f=t.pstyle("label"),d=t.pstyle("source-label"),p=t.pstyle("target-label");if(h||(!f||!f.value)&&(!d||!d.value)&&(!p||!p.value))return;e.textAlign="center",e.textBaseline="bottom"}var g=!r,m;r&&(m=r,e.translate(-m.x1,-m.y1)),i==null?(s.drawText(e,t,null,g,a),t.isEdge()&&(s.drawText(e,t,"source",g,a),s.drawText(e,t,"target",g,a))):s.drawText(e,t,i,g,a),r&&e.translate(m.x1,m.y1)};_g.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,o=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*o,u=t.pstyle("color").value,h=t.pstyle("text-outline-color").value;e.font=n+" "+s+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],o),this.colorStrokeStyle(e,h[0],h[1],h[2],l)};_g.getTextAngle=function(e,t){var r,n=e._private,i=n.rscratch,a=t?t+"-":"",s=e.pstyle(a+"text-rotation");if(s.strValue==="autorotate"){var o=Gs(i,"labelAngle",t);r=e.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};_g.drawText=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private,s=a.rscratch,o=i?t.effectiveOpacity():1;if(!(i&&(o===0||t.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Gs(s,"labelX",r),u=Gs(s,"labelY",r),h,f,d=this.getLabelText(t,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(e,t,i);var p=r?r+"-":"",g=Gs(s,"labelWidth",r),m=Gs(s,"labelHeight",r),y=Gs(s,"labelActualDescent",r),x=t.pstyle(p+"text-margin-x").pfValue,b=t.pstyle(p+"text-margin-y").pfValue,T=t.isEdge(),k=t.pstyle("text-halign").value,w=t.pstyle("text-valign").value;T&&(k="center",w="center"),l+=x,u+=b;var C;n?C=this.getTextAngle(t,r):C=0,C!==0&&(h=l,f=u,e.translate(h,f),e.rotate(C),l=0,u=0);var S=ev(k),E=tv(w);switch(E){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var L=t.pstyle("text-background-opacity").value,N=t.pstyle("text-border-opacity").value,O=t.pstyle("text-border-width").pfValue,R=t.pstyle("text-background-padding").pfValue,_=t.pstyle("text-background-shape").strValue,D=_==="round-rectangle"||_==="roundrectangle",I=_==="circle",M=2;if(L>0||O>0&&N>0){var B=e.fillStyle,P=e.strokeStyle,$=e.lineWidth,G=t.pstyle("text-background-color").value,q=t.pstyle("text-border-color").value,z=t.pstyle("text-border-style").value,V=L>0,j=O>0&&N>0,ee=l-R;switch(S){case"left":ee-=g;break;case"center":ee-=g/2;break}var ne=u-m-R,Q=g+2*R,pe=m+2*R;if(V&&(e.fillStyle="rgba(".concat(G[0],",").concat(G[1],",").concat(G[2],",").concat(L*o,")")),j&&(e.strokeStyle="rgba(".concat(q[0],",").concat(q[1],",").concat(q[2],",").concat(N*o,")"),e.lineWidth=O,e.setLineDash))switch(z){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=O/4,e.setLineDash([]);break;default:e.setLineDash([]);break}if(D?(e.beginPath(),Vxe(e,ee,ne,Q,pe,M)):I?(e.beginPath(),Dut(e,ee,ne,Q,pe)):(e.beginPath(),e.rect(ee,ne,Q,pe)),V&&e.fill(),j&&e.stroke(),j&&z==="double"){var te=O/2;e.beginPath(),D?Vxe(e,ee+te,ne+te,Q-2*te,pe-2*te,M):e.rect(ee+te,ne+te,Q-2*te,pe-2*te),e.stroke()}e.fillStyle=B,e.strokeStyle=P,e.lineWidth=$,e.setLineDash&&e.setLineDash([])}var de=2*t.pstyle("text-outline-width").pfValue;if(de>0&&(e.lineWidth=de),u-=y,t.pstyle("text-wrap").value==="wrap"){var ce=Gs(s,"labelWrapCachedLines",r),ue=Gs(s,"labelLineHeight",r),Re=g/2,ve=this.getLabelJustification(t);switch(ve==="auto"||(S==="left"?ve==="left"?l+=-g:ve==="center"&&(l+=-Re):S==="center"?ve==="left"?l+=-Re:ve==="right"&&(l+=Re):S==="right"&&(ve==="center"?l+=Re:ve==="right"&&(l+=g))),E){case"top":u-=(ce.length-1)*ue;break;case"center":case"bottom":u-=(ce.length-1)*ue;break}for(var Ge=0;Ge0&&e.strokeText(ce[Ge],l,u),e.fillText(ce[Ge],l,u),u+=ue}else de>0&&e.strokeText(d,l,u),e.fillText(d,l,u);C!==0&&(e.rotate(-C),e.translate(-h,-f))}}};mp={};mp.drawNode=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=t._private,h=u.rscratch,f=t.position();if(!(!Pt(f.x)||!Pt(f.y))&&!(a&&!t.visible())){var d=a?t.effectiveOpacity():1,p=s.usePaths(),g,m=!1,y=t.padding();o=t.width()+2*y,l=t.height()+2*y;var x;r&&(x=r,e.translate(-x.x1,-x.y1));for(var b=t.pstyle("background-image"),T=b.value,k=new Array(T.length),w=new Array(T.length),C=0,S=0;S0&&arguments[0]!==void 0?arguments[0]:_;s.eleFillStyle(e,t,U)},te=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q;s.colorStrokeStyle(e,D[0],D[1],D[2],U)},de=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee;s.colorStrokeStyle(e,V[0],V[1],V[2],U)},ce=function(U,ae,K,Y){var Z=s.nodePathCache=s.nodePathCache||[],Ce=pbe(K==="polygon"?K+","+Y.join(","):K,""+ae,""+U,""+Q),we=Z[Ce],ke,Se=!1;return we!=null?(ke=we,Se=!0,h.pathCache=ke):(ke=new Path2D,Z[Ce]=h.pathCache=ke),{path:ke,cacheHit:Se}},ue=t.pstyle("shape").strValue,Re=t.pstyle("shape-polygon-points").pfValue;if(p){e.translate(f.x,f.y);var ve=ce(o,l,ue,Re);g=ve.path,m=ve.cacheHit}var Ge=function(){if(!m){var U=f;p&&(U={x:0,y:0}),s.nodeShapes[s.getNodeShape(t)].draw(g||e,U.x,U.y,o,l,Q,h)}p?e.fill(g):e.fill()},He=function(){for(var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,K=u.backgrounding,Y=0,Z=0;Z0&&arguments[0]!==void 0?arguments[0]:!1,ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(t)&&(s.drawPie(e,t,ae),U&&(p||s.nodeShapes[s.getNodeShape(t)].draw(e,f.x,f.y,o,l,Q,h)))},me=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasStripe(t)&&(e.save(),p?e.clip(h.pathCache):(s.nodeShapes[s.getNodeShape(t)].draw(e,f.x,f.y,o,l,Q,h),e.clip()),s.drawStripe(e,t,ae),e.restore(),U&&(p||s.nodeShapes[s.getNodeShape(t)].draw(e,f.x,f.y,o,l,Q,h)))},De=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,ae=(O>0?O:-O)*U,K=O>0?0:255;O!==0&&(s.colorFillStyle(e,K,K,K,ae),p?e.fill(g):e.fill())},Ie=function(){if(R>0){if(e.lineWidth=R,e.lineCap=B,e.lineJoin=M,e.setLineDash)switch(I){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash($),e.lineDashOffset=G;break;case"solid":case"double":e.setLineDash([]);break}if(P!=="center"){if(e.save(),e.lineWidth*=2,P==="inside")p?e.clip(g):e.clip();else{var U=new Path2D;U.rect(-o/2-R,-l/2-R,o+2*R,l+2*R),U.addPath(g),e.clip(U,"evenodd")}p?e.stroke(g):e.stroke(),e.restore()}else p?e.stroke(g):e.stroke();if(I==="double"){e.lineWidth=R/3;var ae=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",p?e.stroke(g):e.stroke(),e.globalCompositeOperation=ae}e.setLineDash&&e.setLineDash([])}},Me=function(){if(z>0){if(e.lineWidth=z,e.lineCap="butt",e.setLineDash)switch(j){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([]);break}var U=f;p&&(U={x:0,y:0});var ae=s.getNodeShape(t),K=R;P==="inside"&&(K=0),P==="outside"&&(K*=2);var Y=(o+K+(z+ne))/o,Z=(l+K+(z+ne))/l,Ce=o*Y,we=l*Z,ke=s.nodeShapes[ae].points,Se;if(p){var Ne=ce(Ce,we,ae,ke);Se=Ne.path}if(ae==="ellipse")s.drawEllipsePath(Se||e,U.x,U.y,Ce,we);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(ae)){var Ae=0,Fe=0,Pe=0;ae==="round-diamond"?Ae=(K+ne+z)*1.4:ae==="round-heptagon"?(Ae=(K+ne+z)*1.075,Pe=-(K/2+ne+z)/35):ae==="round-hexagon"?Ae=(K+ne+z)*1.12:ae==="round-pentagon"?(Ae=(K+ne+z)*1.13,Pe=-(K/2+ne+z)/15):ae==="round-tag"?(Ae=(K+ne+z)*1.12,Fe=(K/2+z+ne)*.07):ae==="round-triangle"&&(Ae=(K+ne+z)*(Math.PI/2),Pe=-(K+ne/2+z)/Math.PI),Ae!==0&&(Y=(o+Ae)/o,Ce=o*Y,["round-hexagon","round-tag"].includes(ae)||(Z=(l+Ae)/l,we=l*Z)),Q=Q==="auto"?Sbe(Ce,we):Q;for(var We=Ce/2,be=we/2,lt=Q+(K+z+ne)/2,$e=new Array(ke.length/2),at=new Array(ke.length/2),bt=0;bt0){if(i=i||n.position(),a==null||s==null){var p=n.padding();a=n.width()+2*p,s=n.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,i.x,i.y,a+l*2,s+l*2,d),r.fill()}}}};mp.drawNodeOverlay=M2e("overlay");mp.drawNodeUnderlay=M2e("underlay");mp.hasPie=function(e){return e=e[0],e._private.hasPie};mp.hasStripe=function(e){return e=e[0],e._private.hasStripe};mp.drawPie=function(e,t,r,n){t=t[0],n=n||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),o=t.pstyle("pie-start-angle").pfValue,l=n.x,u=n.y,h=t.width(),f=t.height(),d=Math.min(h,f)/2,p,g=0,m=this.usePaths();if(m&&(l=0,u=0),a.units==="%"?d=d*a.pfValue:a.pfValue!==void 0&&(d=a.pfValue/2),s.units==="%"?p=d*s.pfValue:s.pfValue!==void 0&&(p=s.pfValue/2),!(p>=d))for(var y=1;y<=i.pieBackgroundN;y++){var x=t.pstyle("pie-"+y+"-background-size").value,b=t.pstyle("pie-"+y+"-background-color").value,T=t.pstyle("pie-"+y+"-background-opacity").value*r,k=x/100;k+g>1&&(k=1-g);var w=1.5*Math.PI+2*Math.PI*g;w+=o;var C=2*Math.PI*k,S=w+C;x===0||g>=1||g+k>1||(p===0?(e.beginPath(),e.moveTo(l,u),e.arc(l,u,d,w,S),e.closePath()):(e.beginPath(),e.arc(l,u,d,w,S),e.arc(l,u,p,S,w,!0),e.closePath()),this.colorFillStyle(e,b[0],b[1],b[2],T),e.fill(),g+=k)}};mp.drawStripe=function(e,t,r,n){t=t[0],n=n||t.position();var i=t.cy().style(),a=n.x,s=n.y,o=t.width(),l=t.height(),u=0,h=this.usePaths();e.save();var f=t.pstyle("stripe-direction").value,d=t.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":e.rotate(-Math.PI/2);break}var p=o,g=l;d.units==="%"?(p=p*d.pfValue,g=g*d.pfValue):d.pfValue!==void 0&&(p=d.pfValue,g=d.pfValue),h&&(a=0,s=0),s-=p/2,a-=g/2;for(var m=1;m<=i.stripeBackgroundN;m++){var y=t.pstyle("stripe-"+m+"-background-size").value,x=t.pstyle("stripe-"+m+"-background-color").value,b=t.pstyle("stripe-"+m+"-background-opacity").value*r,T=y/100;T+u>1&&(T=1-u),!(y===0||u>=1||u+T>1)&&(e.beginPath(),e.rect(a,s+g*u,p,g*T),e.closePath(),this.colorFillStyle(e,x[0],x[1],x[2],b),e.fill(),u+=T)}e.restore()};Vs={},Nut=100;Vs.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),r=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/r};Vs.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;it.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(h[t.NODE]=!0,h[t.SELECT_BOX]=!0);var b=r.style(),T=r.zoom(),k=s!==void 0?s:T,w=r.pan(),C={x:w.x,y:w.y},S={zoom:T,pan:{x:w.x,y:w.y}},E=t.prevViewport,L=E===void 0||S.zoom!==E.zoom||S.pan.x!==E.pan.x||S.pan.y!==E.pan.y;!L&&!(m&&!g)&&(t.motionBlurPxRatio=1),o&&(C=o),k*=l,C.x*=l,C.y*=l;var N=t.getCachedZSortedEles();function O(te,de,ce,ue,Re){var ve=te.globalCompositeOperation;te.globalCompositeOperation="destination-out",t.colorFillStyle(te,255,255,255,t.motionBlurTransparency),te.fillRect(de,ce,ue,Re),te.globalCompositeOperation=ve}function R(te,de){var ce,ue,Re,ve;!t.clearingMotionBlur&&(te===u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||te===u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(ce={x:w.x*p,y:w.y*p},ue=T*p,Re=t.canvasWidth*p,ve=t.canvasHeight*p):(ce=C,ue=k,Re=t.canvasWidth,ve=t.canvasHeight),te.setTransform(1,0,0,1,0,0),de==="motionBlur"?O(te,0,0,Re,ve):!n&&(de===void 0||de)&&te.clearRect(0,0,Re,ve),i||(te.translate(ce.x,ce.y),te.scale(ue,ue)),o&&te.translate(o.x,o.y),s&&te.scale(s,s)}if(f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=r.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var _=t.data.bufferContexts[t.TEXTURE_BUFFER];_.setTransform(1,0,0,1,0,0),_.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:_,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult});var S=t.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:t.canvasWidth,height:t.canvasHeight};S.mpan={x:(0-S.pan.x)/S.zoom,y:(0-S.pan.y)/S.zoom}}h[t.DRAG]=!1,h[t.NODE]=!1;var D=u.contexts[t.NODE],I=t.textureCache.texture,S=t.textureCache.viewport;D.setTransform(1,0,0,1,0,0),d?O(D,0,0,S.width,S.height):D.clearRect(0,0,S.width,S.height);var M=b.core("outside-texture-bg-color").value,B=b.core("outside-texture-bg-opacity").value;t.colorFillStyle(D,M[0],M[1],M[2],B),D.fillRect(0,0,S.width,S.height);var T=r.zoom();R(D,!1),D.clearRect(S.mpan.x,S.mpan.y,S.width/S.zoom/l,S.height/S.zoom/l),D.drawImage(I,S.mpan.x,S.mpan.y,S.width/S.zoom/l,S.height/S.zoom/l)}else t.textureOnViewport&&!n&&(t.textureCache=null);var P=r.extent(),$=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),G=t.hideEdgesOnViewport&&$,q=[];if(q[t.NODE]=!h[t.NODE]&&d&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,q[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),q[t.DRAG]=!h[t.DRAG]&&d&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,q[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),h[t.NODE]||i||a||q[t.NODE]){var z=d&&!q[t.NODE]&&p!==1,D=n||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]),V=d&&!z?"motionBlur":void 0;R(D,V),G?t.drawCachedNodes(D,N.nondrag,l,P):t.drawLayeredElements(D,N.nondrag,l,P),t.debug&&t.drawDebugPoints(D,N.nondrag),!i&&!d&&(h[t.NODE]=!1)}if(!a&&(h[t.DRAG]||i||q[t.DRAG])){var z=d&&!q[t.DRAG]&&p!==1,D=n||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]);R(D,d&&!z?"motionBlur":void 0),G?t.drawCachedNodes(D,N.drag,l,P):t.drawCachedElements(D,N.drag,l,P),t.debug&&t.drawDebugPoints(D,N.drag),!i&&!d&&(h[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,R),d&&p!==1){var j=u.contexts[t.NODE],ee=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],ne=u.contexts[t.DRAG],Q=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],pe=function(de,ce,ue){de.setTransform(1,0,0,1,0,0),ue||!x?de.clearRect(0,0,t.canvasWidth,t.canvasHeight):O(de,0,0,t.canvasWidth,t.canvasHeight);var Re=p;de.drawImage(ce,0,0,t.canvasWidth*Re,t.canvasHeight*Re,0,0,t.canvasWidth,t.canvasHeight)};(h[t.NODE]||q[t.NODE])&&(pe(j,ee,q[t.NODE]),h[t.NODE]=!1),(h[t.DRAG]||q[t.DRAG])&&(pe(ne,Q,q[t.DRAG]),h[t.DRAG]=!1)}t.prevViewport=S,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),d&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,h[t.NODE]=!0,h[t.DRAG]=!0,t.redraw()},Nut)),n||r.emit("render")};Vs.drawSelectionRectangle=function(e,t){var r=this,n=r.cy,i=r.data,a=n.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=i.canvasNeedsRedraw,u=e.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var h=u||i.contexts[r.SELECT_BOX];if(t(h),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),d=a.core("selection-box-border-width").value/f;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(i.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),p=i.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),h.fill()}var g=r.lastRedrawTime;if(r.showFps&&g){g=Math.round(g);var m=Math.round(1e3/g),y="1 frame = "+g+" ms = "+m+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!_T){var x=h.measureText(y);_T=x.actualBoundingBoxAscent}h.fillText(y,0,_T);var b=60;h.strokeRect(0,_T+10,250,20),h.fillRect(0,_T+10,250*Math.min(m/b,1),20)}o||(l[r.SELECT_BOX]=!1)}};Uxe=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});jut=(function(){function e(t,r,n,i){dp(this,e),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,r,r),this.scratch=i(t,r,this.texHeight,"scratch")}return pp(e,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var n=r.w,i=r.h,a=this.texHeight,s=this.texSize,o=a/i,l=n*o,u=i*o;return l>s&&(o=s/n,l=n*o,u=i*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,n,i){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(n),h=u.scale,f=u.texW,d=u.texH,p=function(T,k){if(i&&k){var w=k.context,C=T.x,S=T.row,E=C,L=l*S;w.save(),w.translate(E,L),w.scale(h,h),i(w,n),w.restore()}},g=[null,null],m=function(){p(a.freePointer,a.canvas),g[0]={x:a.freePointer.x,y:a.freePointer.row*l,w:f,h:d},g[1]={x:a.freePointer.x+f,y:a.freePointer.row*l,w:0,h:d},a.freePointer.x+=f,a.freePointer.x==s&&(a.freePointer.x=0,a.freePointer.row++)},y=function(){var T=a.scratch,k=a.canvas;T.clear(),p({x:0,row:0},T);var w=s-a.freePointer.x,C=f-w,S=l;{var E=a.freePointer.x,L=a.freePointer.row*l,N=w;k.context.drawImage(T,0,0,N,S,E,L,N,S),g[0]={x:E,y:L,w:N,h:d}}{var O=w,R=(a.freePointer.row+1)*l,_=C;k&&k.context.drawImage(T,O,0,_,S,0,R,_,S),g[1]={x:0,y:R,w:_,h:d}}a.freePointer.x=C,a.freePointer.row++},x=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+f<=s)m();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(x(),m()):this.enableWrapping?y():(x(),m())}return this.keyToLocation.set(r,g),this.needsBuffer=!0,g}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var n=this.texSize,i=this.texRows,a=this.getScale(r),s=a.texW;return this.freePointer.x+s>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=i.forceRedraw,s=a===void 0?!1:a,o=i.filterEle,l=o===void 0?function(){return!0}:o,u=i.filterType,h=u===void 0?function(){return!0}:u,f=!1,d=!1,p=Co(r),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(l(m)){var y=Co(this.renderTypes.values()),x;try{var b=function(){var k=x.value,w=k.type;if(h(w)){var C=n.collections.get(k.collection),S=k.getKey(m),E=Array.isArray(S)?S:[S];if(s)E.forEach(function(R){return C.markKeyForGC(R)}),d=!0;else{var L=k.getID?k.getID(m):m.id(),N=n._key(w,L),O=n.typeAndIdToKey.get(N);O!==void 0&&!zut(E,O)&&(f=!0,n.typeAndIdToKey.delete(N),O.forEach(function(R){return C.markKeyForGC(R)}))}}};for(y.s();!(x=y.n()).done;)b()}catch(T){y.e(T)}finally{y.f()}}}}catch(T){p.e(T)}finally{p.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var r=Co(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.gc()}}catch(a){r.e(a)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,n,i,a){var s=this.renderTypes.get(n),o=this.collections.get(s.collection),l=!1,u=o.draw(a,i,function(d){s.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,i.w,i.h),d.clip(),s.drawElement(d,r,i,!0,!0),d.restore()):s.drawElement(d,r,i,!0,!0),l=!0});if(l){var h=s.getID?s.getID(r):r.id(),f=this._key(n,h);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return u}},{key:"getAtlasInfo",value:function(r,n){var i=this,a=this.renderTypes.get(n),s=a.getKey(r),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=a.getBoundingBox(r,l),h=i.getOrCreateAtlas(r,n,u,l),f=h.getOffsets(l),d=ia(f,2),p=d[0],g=d[1];return{atlas:h,tex:p,tex1:p,tex2:g,bb:u}})}},{key:"getDebugInfo",value:function(){var r=[],n=Co(this.collections),i;try{for(n.s();!(i=n.n()).done;){var a=ia(i.value,2),s=a[0],o=a[1],l=o.getCounts(),u=l.keyCount,h=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:h})}}catch(f){n.e(f)}finally{n.f()}return r}}])})(),Jut=(function(){function e(t){dp(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return pp(e,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n}}])})(),eht=` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } -`,Tnt=` +`,tht=` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } -`,wnt=` +`,rht=` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } -`,knt=` +`,nht=` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry @@ -594,7 +599,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho // return signed distance return (dot(p/ab,p/ab)>1.0) ? d : -d; } -`,gx={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},TS={IGNORE:1,USE_BB:2},dO=0,uge=1,hge=2,pO=3,O1=4,Z3=5,lx=6,cx=7,Cnt=(function(){function e(t,r,i){Td(this,e),this.r=t,this.gl=r,this.maxInstances=i.webglBatchSize,this.atlasSize=i.webglTexSize,this.bgColor=i.bgColor,this.debug=i.webglDebug,this.batchDebugInfo=[],i.enableWrapping=!0,i.createTextureCanvas=rnt,this.atlasManager=new vnt(t,i),this.batchManager=new bnt(i),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(gx.SCREEN),this.pickingProgram=this._createShaderProgram(gx.PICKING),this.vao=this._createVAO()}return wd(e,[{key:"addAtlasCollection",value:function(r,i){this.atlasManager.addAtlasCollection(r,i)}},{key:"addTextureAtlasRenderType",value:function(r,i){this.atlasManager.addRenderType(r,i)}},{key:"addSimpleShapeRenderType",value:function(r,i){this.simpleShapeOptions.set(r,i)}},{key:"invalidate",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.type,a=this.atlasManager;return n?a.invalidate(r,{filterType:function(o){return o===n},forceRedraw:!0}):a.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var i=this.gl,n=`#version 300 es +`,PT={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Z3={IGNORE:1,USE_BB:2},N$=0,Xxe=1,jxe=2,O$=3,q1=4,A3=5,RT=6,LT=7,iht=(function(){function e(t,r,n){dp(this,e),this.r=t,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=Put,this.atlasManager=new Qut(t,n),this.batchManager=new Jut(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(PT.SCREEN),this.pickingProgram=this._createShaderProgram(PT.PICKING),this.vao=this._createVAO()}return pp(e,[{key:"addAtlasCollection",value:function(r,n){this.atlasManager.addAtlasCollection(r,n)}},{key:"addTextureAtlasRenderType",value:function(r,n){this.atlasManager.addRenderType(r,n)}},{key:"addSimpleShapeRenderType",value:function(r,n){this.simpleShapeOptions.set(r,n)}},{key:"invalidate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.type,a=this.atlasManager;return i?a.invalidate(r,{filterType:function(o){return o===i},forceRedraw:!0}):a.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var n=this.gl,i=`#version 300 es precision highp float; uniform mat3 uPanZoomMatrix; @@ -641,7 +646,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho int vid = gl_VertexID; vec2 position = aPosition; // TODO make this a vec3, simplifies some code below - if(aVertType == `.concat(dO,`) { + if(aVertType == `.concat(N$,`) { float texX = aTex.x; // texture coordinates float texY = aTex.y; float texW = aTex.z; @@ -659,8 +664,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } - else if(aVertType == `).concat(O1," || aVertType == ").concat(cx,` - || aVertType == `).concat(Z3," || aVertType == ").concat(lx,`) { // simple shapes + else if(aVertType == `).concat(q1," || aVertType == ").concat(LT,` + || aVertType == `).concat(A3," || aVertType == ").concat(RT,`) { // simple shapes // the bounding box is needed by the fragment shader vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat @@ -675,7 +680,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } - else if(aVertType == `).concat(uge,`) { + else if(aVertType == `).concat(Xxe,`) { vec2 source = aPointAPointB.xy; vec2 target = aPointAPointB.zw; @@ -690,7 +695,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); vColor = aColor; } - else if(aVertType == `).concat(hge,`) { + else if(aVertType == `).concat(jxe,`) { vec2 pointA = aPointAPointB.xy; vec2 pointB = aPointAPointB.zw; vec2 pointC = aPointCPointD.xy; @@ -739,7 +744,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho vColor = aColor; } - else if(aVertType == `).concat(pO,` && vid < 3) { + else if(aVertType == `).concat(O$,` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); @@ -784,10 +789,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho out vec4 outColor; - `).concat(xnt,` - `).concat(Tnt,` - `).concat(wnt,` - `).concat(knt,` + `).concat(eht,` + `).concat(tht,` + `).concat(rht,` + `).concat(nht,` vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha return vec4( @@ -803,21 +808,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } void main(void) { - if(vVertType == `).concat(dO,`) { + if(vVertType == `).concat(N$,`) { // look up the texel from the texture unit `).concat(a.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` else `),` } - else if(vVertType == `).concat(pO,`) { + else if(vVertType == `).concat(O$,`) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow } - else if(vVertType == `).concat(O1,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + else if(vVertType == `).concat(q1,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done } - else if(vVertType == `).concat(O1," || vVertType == ").concat(cx,` - || vVertType == `).concat(Z3," || vVertType == ").concat(lx,`) { // use SDF + else if(vVertType == `).concat(q1," || vVertType == ").concat(LT,` + || vVertType == `).concat(A3," || vVertType == ").concat(RT,`) { // use SDF float outerBorder = vBorderWidth[0]; float innerBorder = vBorderWidth[1]; @@ -828,11 +833,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center float d; // signed distance - if(vVertType == `).concat(O1,`) { + if(vVertType == `).concat(q1,`) { d = rectangleSD(p, b); - } else if(vVertType == `).concat(cx,` && w == h) { + } else if(vVertType == `).concat(LT,` && w == h) { d = circleSD(p, b.x); // faster than ellipse - } else if(vVertType == `).concat(cx,`) { + } else if(vVertType == `).concat(LT,`) { d = ellipseSD(p, b); } else { d = roundRectangleSD(p, b, vCornerRadius.wzyx); @@ -872,16 +877,44 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `).concat(r.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } - `),o=tnt(i,n,s);o.aPosition=i.getAttribLocation(o,"aPosition"),o.aIndex=i.getAttribLocation(o,"aIndex"),o.aVertType=i.getAttribLocation(o,"aVertType"),o.aTransform=i.getAttribLocation(o,"aTransform"),o.aAtlasId=i.getAttribLocation(o,"aAtlasId"),o.aTex=i.getAttribLocation(o,"aTex"),o.aPointAPointB=i.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=i.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=i.getAttribLocation(o,"aLineWidth"),o.aColor=i.getAttribLocation(o,"aColor"),o.aCornerRadius=i.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=i.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=i.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=i.getUniformLocation(o,"uAtlasSize"),o.uBGColor=i.getUniformLocation(o,"uBGColor"),o.uZoom=i.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:gx.SCREEN;this.panZoomMatrix=r,this.renderTarget=i,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,i){return r.visible()?i&&i.isVisible?i.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,i,n){var a=this.atlasManager,s=this.batchManager,o=a.getRenderTypeOpts(n);if(this._isVisible(r,o)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(r);if(l===TS.IGNORE)return;if(l==TS.USE_BB){this.drawPickingRectangle(r,i,n);return}}var u=a.getAtlasInfo(r,n),h=$s(u),f;try{for(h.s();!(f=h.n()).done;){var d=f.value,p=d.atlas,g=d.tex1,m=d.tex2;s.canAddToCurrentBatch(p)||this.endBatch();for(var y=s.getAtlasIndexForBatch(p),v=0,x=[[g,!0],[m,!1]];v=this.maxInstances&&this.endBatch()}}}}catch(O){h.e(O)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(r,i,n,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=r.pstyle(n.shapeProps.padding).pfValue),a){var l=a.bb,u=a.tex1,h=a.tex2,f=u.w/(u.w+h.w);s||(f=1-f);var d=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(i,d,n,r)}else{var p=n.getBoundingBox(r),g=this._getAdjustedBB(p,o,!0,1);this._applyTransformMatrix(i,g,n,r)}}},{key:"_applyTransformMatrix",value:function(r,i,n,a){var s,o;lge(r);var l=n.getRotation?n.getRotation(a):0;if(l!==0){var u=n.getRotationPoint(a),h=u.x,f=u.y;lS(r,r,[h,f]),cge(r,r,l);var d=n.getRotationOffset(a);s=d.x+(i.xOffset||0),o=d.y+(i.yOffset||0)}else s=i.x1,o=i.y1;lS(r,r,[s,o]),MO(r,r,[i.w,i.h])}},{key:"_getAdjustedBB",value:function(r,i,n,a){var s=r.x1,o=r.y1,l=r.w,u=r.h,h=r.yOffset;i&&(s-=i,o-=i,l+=2*i,u+=2*i);var f=0,d=l*a;return n&&a<1?l=d:!n&&a<1&&(f=l-d,s+=f,l=d),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:h}}},{key:"drawPickingRectangle",value:function(r,i,n){var a=this.atlasManager.getRenderTypeOpts(n),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=O1;var o=this.indexBuffer.getView(s);M1(i,o);var l=this.colorBuffer.getView(s);y0([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(r,u,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,i,n){var a=this.simpleShapeOptions.get(n);if(this._isVisible(r,a)){var s=a.shapeProps,o=this._getVertTypeForShape(r,s.shape);if(o===void 0||a.isSimple&&!a.isSimple(r,this.renderTarget)){this.drawTexture(r,i,n);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===Z3||o===lx){var u=a.getBoundingBox(r),h=this._getCornerRadius(r,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=h,f[1]=h,f[2]=h,f[3]=h,o===lx&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(l);M1(i,d);var p=this.renderTarget.picking?1:n==="node-body"?r.effectiveOpacity():1,g=this.renderTarget.picking?1:r.pstyle(s.opacity).value*p,m=r.pstyle(s.color).value,y=this.colorBuffer.getView(l);y0(m,g,y);var v=this.lineWidthBuffer.getView(l);if(v[0]=0,v[1]=0,s.border){var x=r.pstyle("border-width").value;if(x>0){var T=r.pstyle("border-color").value,C=p*r.pstyle("border-opacity").value,w=this.borderColorBuffer.getView(l);y0(T,C,w);var k=r.pstyle("border-position").value;if(k==="inside")v[0]=0,v[1]=-x;else if(k==="outside")v[0]=x,v[1]=0;else{var E=x/2;v[0]=E,v[1]=-E}}}var A=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(r,A,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,i){var n=r.pstyle(i).value;switch(n){case"rectangle":return O1;case"ellipse":return cx;case"roundrectangle":case"round-rectangle":return Z3;case"bottom-round-rectangle":return lx;default:return}}},{key:"_getCornerRadius",value:function(r,i,n){var a=n.w,s=n.h;if(r.pstyle(i).value==="auto")return yd(a,s);var o=r.pstyle(i).pfValue,l=a/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(r,i,n){if(r.visible()){var a=r._private.rscratch,s,o,l;if(n==="source"?(s=a.arrowStartX,o=a.arrowStartY,l=a.srcArrowAngle):(s=a.arrowEndX,o=a.arrowEndY,l=a.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(n+"-arrow-shape").value;if(u!=="none"){var h=r.pstyle(n+"-arrow-color").value,f=r.pstyle("opacity").value,d=r.pstyle("line-opacity").value,p=f*d,g=r.pstyle("width").pfValue,m=r.pstyle("arrow-scale").value,y=this.r.getArrowWidth(g,m),v=this.instanceCount,x=this.transformBuffer.getMatrixView(v);lge(x),lS(x,x,[s,o]),MO(x,x,[y,y]),cge(x,x,l),this.vertTypeBuffer.getView(v)[0]=pO;var T=this.indexBuffer.getView(v);M1(i,T);var C=this.colorBuffer.getView(v);y0(h,p,C),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,i){if(r.visible()){var n=this._getEdgePoints(r);if(n){var a=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=a*s;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var h=this.instanceCount;this.vertTypeBuffer.getView(h)[0]=uge;var f=this.indexBuffer.getView(h);M1(i,f);var d=this.colorBuffer.getView(h);y0(l,u,d);var p=this.lineWidthBuffer.getView(h);p[0]=o;var g=this.pointAPointBBuffer.getView(h);g[0]=n[0],g[1]=n[1],g[2]=n[2],g[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var m=0;m=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var i=r._private.rscratch;return!(i.badLine||i.allpts==null||isNaN(i.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var i=r._private.rscratch;if(this._isValidEdge(r)){var n=i.allpts;if(n.length==4)return n;var a=this._getNumSegments(r);return this._getCurveSegmentPoints(n,a)}}},{key:"_getNumSegments",value:function(r){var i=15;return Math.min(Math.max(i,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,i){if(r.length==4)return r;for(var n=Array((i+1)*2),a=0;a<=i;a++)if(a==0)n[0]=r[0],n[1]=r[1];else if(a==i)n[a*2]=r[r.length-2],n[a*2+1]=r[r.length-1];else{var s=a/i;this._setCurvePoint(r,s,n,a*2)}return n}},{key:"_setCurvePoint",value:function(r,i,n,a){if(r.length<=2)n[a]=r[0],n[a+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},o=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?TS.USE_BB:TS.IGNORE},l=function(f){var d=f.position(),p=d.x,g=d.y,m=f.outerWidth(),y=f.outerHeight();return{w:m,h:y,x1:p-m/2,y1:g-y/2}};r.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:ant,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:gO(t.getLabelKey,null),getBoundingBox:mO(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:n(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:gO(t.getSourceLabelKey,"source"),getBoundingBox:mO(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:n("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:gO(t.getTargetLabelKey,"target"),getBoundingBox:mO(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:n("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=Ix(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(h,f){var d=!1;f&&f.length>0&&(d|=r.drawing.invalidate(f)),d&&u()}),Ent(r)};gO=function(t,r){return function(i){var n=t(i),a=Kme(i,r);return a.length>1?a.map(function(s,o){return"".concat(n,"_").concat(o)}):n}},mO=function(t,r){return function(i,n){var a=t(i);if(typeof n=="string"){var s=n.indexOf("_");if(s>0){var o=Number(n.substring(s+1)),l=Kme(i,r),u=a.h/l.length,h=u*o,f=a.y1+h;return{x1:a.x1,w:a.w,y1:f,h:u,yOffset:h}}}return a}};Sd={};Sd.drawPolygonPath=function(e,t,r,i,n,a){var s=i/2,o=n/2;e.beginPath&&e.beginPath(),e.moveTo(t+s*a[0],r+o*a[1]);for(var l=1;l0&&s>0){p.clearRect(0,0,a,s),p.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(e.full)p.translate(-i.x1*u,-i.y1*u),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(i.x1*u,i.y1*u);else{var m=t.pan(),y={x:m.x*u,y:m.y*u};u*=t.zoom(),p.translate(y.x,y.y),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(-y.x,-y.y)}e.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=e.bg,p.rect(0,0,a,s),p.fill())}return d};Bx.png=function(e){return e1e(e,this.bufferCanvasImage(e),"image/png")};Bx.jpg=function(e){return e1e(e,this.bufferCanvasImage(e),"image/jpeg")};t1e={};t1e.nodeShapeImpl=function(e,t,r,i,n,a,s,o){switch(e){case"ellipse":return this.drawEllipsePath(t,r,i,n,a);case"polygon":return this.drawPolygonPath(t,r,i,n,a,s);case"round-polygon":return this.drawRoundPolygonPath(t,r,i,n,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,i,n,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,i,n,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,i,n,a,o);case"barrel":return this.drawBarrelPath(t,r,i,n,a)}};Pnt=r1e,Pr=r1e.prototype;Pr.CANVAS_LAYERS=3;Pr.SELECT_BOX=0;Pr.DRAG=1;Pr.NODE=2;Pr.WEBGL=3;Pr.CANVAS_TYPES=["2d","2d","2d","webgl2"];Pr.BUFFER_COUNT=3;Pr.TEXTURE_BUFFER=0;Pr.MOTIONBLUR_BUFFER_NODE=1;Pr.MOTIONBLUR_BUFFER_DRAG=2;Pr.redrawHint=function(e,t){var r=this;switch(e){case"eles":r.data.canvasNeedsRedraw[Pr.NODE]=t;break;case"drag":r.data.canvasNeedsRedraw[Pr.DRAG]=t;break;case"select":r.data.canvasNeedsRedraw[Pr.SELECT_BOX]=t;break;case"gc":r.data.gc=!0;break}};Bnt=typeof Path2D<"u";Pr.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e};Pr.usePaths=function(){return Bnt&&this.pathsEnabled};Pr.setImgSmoothing=function(e,t){e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)};Pr.getImgSmoothing=function(e){return e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled};Pr.makeOffscreenCanvas=function(e,t){var r;if((typeof OffscreenCanvas>"u"?"undefined":Vn(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(e,t);else{var i=this.cy.window(),n=i.document;r=n.createElement("canvas"),r.width=e,r.height=t}return r};[Wme,eu,xh,oP,R0,Cd,ls,Xme,Sd,Bx,t1e].forEach(function(e){nr(Pr,e)});Fnt=[{name:"null",impl:Lme},{name:"base",impl:zme},{name:"canvas",impl:Pnt}],$nt=[{type:"layout",extensions:lit},{type:"renderer",extensions:Fnt}],i1e={},n1e={};BO=function(){if(arguments.length===2)return s1e.apply(null,arguments);if(arguments.length===3)return a1e.apply(null,arguments);if(arguments.length===4)return Gnt.apply(null,arguments);if(arguments.length===5)return znt.apply(null,arguments);Wi("Invalid extension access syntax")};Cx.prototype.extension=BO;$nt.forEach(function(e){e.extensions.forEach(function(t){a1e(e.type,t.name,t.impl)})});wS=function(){if(!(this instanceof wS))return new wS;this.length=0},_0=wS.prototype;_0.instanceString=function(){return"stylesheet"};_0.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this};_0.css=function(e,t){var r=this.length-1;if(Qt(e))this[r].properties.push({name:e,value:t});else if(Kr(e))for(var i=e,n=Object.keys(i),a=0;a{(function(t,r){typeof Fx=="object"&&typeof uP=="object"?uP.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Fx=="object"?Fx.layoutBase=r():t.layoutBase=r()})(Fx,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.i=function(i){return i},r.d=function(i,n,a){r.o(i,n)||Object.defineProperty(i,n,{configurable:!1,enumerable:!0,get:a})},r.n=function(i){var n=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(n,"a",n),n},r.o=function(i,n){return Object.prototype.hasOwnProperty.call(i,n)},r.p="",r(r.s=26)})([(function(e,t,r){"use strict";function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i}),(function(e,t,r){"use strict";var i=r(2),n=r(8),a=r(9);function s(l,u,h){i.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=s}),(function(e,t,r){"use strict";function i(n){this.vGraphObject=n}e.exports=i}),(function(e,t,r){"use strict";var i=r(2),n=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,g){p==null&&g==null&&(g=d),i.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(i.prototype);for(var h in i)u[h]=i[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,r){"use strict";function i(n,a){n==null&&a==null?(this.x=0,this.y=0):(this.x=n,this.y=a)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(n){this.x=n},i.prototype.setY=function(n){this.y=n},i.prototype.getDifference=function(n){return new DimensionD(this.x-n.x,this.y-n.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(n){return this.x+=n.width,this.y+=n.height,this},e.exports=i}),(function(e,t,r){"use strict";var i=r(2),n=r(10),a=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,y){i.call(this,y),this.estimatedSize=n.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(i.prototype);for(var p in i)d[p]=i[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,y){if(m==null&&y==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var x=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(x.source=m,x.target=y,x.isInterGraph=!1,this.getEdges().push(x),m.edges.push(x),y!=m&&y.edges.push(x),x)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),v,x=y.length,T=0;T-1&&k>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(w,1),v.target!=v.source&&v.target.edges.splice(k,1);var C=v.source.owner.getEdges().indexOf(v);if(C==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(C,1)}},d.prototype.updateLeftTop=function(){for(var g=n.MAX_VALUE,m=n.MAX_VALUE,y,v,x,T=this.getNodes(),C=T.length,w=0;wy&&(g=y),m>v&&(m=v)}return g==n.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?x=T[0].getParent().paddingLeft:x=this.margin,this.left=m-x,this.top=g-x,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=n.MAX_VALUE,y=-n.MAX_VALUE,v=n.MAX_VALUE,x=-n.MAX_VALUE,T,C,w,k,E,A=this.nodes,N=A.length,P=0;PT&&(m=T),yw&&(v=w),xT&&(m=T),yw&&(v=w),x=this.nodes.length){var N=0;y.forEach(function(P){P.owner==g&&N++}),N==this.nodes.length&&(this.isConnected=!0)}},e.exports=d}),(function(e,t,r){"use strict";var i,n=r(1);function a(s){i=r(5),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof i){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=A,!1;if(uh)return o[0]=d,o[1]=u,o[2]=k,o[3]=f,!1;if(lh?(o[0]=m,o[1]=y,L=!0):(o[0]=g,o[1]=p,L=!0):R===I&&(l>h?(o[0]=d,o[1]=p,L=!0):(o[0]=v,o[1]=y,L=!0)),-D===I?h>l?(o[2]=E,o[3]=A,_=!0):(o[2]=k,o[3]=w,_=!0):D===I&&(h>l?(o[2]=C,o[3]=w,_=!0):(o[2]=N,o[3]=A,_=!0)),L&&_)return!1;if(l>h?u>f?(B=this.getCardinalDirection(R,I,4),M=this.getCardinalDirection(D,I,2)):(B=this.getCardinalDirection(-R,I,3),M=this.getCardinalDirection(-D,I,1)):u>f?(B=this.getCardinalDirection(-R,I,1),M=this.getCardinalDirection(-D,I,3)):(B=this.getCardinalDirection(R,I,2),M=this.getCardinalDirection(D,I,4)),!L)switch(B){case 1:z=p,F=l+-T/I,o[0]=F,o[1]=z;break;case 2:F=v,z=u+x*I,o[0]=F,o[1]=z;break;case 3:z=y,F=l+T/I,o[0]=F,o[1]=z;break;case 4:F=m,z=u+-x*I,o[0]=F,o[1]=z;break}if(!_)switch(M){case 1:G=w,$=h+-O/I,o[2]=$,o[3]=G;break;case 2:$=N,G=f+P*I,o[2]=$,o[3]=G;break;case 3:G=A,$=h+O/I,o[2]=$,o[3]=G;break;case 4:$=E,G=f+-P*I,o[2]=$,o[3]=G;break}}return!1},n.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},n.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,y=l.y,v=void 0,x=void 0,T=void 0,C=void 0,w=void 0,k=void 0,E=void 0,A=void 0,N=void 0;return T=d-h,w=u-f,E=f*h-u*d,C=y-g,k=p-m,A=m*g-p*y,N=T*k-C*w,N===0?null:(v=(w*A-k*E)/N,x=(C*E-T*A)/N,new i(v,x))},n.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o0?1:n<0?-1:0},i.floor=function(n){return n<0?Math.ceil(n):Math.floor(n)},i.ceil=function(n){return n<0?Math.floor(n):Math.ceil(n)},e.exports=i}),(function(e,t,r){"use strict";function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i}),(function(e,t,r){"use strict";var i=(function(){function u(h,f){for(var d=0;d"u"?"undefined":i(a);return a==null||s!="object"&&s!="function"},e.exports=n}),(function(e,t,r){"use strict";function i(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(T.push(w[0]);T.length>0&&g;){var k=T[0];T.splice(0,1),x.add(k);for(var E=k.getEdges(),v=0;v-1&&w.splice(O,1)}x=new Set,C=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),v=0;v0){for(var y=this.edgeToDummyNodes.get(m),v=0;v=0&&g.splice(A,1);var N=C.getNeighborsList();N.forEach(function(L){if(m.indexOf(L)<0){var _=y.get(L),R=_-1;R==1&&k.push(L),y.set(L,R)}})}m=m.concat(k),(g.length==1||g.length==2)&&(v=!0,x=g[0])}return x},d.prototype.setGraphManager=function(p){this.graphManager=p},e.exports=d}),(function(e,t,r){"use strict";function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},e.exports=i}),(function(e,t,r){"use strict";var i=r(4);function n(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(a){this.lworldExtX=a},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(a){this.lworldExtY=a},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},n.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},n.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},n.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},n.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},n.prototype.inverseTransformPoint=function(a){var s=new i(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},e.exports=n}),(function(e,t,r){"use strict";function i(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,y,v=this.getAllNodes(),x;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),x=new Set,p=0;pT||x>T)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*y)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(v>T||x>T)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=v.length||T>=v[0].length)){for(var C=0;Cu}}]),o})();e.exports=s}),(function(e,t,r){"use strict";var i=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;n(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},n.emit=function(a,s){for(var o=0;o{(function(t,r){typeof $x=="object"&&typeof fP=="object"?fP.exports=r(hP()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof $x=="object"?$x.coseBase=r(hP()):t.coseBase=r(t.layoutBase)})($x,function(e){return(function(t){var r={};function i(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=r,i.i=function(n){return n},i.d=function(n,a,s){i.o(n,a)||Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:s})},i.n=function(n){var a=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(a,"a",a),a},i.o=function(n,a){return Object.prototype.hasOwnProperty.call(n,a)},i.p="",i(i.s=7)})([(function(t,r){t.exports=e}),(function(t,r,i){"use strict";var n=i(0).FDLayoutConstants;function a(){}for(var s in n)a[s]=n[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=a}),(function(t,r,i){"use strict";var n=i(0).FDLayoutEdge;function a(o,l,u){n.call(this,o,l,u)}a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a}),(function(t,r,i){"use strict";var n=i(0).LGraph;function a(o,l,u){n.call(this,o,l,u)}a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a}),(function(t,r,i){"use strict";var n=i(0).LGraphManager;function a(o){n.call(this,o)}a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a}),(function(t,r,i){"use strict";var n=i(0).FDLayoutNode,a=i(0).IMath;function s(l,u,h,f){n.call(this,l,u,h,f)}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),f,d=0;d0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(A){return k.has(A)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),k=this.nodesWithGravity.filter(function(N){return w.has(N)});this.graphManager.setAllNodesToApplyGravitation(k),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var E=!this.isTreeGrowing&&!this.isGrowthFinished,A=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(E,A),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),k={},E=0;E1){var L;for(L=0;LA&&(A=Math.floor(O.y)),P=Math.floor(O.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-O.x/2,f.WORLD_CENTER_Y-O.y/2))},T.radialLayout=function(w,k,E){var A=Math.max(this.maxDiagonalInTree(w),u.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(k,null,0,359,0,A);var N=v.calculateBounds(w),P=new x;P.setDeviceOrgX(N.getMinX()),P.setDeviceOrgY(N.getMinY()),P.setWorldOrgX(E.x),P.setWorldOrgY(E.y);for(var O=0;O1;){var U=G[0];G.splice(0,1);var j=B.indexOf(U);j>=0&&B.splice(j,1),z--,M--}k!=null?$=(B.indexOf(G[0])+1)%z:$=0;for(var H=Math.abs(A-E)/M,Q=$;F!=M;Q=++Q%z){var Y=B[Q].getOtherEnd(w);if(Y!=k){var se=(E+F*H)%360,J=(se+H)%360;T.branchRadialLayout(Y,w,se,J,N+P,P),F++}}},T.maxDiagonalInTree=function(w){for(var k=m.MIN_VALUE,E=0;Ek&&(k=N)}return k},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var w=this,k={};this.memberGroups={},this.idToDummyNode={};for(var E=[],A=this.graphManager.getAllNodes(),N=0;N"u"&&(k[L]=[]),k[L]=k[L].concat(P)}Object.keys(k).forEach(function(_){if(k[_].length>1){var R="DummyCompound_"+_;w.memberGroups[R]=k[_];var D=k[_][0].getParent(),I=new o(w.graphManager);I.id=R,I.paddingLeft=D.paddingLeft||0,I.paddingRight=D.paddingRight||0,I.paddingBottom=D.paddingBottom||0,I.paddingTop=D.paddingTop||0,w.idToDummyNode[R]=I;var B=w.getGraphManager().add(w.newGraph(),I),M=D.getChild();M.add(I);for(var F=0;F=0;w--){var k=this.compoundOrder[w],E=k.id,A=k.paddingLeft,N=k.paddingTop;this.adjustLocations(this.tiledMemberPack[E],k.rect.x,k.rect.y,A,N)}},T.prototype.repopulateZeroDegreeMembers=function(){var w=this,k=this.tiledZeroDegreePack;Object.keys(k).forEach(function(E){var A=w.idToDummyNode[E],N=A.paddingLeft,P=A.paddingTop;w.adjustLocations(k[E],A.rect.x,A.rect.y,N,P)})},T.prototype.getToBeTiled=function(w){var k=w.id;if(this.toBeTiled[k]!=null)return this.toBeTiled[k];var E=w.getChild();if(E==null)return this.toBeTiled[k]=!1,!1;for(var A=E.getNodes(),N=0;N0)return this.toBeTiled[k]=!1,!1;if(P.getChild()==null){this.toBeTiled[P.id]=!1;continue}if(!this.getToBeTiled(P))return this.toBeTiled[k]=!1,!1}return this.toBeTiled[k]=!0,!0},T.prototype.getNodeDegree=function(w){for(var k=w.id,E=w.getEdges(),A=0,N=0;N_&&(_=D.rect.height)}E+=_+w.verticalPadding}},T.prototype.tileCompoundMembers=function(w,k){var E=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(A){var N=k[A];E.tiledMemberPack[A]=E.tileNodes(w[A],N.paddingLeft+N.paddingRight),N.rect.width=E.tiledMemberPack[A].width,N.rect.height=E.tiledMemberPack[A].height})},T.prototype.tileNodes=function(w,k){var E=u.TILING_PADDING_VERTICAL,A=u.TILING_PADDING_HORIZONTAL,N={rows:[],rowWidth:[],rowHeight:[],width:0,height:k,verticalPadding:E,horizontalPadding:A};w.sort(function(L,_){return L.rect.width*L.rect.height>_.rect.width*_.rect.height?-1:L.rect.width*L.rect.height<_.rect.width*_.rect.height?1:0});for(var P=0;P0&&(O+=w.horizontalPadding),w.rowWidth[E]=O,w.width0&&(L+=w.verticalPadding);var _=0;L>w.rowHeight[E]&&(_=w.rowHeight[E],w.rowHeight[E]=L,_=w.rowHeight[E]-_),w.height+=_,w.rows[E].push(k)},T.prototype.getShortestRowIndex=function(w){for(var k=-1,E=Number.MAX_VALUE,A=0;AE&&(k=A,E=w.rowWidth[A]);return k},T.prototype.canAddHorizontal=function(w,k,E){var A=this.getShortestRowIndex(w);if(A<0)return!0;var N=w.rowWidth[A];if(N+w.horizontalPadding+k<=w.width)return!0;var P=0;w.rowHeight[A]0&&(P=E+w.verticalPadding-w.rowHeight[A]);var O;w.width-N>=k+w.horizontalPadding?O=(w.height+P)/(N+k+w.horizontalPadding):O=(w.height+P)/w.width,P=E+w.verticalPadding;var L;return w.widthP&&k!=E){A.splice(-1,1),w.rows[E].push(N),w.rowWidth[k]=w.rowWidth[k]-P,w.rowWidth[E]=w.rowWidth[E]+P,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var O=Number.MIN_VALUE,L=0;LO&&(O=A[L].height);k>0&&(O+=w.verticalPadding);var _=w.rowHeight[k]+w.rowHeight[E];w.rowHeight[k]=O,w.rowHeight[E]0)for(var M=N;M<=P;M++)B[0]+=this.grid[M][O-1].length+this.grid[M][O].length-1;if(P0)for(var M=O;M<=L;M++)B[3]+=this.grid[N-1][M].length+this.grid[N][M].length-1;for(var F=m.MAX_VALUE,z,$,G=0;G{(function(t,r){typeof zx=="object"&&typeof pP=="object"?pP.exports=r(dP()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof zx=="object"?zx.cytoscapeCoseBilkent=r(dP()):t.cytoscapeCoseBilkent=r(t.coseBase)})(zx,function(e){return(function(t){var r={};function i(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=r,i.i=function(n){return n},i.d=function(n,a,s){i.o(n,a)||Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:s})},i.n=function(n){var a=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(a,"a",a),a},i.o=function(n,a){return Object.prototype.hasOwnProperty.call(n,a)},i.p="",i(i.s=1)})([(function(t,r){t.exports=e}),(function(t,r,i){"use strict";var n=i(0).layoutBase.LayoutConstants,a=i(0).layoutBase.FDLayoutConstants,s=i(0).CoSEConstants,o=i(0).CoSELayout,l=i(0).CoSENode,u=i(0).layoutBase.PointD,h=i(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(y,v){var x={};for(var T in y)x[T]=y[T];for(var T in v)x[T]=v[T];return x}function p(y){this.options=d(f,y),g(this.options)}var g=function(v){v.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=v.nodeRepulsion),v.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=v.idealEdgeLength),v.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=v.edgeElasticity),v.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.quality=="draft"?n.QUALITY=0:v.quality=="proof"?n.QUALITY=2:n.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!v.randomize,s.ANIMATE=a.ANIMATE=n.ANIMATE=v.animate,s.TILE=v.tile,s.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal};p.prototype.run=function(){var y,v,x=this.options,T=this.idToLNode={},C=this.layout=new o,w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var k=C.newGraphManager();this.gm=k;var E=this.options.eles.nodes(),A=this.options.eles.edges();this.root=k.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(E),C);for(var N=0;N0){var L;L=x.getGraphManager().add(x.newGraph(),E),this.processChildrenList(L,k,x)}}},p.prototype.stop=function(){return this.stopped=!0,this};var m=function(v){v("layout","cose-bilkent",p)};typeof cytoscape<"u"&&m(cytoscape),t.exports=m})])})});var m1e={};Lr(m1e,{render:()=>Wnt});function c1e(e,t){e.forEach(r=>{let i={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach(n=>{["id","label","height","width","padding","x","y"].includes(n)||(i[n]=r[n])}),t.add({group:"nodes",data:i,position:{x:r.x??0,y:r.y??0}})})}function u1e(e,t){e.forEach(r=>{let i={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach(n=>{["id","start","end"].includes(n)||(i[n]=r[n])}),t.add({group:"edges",data:i})})}function h1e(e){return new Promise(t=>{let r=Qe("body").append("div").attr("id","cy").attr("style","display:none"),i=Xo({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),c1e(e.nodes,i),u1e(e.edges,i),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}});let n={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};i.layout(n).run(),i.ready(a=>{ee.info("Cytoscape ready",a),t(i)})})}function f1e(e){return e.nodes().map(t=>{let r=t.data(),i=t.position(),n={id:r.id,x:i.x,y:i.y};return Object.keys(r).forEach(a=>{a!=="id"&&(n[a]=r[a])}),n})}function d1e(e){return e.edges().map(t=>{let r=t.data(),i=t._private.rscratch,n={id:r.id,source:r.source,target:r.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(r).forEach(a=>{["id","source","target"].includes(a)||(n[a]=r[a])}),n})}async function p1e(e,t){ee.debug("Starting cose-bilkent layout algorithm");try{g1e(e);let r=await h1e(e),i=f1e(r),n=d1e(r);return ee.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(r){throw ee.error("Error in cose-bilkent layout algorithm:",r),r}}function g1e(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(e.edges))throw new Error("Edges array is required in layout data");return!0}var l1e,Vnt,Wnt,y1e=q(()=>{er();cP();l1e=ks(o1e(),1);Ar();Xo.use(l1e.default);b(c1e,"addNodes");b(u1e,"addEdges");b(h1e,"createCytoscapeInstance");b(f1e,"extractPositionedNodes");b(d1e,"extractPositionedEdges");b(p1e,"executeCoseBilkentLayout");b(g1e,"validateLayoutData");Vnt=b(async(e,t,{insertCluster:r,insertEdge:i,insertEdgeLabel:n,insertMarkers:a,insertNode:s,log:o,positionEdgeLabel:l},{algorithm:u})=>{let h={},f={},d=t.select("g");a(d,e.markers,e.type,e.diagramId);let p=d.insert("g").attr("class","subgraphs"),g=d.insert("g").attr("class","edgePaths"),m=d.insert("g").attr("class","edgeLabels"),y=d.insert("g").attr("class","nodes");o.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(e.nodes.map(async T=>{if(T.isGroup){let C={...T};f[T.id]=C,h[T.id]=C,await r(p,T)}else{let C={...T};h[T.id]=C;let w=await s(y,T,{config:e.config,dir:e.direction||"TB"}),k=w.node().getBBox();C.width=k.width,C.height=k.height,C.domId=w,o.debug(`Node ${T.id} dimensions: ${k.width}x${k.height}`)}})),o.debug("Running cose-bilkent layout algorithm");let v={...e,nodes:e.nodes.map(T=>{let C=h[T.id];return{...T,width:C.width,height:C.height}})},x=await p1e(v,e.config);o.debug("Positioning nodes based on layout results"),x.nodes.forEach(T=>{let C=h[T.id];C?.domId&&(C.domId.attr("transform",`translate(${T.x}, ${T.y})`),C.x=T.x,C.y=T.y,o.debug(`Positioned node ${C.id} at center (${T.x}, ${T.y})`))}),x.edges.forEach(T=>{let C=e.edges.find(w=>w.id===T.id);C&&(C.points=[{x:T.startX,y:T.startY},{x:T.midX,y:T.midY},{x:T.endX,y:T.endY}])}),o.debug("Inserting and positioning edges"),await Promise.all(e.edges.map(async T=>{let C=await n(m,T),w=h[T.start??""],k=h[T.end??""];if(w&&k){let E=x.edges.find(A=>A.id===T.id);if(E){o.debug("APA01 positionedEdge",E);let A={...T},N=i(g,A,f,e.type,w,k,e.diagramId);l(A,N)}else{let A={...T,points:[{x:w.x||0,y:w.y||0},{x:k.x||0,y:k.y||0}]},N=i(g,A,f,e.type,w,k,e.diagramId);l(A,N)}}})),o.debug("Cose-bilkent rendering completed")},"render"),Wnt=Vnt});var Unt,Gx,gP,Hnt,Ko,tu,Zo=q(()=>{Fo();Is();$r();Er();er();Unt={common:ht,getConfig:It,insertCluster:t1,insertEdge:_5,insertEdgeLabel:E5,insertMarkers:L5,insertNode:r0,interpolateToCurve:QC,labelHelper:or,log:ee,positionEdgeLabel:A5},Gx={},gP=b(e=>{for(let t of e)Gx[t.name]=t},"registerLayoutLoaders"),Hnt=b(()=>{gP([{name:"dagre",loader:b(async()=>await Promise.resolve().then(()=>(zde(),$de)),"loader")},{name:"cose-bilkent",loader:b(async()=>await Promise.resolve().then(()=>(y1e(),m1e)),"loader")}])},"registerDefaultLayoutLoaders");Hnt();Ko=b(async(e,t)=>{if(!(e.layoutAlgorithm in Gx))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let h of e.nodes){let f=h.domId||h.id;h.domId=`${e.diagramId}-${f}`}let r=Gx[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:a}=e.config,{useGradient:s,gradientStart:o,gradientStop:l}=a,u=t.attr("id");if(t.append("defs").append("filter").attr("id",`${u}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${u}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),s){let h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Unt,{algorithm:r.algorithm})},"render"),tu=b((e="",{fallback:t="dagre"}={})=>{if(e in Gx)return e;if(t in Gx)return ee.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")});var yP,D0,QS,F1e,JS,eE,$a,tE,rE,Ed=q(()=>{Er();er();yP=ks(Vm(),1);Ar();D0=b((e,t)=>{let r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),t.attrs!==void 0)for(let i in t.attrs)r.attr(i,t.attrs[i]);return t.class&&r.attr("class",t.class),r},"drawRect"),QS=b((e,t)=>{let r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};D0(e,r).lower()},"drawBackgroundRect"),F1e=b((e,t)=>{let r=t.text.replace(xp," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class&&i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),i},"drawText"),JS=b((e,t,r,i)=>{let n=e.append("image");n.attr("x",t),n.attr("y",r);let a=(0,yP.sanitizeUrl)(i);n.attr("xlink:href",a)},"drawImage"),eE=b((e,t,r,i)=>{let n=e.append("use");n.attr("x",t),n.attr("y",r);let a=(0,yP.sanitizeUrl)(i);n.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),$a=b(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),tE=b(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),rE=b(()=>{let e=Qe(".mermaidTooltip");return e.empty()&&(e=Qe("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),e},"createTooltip")});var K1e={};Lr(K1e,{diagram:()=>Gat});function tl(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=Kp(t[e].text,n,i),t[e].textLines=t[e].text.split(ht.lineBreakRegex).length,t[e].width=n,t[e].height=ub(t[e].text,i);else{let a=t[e].text.split(ht.lineBreakRegex);t[e].textLines=a.length;let s=0;t[e].height=0,t[e].width=0;for(let o of a)t[e].width=Math.max(ma(o,i),t[e].width),s=ub(o,i),t[e].height=t[e].height+s}}function CP(e,t,r,i,n){let a=new Y1e(n);a.data.widthLimit=r.data.widthLimit/Math.min(bP,i.length);for(let[s,o]of i.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Ht.wrap,h=iE(Ht);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",tl("label",o,u,h,a.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let g=iE(Ht);tl("type",o,u,g,a.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let g=iE(Ht);g.fontSize=g.fontSize-2,tl("descr",o,u,g,a.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%bP===0){let g=r.data.startx+Ht.diagramMarginX,m=r.data.stopy+Ht.diagramMarginY+l;a.setData(g,g,m,m)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Ht.diagramMarginX:a.data.startx,m=a.data.starty;a.setData(g,g,m,m)}a.name=o.alias;let f=n.db.getC4ShapeArray(o.alias),d=n.db.getC4ShapeKeys(o.alias);d.length>0&&X1e(a,e,f,d),t=o.alias;let p=n.db.getBoundaries(t);p.length>0&&CP(e,t,a,p,n),o.alias!=="global"&&j1e(e,o,a),r.data.stopy=Math.max(a.data.stopy+Ht.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Ht.c4ShapeMargin,r.data.stopx),oE=Math.max(oE,r.data.stopx),lE=Math.max(lE,r.data.stopy)}}var W1e,nE,Xnt,Bl,Ad,cs,Pl,iu,Hx,TP,wP,aE,sE,G1e,Knt,Znt,Qnt,Jnt,eat,tat,rat,iat,nat,aat,sat,oat,lat,cat,uat,hat,fat,q1e,dat,pat,V1e,gat,mat,yat,vat,_d,bat,xat,Tat,wat,kat,vP,kP,U1e,Cat,Sat,Eat,Aat,_at,Lat,Rat,Iat,Dat,Nat,Mat,Ch,ru,oE,lE,H1e,bP,Ht,Y1e,xP,Ux,iE,Oat,j1e,X1e,el,$1e,Pat,Bat,Fat,z1e,$at,zat,Gat,Z1e=q(()=>{Ed();$r();Er();er();Ar();W1e=ks(Vm(),1),nE=(function(){var e=b(function(Te,Be,He,nt){for(He=He||{},nt=Te.length;nt--;He[Te[nt]]=Be);return He},"o"),t=[1,24],r=[1,25],i=[1,26],n=[1,27],a=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],g=[1,30],m=[1,31],y=[1,32],v=[1,33],x=[1,34],T=[1,35],C=[1,36],w=[1,37],k=[1,38],E=[1,39],A=[1,40],N=[1,41],P=[1,42],O=[1,43],L=[1,44],_=[1,45],R=[1,46],D=[1,47],I=[1,48],B=[1,50],M=[1,51],F=[1,52],z=[1,53],$=[1,54],G=[1,55],U=[1,56],j=[1,57],H=[1,58],Q=[1,59],Y=[1,60],se=[14,42],J=[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],re=[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],ie=[1,82],te=[1,83],xe=[1,84],fe=[1,85],Se=[12,14,42],Me=[12,14,33,42],ke=[12,14,33,42,76,77,79,80],Ce=[12,33],Ie=[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],Pe={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:b(function(Be,He,nt,qe,Ue,ge,ce){var V=ge.length-1;switch(Ue){case 3:qe.setDirection("TB");break;case 4:qe.setDirection("BT");break;case 5:qe.setDirection("RL");break;case 6:qe.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:qe.setC4Type(ge[V-3]);break;case 19:qe.setTitle(ge[V].substring(6)),this.$=ge[V].substring(6);break;case 20:qe.setAccDescription(ge[V].substring(15)),this.$=ge[V].substring(15);break;case 21:this.$=ge[V].trim(),qe.setTitle(this.$);break;case 22:case 23:this.$=ge[V].trim(),qe.setAccDescription(this.$);break;case 28:ge[V].splice(2,0,"ENTERPRISE"),qe.addPersonOrSystemBoundary(...ge[V]),this.$=ge[V];break;case 29:ge[V].splice(2,0,"SYSTEM"),qe.addPersonOrSystemBoundary(...ge[V]),this.$=ge[V];break;case 30:qe.addPersonOrSystemBoundary(...ge[V]),this.$=ge[V];break;case 31:ge[V].splice(2,0,"CONTAINER"),qe.addContainerBoundary(...ge[V]),this.$=ge[V];break;case 32:qe.addDeploymentNode("node",...ge[V]),this.$=ge[V];break;case 33:qe.addDeploymentNode("nodeL",...ge[V]),this.$=ge[V];break;case 34:qe.addDeploymentNode("nodeR",...ge[V]),this.$=ge[V];break;case 35:qe.popBoundaryParseStack();break;case 39:qe.addPersonOrSystem("person",...ge[V]),this.$=ge[V];break;case 40:qe.addPersonOrSystem("external_person",...ge[V]),this.$=ge[V];break;case 41:qe.addPersonOrSystem("system",...ge[V]),this.$=ge[V];break;case 42:qe.addPersonOrSystem("system_db",...ge[V]),this.$=ge[V];break;case 43:qe.addPersonOrSystem("system_queue",...ge[V]),this.$=ge[V];break;case 44:qe.addPersonOrSystem("external_system",...ge[V]),this.$=ge[V];break;case 45:qe.addPersonOrSystem("external_system_db",...ge[V]),this.$=ge[V];break;case 46:qe.addPersonOrSystem("external_system_queue",...ge[V]),this.$=ge[V];break;case 47:qe.addContainer("container",...ge[V]),this.$=ge[V];break;case 48:qe.addContainer("container_db",...ge[V]),this.$=ge[V];break;case 49:qe.addContainer("container_queue",...ge[V]),this.$=ge[V];break;case 50:qe.addContainer("external_container",...ge[V]),this.$=ge[V];break;case 51:qe.addContainer("external_container_db",...ge[V]),this.$=ge[V];break;case 52:qe.addContainer("external_container_queue",...ge[V]),this.$=ge[V];break;case 53:qe.addComponent("component",...ge[V]),this.$=ge[V];break;case 54:qe.addComponent("component_db",...ge[V]),this.$=ge[V];break;case 55:qe.addComponent("component_queue",...ge[V]),this.$=ge[V];break;case 56:qe.addComponent("external_component",...ge[V]),this.$=ge[V];break;case 57:qe.addComponent("external_component_db",...ge[V]),this.$=ge[V];break;case 58:qe.addComponent("external_component_queue",...ge[V]),this.$=ge[V];break;case 60:qe.addRel("rel",...ge[V]),this.$=ge[V];break;case 61:qe.addRel("birel",...ge[V]),this.$=ge[V];break;case 62:qe.addRel("rel_u",...ge[V]),this.$=ge[V];break;case 63:qe.addRel("rel_d",...ge[V]),this.$=ge[V];break;case 64:qe.addRel("rel_l",...ge[V]),this.$=ge[V];break;case 65:qe.addRel("rel_r",...ge[V]),this.$=ge[V];break;case 66:qe.addRel("rel_b",...ge[V]),this.$=ge[V];break;case 67:ge[V].splice(0,1),qe.addRel("rel",...ge[V]),this.$=ge[V];break;case 68:qe.updateElStyle("update_el_style",...ge[V]),this.$=ge[V];break;case 69:qe.updateRelStyle("update_rel_style",...ge[V]),this.$=ge[V];break;case 70:qe.updateLayoutConfig("update_layout_config",...ge[V]),this.$=ge[V];break;case 71:this.$=[ge[V]];break;case 72:ge[V].unshift(ge[V-1]),this.$=ge[V];break;case 73:case 75:this.$=ge[V].trim();break;case 74:let le={};le[ge[V-1].trim()]=ge[V].trim(),this.$=le;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y},{13:70,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y},{13:71,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y},{13:72,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y},{13:73,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y},{14:[1,74]},e(se,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y}),e(se,[2,14]),e(J,[2,16],{12:[1,76]}),e(se,[2,36],{12:[1,77]}),e(re,[2,19]),e(re,[2,20]),{25:[1,78]},{27:[1,79]},e(re,[2,23]),{35:80,75:81,76:ie,77:te,79:xe,80:fe},{35:86,75:81,76:ie,77:te,79:xe,80:fe},{35:87,75:81,76:ie,77:te,79:xe,80:fe},{35:88,75:81,76:ie,77:te,79:xe,80:fe},{35:89,75:81,76:ie,77:te,79:xe,80:fe},{35:90,75:81,76:ie,77:te,79:xe,80:fe},{35:91,75:81,76:ie,77:te,79:xe,80:fe},{35:92,75:81,76:ie,77:te,79:xe,80:fe},{35:93,75:81,76:ie,77:te,79:xe,80:fe},{35:94,75:81,76:ie,77:te,79:xe,80:fe},{35:95,75:81,76:ie,77:te,79:xe,80:fe},{35:96,75:81,76:ie,77:te,79:xe,80:fe},{35:97,75:81,76:ie,77:te,79:xe,80:fe},{35:98,75:81,76:ie,77:te,79:xe,80:fe},{35:99,75:81,76:ie,77:te,79:xe,80:fe},{35:100,75:81,76:ie,77:te,79:xe,80:fe},{35:101,75:81,76:ie,77:te,79:xe,80:fe},{35:102,75:81,76:ie,77:te,79:xe,80:fe},{35:103,75:81,76:ie,77:te,79:xe,80:fe},{35:104,75:81,76:ie,77:te,79:xe,80:fe},e(Se,[2,59]),{35:105,75:81,76:ie,77:te,79:xe,80:fe},{35:106,75:81,76:ie,77:te,79:xe,80:fe},{35:107,75:81,76:ie,77:te,79:xe,80:fe},{35:108,75:81,76:ie,77:te,79:xe,80:fe},{35:109,75:81,76:ie,77:te,79:xe,80:fe},{35:110,75:81,76:ie,77:te,79:xe,80:fe},{35:111,75:81,76:ie,77:te,79:xe,80:fe},{35:112,75:81,76:ie,77:te,79:xe,80:fe},{35:113,75:81,76:ie,77:te,79:xe,80:fe},{35:114,75:81,76:ie,77:te,79:xe,80:fe},{35:115,75:81,76:ie,77:te,79:xe,80:fe},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y},{12:[1,118],33:[1,117]},{35:119,75:81,76:ie,77:te,79:xe,80:fe},{35:120,75:81,76:ie,77:te,79:xe,80:fe},{35:121,75:81,76:ie,77:te,79:xe,80:fe},{35:122,75:81,76:ie,77:te,79:xe,80:fe},{35:123,75:81,76:ie,77:te,79:xe,80:fe},{35:124,75:81,76:ie,77:te,79:xe,80:fe},{35:125,75:81,76:ie,77:te,79:xe,80:fe},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(se,[2,15]),e(J,[2,17],{21:22,19:130,22:t,23:r,24:i,26:n,28:a}),e(se,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:i,26:n,28:a,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T,51:C,52:w,53:k,54:E,55:A,56:N,57:P,58:O,59:L,60:_,61:R,62:D,63:I,64:B,65:M,66:F,67:z,68:$,69:G,70:U,71:j,72:H,73:Q,74:Y}),e(re,[2,21]),e(re,[2,22]),e(Se,[2,39]),e(Me,[2,71],{75:81,35:132,76:ie,77:te,79:xe,80:fe}),e(ke,[2,73]),{78:[1,133]},e(ke,[2,75]),e(ke,[2,76]),e(Se,[2,40]),e(Se,[2,41]),e(Se,[2,42]),e(Se,[2,43]),e(Se,[2,44]),e(Se,[2,45]),e(Se,[2,46]),e(Se,[2,47]),e(Se,[2,48]),e(Se,[2,49]),e(Se,[2,50]),e(Se,[2,51]),e(Se,[2,52]),e(Se,[2,53]),e(Se,[2,54]),e(Se,[2,55]),e(Se,[2,56]),e(Se,[2,57]),e(Se,[2,58]),e(Se,[2,60]),e(Se,[2,61]),e(Se,[2,62]),e(Se,[2,63]),e(Se,[2,64]),e(Se,[2,65]),e(Se,[2,66]),e(Se,[2,67]),e(Se,[2,68]),e(Se,[2,69]),e(Se,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(Ce,[2,28]),e(Ce,[2,29]),e(Ce,[2,30]),e(Ce,[2,31]),e(Ce,[2,32]),e(Ce,[2,33]),e(Ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(J,[2,18]),e(se,[2,38]),e(Me,[2,72]),e(ke,[2,74]),e(Se,[2,24]),e(Se,[2,35]),e(Ie,[2,25]),e(Ie,[2,26],{12:[1,138]}),e(Ie,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:b(function(Be,He){if(He.recoverable)this.trace(Be);else{var nt=new Error(Be);throw nt.hash=He,nt}},"parseError"),parse:b(function(Be){var He=this,nt=[0],qe=[],Ue=[null],ge=[],ce=this.table,V="",le=0,X=0,he=0,Z=2,Ve=1,ve=ge.slice.call(arguments,1),Oe=Object.create(this.lexer),Ae={yy:{}};for(var Fe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Fe)&&(Ae.yy[Fe]=this.yy[Fe]);Oe.setInput(Be,Ae.yy),Ae.yy.lexer=Oe,Ae.yy.parser=this,typeof Oe.yylloc>"u"&&(Oe.yylloc={});var Re=Oe.yylloc;ge.push(Re);var We=Oe.options&&Oe.options.ranges;typeof Ae.yy.parseError=="function"?this.parseError=Ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(et){nt.length=nt.length-2*et,Ue.length=Ue.length-et,ge.length=ge.length-et}b(De,"popStack");function Ye(){var et;return et=qe.pop()||Oe.lex()||Ve,typeof et!="number"&&(et instanceof Array&&(qe=et,et=qe.pop()),et=He.symbols_[et]||et),et}b(Ye,"lex");for(var ue,Tt,be,it,ft,Dt,mt={},vt,ut,oe,ot;;){if(be=nt[nt.length-1],this.defaultActions[be]?it=this.defaultActions[be]:((ue===null||typeof ue>"u")&&(ue=Ye()),it=ce[be]&&ce[be][ue]),typeof it>"u"||!it.length||!it[0]){var ct="";ot=[];for(vt in ce[be])this.terminals_[vt]&&vt>Z&&ot.push("'"+this.terminals_[vt]+"'");Oe.showPosition?ct="Parse error on line "+(le+1)+`: -`+Oe.showPosition()+` -Expecting `+ot.join(", ")+", got '"+(this.terminals_[ue]||ue)+"'":ct="Parse error on line "+(le+1)+": Unexpected "+(ue==Ve?"end of input":"'"+(this.terminals_[ue]||ue)+"'"),this.parseError(ct,{text:Oe.match,token:this.terminals_[ue]||ue,line:Oe.yylineno,loc:Re,expected:ot})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+be+", token: "+ue);switch(it[0]){case 1:nt.push(ue),Ue.push(Oe.yytext),ge.push(Oe.yylloc),nt.push(it[1]),ue=null,Tt?(ue=Tt,Tt=null):(X=Oe.yyleng,V=Oe.yytext,le=Oe.yylineno,Re=Oe.yylloc,he>0&&he--);break;case 2:if(ut=this.productions_[it[1]][1],mt.$=Ue[Ue.length-ut],mt._$={first_line:ge[ge.length-(ut||1)].first_line,last_line:ge[ge.length-1].last_line,first_column:ge[ge.length-(ut||1)].first_column,last_column:ge[ge.length-1].last_column},We&&(mt._$.range=[ge[ge.length-(ut||1)].range[0],ge[ge.length-1].range[1]]),Dt=this.performAction.apply(mt,[V,X,le,Ae.yy,it[1],Ue,ge].concat(ve)),typeof Dt<"u")return Dt;ut&&(nt=nt.slice(0,-1*ut*2),Ue=Ue.slice(0,-1*ut),ge=ge.slice(0,-1*ut)),nt.push(this.productions_[it[1]][0]),Ue.push(mt.$),ge.push(mt._$),oe=ce[nt[nt.length-2]][nt[nt.length-1]],nt.push(oe);break;case 3:return!0}}return!0},"parse")},pe=(function(){var Te={EOF:1,parseError:b(function(He,nt){if(this.yy.parser)this.yy.parser.parseError(He,nt);else throw new Error(He)},"parseError"),setInput:b(function(Be,He){return this.yy=He||this.yy||{},this._input=Be,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Be=this._input[0];this.yytext+=Be,this.yyleng++,this.offset++,this.match+=Be,this.matched+=Be;var He=Be.match(/(?:\r\n?|\n).*/g);return He?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Be},"input"),unput:b(function(Be){var He=Be.length,nt=Be.split(/(?:\r\n?|\n)/g);this._input=Be+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-He),this.offset-=He;var qe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),nt.length-1&&(this.yylineno-=nt.length-1);var Ue=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:nt?(nt.length===qe.length?this.yylloc.first_column:0)+qe[qe.length-nt.length].length-nt[0].length:this.yylloc.first_column-He},this.options.ranges&&(this.yylloc.range=[Ue[0],Ue[0]+this.yyleng-He]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Be){this.unput(this.match.slice(Be))},"less"),pastInput:b(function(){var Be=this.matched.substr(0,this.matched.length-this.match.length);return(Be.length>20?"...":"")+Be.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Be=this.match;return Be.length<20&&(Be+=this._input.substr(0,20-Be.length)),(Be.substr(0,20)+(Be.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Be=this.pastInput(),He=new Array(Be.length+1).join("-");return Be+this.upcomingInput()+` -`+He+"^"},"showPosition"),test_match:b(function(Be,He){var nt,qe,Ue;if(this.options.backtrack_lexer&&(Ue={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ue.yylloc.range=this.yylloc.range.slice(0))),qe=Be[0].match(/(?:\r\n?|\n).*/g),qe&&(this.yylineno+=qe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:qe?qe[qe.length-1].length-qe[qe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Be[0].length},this.yytext+=Be[0],this.match+=Be[0],this.matches=Be,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(Be[0].length),this.matched+=Be[0],nt=this.performAction.call(this,this.yy,this,He,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),nt)return nt;if(this._backtrack){for(var ge in Ue)this[ge]=Ue[ge];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Be,He,nt,qe;this._more||(this.yytext="",this.match="");for(var Ue=this._currentRules(),ge=0;geHe[0].length)){if(He=nt,qe=ge,this.options.backtrack_lexer){if(Be=this.test_match(nt,Ue[ge]),Be!==!1)return Be;if(this._backtrack){He=!1;continue}else return!1}else if(!this.options.flex)break}return He?(Be=this.test_match(He,Ue[qe]),Be!==!1?Be:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var He=this.next();return He||this.lex()},"lex"),begin:b(function(He){this.conditionStack.push(He)},"begin"),popState:b(function(){var He=this.conditionStack.length-1;return He>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(He){return He=this.conditionStack.length-1-Math.abs(He||0),He>=0?this.conditionStack[He]:"INITIAL"},"topState"),pushState:b(function(He){this.begin(He)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(He,nt,qe,Ue){var ge=Ue;switch(qe){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),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]+)/,/^(?:$)/],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:[65,66,67,68],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}}};return Te})();Pe.lexer=pe;function Je(){this.yy={}}return b(Je,"Parser"),Je.prototype=Pe,Pe.Parser=Je,new Je})();nE.parser=nE;Xnt=nE,Bl=[],Ad=[""],cs="global",Pl="",iu=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Hx=[],TP="",wP=!1,aE=4,sE=2,Knt=b(function(){return G1e},"getC4Type"),Znt=b(function(e){G1e=mr(e,we())},"setC4Type"),Qnt=b(function(e,t,r,i,n,a,s,o,l){if(e==null||t===void 0||t===null||r===void 0||r===null||i===void 0||i===null)return;let u={},h=Hx.find(f=>f.from===t&&f.to===r);if(h?u=h:Hx.push(u),u.type=e,u.from=t,u.to=r,u.label={text:i},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.descr={text:a};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=_d()},"addRel"),Jnt=b(function(e,t,r,i,n,a,s){if(t===null||r===null)return;let o={},l=Bl.find(u=>u.alias===t);if(l&&t===l.alias?o=l:(o.alias=t,Bl.push(o)),r==null?o.label={text:""}:o.label={text:r},i==null)o.descr={text:""};else if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]={text:h}}else o.descr={text:i};if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]=h}else o.sprite=n;if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.tags=a;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:e},o.parentBoundary=cs,o.wrap=_d()},"addPersonOrSystem"),eat=b(function(e,t,r,i,n,a,s,o){if(t===null||r===null)return;let l={},u=Bl.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,Bl.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=_d(),l.typeC4Shape={text:e},l.parentBoundary=cs},"addContainer"),tat=b(function(e,t,r,i,n,a,s,o){if(t===null||r===null)return;let l={},u=Bl.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,Bl.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=_d(),l.typeC4Shape={text:e},l.parentBoundary=cs},"addComponent"),rat=b(function(e,t,r,i,n){if(e===null||t===null)return;let a={},s=iu.find(o=>o.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,iu.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.link=n;a.parentBoundary=cs,a.wrap=_d(),Pl=cs,cs=e,Ad.push(Pl)},"addPersonOrSystemBoundary"),iat=b(function(e,t,r,i,n){if(e===null||t===null)return;let a={},s=iu.find(o=>o.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,iu.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.link=n;a.parentBoundary=cs,a.wrap=_d(),Pl=cs,cs=e,Ad.push(Pl)},"addContainerBoundary"),nat=b(function(e,t,r,i,n,a,s,o){if(t===null||r===null)return;let l={},u=iu.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,iu.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.type={text:"node"};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.type={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.nodeType=e,l.parentBoundary=cs,l.wrap=_d(),Pl=cs,cs=t,Ad.push(Pl)},"addDeploymentNode"),aat=b(function(){cs=Pl,Ad.pop(),Pl=Ad.pop(),Ad.push(Pl)},"popBoundaryParseStack"),sat=b(function(e,t,r,i,n,a,s,o,l,u,h){let f=Bl.find(d=>d.alias===t);if(!(f===void 0&&(f=iu.find(d=>d.alias===t),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.borderColor=n;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),oat=b(function(e,t,r,i,n,a,s){let o=Hx.find(l=>l.from===t&&l.to===r);if(o!==void 0){if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.textColor=i;if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.lineColor=n;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),lat=b(function(e,t,r){let i=aE,n=sE;if(typeof t=="object"){let a=Object.values(t)[0];i=parseInt(a)}else i=parseInt(t);if(typeof r=="object"){let a=Object.values(r)[0];n=parseInt(a)}else n=parseInt(r);i>=1&&(aE=i),n>=1&&(sE=n)},"updateLayoutConfig"),cat=b(function(){return aE},"getC4ShapeInRow"),uat=b(function(){return sE},"getC4BoundaryInRow"),hat=b(function(){return cs},"getCurrentBoundaryParse"),fat=b(function(){return Pl},"getParentBoundaryParse"),q1e=b(function(e){return e==null?Bl:Bl.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),dat=b(function(e){return Bl.find(t=>t.alias===e)},"getC4Shape"),pat=b(function(e){return Object.keys(q1e(e))},"getC4ShapeKeys"),V1e=b(function(e){return e==null?iu:iu.filter(t=>t.parentBoundary===e)},"getBoundaries"),gat=V1e,mat=b(function(){return Hx},"getRels"),yat=b(function(){return TP},"getTitle"),vat=b(function(e){wP=e},"setWrap"),_d=b(function(){return wP},"autoWrap"),bat=b(function(){Bl=[],iu=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Pl="",cs="global",Ad=[""],Hx=[],Ad=[""],TP="",wP=!1,aE=4,sE=2},"clear"),xat={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},Tat={FILLED:0,OPEN:1},wat={LEFTOF:0,RIGHTOF:1,OVER:2},kat=b(function(e){TP=mr(e,we())},"setTitle"),vP={addPersonOrSystem:Jnt,addPersonOrSystemBoundary:rat,addContainer:eat,addContainerBoundary:iat,addComponent:tat,addDeploymentNode:nat,popBoundaryParseStack:aat,addRel:Qnt,updateElStyle:sat,updateRelStyle:oat,updateLayoutConfig:lat,autoWrap:_d,setWrap:vat,getC4ShapeArray:q1e,getC4Shape:dat,getC4ShapeKeys:pat,getBoundaries:V1e,getBoundarys:gat,getCurrentBoundaryParse:hat,getParentBoundaryParse:fat,getRels:mat,getTitle:yat,getC4Type:Knt,getC4ShapeInRow:cat,getC4BoundaryInRow:uat,setAccTitle:yr,getAccTitle:vr,getAccDescription:xr,setAccDescription:br,getConfig:b(()=>we().c4,"getConfig"),clear:bat,LINETYPE:xat,ARROWTYPE:Tat,PLACEMENT:wat,setTitle:kat,setC4Type:Znt},kP=b(function(e,t){return D0(e,t)},"drawRect"),U1e=b(function(e,t,r,i,n,a){let s=e.append("image");s.attr("width",t),s.attr("height",r),s.attr("x",i),s.attr("y",n);let o=a.startsWith("data:image/png;base64")?a:(0,W1e.sanitizeUrl)(a);s.attr("xlink:href",o)},"drawImage"),Cat=b((e,t,r,i)=>{let n=e.append("g"),a=0;for(let s of t){let o=s.textColor?s.textColor:"#444444",l=s.lineColor?s.lineColor:"#444444",u=s.offsetX?parseInt(s.offsetX):0,h=s.offsetY?parseInt(s.offsetY):0,f="";if(a===0){let p=n.append("line");p.attr("x1",s.startPoint.x),p.attr("y1",s.startPoint.y),p.attr("x2",s.endPoint.x),p.attr("y2",s.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",l),p.style("fill","none"),s.type!=="rel_b"&&p.attr("marker-end","url("+f+"#"+i+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+f+"#"+i+"-arrowend)"),a=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&p.attr("marker-end","url("+f+"#"+i+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+f+"#"+i+"-arrowend)")}let d=r.messageFont();Ch(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+h,s.label.width,s.label.height,{fill:o},d),s.techn&&s.techn.text!==""&&(d=r.messageFont(),Ch(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+h,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:o,"font-style":"italic"},d))}},"drawRels"),Sat=b(function(e,t,r){let i=e.append("g"),n=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",s=t.fontColor?t.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(o={"stroke-width":1});let l={x:t.x,y:t.y,fill:n,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:o};kP(i,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,Ch(r)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,Ch(r)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,Ch(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),Eat=b(function(e,t,r){let i=t.bgColor?t.bgColor:r[t.typeC4Shape.text+"_bg_color"],n=t.borderColor?t.borderColor:r[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let o=e.append("g");o.attr("class","person-man");let l=$a();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=t.x,l.y=t.y,l.fill=i,l.width=t.width,l.height=t.height,l.stroke=n,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},kP(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","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));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","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));break}let u=Mat(r,t.typeC4Shape.text);switch(o.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){case"person":case"external_person":U1e(o,48,48,t.x+t.width/2-24,t.y+t.image.Y,s);break}let h=r[t.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,Ch(r)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},h),h=r[t.typeC4Shape.text+"Font"](),h.fontColor=a,t.techn&&t.techn?.text!==""?Ch(r)(t.techn.text,o,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},h):t.type&&t.type.text!==""&&Ch(r)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},h),t.descr&&t.descr.text!==""&&(h=r.personFont(),h.fontColor=a,Ch(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},h)),t.height},"drawC4Shape"),Aat=b(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),_at=b(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Lat=b(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Rat=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Iat=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Dat=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Nat=b(function(e,t){let i=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);i.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"),i.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),Mat=b((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Ch=(function(){function e(n,a,s,o,l,u,h){let f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,h)}b(e,"byText");function t(n,a,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:g}=f,m=n.split(ht.lineBreakRegex);for(let y=0;y=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>H1e)&&(t=this.nextData.startx+e.margin+Ht.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+e.height,this.nextData.cnt=1),e.x=t,e.y=i,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},xP(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},xP=b(function(e){Di(Ht,e),e.fontFamily&&(Ht.personFontFamily=Ht.systemFontFamily=Ht.messageFontFamily=e.fontFamily),e.fontSize&&(Ht.personFontSize=Ht.systemFontSize=Ht.messageFontSize=e.fontSize),e.fontWeight&&(Ht.personFontWeight=Ht.systemFontWeight=Ht.messageFontWeight=e.fontWeight)},"setConf"),Ux=b((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),iE=b(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),Oat=b(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");b(tl,"calcC4ShapeTextWH");j1e=b(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=Ht.c4ShapeMargin-35;let i=t.wrap&&Ht.wrap,n=iE(Ht);n.fontSize=n.fontSize+2,n.fontWeight="bold";let a=ma(t.label.text,n);tl("label",t,i,n,a),ru.drawBoundary(e,t,Ht)},"drawBoundary"),X1e=b(function(e,t,r,i){let n=0;for(let a of i){n=0;let s=r[a],o=Ux(Ht,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=ma("\xAB"+s.typeC4Shape.text+"\xBB",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=Ht.c4ShapePadding,n=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height);let l=s.wrap&&Ht.wrap,u=Ht.width-Ht.c4ShapePadding*2,h=Ux(Ht,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",tl("label",s,l,h,u),s.label.Y=n+8,n=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=Ux(Ht,s.typeC4Shape.text);tl("type",s,l,p,u),s.type.Y=n+5,n=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=Ux(Ht,s.techn.text);tl("techn",s,l,p,u),s.techn.Y=n+5,n=s.techn.Y+s.techn.height}let f=n,d=s.label.width;if(s.descr&&s.descr.text!==""){let p=Ux(Ht,s.typeC4Shape.text);tl("descr",s,l,p,u),s.descr.Y=n+20,n=s.descr.Y+s.descr.height,d=Math.max(s.label.width,s.descr.width),f=n-s.descr.textLines*5}d=d+Ht.c4ShapePadding,s.width=Math.max(s.width||Ht.width,d,Ht.width),s.height=Math.max(s.height||Ht.height,f,Ht.height),s.margin=s.margin||Ht.c4ShapeMargin,e.insert(s),ru.drawC4Shape(t,s,Ht)}e.bumpLastMargin(Ht.c4ShapeMargin)},"drawC4ShapeArray"),el=class{static{b(this,"Point")}constructor(e,t){this.x=e,this.y=t}},$1e=b(function(e,t){let r=e.x,i=e.y,n=t.x,a=t.y,s=r+e.width/2,o=i+e.height/2,l=Math.abs(r-n),u=Math.abs(i-a),h=u/l,f=e.height/e.width,d=null;return i==a&&rn?d=new el(r,o):r==n&&ia&&(d=new el(s,i)),r>n&&i=h?d=new el(r,o+h*e.width/2):d=new el(s-l/u*e.height/2,i+e.height):r=h?d=new el(r+e.width,o+h*e.width/2):d=new el(s+l/u*e.height/2,i+e.height):ra?f>=h?d=new el(r+e.width,o-h*e.width/2):d=new el(s+e.height/2*l/u,i):r>n&&i>a&&(f>=h?d=new el(r,o-e.width/2*h):d=new el(s-e.height/2*l/u,i)),d},"getIntersectPoint"),Pat=b(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=$1e(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=$1e(t,r);return{startPoint:i,endPoint:n}},"getIntersectPoints"),Bat=b(function(e,t,r,i,n){let a=0;for(let s of t){a=a+1;let o=s.wrap&&Ht.wrap,l=Oat(Ht);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=a+": "+s.label.text);let h=ma(s.label.text,l);tl("label",s,o,l,h),s.techn&&s.techn.text!==""&&(h=ma(s.techn.text,l),tl("techn",s,o,l,h)),s.descr&&s.descr.text!==""&&(h=ma(s.descr.text,l),tl("descr",s,o,l,h));let f=r(s.from),d=r(s.to),p=Pat(f,d);s.startPoint=p.startPoint,s.endPoint=p.endPoint}ru.drawRels(e,t,Ht,n)},"drawRels");b(CP,"drawInsideBoundary");Fat=b(function(e,t,r,i){Ht=we().c4;let n=we().securityLevel,a;n==="sandbox"&&(a=Qe("#i"+t));let s=n==="sandbox"?Qe(a.nodes()[0].contentDocument.body):Qe("body"),o=i.db;i.db.setWrap(Ht.wrap),H1e=o.getC4ShapeInRow(),bP=o.getC4BoundaryInRow(),ee.debug(`C:${JSON.stringify(Ht,null,2)}`);let l=n==="sandbox"?s.select(`[id="${t}"]`):Qe(`[id="${t}"]`);ru.insertComputerIcon(l,t),ru.insertDatabaseIcon(l,t),ru.insertClockIcon(l,t);let u=new Y1e(i);u.setData(Ht.diagramMarginX,Ht.diagramMarginX,Ht.diagramMarginY,Ht.diagramMarginY),u.data.widthLimit=screen.availWidth,oE=Ht.diagramMarginX,lE=Ht.diagramMarginY;let h=i.db.getTitle(),f=i.db.getBoundaries("");CP(l,"",u,f,i),ru.insertArrowHead(l,t),ru.insertArrowEnd(l,t),ru.insertArrowCrossHead(l,t),ru.insertArrowFilledHead(l,t),Bat(l,i.db.getRels(),i.db.getC4Shape,i,t),u.data.stopx=oE,u.data.stopy=lE;let d=u.data,g=d.stopy-d.starty+2*Ht.diagramMarginY,y=d.stopx-d.startx+2*Ht.diagramMarginX;h&&l.append("text").text(h).attr("x",(d.stopx-d.startx)/2-4*Ht.diagramMarginX).attr("y",d.starty+Ht.diagramMarginY),Mr(l,g,y,Ht.useMaxWidth);let v=h?60:0;l.attr("viewBox",d.startx-Ht.diagramMarginX+" -"+(Ht.diagramMarginY+v)+" "+y+" "+(g+v)),ee.debug("models:",d)},"draw"),z1e={drawPersonOrSystemArray:X1e,drawBoundary:j1e,setConf:xP,draw:Fat},$at=b(e=>`.person { + `),o=Out(n,i,s);o.aPosition=n.getAttribLocation(o,"aPosition"),o.aIndex=n.getAttribLocation(o,"aIndex"),o.aVertType=n.getAttribLocation(o,"aVertType"),o.aTransform=n.getAttribLocation(o,"aTransform"),o.aAtlasId=n.getAttribLocation(o,"aAtlasId"),o.aTex=n.getAttribLocation(o,"aTex"),o.aPointAPointB=n.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=n.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=n.getAttribLocation(o,"aLineWidth"),o.aColor=n.getAttribLocation(o,"aColor"),o.aCornerRadius=n.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=n.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=n.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=n.getUniformLocation(o,"uAtlasSize"),o.uBGColor=n.getUniformLocation(o,"uBGColor"),o.uZoom=n.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:PT.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,n){return r.visible()?n&&n.isVisible?n.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,n,i){var a=this.atlasManager,s=this.batchManager,o=a.getRenderTypeOpts(i);if(this._isVisible(r,o)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(r);if(l===Z3.IGNORE)return;if(l==Z3.USE_BB){this.drawPickingRectangle(r,n,i);return}}var u=a.getAtlasInfo(r,i),h=Co(u),f;try{for(h.s();!(f=h.n()).done;){var d=f.value,p=d.atlas,g=d.tex1,m=d.tex2;s.canAddToCurrentBatch(p)||this.endBatch();for(var y=s.getAtlasIndexForBatch(p),x=0,b=[[g,!0],[m,!1]];x=this.maxInstances&&this.endBatch()}}}}catch(O){h.e(O)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(r,n,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(i.shapeProps&&i.shapeProps.padding&&(o=r.pstyle(i.shapeProps.padding).pfValue),a){var l=a.bb,u=a.tex1,h=a.tex2,f=u.w/(u.w+h.w);s||(f=1-f);var d=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(n,d,i,r)}else{var p=i.getBoundingBox(r),g=this._getAdjustedBB(p,o,!0,1);this._applyTransformMatrix(n,g,i,r)}}},{key:"_applyTransformMatrix",value:function(r,n,i,a){var s,o;Hxe(r);var l=i.getRotation?i.getRotation(a):0;if(l!==0){var u=i.getRotationPoint(a),h=u.x,f=u.y;$3(r,r,[h,f]),Yxe(r,r,l);var d=i.getRotationOffset(a);s=d.x+(n.xOffset||0),o=d.y+(n.yOffset||0)}else s=n.x1,o=n.y1;$3(r,r,[s,o]),tF(r,r,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(r,n,i,a){var s=r.x1,o=r.y1,l=r.w,u=r.h,h=r.yOffset;n&&(s-=n,o-=n,l+=2*n,u+=2*n);var f=0,d=l*a;return i&&a<1?l=d:!i&&a<1&&(f=l-d,s+=f,l=d),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:h}}},{key:"drawPickingRectangle",value:function(r,n,i){var a=this.atlasManager.getRenderTypeOpts(i),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=q1;var o=this.indexBuffer.getView(s);G1(n,o);var l=this.colorBuffer.getView(s);gg([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(r,u,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,n,i){var a=this.simpleShapeOptions.get(i);if(this._isVisible(r,a)){var s=a.shapeProps,o=this._getVertTypeForShape(r,s.shape);if(o===void 0||a.isSimple&&!a.isSimple(r,this.renderTarget)){this.drawTexture(r,n,i);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===A3||o===RT){var u=a.getBoundingBox(r),h=this._getCornerRadius(r,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=h,f[1]=h,f[2]=h,f[3]=h,o===RT&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(l);G1(n,d);var p=this.renderTarget.picking?1:i==="node-body"?r.effectiveOpacity():1,g=this.renderTarget.picking?1:r.pstyle(s.opacity).value*p,m=r.pstyle(s.color).value,y=this.colorBuffer.getView(l);gg(m,g,y);var x=this.lineWidthBuffer.getView(l);if(x[0]=0,x[1]=0,s.border){var b=r.pstyle("border-width").value;if(b>0){var T=r.pstyle("border-color").value,k=p*r.pstyle("border-opacity").value,w=this.borderColorBuffer.getView(l);gg(T,k,w);var C=r.pstyle("border-position").value;if(C==="inside")x[0]=0,x[1]=-b;else if(C==="outside")x[0]=b,x[1]=0;else{var S=b/2;x[0]=S,x[1]=-S}}}var E=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(r,E,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,n){var i=r.pstyle(n).value;switch(i){case"rectangle":return q1;case"ellipse":return LT;case"roundrectangle":case"round-rectangle":return A3;case"bottom-round-rectangle":return RT;default:return}}},{key:"_getCornerRadius",value:function(r,n,i){var a=i.w,s=i.h;if(r.pstyle(n).value==="auto")return cp(a,s);var o=r.pstyle(n).pfValue,l=a/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(r,n,i){if(r.visible()){var a=r._private.rscratch,s,o,l;if(i==="source"?(s=a.arrowStartX,o=a.arrowStartY,l=a.srcArrowAngle):(s=a.arrowEndX,o=a.arrowEndY,l=a.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(i+"-arrow-shape").value;if(u!=="none"){var h=r.pstyle(i+"-arrow-color").value,f=r.pstyle("opacity").value,d=r.pstyle("line-opacity").value,p=f*d,g=r.pstyle("width").pfValue,m=r.pstyle("arrow-scale").value,y=this.r.getArrowWidth(g,m),x=this.instanceCount,b=this.transformBuffer.getMatrixView(x);Hxe(b),$3(b,b,[s,o]),tF(b,b,[y,y]),Yxe(b,b,l),this.vertTypeBuffer.getView(x)[0]=O$;var T=this.indexBuffer.getView(x);G1(n,T);var k=this.colorBuffer.getView(x);gg(h,p,k),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,n){if(r.visible()){var i=this._getEdgePoints(r);if(i){var a=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=a*s;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var h=this.instanceCount;this.vertTypeBuffer.getView(h)[0]=Xxe;var f=this.indexBuffer.getView(h);G1(n,f);var d=this.colorBuffer.getView(h);gg(l,u,d);var p=this.lineWidthBuffer.getView(h);p[0]=o;var g=this.pointAPointBBuffer.getView(h);g[0]=i[0],g[1]=i[1],g[2]=i[2],g[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var m=0;m=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var n=r._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var n=r._private.rscratch;if(this._isValidEdge(r)){var i=n.allpts;if(i.length==4)return i;var a=this._getNumSegments(r);return this._getCurveSegmentPoints(i,a)}}},{key:"_getNumSegments",value:function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,n){if(r.length==4)return r;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=r[0],i[1]=r[1];else if(a==n)i[a*2]=r[r.length-2],i[a*2+1]=r[r.length-1];else{var s=a/n;this._setCurvePoint(r,s,i,a*2)}return i}},{key:"_setCurvePoint",value:function(r,n,i,a){if(r.length<=2)i[a]=r[0],i[a+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},o=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?Z3.USE_BB:Z3.IGNORE},l=function(f){var d=f.position(),p=d.x,g=d.y,m=f.outerWidth(),y=f.outerHeight();return{w:m,h:y,x1:p-m/2,y1:g-y/2}};r.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:Fut,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:P$(t.getLabelKey,null),getBoundingBox:B$(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:P$(t.getSourceLabelKey,"source"),getBoundingBox:B$(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:P$(t.getTargetLabelKey,"target"),getBoundingBox:B$(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=QT(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(h,f){var d=!1;f&&f.length>0&&(d|=r.drawing.invalidate(f)),d&&u()}),sht(r)};P$=function(t,r){return function(n){var i=t(n),a=P2e(n,r);return a.length>1?a.map(function(s,o){return"".concat(i,"_").concat(o)}):i}},B$=function(t,r){return function(n,i){var a=t(n);if(typeof i=="string"){var s=i.indexOf("_");if(s>0){var o=Number(i.substring(s+1)),l=P2e(n,r),u=a.h/l.length,h=u*o,f=a.y1+h;return{x1:a.x1,w:a.w,y1:f,h:u,yOffset:h}}}return a}};yp={};yp.drawPolygonPath=function(e,t,r,n,i,a){var s=n/2,o=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+s*a[0],r+o*a[1]);for(var l=1;l0&&s>0){p.clearRect(0,0,a,s),p.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(e.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var m=t.pan(),y={x:m.x*u,y:m.y*u};u*=t.zoom(),p.translate(y.x,y.y),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(-y.x,-y.y)}e.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=e.bg,p.rect(0,0,a,s),p.fill())}return d};iw.png=function(e){return z2e(e,this.bufferCanvasImage(e),"image/png")};iw.jpg=function(e){return z2e(e,this.bufferCanvasImage(e),"image/jpeg")};G2e={};G2e.nodeShapeImpl=function(e,t,r,n,i,a,s,o){switch(e){case"ellipse":return this.drawEllipsePath(t,r,n,i,a);case"polygon":return this.drawPolygonPath(t,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(t,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,n,i,a,o);case"barrel":return this.drawBarrelPath(t,r,n,i,a)}};mht=q2e,Zr=q2e.prototype;Zr.CANVAS_LAYERS=3;Zr.SELECT_BOX=0;Zr.DRAG=1;Zr.NODE=2;Zr.WEBGL=3;Zr.CANVAS_TYPES=["2d","2d","2d","webgl2"];Zr.BUFFER_COUNT=3;Zr.TEXTURE_BUFFER=0;Zr.MOTIONBLUR_BUFFER_NODE=1;Zr.MOTIONBLUR_BUFFER_DRAG=2;Zr.redrawHint=function(e,t){var r=this;switch(e){case"eles":r.data.canvasNeedsRedraw[Zr.NODE]=t;break;case"drag":r.data.canvasNeedsRedraw[Zr.DRAG]=t;break;case"select":r.data.canvasNeedsRedraw[Zr.SELECT_BOX]=t;break;case"gc":r.data.gc=!0;break}};yht=typeof Path2D<"u";Zr.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e};Zr.usePaths=function(){return yht&&this.pathsEnabled};Zr.setImgSmoothing=function(e,t){e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)};Zr.getImgSmoothing=function(e){return e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled};Zr.makeOffscreenCanvas=function(e,t){var r;if((typeof OffscreenCanvas>"u"?"undefined":va(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(e,t);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=e,r.height=t}return r};[L2e,$u,rf,_F,_g,mp,Vs,O2e,yp,iw,G2e].forEach(function(e){yr(Zr,e)});vht=[{name:"null",impl:g2e},{name:"base",impl:E2e},{name:"canvas",impl:mht}],xht=[{type:"layout",extensions:qct},{type:"renderer",extensions:vht}],V2e={},W2e={};iF=function(){if(arguments.length===2)return H2e.apply(null,arguments);if(arguments.length===3)return U2e.apply(null,arguments);if(arguments.length===4)return Tht.apply(null,arguments);if(arguments.length===5)return bht.apply(null,arguments);gi("Invalid extension access syntax")};UT.prototype.extension=iF;xht.forEach(function(e){e.extensions.forEach(function(t){U2e(e.type,t.name,t.impl)})});Q3=function(){if(!(this instanceof Q3))return new Q3;this.length=0},Eg=Q3.prototype;Eg.instanceString=function(){return"stylesheet"};Eg.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this};Eg.css=function(e,t){var r=this.length-1;if(fr(e))this[r].properties.push({name:e,value:t});else if(dn(e))for(var n=e,i=Object.keys(n),a=0;a{(function(t,r){typeof aw=="object"&&typeof IF=="object"?IF.exports=r():typeof define=="function"&&define.amd?define([],r):typeof aw=="object"?aw.layoutBase=r():t.layoutBase=r()})(aw,function(){return(function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)})([(function(e,t,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=s}),(function(e,t,r){"use strict";function n(i){this.vGraphObject=i}e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,y){n.call(this,y),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,y){if(m==null&&y==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(b.source=m,b.target=y,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),y!=m&&y.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),x,b=y.length,T=0;T-1&&C>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(C,1);var k=x.source.owner.getEdges().indexOf(x);if(k==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(k,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,y,x,b,T=this.getNodes(),k=T.length,w=0;wy&&(g=y),m>x&&(m=x)}return g==i.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?b=T[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,y=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,k,w,C,S,E=this.nodes,L=E.length,N=0;NT&&(m=T),yw&&(x=w),bT&&(m=T),yw&&(x=w),b=this.nodes.length){var L=0;y.forEach(function(N){N.owner==g&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},e.exports=d}),(function(e,t,r){"use strict";var n,i=r(1);function a(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=E,!1;if(uh)return o[0]=d,o[1]=u,o[2]=C,o[3]=f,!1;if(lh?(o[0]=m,o[1]=y,R=!0):(o[0]=g,o[1]=p,R=!0):D===M&&(l>h?(o[0]=d,o[1]=p,R=!0):(o[0]=x,o[1]=y,R=!0)),-I===M?h>l?(o[2]=S,o[3]=E,_=!0):(o[2]=C,o[3]=w,_=!0):I===M&&(h>l?(o[2]=k,o[3]=w,_=!0):(o[2]=L,o[3]=E,_=!0)),R&&_)return!1;if(l>h?u>f?(B=this.getCardinalDirection(D,M,4),P=this.getCardinalDirection(I,M,2)):(B=this.getCardinalDirection(-D,M,3),P=this.getCardinalDirection(-I,M,1)):u>f?(B=this.getCardinalDirection(-D,M,1),P=this.getCardinalDirection(-I,M,3)):(B=this.getCardinalDirection(D,M,2),P=this.getCardinalDirection(I,M,4)),!R)switch(B){case 1:G=p,$=l+-T/M,o[0]=$,o[1]=G;break;case 2:$=x,G=u+b*M,o[0]=$,o[1]=G;break;case 3:G=y,$=l+T/M,o[0]=$,o[1]=G;break;case 4:$=m,G=u+-b*M,o[0]=$,o[1]=G;break}if(!_)switch(P){case 1:z=w,q=h+-O/M,o[2]=q,o[3]=z;break;case 2:q=L,z=f+N*M,o[2]=q,o[3]=z;break;case 3:z=E,q=h+O/M,o[2]=q,o[3]=z;break;case 4:q=S,z=f+-N*M,o[2]=q,o[3]=z;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,y=l.y,x=void 0,b=void 0,T=void 0,k=void 0,w=void 0,C=void 0,S=void 0,E=void 0,L=void 0;return T=d-h,w=u-f,S=f*h-u*d,k=y-g,C=p-m,E=m*g-p*y,L=T*C-k*w,L===0?null:(x=(w*E-C*S)/L,b=(k*S-T*E)/L,new n(x,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},e.exports=n}),(function(e,t,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n}),(function(e,t,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},e.exports=i}),(function(e,t,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(T.push(w[0]);T.length>0&&g;){var C=T[0];T.splice(0,1),b.add(C);for(var S=C.getEdges(),x=0;x-1&&w.splice(O,1)}b=new Set,k=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),x=0;x0){for(var y=this.edgeToDummyNodes.get(m),x=0;x=0&&g.splice(E,1);var L=k.getNeighborsList();L.forEach(function(R){if(m.indexOf(R)<0){var _=y.get(R),D=_-1;D==1&&C.push(R),y.set(R,D)}})}m=m.concat(C),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},e.exports=d}),(function(e,t,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},e.exports=n}),(function(e,t,r){"use strict";var n=r(4);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},e.exports=i}),(function(e,t,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,y,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pT||b>T)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*y)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(x>T||b>T)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=x.length||T>=x[0].length)){for(var k=0;ku}}]),o})();e.exports=s}),(function(e,t,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(t,r){typeof sw=="object"&&typeof DF=="object"?DF.exports=r(MF()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof sw=="object"?sw.coseBase=r(MF()):t.coseBase=r(t.layoutBase)})(sw,function(e){return(function(t){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)})([(function(t,r){t.exports=e}),(function(t,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}for(var s in i)a[s]=i[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=a}),(function(t,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];t.exports=a}),(function(t,r,n){"use strict";var i=n(0).LGraph;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];t.exports=a}),(function(t,r,n){"use strict";var i=n(0).LGraphManager;function a(o){i.call(this,o)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];t.exports=a}),(function(t,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function s(l,u,h,f){i.call(this,l,u,h,f)}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),f,d=0;d0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),S=this.nodesWithGravity.filter(function(E){return C.has(E)});this.graphManager.setAllNodesToApplyGravitation(S),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(L){return w.has(L)});this.graphManager.setAllNodesToApplyGravitation(C),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var S=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(S,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),C={},S=0;S1){var R;for(R=0;RE&&(E=Math.floor(O.y)),N=Math.floor(O.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-O.x/2,f.WORLD_CENTER_Y-O.y/2))},T.radialLayout=function(w,C,S){var E=Math.max(this.maxDiagonalInTree(w),u.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(C,null,0,359,0,E);var L=x.calculateBounds(w),N=new b;N.setDeviceOrgX(L.getMinX()),N.setDeviceOrgY(L.getMinY()),N.setWorldOrgX(S.x),N.setWorldOrgY(S.y);for(var O=0;O1;){var V=z[0];z.splice(0,1);var j=B.indexOf(V);j>=0&&B.splice(j,1),G--,P--}C!=null?q=(B.indexOf(z[0])+1)%G:q=0;for(var ee=Math.abs(E-S)/P,ne=q;$!=P;ne=++ne%G){var Q=B[ne].getOtherEnd(w);if(Q!=C){var pe=(S+$*ee)%360,te=(pe+ee)%360;T.branchRadialLayout(Q,w,pe,te,L+N,N),$++}}},T.maxDiagonalInTree=function(w){for(var C=m.MIN_VALUE,S=0;SC&&(C=L)}return C},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var w=this,C={};this.memberGroups={},this.idToDummyNode={};for(var S=[],E=this.graphManager.getAllNodes(),L=0;L"u"&&(C[R]=[]),C[R]=C[R].concat(N)}Object.keys(C).forEach(function(_){if(C[_].length>1){var D="DummyCompound_"+_;w.memberGroups[D]=C[_];var I=C[_][0].getParent(),M=new o(w.graphManager);M.id=D,M.paddingLeft=I.paddingLeft||0,M.paddingRight=I.paddingRight||0,M.paddingBottom=I.paddingBottom||0,M.paddingTop=I.paddingTop||0,w.idToDummyNode[D]=M;var B=w.getGraphManager().add(w.newGraph(),M),P=I.getChild();P.add(M);for(var $=0;$=0;w--){var C=this.compoundOrder[w],S=C.id,E=C.paddingLeft,L=C.paddingTop;this.adjustLocations(this.tiledMemberPack[S],C.rect.x,C.rect.y,E,L)}},T.prototype.repopulateZeroDegreeMembers=function(){var w=this,C=this.tiledZeroDegreePack;Object.keys(C).forEach(function(S){var E=w.idToDummyNode[S],L=E.paddingLeft,N=E.paddingTop;w.adjustLocations(C[S],E.rect.x,E.rect.y,L,N)})},T.prototype.getToBeTiled=function(w){var C=w.id;if(this.toBeTiled[C]!=null)return this.toBeTiled[C];var S=w.getChild();if(S==null)return this.toBeTiled[C]=!1,!1;for(var E=S.getNodes(),L=0;L0)return this.toBeTiled[C]=!1,!1;if(N.getChild()==null){this.toBeTiled[N.id]=!1;continue}if(!this.getToBeTiled(N))return this.toBeTiled[C]=!1,!1}return this.toBeTiled[C]=!0,!0},T.prototype.getNodeDegree=function(w){for(var C=w.id,S=w.getEdges(),E=0,L=0;L_&&(_=I.rect.height)}S+=_+w.verticalPadding}},T.prototype.tileCompoundMembers=function(w,C){var S=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(E){var L=C[E];S.tiledMemberPack[E]=S.tileNodes(w[E],L.paddingLeft+L.paddingRight),L.rect.width=S.tiledMemberPack[E].width,L.rect.height=S.tiledMemberPack[E].height})},T.prototype.tileNodes=function(w,C){var S=u.TILING_PADDING_VERTICAL,E=u.TILING_PADDING_HORIZONTAL,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:C,verticalPadding:S,horizontalPadding:E};w.sort(function(R,_){return R.rect.width*R.rect.height>_.rect.width*_.rect.height?-1:R.rect.width*R.rect.height<_.rect.width*_.rect.height?1:0});for(var N=0;N0&&(O+=w.horizontalPadding),w.rowWidth[S]=O,w.width0&&(R+=w.verticalPadding);var _=0;R>w.rowHeight[S]&&(_=w.rowHeight[S],w.rowHeight[S]=R,_=w.rowHeight[S]-_),w.height+=_,w.rows[S].push(C)},T.prototype.getShortestRowIndex=function(w){for(var C=-1,S=Number.MAX_VALUE,E=0;ES&&(C=E,S=w.rowWidth[E]);return C},T.prototype.canAddHorizontal=function(w,C,S){var E=this.getShortestRowIndex(w);if(E<0)return!0;var L=w.rowWidth[E];if(L+w.horizontalPadding+C<=w.width)return!0;var N=0;w.rowHeight[E]0&&(N=S+w.verticalPadding-w.rowHeight[E]);var O;w.width-L>=C+w.horizontalPadding?O=(w.height+N)/(L+C+w.horizontalPadding):O=(w.height+N)/w.width,N=S+w.verticalPadding;var R;return w.widthN&&C!=S){E.splice(-1,1),w.rows[S].push(L),w.rowWidth[C]=w.rowWidth[C]-N,w.rowWidth[S]=w.rowWidth[S]+N,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=E[R].height);C>0&&(O+=w.verticalPadding);var _=w.rowHeight[C]+w.rowHeight[S];w.rowHeight[C]=O,w.rowHeight[S]0)for(var P=L;P<=N;P++)B[0]+=this.grid[P][O-1].length+this.grid[P][O].length-1;if(N0)for(var P=O;P<=R;P++)B[3]+=this.grid[L-1][P].length+this.grid[L][P].length-1;for(var $=m.MAX_VALUE,G,q,z=0;z{(function(t,r){typeof ow=="object"&&typeof OF=="object"?OF.exports=r(NF()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof ow=="object"?ow.cytoscapeCoseBilkent=r(NF()):t.cytoscapeCoseBilkent=r(t.coseBase)})(ow,function(e){return(function(t){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)})([(function(t,r){t.exports=e}),(function(t,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,o=n(0).CoSELayout,l=n(0).CoSENode,u=n(0).layoutBase.PointD,h=n(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(y,x){var b={};for(var T in y)b[T]=y[T];for(var T in x)b[T]=x[T];return b}function p(y){this.options=d(f,y),g(this.options)}var g=function(x){x.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=x.nodeRepulsion),x.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=x.idealEdgeLength),x.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=x.edgeElasticity),x.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.quality=="draft"?i.QUALITY=0:x.quality=="proof"?i.QUALITY=2:i.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!x.randomize,s.ANIMATE=a.ANIMATE=i.ANIMATE=x.animate,s.TILE=x.tile,s.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal};p.prototype.run=function(){var y,x,b=this.options,T=this.idToLNode={},k=this.layout=new o,w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var C=k.newGraphManager();this.gm=C;var S=this.options.eles.nodes(),E=this.options.eles.edges();this.root=C.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(S),k);for(var L=0;L0){var R;R=b.getGraphManager().add(b.newGraph(),S),this.processChildrenList(R,C,b)}}},p.prototype.stop=function(){return this.stopped=!0,this};var m=function(x){x("layout","cose-bilkent",p)};typeof cytoscape<"u"&&m(cytoscape),t.exports=m})])})});var rTe={};cr(rTe,{render:()=>kht});function j2e(e,t){e.forEach(r=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach(i=>{["id","label","height","width","padding","x","y"].includes(i)||(n[i]=r[i])}),t.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}function K2e(e,t){e.forEach(r=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach(i=>{["id","start","end"].includes(i)||(n[i]=r[i])}),t.add({group:"edges",data:n})})}function Z2e(e){return new Promise(t=>{let r=ct("body").append("div").attr("id","cy").attr("style","display:none"),n=Nl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),j2e(e.nodes,n),K2e(e.edges,n),n.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}});let i={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(i).run(),n.ready(a=>{fe.info("Cytoscape ready",a),t(n)})})}function Q2e(e){return e.nodes().map(t=>{let r=t.data(),n=t.position(),i={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach(a=>{a!=="id"&&(i[a]=r[a])}),i})}function J2e(e){return e.edges().map(t=>{let r=t.data(),n=t._private.rscratch,i={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach(a=>{["id","source","target"].includes(a)||(i[a]=r[a])}),i})}async function eTe(e,t){fe.debug("Starting cose-bilkent layout algorithm");try{tTe(e);let r=await Z2e(e),n=Q2e(r),i=J2e(r);return fe.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(r){throw fe.error("Error in cose-bilkent layout algorithm:",r),r}}function tTe(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(e.edges))throw new Error("Edges array is required in layout data");return!0}var X2e,Cht,kht,nTe=X(()=>{ur();Yt();LF();X2e=Ls(Y2e(),1);zr();Nl.use(X2e.default);v(j2e,"addNodes");v(K2e,"addEdges");v(Z2e,"createCytoscapeInstance");v(Q2e,"extractPositionedNodes");v(J2e,"extractPositionedEdges");v(eTe,"executeCoseBilkentLayout");v(tTe,"validateLayoutData");Cht=v(async(e,t,{insertCluster:r,insertEdge:n,insertEdgeLabel:i,insertMarkers:a,insertNode:s,log:o,positionEdgeLabel:l},{algorithm:u})=>{let h={},f={},d=t.select("g");a(d,e.markers,e.type,e.diagramId);let p=d.insert("g").attr("class","subgraphs"),g=d.insert("g").attr("class","edgePaths"),m=d.insert("g").attr("class","edgeLabels"),y=d.insert("g").attr("class","nodes");o.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(e.nodes.map(async T=>{if(T.isGroup){let k={...T};f[T.id]=k,h[T.id]=k,await r(p,T)}else{let k={...T};h[T.id]=k;let w=await s(y,T,{config:e.config,dir:e.direction||"TB"}),C=w.node().getBBox();k.width=C.width,k.height=C.height,k.domId=w,o.debug(`Node ${T.id} dimensions: ${C.width}x${C.height}`)}})),o.debug("Running cose-bilkent layout algorithm");let x={...e,nodes:e.nodes.map(T=>{let k=h[T.id];return{...T,width:k.width,height:k.height}})},b=await eTe(x,e.config);o.debug("Positioning nodes based on layout results"),b.nodes.forEach(T=>{let k=h[T.id];k?.domId&&(k.domId.attr("transform",`translate(${T.x}, ${T.y})`),k.x=T.x,k.y=T.y,o.debug(`Positioned node ${k.id} at center (${T.x}, ${T.y})`))}),b.edges.forEach(T=>{let k=e.edges.find(w=>w.id===T.id);k&&(k.points=[{x:T.startX,y:T.startY},{x:T.midX,y:T.midY},{x:T.endX,y:T.endY}])}),o.debug("Inserting and positioning edges"),await Promise.all(e.edges.map(async T=>{let k=await i(m,T),w=h[T.start??""],C=h[T.end??""];if(w&&C){let S=b.edges.find(E=>E.id===T.id);if(S){o.debug("APA01 positionedEdge",S);let E={...T},L=n(g,E,f,e.type,w,C,e.diagramId);l(E,L)}else{let E={...T,points:[{x:w.x||0,y:w.y||0},{x:C.x||0,y:C.y||0}]},L=n(g,E,f,e.type,w,C,e.diagramId);l(E,L)}}})),o.debug("Cose-bilkent rendering completed")},"render"),kht=Cht});var Sht,lw,PF,Eht,Ol,Fu,ko=X(()=>{ms();ys();pa();Li();Ur();hr();ur();Yt();Sht={common:vt,getConfig:It,insertCluster:wd,insertEdge:Cd,insertEdgeLabel:vu,insertMarkers:t1,insertNode:mu,interpolateToCurve:dE,labelHelper:tr,log:fe,positionEdgeLabel:e1},lw={},PF=v(e=>{for(let t of e)lw[t.name]=t},"registerLayoutLoaders"),Eht=v(()=>{PF([{name:"dagre",loader:v(async()=>await Promise.resolve().then(()=>(Bme(),Pme)),"loader")},{name:"swimlane",loader:v(async()=>await Promise.resolve().then(()=>(k1e(),C1e)),"loader")},{name:"cose-bilkent",loader:v(async()=>await Promise.resolve().then(()=>(nTe(),rTe)),"loader")}])},"registerDefaultLayoutLoaders");Eht();Ol=v(async(e,t)=>{if(!(e.layoutAlgorithm in lw))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let h of e.nodes){let f=h.domId||h.id;h.domId=`${e.diagramId}-${f}`}let r=lw[e.layoutAlgorithm],n=await r.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:s,gradientStart:o,gradientStop:l}=a,u=t.attr("id");if(t.append("defs").append("filter").attr("id",`${u}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${u}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),s){let h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return n.render(e,t,Sht,{algorithm:r.algorithm})},"render"),Fu=v((e="",{fallback:t="dagre"}={})=>{if(e in lw)return e;if(t in lw)return fe.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")});var $F,Lg,_A,kTe,RA,LA,Eo,IA,dv,al=X(()=>{hr();Yt();$F=Ls(y2(),1);zr();Lg=v((e,t)=>{let r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),t.attrs!==void 0)for(let n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),_A=v((e,t)=>{let r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};Lg(e,r).lower()},"drawBackgroundRect"),kTe=v((e,t)=>{let r=t.text.replace(v0," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),RA=v((e,t,r,n)=>{let i=e.append("image");i.attr("x",t),i.attr("y",r);let a=(0,$F.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),LA=v((e,t,r,n)=>{let i=e.append("use");i.attr("x",t),i.attr("y",r);let a=(0,$F.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),Eo=v(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),IA=v(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),dv=v(()=>{let e=ct(".mermaidTooltip");return e.empty()&&(e=ct("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),e},"createTooltip")});var zTe={};cr(zTe,{diagram:()=>Mft});function xp(e,t,r,n,i){let a=t[e];if(!a.width)if(r)a.text=W0(a.text,i,n),a.textLines=a.text.split(vt.lineBreakRegex).length,a.width=i,a.height=R2(a.text,n);else{let s=a.text.split(vt.lineBreakRegex);a.textLines=s.length;let o=0;a.height=0,a.width=0;for(let l of s)a.width=Math.max(gs(l,n),a.width),o=R2(l,n),a.height=a.height+o}return a}async function UF(e,t,r,n,i){let a=i.db,s=new BTe(i);s.data.widthLimit=r.data.widthLimit/Math.min(GF,n.length);for(let[o,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&gr.wrap,f=MA(gr);f.fontSize=f.fontSize+2,f.fontWeight="bold";let d=xp("label",l,h,f,s.data.widthLimit);if(d.Y=u+8,u=d.Y+d.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let y=MA(gr),x=xp("type",l,h,y,s.data.widthLimit);x.Y=u+5,u=x.Y+x.height}if(l.descr&&l.descr.text!==""){let y=MA(gr);y.fontSize=y.fontSize-2;let x=xp("descr",l,h,y,s.data.widthLimit);x.Y=u+20,u=x.Y+x.height}if(o==0||o%GF===0){let y=r.data.startx+gr.diagramMarginX,x=r.data.stopy+gr.diagramMarginY+u;s.setData(y,y,x,x)}else{let y=s.data.stopx!==s.data.startx?s.data.stopx+gr.diagramMarginX:s.data.startx,x=s.data.starty;s.setData(y,y,x,x)}s.name=l.alias;let p=a.getC4ShapeArray(l.alias),g=a.getC4ShapeKeys(l.alias);g.length>0&&await FTe(s,e,p,g),t=l.alias;let m=a.getBoundaries(t);m.length>0&&await UF(e,t,s,m,i),l.alias!=="global"&&$Te(e,l,s),r.data.stopy=Math.max(s.data.stopy+gr.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+gr.c4ShapeMargin,r.data.stopx),dw=Math.max(dw,r.data.stopx),pw=Math.max(pw,r.data.stopy)}}var DA,Rht,RTe,Ig,LTe,vc,vp,Ws,yc,zu,gw,VF,WF,NA,OA,ITe,Lht,Iht,Mht,Dht,Nht,Oht,Pht,Bht,$ht,Fht,zht,Ght,qht,Vht,Wht,Uht,Hht,MTe,Yht,Xht,DTe,jht,Kht,Zht,Qht,bp,Jht,eft,tft,rft,nft,zF,NTe,ift,aft,sft,oft,lft,cft,uft,hft,fft,fw,of,dft,pft,gft,mft,FF,yft,vft,xft,bft,Tft,OTe,wft,STe,Cft,ETe,dw,pw,PTe,GF,gr,BTe,qF,MA,kft,$Te,FTe,Sft,ATe,Eft,Aft,_ft,_Te,Rft,Lft,Ift,Mft,GTe=X(()=>{al();Li();ta();Wi();Vi();Ur();hr();ur();Yt();zr();DA=(function(){var e=v(function(le,oe,he,xe){for(he=he||{},xe=le.length;xe--;he[le[xe]]=oe);return he},"o"),t=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],g=[1,30],m=[1,31],y=[1,32],x=[1,33],b=[1,34],T=[1,35],k=[1,36],w=[1,37],C=[1,38],S=[1,39],E=[1,40],L=[1,41],N=[1,42],O=[1,43],R=[1,44],_=[1,45],D=[1,46],I=[1,47],M=[1,48],B=[1,50],P=[1,51],$=[1,52],G=[1,53],q=[1,54],z=[1,55],V=[1,56],j=[1,57],ee=[1,58],ne=[1,59],Q=[1,60],pe=[14,42],te=[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],de=[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],ce=[1,82],ue=[1,83],Re=[1,84],ve=[1,85],Ge=[12,14,42],He=[12,14,33,42],Ue=[12,14,33,42,76,77,79,80],me=[12,33],De=[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],Ie={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:v(function(oe,he,xe,se,F,H,W){var U=H.length-1;switch(F){case 3:se.setDirection("TB");break;case 4:se.setDirection("BT");break;case 5:se.setDirection("RL");break;case 6:se.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:se.setC4Type(H[U-3]);break;case 19:se.setTitle(H[U].substring(6)),this.$=H[U].substring(6);break;case 20:se.setAccDescription(H[U].substring(15)),this.$=H[U].substring(15);break;case 21:this.$=H[U].trim(),se.setTitle(this.$);break;case 22:case 23:this.$=H[U].trim(),se.setAccDescription(this.$);break;case 28:H[U].splice(2,0,"ENTERPRISE"),se.addPersonOrSystemBoundary(...H[U]),this.$=H[U];break;case 29:H[U].splice(2,0,"SYSTEM"),se.addPersonOrSystemBoundary(...H[U]),this.$=H[U];break;case 30:se.addPersonOrSystemBoundary(...H[U]),this.$=H[U];break;case 31:H[U].splice(2,0,"CONTAINER"),se.addContainerBoundary(...H[U]),this.$=H[U];break;case 32:se.addDeploymentNode("node",...H[U]),this.$=H[U];break;case 33:se.addDeploymentNode("nodeL",...H[U]),this.$=H[U];break;case 34:se.addDeploymentNode("nodeR",...H[U]),this.$=H[U];break;case 35:se.popBoundaryParseStack();break;case 39:se.addPersonOrSystem("person",...H[U]),this.$=H[U];break;case 40:se.addPersonOrSystem("external_person",...H[U]),this.$=H[U];break;case 41:se.addPersonOrSystem("system",...H[U]),this.$=H[U];break;case 42:se.addPersonOrSystem("system_db",...H[U]),this.$=H[U];break;case 43:se.addPersonOrSystem("system_queue",...H[U]),this.$=H[U];break;case 44:se.addPersonOrSystem("external_system",...H[U]),this.$=H[U];break;case 45:se.addPersonOrSystem("external_system_db",...H[U]),this.$=H[U];break;case 46:se.addPersonOrSystem("external_system_queue",...H[U]),this.$=H[U];break;case 47:se.addContainer("container",...H[U]),this.$=H[U];break;case 48:se.addContainer("container_db",...H[U]),this.$=H[U];break;case 49:se.addContainer("container_queue",...H[U]),this.$=H[U];break;case 50:se.addContainer("external_container",...H[U]),this.$=H[U];break;case 51:se.addContainer("external_container_db",...H[U]),this.$=H[U];break;case 52:se.addContainer("external_container_queue",...H[U]),this.$=H[U];break;case 53:se.addComponent("component",...H[U]),this.$=H[U];break;case 54:se.addComponent("component_db",...H[U]),this.$=H[U];break;case 55:se.addComponent("component_queue",...H[U]),this.$=H[U];break;case 56:se.addComponent("external_component",...H[U]),this.$=H[U];break;case 57:se.addComponent("external_component_db",...H[U]),this.$=H[U];break;case 58:se.addComponent("external_component_queue",...H[U]),this.$=H[U];break;case 60:se.addRel("rel",...H[U]),this.$=H[U];break;case 61:se.addRel("birel",...H[U]),this.$=H[U];break;case 62:se.addRel("rel_u",...H[U]),this.$=H[U];break;case 63:se.addRel("rel_d",...H[U]),this.$=H[U];break;case 64:se.addRel("rel_l",...H[U]),this.$=H[U];break;case 65:se.addRel("rel_r",...H[U]),this.$=H[U];break;case 66:se.addRel("rel_b",...H[U]),this.$=H[U];break;case 67:H[U].splice(0,1),se.addRel("rel",...H[U]),this.$=H[U];break;case 68:se.updateElStyle("update_el_style",...H[U]),this.$=H[U];break;case 69:se.updateRelStyle("update_rel_style",...H[U]),this.$=H[U];break;case 70:se.updateLayoutConfig("update_layout_config",...H[U]),this.$=H[U];break;case 71:this.$=[H[U]];break;case 72:H[U].unshift(H[U-1]),this.$=H[U];break;case 73:case 75:this.$=H[U].trim();break;case 74:let ae={};ae[H[U-1].trim()]=H[U].trim(),this.$=ae;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q},{13:70,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q},{13:71,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q},{13:72,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q},{13:73,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q},{14:[1,74]},e(pe,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q}),e(pe,[2,14]),e(te,[2,16],{12:[1,76]}),e(pe,[2,36],{12:[1,77]}),e(de,[2,19]),e(de,[2,20]),{25:[1,78]},{27:[1,79]},e(de,[2,23]),{35:80,75:81,76:ce,77:ue,79:Re,80:ve},{35:86,75:81,76:ce,77:ue,79:Re,80:ve},{35:87,75:81,76:ce,77:ue,79:Re,80:ve},{35:88,75:81,76:ce,77:ue,79:Re,80:ve},{35:89,75:81,76:ce,77:ue,79:Re,80:ve},{35:90,75:81,76:ce,77:ue,79:Re,80:ve},{35:91,75:81,76:ce,77:ue,79:Re,80:ve},{35:92,75:81,76:ce,77:ue,79:Re,80:ve},{35:93,75:81,76:ce,77:ue,79:Re,80:ve},{35:94,75:81,76:ce,77:ue,79:Re,80:ve},{35:95,75:81,76:ce,77:ue,79:Re,80:ve},{35:96,75:81,76:ce,77:ue,79:Re,80:ve},{35:97,75:81,76:ce,77:ue,79:Re,80:ve},{35:98,75:81,76:ce,77:ue,79:Re,80:ve},{35:99,75:81,76:ce,77:ue,79:Re,80:ve},{35:100,75:81,76:ce,77:ue,79:Re,80:ve},{35:101,75:81,76:ce,77:ue,79:Re,80:ve},{35:102,75:81,76:ce,77:ue,79:Re,80:ve},{35:103,75:81,76:ce,77:ue,79:Re,80:ve},{35:104,75:81,76:ce,77:ue,79:Re,80:ve},e(Ge,[2,59]),{35:105,75:81,76:ce,77:ue,79:Re,80:ve},{35:106,75:81,76:ce,77:ue,79:Re,80:ve},{35:107,75:81,76:ce,77:ue,79:Re,80:ve},{35:108,75:81,76:ce,77:ue,79:Re,80:ve},{35:109,75:81,76:ce,77:ue,79:Re,80:ve},{35:110,75:81,76:ce,77:ue,79:Re,80:ve},{35:111,75:81,76:ce,77:ue,79:Re,80:ve},{35:112,75:81,76:ce,77:ue,79:Re,80:ve},{35:113,75:81,76:ce,77:ue,79:Re,80:ve},{35:114,75:81,76:ce,77:ue,79:Re,80:ve},{35:115,75:81,76:ce,77:ue,79:Re,80:ve},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:ce,77:ue,79:Re,80:ve},{35:120,75:81,76:ce,77:ue,79:Re,80:ve},{35:121,75:81,76:ce,77:ue,79:Re,80:ve},{35:122,75:81,76:ce,77:ue,79:Re,80:ve},{35:123,75:81,76:ce,77:ue,79:Re,80:ve},{35:124,75:81,76:ce,77:ue,79:Re,80:ve},{35:125,75:81,76:ce,77:ue,79:Re,80:ve},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(pe,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:r,24:n,26:i,28:a}),e(pe,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:n,26:i,28:a,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:y,48:x,49:b,50:T,51:k,52:w,53:C,54:S,55:E,56:L,57:N,58:O,59:R,60:_,61:D,62:I,63:M,64:B,65:P,66:$,67:G,68:q,69:z,70:V,71:j,72:ee,73:ne,74:Q}),e(de,[2,21]),e(de,[2,22]),e(Ge,[2,39]),e(He,[2,71],{75:81,35:132,76:ce,77:ue,79:Re,80:ve}),e(Ue,[2,73]),{78:[1,133]},e(Ue,[2,75]),e(Ue,[2,76]),e(Ge,[2,40]),e(Ge,[2,41]),e(Ge,[2,42]),e(Ge,[2,43]),e(Ge,[2,44]),e(Ge,[2,45]),e(Ge,[2,46]),e(Ge,[2,47]),e(Ge,[2,48]),e(Ge,[2,49]),e(Ge,[2,50]),e(Ge,[2,51]),e(Ge,[2,52]),e(Ge,[2,53]),e(Ge,[2,54]),e(Ge,[2,55]),e(Ge,[2,56]),e(Ge,[2,57]),e(Ge,[2,58]),e(Ge,[2,60]),e(Ge,[2,61]),e(Ge,[2,62]),e(Ge,[2,63]),e(Ge,[2,64]),e(Ge,[2,65]),e(Ge,[2,66]),e(Ge,[2,67]),e(Ge,[2,68]),e(Ge,[2,69]),e(Ge,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(me,[2,28]),e(me,[2,29]),e(me,[2,30]),e(me,[2,31]),e(me,[2,32]),e(me,[2,33]),e(me,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(pe,[2,38]),e(He,[2,72]),e(Ue,[2,74]),e(Ge,[2,24]),e(Ge,[2,35]),e(De,[2,25]),e(De,[2,26],{12:[1,138]}),e(De,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:v(function(oe,he){if(he.recoverable)this.trace(oe);else{var xe=new Error(oe);throw xe.hash=he,xe}},"parseError"),parse:v(function(oe){var he=this,xe=[0],se=[],F=[null],H=[],W=this.table,U="",ae=0,K=0,Y=0,Z=2,Ce=1,we=H.slice.call(arguments,1),ke=Object.create(this.lexer),Se={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(Se.yy[Ne]=this.yy[Ne]);ke.setInput(oe,Se.yy),Se.yy.lexer=ke,Se.yy.parser=this,typeof ke.yylloc>"u"&&(ke.yylloc={});var Ae=ke.yylloc;H.push(Ae);var Fe=ke.options&&ke.options.ranges;typeof Se.yy.parseError=="function"?this.parseError=Se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pe(Qe){xe.length=xe.length-2*Qe,F.length=F.length-Qe,H.length=H.length-Qe}v(Pe,"popStack");function We(){var Qe;return Qe=se.pop()||ke.lex()||Ce,typeof Qe!="number"&&(Qe instanceof Array&&(se=Qe,Qe=se.pop()),Qe=he.symbols_[Qe]||Qe),Qe}v(We,"lex");for(var be,lt,$e,at,bt,Et,pt={},Ct,ht,Te,ot;;){if($e=xe[xe.length-1],this.defaultActions[$e]?at=this.defaultActions[$e]:((be===null||typeof be>"u")&&(be=We()),at=W[$e]&&W[$e][be]),typeof at>"u"||!at.length||!at[0]){var gt="";ot=[];for(Ct in W[$e])this.terminals_[Ct]&&Ct>Z&&ot.push("'"+this.terminals_[Ct]+"'");ke.showPosition?gt="Parse error on line "+(ae+1)+`: +`+ke.showPosition()+` +Expecting `+ot.join(", ")+", got '"+(this.terminals_[be]||be)+"'":gt="Parse error on line "+(ae+1)+": Unexpected "+(be==Ce?"end of input":"'"+(this.terminals_[be]||be)+"'"),this.parseError(gt,{text:ke.match,token:this.terminals_[be]||be,line:ke.yylineno,loc:Ae,expected:ot})}if(at[0]instanceof Array&&at.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$e+", token: "+be);switch(at[0]){case 1:xe.push(be),F.push(ke.yytext),H.push(ke.yylloc),xe.push(at[1]),be=null,lt?(be=lt,lt=null):(K=ke.yyleng,U=ke.yytext,ae=ke.yylineno,Ae=ke.yylloc,Y>0&&Y--);break;case 2:if(ht=this.productions_[at[1]][1],pt.$=F[F.length-ht],pt._$={first_line:H[H.length-(ht||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(ht||1)].first_column,last_column:H[H.length-1].last_column},Fe&&(pt._$.range=[H[H.length-(ht||1)].range[0],H[H.length-1].range[1]]),Et=this.performAction.apply(pt,[U,K,ae,Se.yy,at[1],F,H].concat(we)),typeof Et<"u")return Et;ht&&(xe=xe.slice(0,-1*ht*2),F=F.slice(0,-1*ht),H=H.slice(0,-1*ht)),xe.push(this.productions_[at[1]][0]),F.push(pt.$),H.push(pt._$),Te=W[xe[xe.length-2]][xe[xe.length-1]],xe.push(Te);break;case 3:return!0}}return!0},"parse")},Me=(function(){var le={EOF:1,parseError:v(function(he,xe){if(this.yy.parser)this.yy.parser.parseError(he,xe);else throw new Error(he)},"parseError"),setInput:v(function(oe,he){return this.yy=he||this.yy||{},this._input=oe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var oe=this._input[0];this.yytext+=oe,this.yyleng++,this.offset++,this.match+=oe,this.matched+=oe;var he=oe.match(/(?:\r\n?|\n).*/g);return he?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),oe},"input"),unput:v(function(oe){var he=oe.length,xe=oe.split(/(?:\r\n?|\n)/g);this._input=oe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-he),this.offset-=he;var se=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),xe.length-1&&(this.yylineno-=xe.length-1);var F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:xe?(xe.length===se.length?this.yylloc.first_column:0)+se[se.length-xe.length].length-xe[0].length:this.yylloc.first_column-he},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-he]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(oe){this.unput(this.match.slice(oe))},"less"),pastInput:v(function(){var oe=this.matched.substr(0,this.matched.length-this.match.length);return(oe.length>20?"...":"")+oe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var oe=this.match;return oe.length<20&&(oe+=this._input.substr(0,20-oe.length)),(oe.substr(0,20)+(oe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var oe=this.pastInput(),he=new Array(oe.length+1).join("-");return oe+this.upcomingInput()+` +`+he+"^"},"showPosition"),test_match:v(function(oe,he){var xe,se,F;if(this.options.backtrack_lexer&&(F={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(F.yylloc.range=this.yylloc.range.slice(0))),se=oe[0].match(/(?:\r\n?|\n).*/g),se&&(this.yylineno+=se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:se?se[se.length-1].length-se[se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+oe[0].length},this.yytext+=oe[0],this.match+=oe[0],this.matches=oe,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(oe[0].length),this.matched+=oe[0],xe=this.performAction.call(this,this.yy,this,he,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xe)return xe;if(this._backtrack){for(var H in F)this[H]=F[H];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var oe,he,xe,se;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),H=0;Hhe[0].length)){if(he=xe,se=H,this.options.backtrack_lexer){if(oe=this.test_match(xe,F[H]),oe!==!1)return oe;if(this._backtrack){he=!1;continue}else return!1}else if(!this.options.flex)break}return he?(oe=this.test_match(he,F[se]),oe!==!1?oe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var he=this.next();return he||this.lex()},"lex"),begin:v(function(he){this.conditionStack.push(he)},"begin"),popState:v(function(){var he=this.conditionStack.length-1;return he>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(he){return he=this.conditionStack.length-1-Math.abs(he||0),he>=0?this.conditionStack[he]:"INITIAL"},"topState"),pushState:v(function(he){this.begin(he)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(he,xe,se,F){var H=F;switch(se){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),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]+)/,/^(?:$)/],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:[65,66,67,68],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}}};return le})();Ie.lexer=Me;function re(){this.yy={}}return v(re,"Parser"),re.prototype=Ie,Ie.Parser=re,new re})();DA.parser=DA;Rht=DA,RTe=v(e=>ze()[e],"getRequiredConfig"),Ig=v((e,t)=>{for(let[r,n]of Object.entries(t))if(n!==void 0)if(typeof n=="object"){let[i,a]=Object.entries(n)[0];e[i]=a}else e[r]=n},"assignAttributes"),LTe=v(()=>({alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}),"createGlobalBoundary"),vc=[],vp=[""],Ws="global",yc="",zu=[LTe()],gw=[],VF="",WF=!1,NA=4,OA=2,Lht=v(function(){return ITe},"getC4Type"),Iht=v(function(e){ITe=Cr(e,ze())},"setC4Type"),Mht=v(function(e,t,r,n,i,a,s,o,l){if(e==null||t===void 0||t===null||r===void 0||r===null||n===void 0||n===null)return;let u={},h=gw.find(f=>f.from===t&&f.to===r);if(h?u=h:gw.push(u),u.type=e,u.from=t,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.techn={text:i};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.descr={text:a};Ig(u,{sprite:s,tags:o,link:l}),u.wrap=bp()},"addRel"),Dht=v(function(e,t,r,n,i,a,s){if(t===null||r===null)return;let o={},l=vc.find(u=>u.alias===t);if(l&&t===l.alias?o=l:(o.alias=t,vc.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};Ig(o,{sprite:i,tags:a,link:s}),o.typeC4Shape={text:e},o.parentBoundary=Ws,o.wrap=bp()},"addPersonOrSystem"),Nht=v(function(e,t,r,n,i,a,s,o){if(t===null||r===null)return;let l={},u=vc.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,vc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};Ig(l,{sprite:a,tags:s,link:o}),l.wrap=bp(),l.typeC4Shape={text:e},l.parentBoundary=Ws},"addContainer"),Oht=v(function(e,t,r,n,i,a,s,o){if(t===null||r===null)return;let l={},u=vc.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,vc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};Ig(l,{sprite:a,tags:s,link:o}),l.wrap=bp(),l.typeC4Shape={text:e},l.parentBoundary=Ws},"addComponent"),Pht=v(function(e,t,r,n,i){if(e===null||t===null)return;let a={},s=zu.find(o=>o.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,zu.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};Ig(a,{tags:n,link:i}),a.parentBoundary=Ws,a.wrap=bp(),yc=Ws,Ws=e,vp.push(yc)},"addPersonOrSystemBoundary"),Bht=v(function(e,t,r,n,i){if(e===null||t===null)return;let a={},s=zu.find(o=>o.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,zu.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};Ig(a,{tags:n,link:i}),a.parentBoundary=Ws,a.wrap=bp(),yc=Ws,Ws=e,vp.push(yc)},"addContainerBoundary"),$ht=v(function(e,t,r,n,i,a,s,o){if(t===null||r===null)return;let l={},u=zu.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,zu.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};Ig(l,{tags:s,link:o}),l.nodeType=e,l.parentBoundary=Ws,l.wrap=bp(),yc=Ws,Ws=t,vp.push(yc)},"addDeploymentNode"),Fht=v(function(){Ws=yc,vp.pop(),yc=vp.pop(),vp.push(yc)},"popBoundaryParseStack"),zht=v(function(e,t,r,n,i,a,s,o,l,u,h){let f=vc.find(d=>d.alias===t);if(!(f===void 0&&(f=zu.find(d=>d.alias===t),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.borderColor=i;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),Ght=v(function(e,t,r,n,i,a,s){let o=gw.find(l=>l.from===t&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),qht=v(function(e,t,r){let n=NA,i=OA;if(typeof t=="object"){let a=Object.values(t)[0];n=parseInt(a)}else n=parseInt(t);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(NA=n),i>=1&&(OA=i)},"updateLayoutConfig"),Vht=v(function(){return NA},"getC4ShapeInRow"),Wht=v(function(){return OA},"getC4BoundaryInRow"),Uht=v(function(){return Ws},"getCurrentBoundaryParse"),Hht=v(function(){return yc},"getParentBoundaryParse"),MTe=v(function(e){return e==null?vc:vc.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),Yht=v(function(e){return vc.find(t=>t.alias===e)},"getC4Shape"),Xht=v(function(e){return Object.keys(MTe(e))},"getC4ShapeKeys"),DTe=v(function(e){return e==null?zu:zu.filter(t=>t.parentBoundary===e)},"getBoundaries"),jht=DTe,Kht=v(function(){return gw},"getRels"),Zht=v(function(){return VF},"getTitle"),Qht=v(function(e){WF=e},"setWrap"),bp=v(function(){return WF},"autoWrap"),Jht=v(function(){vc=[],zu=[LTe()],yc="",Ws="global",vp=[""],gw=[],vp=[""],VF="",WF=!1,NA=4,OA=2},"clear"),eft={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},tft={FILLED:0,OPEN:1},rft={LEFTOF:0,RIGHTOF:1,OVER:2},nft=v(function(e){VF=Cr(e,ze())},"setTitle"),zF={addPersonOrSystem:Dht,addPersonOrSystemBoundary:Pht,addContainer:Nht,addContainerBoundary:Bht,addComponent:Oht,addDeploymentNode:$ht,popBoundaryParseStack:Fht,addRel:Mht,updateElStyle:zht,updateRelStyle:Ght,updateLayoutConfig:qht,autoWrap:bp,setWrap:Qht,getC4ShapeArray:MTe,getC4Shape:Yht,getC4ShapeKeys:Xht,getBoundaries:DTe,getBoundarys:jht,getCurrentBoundaryParse:Uht,getParentBoundaryParse:Hht,getRels:Kht,getTitle:Zht,getC4Type:Lht,getC4ShapeInRow:Vht,getC4BoundaryInRow:Wht,setAccTitle:Ar,getAccTitle:Lr,getAccDescription:Mr,setAccDescription:Ir,getConfig:v(()=>RTe("c4"),"getConfig"),clear:Jht,LINETYPE:eft,ARROWTYPE:tft,PLACEMENT:rft,setTitle:nft,setC4Type:Iht},NTe=v(function(e,t){return Lg(e,t)},"drawRect"),ift=v((e,t,r,n)=>{let i=e.append("g"),a=0;for(let s of t){let o=s.textColor?s.textColor:"#444444",l=s.lineColor?s.lineColor:"#444444",u=s.offsetX?parseInt(String(s.offsetX)):0,h=s.offsetY?parseInt(String(s.offsetY)):0,f="";if(a===0){let g=i.append("line");g.attr("x1",s.startPoint.x),g.attr("y1",s.startPoint.y),g.attr("x2",s.endPoint.x),g.attr("y2",s.endPoint.y),g.attr("stroke-width","1"),g.attr("stroke",l),g.style("fill","none"),s.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)"),a=-1}else{let g=i.append("path");g.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)")}let d=s.label.width,p=r.messageFont();fw(r)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+h,d,s.label.height,{fill:o},p),s.techn&&s.techn.text!==""&&(p=r.messageFont(),fw(r)("["+s.techn.text+"]",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+h,Math.max(d,s.techn.width),s.techn.height,{fill:o,"font-style":"italic"},p))}},"drawRels"),aft=v(function(e,t,r){let n=e.append("g"),i=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",s=t.fontColor?t.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(o={"stroke-width":1});let l={x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:o};NTe(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,fw(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,fw(r)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,fw(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),sft=v(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),oft=v(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),lft=v(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),cft=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),uft=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),hft=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),fft=v(function(e,t){let n=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.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"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),fw=(function(){function e(i,a,s,o,l,u,h){let f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,h)}v(e,"byText");function t(i,a,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:g}=f,m=i.split(vt.lineBreakRegex);for(let y=0;y{if(t==="sandbox"){let n=ct("#i"+e).node()?.contentDocument;if(!n)throw new Error(`Sandbox iframe #i${e} is missing its content document`);return{root:ct(n.body),doc:n}}return{root:ct("body"),doc:document}},"getDiagramRoot"),pft=new Set(["system_queue","external_system_queue","container_queue","external_container_queue","component_queue","external_component_queue"]),gft=new Set(["system_db","external_system_db","container_db","external_container_db","component_db","external_component_db"]),mft={person:"person",box:"rounded",rounded:"rounded",cylinder:"cylinder",database:"cylinder",db:"cylinder",queue:"h-cyl",pipe:"h-cyl",component:"fr-rect"},FF=v(e=>e?mft[e.toLowerCase()]:void 0,"keywordShape"),yft=v(e=>{let t=FF(e.shape)??FF(e.sprite);if(t)return t;if(e.tags)for(let n of e.tags.split(",")){let i=FF(n.trim());if(i)return i}let r=e.typeC4Shape.text;return r==="person"||r==="external_person"?"person":gft.has(r)?"cylinder":pft.has(r)?"h-cyl":"rounded"},"resolveNodeShape"),vft={person:"Person",system:"Software System",container:"Container",component:"Component"},xft=v(e=>{let t=e.replace(/^external_/,"").replace(/_(db|queue)$/,"");return vft[t]??t.replace(/_/g," ")},"stereotypeLabel"),bft=v(e=>e.startsWith("external_"),"isExternal"),Tft=v(e=>{let t=xft(e.typeC4Shape.text);return e.techn?.text?`[${t}: ${e.techn.text}]`:`[${t}]`},"stereotypeText"),OTe=["person","system","system_db","system_queue","container","container_db","container_queue","component","component_db","component_queue"].flatMap(e=>[e,`external_${e}`]),wft=new Set(OTe),STe=v(e=>wft.has(e),"isC4ElementType"),Cft=v((e,t)=>{let r=e.typeC4Shape.text,n=e.bgColor??(STe(r)&&t[`${r}_bg_color`]),i=e.borderColor??(STe(r)&&t[`${r}_border_color`]),a=[];return n&&a.push(`fill:${n}`),i&&a.push(`stroke:${i}`),a.push(`color:${e.fontColor??"#FFFFFF"}`),a},"elementCssStyles"),ETe=v((e,t,r,n,i)=>{let a=e.typeC4Shape.text,s=["c4-shape",`c4-${a}`];bft(a)&&s.push("c4-external");let o=yft(e),l=Cft(e,t);return(o==="rounded"||o==="fr-rect")&&l.push("rx:12px","ry:12px"),{id:e.alias,label:e.label.text,stereotype:Tft(e),description:e.descr?.text?[e.descr.text]:void 0,labelType:"string",isGroup:!1,shape:o,cssClasses:s.join(" "),cssStyles:l,padding:r,look:n,useHtmlLabels:!1,width:i}},"buildC4Node"),dw=0,pw=0,PTe=4,GF=2;DA.yy=zF;gr={},BTe=class{static{v(this,"Bounds")}constructor(e){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,qF(e.db.getConfig())}setData(e,t,r,n){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.stopx,r=this.data.widthLimit,n=this.nextData.startx===this.nextData.stopx?t+e.margin:t+e.margin*2,i=n+e.width,a=this.nextData.starty+e.margin*2,s=a+e.height;(n>=r||i>=r||this.nextData.cnt>PTe)&&(n=this.nextData.startx+e.margin+gr.nextLinePaddingX,a=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=n+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=a+e.height,this.nextData.cnt=1),e.x=n,e.y=a,this.updateVal(this.data,"startx",n,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",n,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",s,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},qF(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},qF=v(function(e){ui(gr,e),e?.fontFamily&&(gr.personFontFamily=gr.systemFontFamily=gr.messageFontFamily=e.fontFamily),e?.fontSize&&(gr.personFontSize=gr.systemFontSize=gr.messageFontSize=e.fontSize),e?.fontWeight&&(gr.personFontWeight=gr.systemFontWeight=gr.messageFontWeight=e.fontWeight)},"setConf"),MA=v(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),kft=v(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");v(xp,"calcC4ShapeTextWH");$Te=v(function(e,t,r){let n=r.data.startx,i=r.data.starty;t.x=n,t.y=i,t.width=r.data.stopx-n,t.height=r.data.stopy-i,t.label.y=gr.c4ShapeMargin-35;let a=t.wrap&&gr.wrap,s=MA(gr);s.fontSize=s.fontSize+2,s.fontWeight="bold";let o=gs(t.label.text,s);xp("label",t,a,s,o),of.drawBoundary(e,t,gr)},"drawBoundary"),FTe=v(async function(e,t,r,n){let i=ze(),a=i.look??"classic",s={config:i},o=t.attr("id")??"",l=n.map(h=>r[Number(h)]),u=v(h=>{let f=h.shape?G2[h.shape]:void 0;if(!f)throw new Error(`C4: no shape handler for "${h.shape}"`);return f},"shapeHandlerFor");await Promise.all(l.map(async h=>{let f=ETe(h,gr,gr.c4ShapePadding,a,gr.width);f.domId=`${o}-${f.id}`;let d=await u(f)(t,f,s);h.width=f.width??gr.width,h.height=f.height??gr.height,h.margin=gr.c4ShapeMargin,d.remove()}));for(let h of l)e.insert(h);await Promise.all(l.map(async h=>{let f=ETe(h,gr,gr.c4ShapePadding,a,gr.width);f.domId=`${o}-${f.id}`,f.x=h.x+h.width/2,f.y=h.y+h.height/2;let d=t.append("g").attr("transform",`translate(${h.x+h.width/2}, ${h.y+h.height/2})`);await u(f)(d,f,s),h.intersect=f.intersect})),e.bumpLastMargin(gr.c4ShapeMargin)},"drawC4ShapeArray"),Sft=class{static{v(this,"Point")}constructor(e,t){this.x=e,this.y=t}},ATe=v(function(e,t){if(!e.intersect)throw new Error(`C4 shape "${e.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);let{x:r,y:n}=e.intersect(t);return new Sft(r,n)},"getIntersectPoint"),Eft=v(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=ATe(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=ATe(t,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),Aft=v(function(e,t,r,n,i){let a=n.db.getC4Type(),s=0;for(let o of t){s=s+1;let l=o.wrap&&gr.wrap,u=kft(gr);a==="C4Dynamic"&&(o.label.text=s+": "+o.label.text);let h=gs(o.label.text,u);xp("label",o,l,u,h),o.techn&&o.techn.text!==""&&(h=gs(o.techn.text,u),xp("techn",o,l,u,h)),o.descr&&o.descr.text!==""&&(h=gs(o.descr.text,u),xp("descr",o,l,u,h));let f=r(o.from),d=r(o.to);if(!f||!d)throw new Error(`C4 rel "${o.from}" -> "${o.to}" references an unknown shape`);let p=Eft(f,d);if(!p.startPoint||!p.endPoint)throw new Error(`Could not calculate intersection points for rel "${o.from}" -> "${o.to}"`);o.startPoint=p.startPoint,o.endPoint=p.endPoint}of.drawRels(e,t,gr,i)},"drawRels");v(UF,"drawInsideBoundary");_ft=v(async function(e,t,r,n){gr=RTe("c4");let i=ze().securityLevel,{root:a}=dft(t,i),s=n.db;s.setWrap(gr.wrap),PTe=s.getC4ShapeInRow(),GF=s.getC4BoundaryInRow(),fe.debug(`C:${JSON.stringify(gr,null,2)}`);let o=a.select(`[id="${t}"]`);of.insertComputerIcon(o,t),of.insertDatabaseIcon(o,t),of.insertClockIcon(o,t);let l=new BTe(n);l.setData(gr.diagramMarginX,gr.diagramMarginX,gr.diagramMarginY,gr.diagramMarginY),l.data.widthLimit=screen.availWidth,dw=gr.diagramMarginX,pw=gr.diagramMarginY;let u=s.getTitle(),h=s.getBoundaries("");await UF(o,"",l,h,n),of.insertArrowHead(o,t),of.insertArrowEnd(o,t),of.insertArrowCrossHead(o,t),of.insertArrowFilledHead(o,t),Aft(o,s.getRels(),s.getC4Shape,n,t),l.data.stopx=dw,l.data.stopy=pw;let f=l.data,d=f.startx,p=f.starty,m=pw-p+2*gr.diagramMarginY,y=dw-d,x=y+2*gr.diagramMarginX;u&&o.append("text").text(u).attr("x",y/2-4*gr.diagramMarginX).attr("y",p+gr.diagramMarginY),Vr(o,m,x,gr.useMaxWidth);let b=u?60:0;o.attr("viewBox",d-gr.diagramMarginX+" -"+(gr.diagramMarginY+b)+" "+x+" "+(m+b)),fe.debug("models:",f)},"draw"),_Te={drawPersonOrSystemArray:FTe,drawBoundary:$Te,setConf:qF,draw:_ft},Rft=v(()=>{let e=ze().c4??{},t=new CSSStyleSheet;for(let r of OTe){let n=t.cssRules[t.insertRule(`.c4-shape.c4-${r} .label {}`,t.cssRules.length)],i=e[`${r}FontFamily`],a=e[`${r}FontSize`],s=e[`${r}FontWeight`];i&&n.style.setProperty("font-family",i),a&&n.style.setProperty("font-size",typeof a=="number"?`${a}px`:a),s&&n.style.setProperty("font-weight",String(s))}return[...t.cssRules].filter(r=>r.style.length>0).map(r=>` ${r.cssText}`).join(` +`)},"elementFontStyles"),Lft=v(e=>`.person { stroke: ${e.personBorder}; fill: ${e.personBkg}; } -`,"getStyles"),zat=$at,Gat={parser:Xnt,db:vP,renderer:z1e,styles:zat,init:b(({c4:e,wrap:t})=>{z1e.setConf(e),vP.setWrap(t)},"init")}});var nu,Ld=q(()=>{er();nu=b(()=>` +${Rft()} + + /* The element font colour is set inline per element (default white); the + label text takes it via currentColor. */ + .c4-shape .label, + .c4-shape .label text { + color: inherit; + fill: currentColor; + } + /* Structurizr typography: bold name, smaller stereotype/type and description lines. */ + .c4-shape .label .c4-name { + font-weight: bold; + } + .c4-shape .label .c4-type { + font-size: 0.75em; + } + .c4-shape .label .c4-descr { + font-size: 0.82em; + } + .c4-shape .basic, + .c4-shape rect, + .c4-shape path, + .c4-shape circle, + .c4-shape ellipse, + .c4-shape line { + stroke-width: 2px; + } +`,"getStyles"),Ift=Lft,Mft={parser:Rht,db:zF,renderer:_Te,styles:Ift,init:v(({c4:e,wrap:t})=>{_Te.setConf(e),zF.setWrap(t)},"init")}});var Gu,qu=X(()=>{Yt();Gu=v(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; @@ -895,21 +928,21 @@ Expecting `+ot.join(", ")+", got '"+(this.terminals_[ue]||ue)+"'":ct="Parse erro stroke: revert; stroke-width: revert; } -`,"getIconStyles")});var rl,Fl=q(()=>{er();Ar();rl=b((e,t)=>{let r;return t==="sandbox"&&(r=Qe("#i"+e)),(t==="sandbox"?Qe(r.nodes()[0].contentDocument.body):Qe("body")).select(`[id="${e}"]`)},"getDiagramElement")});var Gs,qat,Vat,il=q(()=>{Er();er();Gs=b((e,t,r,i)=>{e.attr("class",r);let{width:n,height:a,x:s,y:o}=qat(e,t);Mr(e,a,n,i);let l=Vat(s,o,n,a,t);e.attr("viewBox",l),ee.debug(`viewBox configured: ${l} with padding: ${t}`)},"setupViewPortForSVG"),qat=b((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),Vat=b((e,t,r,i,n)=>`${e-n} ${t-n} ${r} ${i}`,"createViewBox")});var cE={};Lr(cE,{diagram:()=>Jat});var Wat,Uat,Hat,Yat,jat,SP,Q1e,J1e,Xat,Kat,Zat,Qat,Jat,uE=q(()=>{Ld();Z2();Ed();Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();Ar();Hv();Sn();Wat="flowchart-",Uat=class{constructor(){this.vertexCounter=0,this.config=we(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=yr,this.setAccDescription=br,this.setDiagramTitle=kr,this.getAccTitle=vr,this.getAccDescription=xr,this.getDiagramTitle=Tr,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={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return ht.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,r,i,n,a,s={},o){if(!e||e.trim().length===0)return;let l;if(o!==void 0){let d;o.includes(` -`)?d=o+` -`:d=`{ +`,"getIconStyles")});var $l,sl=X(()=>{Yt();zr();$l=v((e,t)=>{let r;return t==="sandbox"&&(r=ct("#i"+e)),(t==="sandbox"?ct(r.nodes()[0].contentDocument.body):ct("body")).select(`[id="${e}"]`)},"getDiagramElement")});var Ao,Dft,Nft,_o=X(()=>{hr();ur();Yt();Ao=v((e,t,r,n)=>{e.attr("class",r);let{width:i,height:a,x:s,y:o}=Dft(e,t);Vr(e,a,i,n);let l=Nft(s,o,i,a,t);e.attr("viewBox",l),fe.debug(`viewBox configured: ${l} with padding: ${t}`)},"setupViewPortForSVG"),Dft=v((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),Nft=v((e,t,r,n,i)=>`${e-i} ${t-i} ${r} ${n}`,"createViewBox")});var Oft,Pft,Bft,$ft,Fft,HF,qTe,VTe,zft,Gft,qft,YF,mw,WTe,XF=X(()=>{qu();sl();_o();cg();ko();al();Li();Ur();hr();ur();Yt();zr();gy();Qi();Oft="flowchart-",Pft=class{constructor(){this.vertexCounter=0,this.config=ze(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Ar,this.setAccDescription=Ir,this.setDiagramTitle=$r,this.getAccTitle=Lr,this.getAccDescription=Mr,this.getDiagramTitle=Dr,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={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{v(this,"FlowDB")}sanitizeText(e){return vt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,r,n,i,a,s={},o){if(!e||e.trim().length===0)return;let l;if(o!==void 0){let p;o.includes(` +`)?p=o+` +`:p=`{ `+o+` -}`,l=If(d,{schema:Rf})}let u=this.edges.find(d=>d.id===e);if(u){let d=l;d?.animate!==void 0&&(u.animate=d.animate),d?.animation!==void 0&&(u.animation=d.animation),d?.curve!==void 0&&(u.interpolate=d.curve);return}let h,f=this.vertices.get(e);if(f===void 0&&(t===void 0&&r===void 0&&i!==void 0&&i!==null&&ee.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),f={id:e,labelType:"text",domId:Wat+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,f)),this.vertexCounter++,t!==void 0?(this.config=we(),h=this.sanitizeText(t.text.trim()),f.labelType=t.type,h.startsWith('"')&&h.endsWith('"')&&(h=h.substring(1,h.length-1)),f.text=h):f.text===void 0&&(f.text=e),r!==void 0&&(f.type=r),i?.forEach(d=>{f.styles.push(d)}),n?.forEach(d=>{f.classes.push(d)}),a!==void 0&&(f.dir=a),f.props===void 0?f.props=s:s!==void 0&&Object.assign(f.props,s),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes("_"))throw new Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!f9(l.shape))throw new Error(`No such shape: ${l.shape}.`);f.type=l?.shape}l?.label&&(f.text=l?.label,f.labelType=this.sanitizeNodeLabelType(l?.labelType)),l?.icon&&(f.icon=l?.icon,!l.label?.trim()&&f.text===e&&(f.text="")),l?.form&&(f.form=l?.form),l?.pos&&(f.pos=l?.pos),l?.img&&(f.img=l?.img,!l.label?.trim()&&f.text===e&&(f.text="")),l?.constraint&&(f.constraint=l.constraint),l.w&&(f.assetWidth=Number(l.w)),l.h&&(f.assetHeight=Number(l.h))}}addSingleLink(e,t,r,i){let s={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};ee.info("abc78 Got edge...",s);let o=r.text;if(o!==void 0&&(s.text=this.sanitizeText(o.text.trim()),s.text.startsWith('"')&&s.text.endsWith('"')&&(s.text=s.text.substring(1,s.text.length-1)),s.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(s.type=r.type,s.stroke=r.stroke,s.length=r.length>10?10:r.length),i&&!this.edges.some(l=>l.id===i))s.id=i,s.isUserDefinedId=!0;else{let l=this.edges.filter(u=>u.start===s.start&&u.end===s.end);l.length===0?s.id=Mc(s.start,s.end,{counter:0,prefix:"L"}):s.id=Mc(s.start,s.end,{counter:l.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))ee.info("Pushing edge..."),this.edges.push(s);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. +}`,l=Hd(p,{schema:Ud})}let u=this.subGraphLookup.get(e);if(u&&l){u.metadata={...u.metadata,...l};return}let h=this.edges.find(p=>p.id===e);if(h){let p=l;p?.animate!==void 0&&(h.animate=p.animate),p?.animation!==void 0&&(h.animation=p.animation),p?.curve!==void 0&&(h.interpolate=p.curve);return}let f,d=this.vertices.get(e);if(d===void 0&&(t===void 0&&r===void 0&&n!==void 0&&n!==null&&fe.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),d={id:e,labelType:"text",domId:Oft+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,d)),this.vertexCounter++,t!==void 0?(this.config=ze(),f=this.sanitizeText(t.text.trim()),d.labelType=t.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),d.text=f):d.text===void 0&&(d.text=e),r!==void 0&&(d.type=r),n?.forEach(p=>{d.styles.push(p)}),i?.forEach(p=>{d.classes.push(p)}),a!==void 0&&(d.dir=a),d.props===void 0?d.props=s:s!==void 0&&Object.assign(d.props,s),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes("_"))throw new Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!FN(l.shape))throw new Error(`No such shape: ${l.shape}.`);d.type=l?.shape}l?.label&&(d.text=l?.label,d.labelType=this.sanitizeNodeLabelType(l?.labelType)),l?.icon&&(d.icon=l?.icon,!l.label?.trim()&&d.text===e&&(d.text="")),l?.form&&(d.form=l?.form),l?.pos&&(d.pos=l?.pos),l?.img&&(d.img=l?.img,!l.label?.trim()&&d.text===e&&(d.text="")),l?.constraint&&(d.constraint=l.constraint),l.w&&(d.assetWidth=Number(l.w)),l.h&&(d.assetHeight=Number(l.h))}}addSingleLink(e,t,r,n){let s={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};fe.info("abc78 Got edge...",s);let o=r.text;if(o!==void 0&&(s.text=this.sanitizeText(o.text.trim()),s.text.startsWith('"')&&s.text.endsWith('"')&&(s.text=s.text.substring(1,s.text.length-1)),s.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(s.type=r.type,s.stroke=r.stroke,s.length=r.length>10?10:r.length),n&&!this.edges.some(l=>l.id===n))s.id=n,s.isUserDefinedId=!0;else{let l=this.edges.filter(u=>u.start===s.start&&u.end===s.end);l.length===0?s.id=uu(s.start,s.end,{counter:0,prefix:"L"}):s.id=uu(s.start,s.end,{counter:l.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))fe.info("Pushing edge..."),this.edges.push(s);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace("@",""):void 0;ee.info("addLink",e,t,i);for(let n of e)for(let a of t){let s=n===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(r=>{r==="default"?this.edges.defaultInterpolate=t:this.edges[r].interpolate=t})}updateLink(e,t){e.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} 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.)`);r==="default"?this.edges.defaultStyle=t:(this.edges[r].style=t,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(e,t){let r=t.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(i=>{let n=this.classes.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.classes.set(i,n)),r?.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");n.textStyles.push(s)}n.styles.push(a)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,t){for(let r of e.split(",")){let i=this.vertices.get(r);i&&i.classes.push(t);let n=this.edges.find(s=>s.id===r);n&&n.classes.push(t);let a=this.subGraphLookup.get(r);a&&a.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let r of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,t)}}setClickFun(e,t,r){if(we().securityLevel!=="loose"||t===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{let a=this.lookUpDomId(e),s=document.querySelector(`[id="${a}"]`);s!==null&&s.addEventListener("click",()=>{jt.runFunc(t,...i)},!1)}))}setLink(e,t,r){e.split(",").forEach(i=>{let n=this.vertices.get(i);n!==void 0&&(n.link=jt.formatUrl(t,this.config),n.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(i=>{this.setClickFun(i,t,r)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=rE();Qe(e).select("svg").selectAll("g.node").on("mouseover",n=>{let a=Qe(n.currentTarget),s=a.attr("title");if(s===null)return;let o=n.currentTarget?.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.text(a.attr("title")).style("left",window.scrollX+o.left+(o.right-o.left)/2+"px").style("top",window.scrollY+o.bottom+"px"),t.html(No.sanitize(s)),a.classed("hover",!0)}).on("mouseout",n=>{t.transition().duration(500).style("opacity",0),Qe(n.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=we(),fr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,t,r){let i=e.text.trim(),n=r.text;e===r&&/\s/.exec(r.text)&&(i=void 0);let s=b(f=>{let d={boolean:{},number:{},string:{}},p=[],g;return{nodeList:f.filter(function(y){let v=typeof y;return y.stmt&&y.stmt==="dir"?(g=y.value,!1):y.trim()===""?!1:v in d?d[v].hasOwnProperty(y)?!1:d[v][y]=!0:p.includes(y)?!1:p.push(y)}),dir:g}},"uniq")(t.flat()),o=s.nodeList,l=s.dir,u=we().flowchart??{};if(l=l??(u.inheritDir?this.getDirection()??we().direction??void 0:void 0),this.version==="gen-1")for(let f=0;f2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let i=0,n=1;for(;i=0){let s=this.indexNodes2(e,a);if(s.result)return{result:!0,count:n+s.count};n=n+s.count}i=i+1}return{result:!1,count:n}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),r="arrow_open";switch(t[0]){case"<":r="arrow_point",t=t.slice(1);break;case"x":r="arrow_cross",t=t.slice(1);break;case"o":r="arrow_circle",t=t.slice(1);break}let i="normal";return t.includes("=")&&(i="thick"),t.includes(".")&&(i="dotted"),{type:r,stroke:i}}countChar(e,t){let r=t.length,i=0;for(let n=0;n":i="arrow_point",t.startsWith("<")&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",t.startsWith("o")&&(i="double_"+i,r=r.slice(1));break}let n="normal",a=r.length-1;r.startsWith("=")&&(n="thick"),r.startsWith("~")&&(n="invisible");let s=this.countChar(".",r);return s&&(n="dotted",a=s),{type:i,stroke:n,length:a}}destructLink(e,t){let r=this.destructEndLink(e),i;if(t){if(i=this.destructStartLink(t),i.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=r.type;else{if(i.type!==r.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=r.length,i}return r}exists(e,t){for(let r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(e,t){let r=[];return e.nodes.forEach((i,n)=>{this.exists(t,i)||r.push(e.nodes[n])}),{nodes:r}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,t){return e.find(r=>r.id===t)}destructEdgeType(e){let t="none",r="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":r=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":t=e.replace("double_",""),r=t;break}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,i,n,a){let s=r.get(e.id),o=i.get(e.id)??!1,l=this.findNode(t,e.id);if(l)l.cssStyles=e.styles,l.cssCompiledStyles=this.getCompiledStyles(e.classes),l.cssClasses=e.classes.join(" ");else{let u={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:s,padding:n.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};o?t.push({...u,isGroup:!0,shape:"rect"}):t.push({...u,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let r of e){let i=this.classes.get(r);i?.styles&&(t=[...t,...i.styles??[]].map(n=>n.trim())),i?.textStyles&&(t=[...t,...i.textStyles??[]].map(n=>n.trim()))}return t}getData(){let e=we(),t=[],r=[],i=this.getSubGraphs(),n=new Map,a=new Map;for(let l=i.length-1;l>=0;l--){let u=i[l];u.nodes.length>0&&a.set(u.id,!0);for(let h of u.nodes)n.set(h,u.id)}for(let l=i.length-1;l>=0;l--){let u=i[l];t.push({id:u.id,label:u.title,labelStyle:"",labelType:u.labelType,parentId:n.get(u.id),padding:8,cssCompiledStyles:this.getCompiledStyles(u.classes),cssClasses:u.classes.join(" "),shape:"rect",dir:u.dir,isGroup:!0,look:e.look})}this.getVertices().forEach(l=>{this.addNodeFromVertex(l,t,n,a,e,e.look||"classic")});let o=this.getEdges();return o.forEach((l,u)=>{let{arrowTypeStart:h,arrowTypeEnd:f}=this.destructEdgeType(l.type),d=[...o.defaultStyle??[]];l.style&&d.push(...l.style);let p={id:Mc(l.start,l.end,{counter:u,prefix:"L"},l.id),isUserDefinedId:l.isUserDefinedId,start:l.start,end:l.end,type:l.type??"normal",label:l.text,labelType:l.labelType,labelpos:"c",thickness:l.stroke,minlen:l.length,classes:l?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:l?.stroke==="invisible"||l?.type==="arrow_open"?"none":h,arrowTypeEnd:l?.stroke==="invisible"||l?.type==="arrow_open"?"none":f,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(l.classes),labelStyle:d,style:d,pattern:l.stroke,look:e.look,animate:l.animate,animation:l.animation,curve:l.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};r.push(p)}),{nodes:t,edges:r,other:{},config:e}}defaultConfig(){return s4.flowchart}},Hat=b(function(e,t){return t.db.getClasses()},"getClasses"),Yat=b(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing state diagram (v2)",t);let{securityLevel:n,flowchart:a,layout:s}=we();i.db.setDiagramId(t),ee.debug("Before getData: ");let o=i.db.getData();ee.debug("Data: ",o);let l=rl(t,n),u=i.db.getDirection();o.type=i.type,o.layoutAlgorithm=tu(s),o.layoutAlgorithm==="dagre"&&s==="elk"&&ee.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),o.direction=u,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["point","circle","cross"],o.diagramId=t,ee.debug("REF1:",o),await Ko(o,l);let h=o.config.flowchart?.diagramPadding??8;jt.insertTitle(l,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),Gs(l,h,"flowchart",a?.useMaxWidth||!1)},"draw"),jat={getClasses:Hat,draw:Yat},SP=(function(){var e=b(function(Ft,yt,Et,$t){for(Et=Et||{},$t=Ft.length;$t--;Et[Ft[$t]]=yt);return Et},"o"),t=[1,4],r=[1,3],i=[1,5],n=[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,125],a=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],g=[1,50],m=[1,49],y=[1,29],v=[1,30],x=[1,31],T=[1,32],C=[1,33],w=[1,45],k=[1,47],E=[1,43],A=[1,48],N=[1,44],P=[1,51],O=[1,46],L=[1,52],_=[1,53],R=[1,34],D=[1,35],I=[1,36],B=[1,37],M=[1,38],F=[1,58],z=[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,125],$=[1,62],G=[1,61],U=[1,63],j=[8,9,11,75,77,78],H=[1,79],Q=[1,92],Y=[1,97],se=[1,96],J=[1,93],re=[1,89],ie=[1,95],te=[1,91],xe=[1,98],fe=[1,94],Se=[1,99],Me=[1,90],ke=[8,9,10,11,40,75,77,78],Ce=[8,9,10,11,40,46,75,77,78],Ie=[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],Pe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],pe=[44,60,89,102,105,106,109,111,114,115,116],Je=[1,122],Te=[1,123],Be=[1,125],He=[1,124],nt=[44,60,62,74,89,102,105,106,109,111,114,115,116],qe=[1,134],Ue=[1,148],ge=[1,149],ce=[1,150],V=[1,151],le=[1,136],X=[1,138],he=[1,142],Z=[1,143],Ve=[1,144],ve=[1,145],Oe=[1,146],Ae=[1,147],Fe=[1,152],Re=[1,153],We=[1,132],De=[1,133],Ye=[1,140],ue=[1,135],Tt=[1,139],be=[1,137],it=[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,125],ft=[1,155],Dt=[1,157],mt=[8,9,11],vt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ut=[1,177],oe=[1,173],ot=[1,174],ct=[1,178],et=[1,175],me=[1,176],Ze=[77,116,119],rt=[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],at=[10,106],_t=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],At=[1,248],Mt=[1,246],ur=[1,250],Yt=[1,244],Vt=[1,245],Jt=[1,247],cr=[1,249],Ct=[1,251],Ee=[1,269],lt=[8,9,11,106],bt=[8,9,10,11,60,84,105,106,109,110,111,112],Cr={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,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,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",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",125:"direction_td"},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],[33,1]],performAction:b(function(yt,Et,$t,dt,qr,ye,Nu){var _e=ye.length-1;switch(qr){case 2:this.$=[];break;case 3:(!Array.isArray(ye[_e])||ye[_e].length>0)&&ye[_e-1].push(ye[_e]),this.$=ye[_e-1];break;case 4:case 183:this.$=ye[_e];break;case 11:dt.setDirection("TB"),this.$="TB";break;case 12:dt.setDirection(ye[_e-1]),this.$=ye[_e-1];break;case 27:this.$=ye[_e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=dt.addSubGraph(ye[_e-6],ye[_e-1],ye[_e-4]);break;case 34:this.$=dt.addSubGraph(ye[_e-3],ye[_e-1],ye[_e-3]);break;case 35:this.$=dt.addSubGraph(void 0,ye[_e-1],void 0);break;case 37:this.$=ye[_e].trim(),dt.setAccTitle(this.$);break;case 38:case 39:this.$=ye[_e].trim(),dt.setAccDescription(this.$);break;case 43:this.$=ye[_e-1]+ye[_e];break;case 44:this.$=ye[_e];break;case 45:dt.addVertex(ye[_e-1][ye[_e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ye[_e]),dt.addLink(ye[_e-3].stmt,ye[_e-1],ye[_e-2]),this.$={stmt:ye[_e-1],nodes:ye[_e-1].concat(ye[_e-3].nodes)};break;case 46:dt.addLink(ye[_e-2].stmt,ye[_e],ye[_e-1]),this.$={stmt:ye[_e],nodes:ye[_e].concat(ye[_e-2].nodes)};break;case 47:dt.addLink(ye[_e-3].stmt,ye[_e-1],ye[_e-2]),this.$={stmt:ye[_e-1],nodes:ye[_e-1].concat(ye[_e-3].nodes)};break;case 48:this.$={stmt:ye[_e-1],nodes:ye[_e-1]};break;case 49:dt.addVertex(ye[_e-1][ye[_e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ye[_e]),this.$={stmt:ye[_e-1],nodes:ye[_e-1],shapeData:ye[_e]};break;case 50:this.$={stmt:ye[_e],nodes:ye[_e]};break;case 51:this.$=[ye[_e]];break;case 52:dt.addVertex(ye[_e-5][ye[_e-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ye[_e-4]),this.$=ye[_e-5].concat(ye[_e]);break;case 53:this.$=ye[_e-4].concat(ye[_e]);break;case 54:this.$=ye[_e];break;case 55:this.$=ye[_e-2],dt.setClass(ye[_e-2],ye[_e]);break;case 56:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"square");break;case 57:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"doublecircle");break;case 58:this.$=ye[_e-5],dt.addVertex(ye[_e-5],ye[_e-2],"circle");break;case 59:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"ellipse");break;case 60:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"stadium");break;case 61:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"subroutine");break;case 62:this.$=ye[_e-7],dt.addVertex(ye[_e-7],ye[_e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[ye[_e-5],ye[_e-3]]]));break;case 63:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"cylinder");break;case 64:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"round");break;case 65:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"diamond");break;case 66:this.$=ye[_e-5],dt.addVertex(ye[_e-5],ye[_e-2],"hexagon");break;case 67:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"odd");break;case 68:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"trapezoid");break;case 69:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"inv_trapezoid");break;case 70:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"lean_right");break;case 71:this.$=ye[_e-3],dt.addVertex(ye[_e-3],ye[_e-1],"lean_left");break;case 72:this.$=ye[_e],dt.addVertex(ye[_e]);break;case 73:ye[_e-1].text=ye[_e],this.$=ye[_e-1];break;case 74:case 75:ye[_e-2].text=ye[_e-1],this.$=ye[_e-2];break;case 76:this.$=ye[_e];break;case 77:var en=dt.destructLink(ye[_e],ye[_e-2]);this.$={type:en.type,stroke:en.stroke,length:en.length,text:ye[_e-1]};break;case 78:var en=dt.destructLink(ye[_e],ye[_e-2]);this.$={type:en.type,stroke:en.stroke,length:en.length,text:ye[_e-1],id:ye[_e-3]};break;case 79:this.$={text:ye[_e],type:"text"};break;case 80:this.$={text:ye[_e-1].text+""+ye[_e],type:ye[_e-1].type};break;case 81:this.$={text:ye[_e],type:"string"};break;case 82:this.$={text:ye[_e],type:"markdown"};break;case 83:var en=dt.destructLink(ye[_e]);this.$={type:en.type,stroke:en.stroke,length:en.length};break;case 84:var en=dt.destructLink(ye[_e]);this.$={type:en.type,stroke:en.stroke,length:en.length,id:ye[_e-1]};break;case 85:this.$=ye[_e-1];break;case 86:this.$={text:ye[_e],type:"text"};break;case 87:this.$={text:ye[_e-1].text+""+ye[_e],type:ye[_e-1].type};break;case 88:this.$={text:ye[_e],type:"string"};break;case 89:case 104:this.$={text:ye[_e],type:"markdown"};break;case 101:this.$={text:ye[_e],type:"text"};break;case 102:this.$={text:ye[_e-1].text+""+ye[_e],type:ye[_e-1].type};break;case 103:this.$={text:ye[_e],type:"text"};break;case 105:this.$=ye[_e-4],dt.addClass(ye[_e-2],ye[_e]);break;case 106:this.$=ye[_e-4],dt.setClass(ye[_e-2],ye[_e]);break;case 107:case 115:this.$=ye[_e-1],dt.setClickEvent(ye[_e-1],ye[_e]);break;case 108:case 116:this.$=ye[_e-3],dt.setClickEvent(ye[_e-3],ye[_e-2]),dt.setTooltip(ye[_e-3],ye[_e]);break;case 109:this.$=ye[_e-2],dt.setClickEvent(ye[_e-2],ye[_e-1],ye[_e]);break;case 110:this.$=ye[_e-4],dt.setClickEvent(ye[_e-4],ye[_e-3],ye[_e-2]),dt.setTooltip(ye[_e-4],ye[_e]);break;case 111:this.$=ye[_e-2],dt.setLink(ye[_e-2],ye[_e]);break;case 112:this.$=ye[_e-4],dt.setLink(ye[_e-4],ye[_e-2]),dt.setTooltip(ye[_e-4],ye[_e]);break;case 113:this.$=ye[_e-4],dt.setLink(ye[_e-4],ye[_e-2],ye[_e]);break;case 114:this.$=ye[_e-6],dt.setLink(ye[_e-6],ye[_e-4],ye[_e]),dt.setTooltip(ye[_e-6],ye[_e-2]);break;case 117:this.$=ye[_e-1],dt.setLink(ye[_e-1],ye[_e]);break;case 118:this.$=ye[_e-3],dt.setLink(ye[_e-3],ye[_e-2]),dt.setTooltip(ye[_e-3],ye[_e]);break;case 119:this.$=ye[_e-3],dt.setLink(ye[_e-3],ye[_e-2],ye[_e]);break;case 120:this.$=ye[_e-5],dt.setLink(ye[_e-5],ye[_e-4],ye[_e]),dt.setTooltip(ye[_e-5],ye[_e-2]);break;case 121:this.$=ye[_e-4],dt.addVertex(ye[_e-2],void 0,void 0,ye[_e]);break;case 122:this.$=ye[_e-4],dt.updateLink([ye[_e-2]],ye[_e]);break;case 123:this.$=ye[_e-4],dt.updateLink(ye[_e-2],ye[_e]);break;case 124:this.$=ye[_e-8],dt.updateLinkInterpolate([ye[_e-6]],ye[_e-2]),dt.updateLink([ye[_e-6]],ye[_e]);break;case 125:this.$=ye[_e-8],dt.updateLinkInterpolate(ye[_e-6],ye[_e-2]),dt.updateLink(ye[_e-6],ye[_e]);break;case 126:this.$=ye[_e-6],dt.updateLinkInterpolate([ye[_e-4]],ye[_e]);break;case 127:this.$=ye[_e-6],dt.updateLinkInterpolate(ye[_e-4],ye[_e]);break;case 128:case 130:this.$=[ye[_e]];break;case 129:case 131:ye[_e-2].push(ye[_e]),this.$=ye[_e-2];break;case 133:this.$=ye[_e-1]+ye[_e];break;case 181:this.$=ye[_e];break;case 182:this.$=ye[_e-1]+""+ye[_e];break;case 184:this.$=ye[_e-1]+""+ye[_e];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:t,10:r,12:i},{1:[3]},e(n,a,{5:6}),{4:7,9:t,10:r,12:i},{4:8,9:t,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:T,88:C,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_,121:R,122:D,123:I,124:B,125:M},e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),{8:[1,55],9:[1,56],10:F,15:54,18:57},e(z,[2,3]),e(z,[2,4]),e(z,[2,5]),e(z,[2,6]),e(z,[2,7]),e(z,[2,8]),{8:$,9:G,11:U,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:$,9:G,11:U,21:68},{8:$,9:G,11:U,21:69},{8:$,9:G,11:U,21:70},{8:$,9:G,11:U,21:71},{8:$,9:G,11:U,21:72},{8:$,9:G,10:[1,73],11:U,21:74},e(z,[2,36]),{35:[1,75]},{37:[1,76]},e(z,[2,39]),e(j,[2,50],{18:77,39:78,10:F,40:H}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Q,44:Y,60:se,80:[1,87],89:J,95:[1,84],97:[1,85],101:86,105:re,106:ie,109:te,111:xe,114:fe,115:Se,116:Me,120:88},e(z,[2,185]),e(z,[2,186]),e(z,[2,187]),e(z,[2,188]),e(z,[2,189]),e(ke,[2,51]),e(ke,[2,54],{46:[1,100]}),e(Ce,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:m,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:w,102:k,105:E,106:A,109:N,111:P,114:O,115:L,116:_}),e(Ie,[2,181]),e(Ie,[2,142]),e(Ie,[2,143]),e(Ie,[2,144]),e(Ie,[2,145]),e(Ie,[2,146]),e(Ie,[2,147]),e(Ie,[2,148]),e(Ie,[2,149]),e(Ie,[2,150]),e(Ie,[2,151]),e(Ie,[2,152]),e(n,[2,12]),e(n,[2,18]),e(n,[2,19]),{9:[1,114]},e(Pe,[2,26],{18:115,10:F}),e(z,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},e(z,[2,40]),e(z,[2,41]),e(z,[2,42]),e(pe,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Je,81:Te,116:Be,119:He},{75:[1,126],77:[1,127]},e(nt,[2,83]),e(z,[2,28]),e(z,[2,29]),e(z,[2,30]),e(z,[2,31]),e(z,[2,32]),{10:qe,12:Ue,14:ge,27:ce,28:128,32:V,44:le,60:X,75:he,80:[1,130],81:[1,131],83:141,84:Z,85:Ve,86:ve,87:Oe,88:Ae,89:Fe,90:Re,91:129,105:We,109:De,111:Ye,114:ue,115:Tt,116:be},e(it,a,{5:154}),e(z,[2,37]),e(z,[2,38]),e(j,[2,48],{44:ft}),e(j,[2,49],{18:156,10:F,40:Dt}),e(ke,[2,44]),{44:g,47:158,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},{44:g,47:163,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},e(mt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(mt,[2,115],{120:168,10:[1,167],14:Q,44:Y,60:se,89:J,105:re,106:ie,109:te,111:xe,114:fe,115:Se,116:Me}),e(mt,[2,117],{10:[1,169]}),e(vt,[2,183]),e(vt,[2,170]),e(vt,[2,171]),e(vt,[2,172]),e(vt,[2,173]),e(vt,[2,174]),e(vt,[2,175]),e(vt,[2,176]),e(vt,[2,177]),e(vt,[2,178]),e(vt,[2,179]),e(vt,[2,180]),{44:g,47:170,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},{30:171,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:179,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:181,50:[1,180],67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:182,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:183,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:184,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{109:[1,185]},{30:186,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:187,65:[1,188],67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:189,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:190,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{30:191,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},e(Ie,[2,182]),e(n,[2,20]),e(Pe,[2,25]),e(j,[2,46],{39:192,18:193,10:F,40:H}),e(pe,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{77:[1,197],79:198,116:Be,119:He},e(Ze,[2,79]),e(Ze,[2,81]),e(Ze,[2,82]),e(Ze,[2,168]),e(Ze,[2,169]),{76:199,79:121,80:Je,81:Te,116:Be,119:He},e(nt,[2,84]),{8:$,9:G,10:qe,11:U,12:Ue,14:ge,21:201,27:ce,29:[1,200],32:V,44:le,60:X,75:he,83:141,84:Z,85:Ve,86:ve,87:Oe,88:Ae,89:Fe,90:Re,91:202,105:We,109:De,111:Ye,114:ue,115:Tt,116:be},e(rt,[2,101]),e(rt,[2,103]),e(rt,[2,104]),e(rt,[2,157]),e(rt,[2,158]),e(rt,[2,159]),e(rt,[2,160]),e(rt,[2,161]),e(rt,[2,162]),e(rt,[2,163]),e(rt,[2,164]),e(rt,[2,165]),e(rt,[2,166]),e(rt,[2,167]),e(rt,[2,90]),e(rt,[2,91]),e(rt,[2,92]),e(rt,[2,93]),e(rt,[2,94]),e(rt,[2,95]),e(rt,[2,96]),e(rt,[2,97]),e(rt,[2,98]),e(rt,[2,99]),e(rt,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,203],33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:T,88:C,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_,121:R,122:D,123:I,124:B,125:M},{10:F,18:204},{44:[1,205]},e(ke,[2,43]),{10:[1,206],44:g,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:113,114:O,115:L,116:_},{10:[1,207]},{10:[1,208],106:[1,209]},e(at,[2,128]),{10:[1,210],44:g,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:113,114:O,115:L,116:_},{10:[1,211],44:g,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:113,114:O,115:L,116:_},{80:[1,212]},e(mt,[2,109],{10:[1,213]}),e(mt,[2,111],{10:[1,214]}),{80:[1,215]},e(vt,[2,184]),{80:[1,216],98:[1,217]},e(ke,[2,55],{113:113,44:g,60:m,89:w,102:k,105:E,106:A,109:N,111:P,114:O,115:L,116:_}),{31:[1,218],67:ut,82:219,116:ct,117:et,118:me},e(_t,[2,86]),e(_t,[2,88]),e(_t,[2,89]),e(_t,[2,153]),e(_t,[2,154]),e(_t,[2,155]),e(_t,[2,156]),{49:[1,220],67:ut,82:219,116:ct,117:et,118:me},{30:221,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{51:[1,222],67:ut,82:219,116:ct,117:et,118:me},{53:[1,223],67:ut,82:219,116:ct,117:et,118:me},{55:[1,224],67:ut,82:219,116:ct,117:et,118:me},{57:[1,225],67:ut,82:219,116:ct,117:et,118:me},{60:[1,226]},{64:[1,227],67:ut,82:219,116:ct,117:et,118:me},{66:[1,228],67:ut,82:219,116:ct,117:et,118:me},{30:229,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},{31:[1,230],67:ut,82:219,116:ct,117:et,118:me},{67:ut,69:[1,231],71:[1,232],82:219,116:ct,117:et,118:me},{67:ut,69:[1,234],71:[1,233],82:219,116:ct,117:et,118:me},e(j,[2,45],{18:156,10:F,40:Dt}),e(j,[2,47],{44:ft}),e(pe,[2,75]),e(pe,[2,74]),{62:[1,235],67:ut,82:219,116:ct,117:et,118:me},e(pe,[2,77]),e(Ze,[2,80]),{77:[1,236],79:198,116:Be,119:He},{30:237,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},e(it,a,{5:238}),e(rt,[2,102]),e(z,[2,35]),{43:239,44:g,45:40,47:41,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},{10:F,18:240},{10:At,60:Mt,84:ur,92:241,105:Yt,107:242,108:243,109:Vt,110:Jt,111:cr,112:Ct},{10:At,60:Mt,84:ur,92:252,104:[1,253],105:Yt,107:242,108:243,109:Vt,110:Jt,111:cr,112:Ct},{10:At,60:Mt,84:ur,92:254,104:[1,255],105:Yt,107:242,108:243,109:Vt,110:Jt,111:cr,112:Ct},{105:[1,256]},{10:At,60:Mt,84:ur,92:257,105:Yt,107:242,108:243,109:Vt,110:Jt,111:cr,112:Ct},{44:g,47:258,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},e(mt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(mt,[2,116]),e(mt,[2,118],{10:[1,262]}),e(mt,[2,119]),e(Ce,[2,56]),e(_t,[2,87]),e(Ce,[2,57]),{51:[1,263],67:ut,82:219,116:ct,117:et,118:me},e(Ce,[2,64]),e(Ce,[2,59]),e(Ce,[2,60]),e(Ce,[2,61]),{109:[1,264]},e(Ce,[2,63]),e(Ce,[2,65]),{66:[1,265],67:ut,82:219,116:ct,117:et,118:me},e(Ce,[2,67]),e(Ce,[2,68]),e(Ce,[2,70]),e(Ce,[2,69]),e(Ce,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(pe,[2,78]),{31:[1,266],67:ut,82:219,116:ct,117:et,118:me},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,267],33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:T,88:C,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_,121:R,122:D,123:I,124:B,125:M},e(ke,[2,53]),{43:268,44:g,45:40,47:41,60:m,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_},e(mt,[2,121],{106:Ee}),e(lt,[2,130],{108:270,10:At,60:Mt,84:ur,105:Yt,109:Vt,110:Jt,111:cr,112:Ct}),e(bt,[2,132]),e(bt,[2,134]),e(bt,[2,135]),e(bt,[2,136]),e(bt,[2,137]),e(bt,[2,138]),e(bt,[2,139]),e(bt,[2,140]),e(bt,[2,141]),e(mt,[2,122],{106:Ee}),{10:[1,271]},e(mt,[2,123],{106:Ee}),{10:[1,272]},e(at,[2,129]),e(mt,[2,105],{106:Ee}),e(mt,[2,106],{113:113,44:g,60:m,89:w,102:k,105:E,106:A,109:N,111:P,114:O,115:L,116:_}),e(mt,[2,110]),e(mt,[2,112],{10:[1,273]}),e(mt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:$,9:G,11:U,21:278},e(z,[2,34]),e(ke,[2,52]),{10:At,60:Mt,84:ur,105:Yt,107:279,108:243,109:Vt,110:Jt,111:cr,112:Ct},e(bt,[2,133]),{14:Q,44:Y,60:se,89:J,101:280,105:re,106:ie,109:te,111:xe,114:fe,115:Se,116:Me,120:88},{14:Q,44:Y,60:se,89:J,101:281,105:re,106:ie,109:te,111:xe,114:fe,115:Se,116:Me,120:88},{98:[1,282]},e(mt,[2,120]),e(Ce,[2,58]),{30:283,67:ut,80:oe,81:ot,82:172,116:ct,117:et,118:me},e(Ce,[2,66]),e(it,a,{5:284}),e(lt,[2,131],{108:270,10:At,60:Mt,84:ur,105:Yt,109:Vt,110:Jt,111:cr,112:Ct}),e(mt,[2,126],{120:168,10:[1,285],14:Q,44:Y,60:se,89:J,105:re,106:ie,109:te,111:xe,114:fe,115:Se,116:Me}),e(mt,[2,127],{120:168,10:[1,286],14:Q,44:Y,60:se,89:J,105:re,106:ie,109:te,111:xe,114:fe,115:Se,116:Me}),e(mt,[2,114]),{31:[1,287],67:ut,82:219,116:ct,117:et,118:me},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,288],33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:T,88:C,89:w,102:k,105:E,106:A,109:N,111:P,113:42,114:O,115:L,116:_,121:R,122:D,123:I,124:B,125:M},{10:At,60:Mt,84:ur,92:289,105:Yt,107:242,108:243,109:Vt,110:Jt,111:cr,112:Ct},{10:At,60:Mt,84:ur,92:290,105:Yt,107:242,108:243,109:Vt,110:Jt,111:cr,112:Ct},e(Ce,[2,62]),e(z,[2,33]),e(mt,[2,124],{106:Ee}),e(mt,[2,125],{106:Ee})],defaultActions:{},parseError:b(function(yt,Et){if(Et.recoverable)this.trace(yt);else{var $t=new Error(yt);throw $t.hash=Et,$t}},"parseError"),parse:b(function(yt){var Et=this,$t=[0],dt=[],qr=[null],ye=[],Nu=this.table,_e="",en=0,sU=0,oU=0,KIe=2,lU=1,ZIe=ye.slice.call(arguments,1),Qn=Object.create(this.lexer),hp={yy:{}};for(var Q7 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q7)&&(hp.yy[Q7]=this.yy[Q7]);Qn.setInput(yt,hp.yy),hp.yy.lexer=Qn,hp.yy.parser=this,typeof Qn.yylloc>"u"&&(Qn.yylloc={});var J7=Qn.yylloc;ye.push(J7);var QIe=Qn.options&&Qn.options.ranges;typeof hp.yy.parseError=="function"?this.parseError=hp.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function JIe(Js){$t.length=$t.length-2*Js,qr.length=qr.length-Js,ye.length=ye.length-Js}b(JIe,"popStack");function cU(){var Js;return Js=dt.pop()||Qn.lex()||lU,typeof Js!="number"&&(Js instanceof Array&&(dt=Js,Js=dt.pop()),Js=Et.symbols_[Js]||Js),Js}b(cU,"lex");for(var Wa,e8,fp,_o,j6t,t8,Qg={},ok,Mu,uU,lk;;){if(fp=$t[$t.length-1],this.defaultActions[fp]?_o=this.defaultActions[fp]:((Wa===null||typeof Wa>"u")&&(Wa=cU()),_o=Nu[fp]&&Nu[fp][Wa]),typeof _o>"u"||!_o.length||!_o[0]){var r8="";lk=[];for(ok in Nu[fp])this.terminals_[ok]&&ok>KIe&&lk.push("'"+this.terminals_[ok]+"'");Qn.showPosition?r8="Parse error on line "+(en+1)+`: -`+Qn.showPosition()+` -Expecting `+lk.join(", ")+", got '"+(this.terminals_[Wa]||Wa)+"'":r8="Parse error on line "+(en+1)+": Unexpected "+(Wa==lU?"end of input":"'"+(this.terminals_[Wa]||Wa)+"'"),this.parseError(r8,{text:Qn.match,token:this.terminals_[Wa]||Wa,line:Qn.yylineno,loc:J7,expected:lk})}if(_o[0]instanceof Array&&_o.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fp+", token: "+Wa);switch(_o[0]){case 1:$t.push(Wa),qr.push(Qn.yytext),ye.push(Qn.yylloc),$t.push(_o[1]),Wa=null,e8?(Wa=e8,e8=null):(sU=Qn.yyleng,_e=Qn.yytext,en=Qn.yylineno,J7=Qn.yylloc,oU>0&&oU--);break;case 2:if(Mu=this.productions_[_o[1]][1],Qg.$=qr[qr.length-Mu],Qg._$={first_line:ye[ye.length-(Mu||1)].first_line,last_line:ye[ye.length-1].last_line,first_column:ye[ye.length-(Mu||1)].first_column,last_column:ye[ye.length-1].last_column},QIe&&(Qg._$.range=[ye[ye.length-(Mu||1)].range[0],ye[ye.length-1].range[1]]),t8=this.performAction.apply(Qg,[_e,sU,en,hp.yy,_o[1],qr,ye].concat(ZIe)),typeof t8<"u")return t8;Mu&&($t=$t.slice(0,-1*Mu*2),qr=qr.slice(0,-1*Mu),ye=ye.slice(0,-1*Mu)),$t.push(this.productions_[_o[1]][0]),qr.push(Qg.$),ye.push(Qg._$),uU=Nu[$t[$t.length-2]][$t[$t.length-1]],$t.push(uU);break;case 3:return!0}}return!0},"parse")},mi=(function(){var Ft={EOF:1,parseError:b(function(Et,$t){if(this.yy.parser)this.yy.parser.parseError(Et,$t);else throw new Error(Et)},"parseError"),setInput:b(function(yt,Et){return this.yy=Et||this.yy||{},this._input=yt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var yt=this._input[0];this.yytext+=yt,this.yyleng++,this.offset++,this.match+=yt,this.matched+=yt;var Et=yt.match(/(?:\r\n?|\n).*/g);return Et?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),yt},"input"),unput:b(function(yt){var Et=yt.length,$t=yt.split(/(?:\r\n?|\n)/g);this._input=yt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Et),this.offset-=Et;var dt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$t.length-1&&(this.yylineno-=$t.length-1);var qr=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$t?($t.length===dt.length?this.yylloc.first_column:0)+dt[dt.length-$t.length].length-$t[0].length:this.yylloc.first_column-Et},this.options.ranges&&(this.yylloc.range=[qr[0],qr[0]+this.yyleng-Et]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(yt){this.unput(this.match.slice(yt))},"less"),pastInput:b(function(){var yt=this.matched.substr(0,this.matched.length-this.match.length);return(yt.length>20?"...":"")+yt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var yt=this.match;return yt.length<20&&(yt+=this._input.substr(0,20-yt.length)),(yt.substr(0,20)+(yt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var yt=this.pastInput(),Et=new Array(yt.length+1).join("-");return yt+this.upcomingInput()+` -`+Et+"^"},"showPosition"),test_match:b(function(yt,Et){var $t,dt,qr;if(this.options.backtrack_lexer&&(qr={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(qr.yylloc.range=this.yylloc.range.slice(0))),dt=yt[0].match(/(?:\r\n?|\n).*/g),dt&&(this.yylineno+=dt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:dt?dt[dt.length-1].length-dt[dt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+yt[0].length},this.yytext+=yt[0],this.match+=yt[0],this.matches=yt,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(yt[0].length),this.matched+=yt[0],$t=this.performAction.call(this,this.yy,this,Et,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$t)return $t;if(this._backtrack){for(var ye in qr)this[ye]=qr[ye];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var yt,Et,$t,dt;this._more||(this.yytext="",this.match="");for(var qr=this._currentRules(),ye=0;yeEt[0].length)){if(Et=$t,dt=ye,this.options.backtrack_lexer){if(yt=this.test_match($t,qr[ye]),yt!==!1)return yt;if(this._backtrack){Et=!1;continue}else return!1}else if(!this.options.flex)break}return Et?(yt=this.test_match(Et,qr[dt]),yt!==!1?yt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var Et=this.next();return Et||this.lex()},"lex"),begin:b(function(Et){this.conditionStack.push(Et)},"begin"),popState:b(function(){var Et=this.conditionStack.length-1;return Et>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(Et){return Et=this.conditionStack.length-1-Math.abs(Et||0),Et>=0?this.conditionStack[Et]:"INITIAL"},"topState"),pushState:b(function(Et){this.begin(Et)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(Et,$t,dt,qr){var ye=qr;switch(dt){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),$t.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Nu=/\n\s*/g;return $t.yytext=$t.yytext.replace(Nu,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return Et.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Et.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Et.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;break;case 70:return this.pushState("edgeText"),75;break;case 71:return 119;case 72:return this.popState(),77;break;case 73:return this.pushState("thickEdgeText"),75;break;case 74:return 119;case 75:return this.popState(),77;break;case 76:return this.pushState("dottedEdgeText"),75;break;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;break;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;break;case 82:return this.popState(),55;break;case 83:return this.pushState("text"),54;break;case 84:return this.popState(),57;break;case 85:return this.pushState("text"),56;break;case 86:return 58;case 87:return this.pushState("text"),67;break;case 88:return this.popState(),64;break;case 89:return this.pushState("text"),63;break;case 90:return this.popState(),49;break;case 91:return this.pushState("text"),48;break;case 92:return this.popState(),69;break;case 93:return this.popState(),71;break;case 94:return 117;case 95:return this.pushState("trapText"),68;break;case 96:return this.pushState("trapText"),70;break;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;break;case 109:return this.pushState("text"),62;break;case 110:return this.popState(),51;break;case 111:return this.pushState("text"),50;break;case 112:return this.popState(),31;break;case 113:return this.pushState("text"),29;break;case 114:return this.popState(),66;break;case 115:return this.pushState("text"),65;break;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),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]*)/,/^(?:.*direction\s+TD[^\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)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],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,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};return Ft})();Cr.lexer=mi;function wr(){this.yy={}}return b(wr,"Parser"),wr.prototype=Cr,Cr.Parser=wr,new wr})();SP.parser=SP;Q1e=SP,J1e=Object.assign({},Q1e);J1e.parse=e=>{let t=e.replace(/}\s*\n/g,`} -`);return Q1e.parse(t)};Xat=J1e,Kat=b((e,t)=>{let r=yp,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return gn(i,n,a,t)},"fade"),Zat=b(e=>`.label { +You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,t,r){let n=this.isLinkData(r)?r.id.replace("@",""):void 0;fe.info("addLink",e,t,n);for(let i of e)for(let a of t){let s=i===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(r=>{r==="default"?this.edges.defaultInterpolate=t:this.edges[r].interpolate=t})}updateLink(e,t){e.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} 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.)`);r==="default"?this.edges.defaultStyle=t:(this.edges[r].style=t,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(n=>n?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(e,t){let r=t.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r?.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s)}i.styles.push(a)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,t){for(let r of e.split(",")){let n=this.vertices.get(r);n&&n.classes.push(t);let i=this.edges.find(s=>s.id===r);i&&i.classes.push(t);let a=this.subGraphLookup.get(r);a&&a.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let r of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,t)}}setClickFun(e,t,r){if(ze().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{let a=this.lookUpDomId(e),s=document.querySelector(`[id="${a}"]`);s!==null&&s.addEventListener("click",()=>{ar.runFunc(t,...n)},!1)}))}setLink(e,t,r){e.split(",").forEach(n=>{let i=this.vertices.get(n);i!==void 0&&(i.link=ar.formatUrl(t,this.config),i.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(n=>{this.setClickFun(n,t,r)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=dv();ct(e).select("svg").selectAll("g.node").on("mouseover",i=>{let a=ct(i.currentTarget),s=a.attr("title");if(s===null)return;let o=i.currentTarget?.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.text(a.attr("title")).style("left",window.scrollX+o.left+(o.right-o.left)/2+"px").style("top",window.scrollY+o.bottom+"px"),t.html(co.sanitize(s)),a.classed("hover",!0)}).on("mouseout",i=>{t.transition().duration(500).style("opacity",0),ct(i.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=ze(),pr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,t,r){let n=e.text.trim(),i=r.text;e===r&&/\s/.exec(r.text)&&(n=void 0);let s=v(f=>{let d={boolean:{},number:{},string:{}},p=[],g;return{nodeList:f.filter(function(y){let x=typeof y;return y.stmt&&y.stmt==="dir"?(g=y.value,!1):y.trim()===""?!1:x in d?d[x].hasOwnProperty(y)?!1:d[x][y]=!0:p.includes(y)?!1:p.push(y)}),dir:g}},"uniq")(t.flat()),o=s.nodeList,l=s.dir,u=ze().flowchart??{};if(l=l??(u.inheritDir?this.getDirection()??ze().direction??void 0:void 0),this.version==="gen-1")for(let f=0;f2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let n=0,i=1;for(;n=0){let s=this.indexNodes2(e,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),r="arrow_open";switch(t[0]){case"<":r="arrow_point",t=t.slice(1);break;case"x":r="arrow_cross",t=t.slice(1);break;case"o":r="arrow_circle",t=t.slice(1);break}let n="normal";return t.includes("=")&&(n="thick"),t.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(e,t){let r=t.length,n=0;for(let i=0;i":n="arrow_point",t.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",t.startsWith("o")&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let s=this.countChar(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}}destructLink(e,t){let r=this.destructEndLink(e),n;if(t){if(n=this.destructStartLink(t),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r}exists(e,t){for(let r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(e,t){let r=[];return e.nodes.forEach((n,i)=>{this.exists(t,n)||r.push(e.nodes[i])}),{nodes:r}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,t){return e.find(r=>r.id===t)}destructEdgeType(e){let t="none",r="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":r=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":t=e.replace("double_",""),r=t;break}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,n,i,a){let s=r.get(e.id),o=n.get(e.id)??!1,l=this.findNode(t,e.id);if(l)l.cssStyles=e.styles,l.cssCompiledStyles=this.getCompiledStyles(e.classes),l.cssClasses=e.classes.join(" ");else{let u={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};o?t.push({...u,isGroup:!0,shape:"rect"}):t.push({...u,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let r of e){let n=this.classes.get(r);n?.styles&&(t=[...t,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(t=[...t,...n.textStyles??[]].map(i=>i.trim()))}return t}getData(){let e=ze(),t=[],r=[],n=this.getSubGraphs(),i=new Map,a=new Map,s=new Map;for(let p of n)for(let g of p.nodes)this.subGraphLookup.has(g)&&s.set(g,p.id);let o=v(p=>this.subGraphLookup.get(p)?.metadata?.view==="collapsed","isCollapsed"),l=v(p=>{let g,m=new Set,y=p;for(;y!==void 0&&!m.has(y);)m.add(y),o(y)&&(g=y),y=s.get(y);return g},"outermostCollapsed"),u=new Set,h=new Map;for(let p of n){let g=l(p.id);if(g!==void 0){p.id!==g&&(u.add(p.id),h.set(p.id,g));for(let m of p.nodes)m!==g&&(u.add(m),h.set(m,g))}}for(let p=n.length-1;p>=0;p--){let g=n[p];if(!u.has(g.id)){g.nodes.length>0&&a.set(g.id,!0);for(let m of g.nodes)i.set(m,g.id)}}for(let p=n.length-1;p>=0;p--){let g=n[p];u.has(g.id)||(g.metadata?.view==="collapsed"?t.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:i.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssClasses:g.classes.join(" "),shape:"collapsedGroup",dir:g.dir,isGroup:!1,look:e.look}):t.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:i.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssClasses:g.classes.join(" "),shape:"rect",dir:g.dir,isGroup:!0,look:e.look}))}this.getVertices().forEach(p=>{u.has(p.id)||this.addNodeFromVertex(p,t,i,a,e,e.look||"classic")});let d=this.getEdges();return d.forEach((p,g)=>{let{arrowTypeStart:m,arrowTypeEnd:y}=this.destructEdgeType(p.type),x=[...d.defaultStyle??[]],b=h.get(p.start)??p.start,T=h.get(p.end)??p.end;if(b===T&&(h.has(p.start)||h.has(p.end)))return;p.style&&x.push(...p.style);let k={id:uu(b,T,{counter:g,prefix:"L"},p.id),isUserDefinedId:p.isUserDefinedId,start:b,end:T,type:p.type??"normal",label:p.text,labelType:p.labelType,labelpos:"c",thickness:p.stroke,minlen:p.length,classes:p?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":m,arrowTypeEnd:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":y,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(p.classes),labelStyle:x,style:x,pattern:p.stroke,look:e.look,animate:p.animate,animation:p.animation,curve:p.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};r.push(k)}),{nodes:t,edges:r,other:{},config:e}}defaultConfig(){return IS.flowchart}},Bft=v(function(e,t){return t.db.getClasses()},"getClasses"),$ft=v(async function(e,t,r,n){fe.info("REF0:"),fe.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:a,layout:s}=ze();n.db.setDiagramId(t),fe.debug("Before getData: ");let o=n.db.getData();fe.debug("Data: ",o);let l=$l(t,i),u=n.db.getDirection();o.type=n.type,o.layoutAlgorithm=Fu(s),o.layoutAlgorithm==="dagre"&&s==="elk"&&fe.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),o.direction=u,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["point","circle","cross"],o.diagramId=t,fe.debug("REF1:",o),await Ol(o,l);let h=o.config.flowchart?.diagramPadding??8;ar.insertTitle(l,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Ao(l,h,"flowchart",a?.useMaxWidth||!1)},"draw"),Fft={getClasses:Bft,draw:$ft},HF=(function(){var e=v(function(At,dt,Nt,Dt){for(Nt=Nt||{},Dt=At.length;Dt--;Nt[At[Dt]]=dt);return Nt},"o"),t=[1,4],r=[1,3],n=[1,5],i=[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,125],a=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],g=[1,50],m=[1,49],y=[1,29],x=[1,30],b=[1,31],T=[1,32],k=[1,33],w=[1,45],C=[1,47],S=[1,43],E=[1,48],L=[1,44],N=[1,51],O=[1,46],R=[1,52],_=[1,53],D=[1,34],I=[1,35],M=[1,36],B=[1,37],P=[1,38],$=[1,58],G=[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,125],q=[1,62],z=[1,61],V=[1,63],j=[8,9,11,75,77,78],ee=[1,79],ne=[1,92],Q=[1,97],pe=[1,96],te=[1,93],de=[1,89],ce=[1,95],ue=[1,91],Re=[1,98],ve=[1,94],Ge=[1,99],He=[1,90],Ue=[8,9,10,11,40,75,77,78],me=[8,9,10,11,40,46,75,77,78],De=[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],Ie=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Me=[44,60,89,102,105,106,109,111,114,115,116],re=[1,122],le=[1,123],oe=[1,125],he=[1,124],xe=[44,60,62,74,89,102,105,106,109,111,114,115,116],se=[1,134],F=[1,148],H=[1,149],W=[1,150],U=[1,151],ae=[1,136],K=[1,138],Y=[1,142],Z=[1,143],Ce=[1,144],we=[1,145],ke=[1,146],Se=[1,147],Ne=[1,152],Ae=[1,153],Fe=[1,132],Pe=[1,133],We=[1,140],be=[1,135],lt=[1,139],$e=[1,137],at=[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,125],bt=[1,155],Et=[1,157],pt=[8,9,11],Ct=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ht=[1,177],Te=[1,173],ot=[1,174],gt=[1,178],Qe=[1,175],_e=[1,176],Ze=[77,116,119],nt=[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],ft=[10,106],jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],yt=[1,248],Ht=[1,246],Er=[1,250],rr=[1,244],Ot=[1,245],Zt=[1,247],Je=[1,249],ut=[1,251],kt=[1,269],lr=[8,9,11,106],ir=[8,9,10,11,60,84,105,106,109,110,111,112],xr={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,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,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",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",125:"direction_td"},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],[33,1]],performAction:v(function(dt,Nt,Dt,xt,Jt,Le,Pn){var Be=Le.length-1;switch(Jt){case 2:this.$=[];break;case 3:(!Array.isArray(Le[Be])||Le[Be].length>0)&&Le[Be-1].push(Le[Be]),this.$=Le[Be-1];break;case 4:case 183:this.$=Le[Be];break;case 11:xt.setDirection("TB"),this.$="TB";break;case 12:xt.setDirection(Le[Be-1]),this.$=Le[Be-1];break;case 27:this.$=Le[Be-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=xt.addSubGraph(Le[Be-6],Le[Be-1],Le[Be-4]);break;case 34:this.$=xt.addSubGraph(Le[Be-3],Le[Be-1],Le[Be-3]);break;case 35:this.$=xt.addSubGraph(void 0,Le[Be-1],void 0);break;case 37:this.$=Le[Be].trim(),xt.setAccTitle(this.$);break;case 38:case 39:this.$=Le[Be].trim(),xt.setAccDescription(this.$);break;case 43:this.$=Le[Be-1]+Le[Be];break;case 44:this.$=Le[Be];break;case 45:xt.addVertex(Le[Be-1][Le[Be-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Le[Be]),xt.addLink(Le[Be-3].stmt,Le[Be-1],Le[Be-2]),this.$={stmt:Le[Be-1],nodes:Le[Be-1].concat(Le[Be-3].nodes)};break;case 46:xt.addLink(Le[Be-2].stmt,Le[Be],Le[Be-1]),this.$={stmt:Le[Be],nodes:Le[Be].concat(Le[Be-2].nodes)};break;case 47:xt.addLink(Le[Be-3].stmt,Le[Be-1],Le[Be-2]),this.$={stmt:Le[Be-1],nodes:Le[Be-1].concat(Le[Be-3].nodes)};break;case 48:this.$={stmt:Le[Be-1],nodes:Le[Be-1]};break;case 49:xt.addVertex(Le[Be-1][Le[Be-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Le[Be]),this.$={stmt:Le[Be-1],nodes:Le[Be-1],shapeData:Le[Be]};break;case 50:this.$={stmt:Le[Be],nodes:Le[Be]};break;case 51:this.$=[Le[Be]];break;case 52:xt.addVertex(Le[Be-5][Le[Be-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Le[Be-4]),this.$=Le[Be-5].concat(Le[Be]);break;case 53:this.$=Le[Be-4].concat(Le[Be]);break;case 54:this.$=Le[Be];break;case 55:this.$=Le[Be-2],xt.setClass(Le[Be-2],Le[Be]);break;case 56:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"square");break;case 57:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"doublecircle");break;case 58:this.$=Le[Be-5],xt.addVertex(Le[Be-5],Le[Be-2],"circle");break;case 59:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"ellipse");break;case 60:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"stadium");break;case 61:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"subroutine");break;case 62:this.$=Le[Be-7],xt.addVertex(Le[Be-7],Le[Be-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Le[Be-5],Le[Be-3]]]));break;case 63:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"cylinder");break;case 64:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"round");break;case 65:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"diamond");break;case 66:this.$=Le[Be-5],xt.addVertex(Le[Be-5],Le[Be-2],"hexagon");break;case 67:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"odd");break;case 68:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"trapezoid");break;case 69:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"inv_trapezoid");break;case 70:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"lean_right");break;case 71:this.$=Le[Be-3],xt.addVertex(Le[Be-3],Le[Be-1],"lean_left");break;case 72:this.$=Le[Be],xt.addVertex(Le[Be]);break;case 73:Le[Be-1].text=Le[Be],this.$=Le[Be-1];break;case 74:case 75:Le[Be-2].text=Le[Be-1],this.$=Le[Be-2];break;case 76:this.$=Le[Be];break;case 77:var Tr=xt.destructLink(Le[Be],Le[Be-2]);this.$={type:Tr.type,stroke:Tr.stroke,length:Tr.length,text:Le[Be-1]};break;case 78:var Tr=xt.destructLink(Le[Be],Le[Be-2]);this.$={type:Tr.type,stroke:Tr.stroke,length:Tr.length,text:Le[Be-1],id:Le[Be-3]};break;case 79:this.$={text:Le[Be],type:"text"};break;case 80:this.$={text:Le[Be-1].text+""+Le[Be],type:Le[Be-1].type};break;case 81:this.$={text:Le[Be],type:"string"};break;case 82:this.$={text:Le[Be],type:"markdown"};break;case 83:var Tr=xt.destructLink(Le[Be]);this.$={type:Tr.type,stroke:Tr.stroke,length:Tr.length};break;case 84:var Tr=xt.destructLink(Le[Be]);this.$={type:Tr.type,stroke:Tr.stroke,length:Tr.length,id:Le[Be-1]};break;case 85:this.$=Le[Be-1];break;case 86:this.$={text:Le[Be],type:"text"};break;case 87:this.$={text:Le[Be-1].text+""+Le[Be],type:Le[Be-1].type};break;case 88:this.$={text:Le[Be],type:"string"};break;case 89:case 104:this.$={text:Le[Be],type:"markdown"};break;case 101:this.$={text:Le[Be],type:"text"};break;case 102:this.$={text:Le[Be-1].text+""+Le[Be],type:Le[Be-1].type};break;case 103:this.$={text:Le[Be],type:"text"};break;case 105:this.$=Le[Be-4],xt.addClass(Le[Be-2],Le[Be]);break;case 106:this.$=Le[Be-4],xt.setClass(Le[Be-2],Le[Be]);break;case 107:case 115:this.$=Le[Be-1],xt.setClickEvent(Le[Be-1],Le[Be]);break;case 108:case 116:this.$=Le[Be-3],xt.setClickEvent(Le[Be-3],Le[Be-2]),xt.setTooltip(Le[Be-3],Le[Be]);break;case 109:this.$=Le[Be-2],xt.setClickEvent(Le[Be-2],Le[Be-1],Le[Be]);break;case 110:this.$=Le[Be-4],xt.setClickEvent(Le[Be-4],Le[Be-3],Le[Be-2]),xt.setTooltip(Le[Be-4],Le[Be]);break;case 111:this.$=Le[Be-2],xt.setLink(Le[Be-2],Le[Be]);break;case 112:this.$=Le[Be-4],xt.setLink(Le[Be-4],Le[Be-2]),xt.setTooltip(Le[Be-4],Le[Be]);break;case 113:this.$=Le[Be-4],xt.setLink(Le[Be-4],Le[Be-2],Le[Be]);break;case 114:this.$=Le[Be-6],xt.setLink(Le[Be-6],Le[Be-4],Le[Be]),xt.setTooltip(Le[Be-6],Le[Be-2]);break;case 117:this.$=Le[Be-1],xt.setLink(Le[Be-1],Le[Be]);break;case 118:this.$=Le[Be-3],xt.setLink(Le[Be-3],Le[Be-2]),xt.setTooltip(Le[Be-3],Le[Be]);break;case 119:this.$=Le[Be-3],xt.setLink(Le[Be-3],Le[Be-2],Le[Be]);break;case 120:this.$=Le[Be-5],xt.setLink(Le[Be-5],Le[Be-4],Le[Be]),xt.setTooltip(Le[Be-5],Le[Be-2]);break;case 121:this.$=Le[Be-4],xt.addVertex(Le[Be-2],void 0,void 0,Le[Be]);break;case 122:this.$=Le[Be-4],xt.updateLink([Le[Be-2]],Le[Be]);break;case 123:this.$=Le[Be-4],xt.updateLink(Le[Be-2],Le[Be]);break;case 124:this.$=Le[Be-8],xt.updateLinkInterpolate([Le[Be-6]],Le[Be-2]),xt.updateLink([Le[Be-6]],Le[Be]);break;case 125:this.$=Le[Be-8],xt.updateLinkInterpolate(Le[Be-6],Le[Be-2]),xt.updateLink(Le[Be-6],Le[Be]);break;case 126:this.$=Le[Be-6],xt.updateLinkInterpolate([Le[Be-4]],Le[Be]);break;case 127:this.$=Le[Be-6],xt.updateLinkInterpolate(Le[Be-4],Le[Be]);break;case 128:case 130:this.$=[Le[Be]];break;case 129:case 131:Le[Be-2].push(Le[Be]),this.$=Le[Be-2];break;case 133:this.$=Le[Be-1]+Le[Be];break;case 181:this.$=Le[Be];break;case 182:this.$=Le[Be-1]+""+Le[Be];break;case 184:this.$=Le[Be-1]+""+Le[Be];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:t,10:r,12:n},{1:[3]},e(i,a,{5:6}),{4:7,9:t,10:r,12:n},{4:8,9:t,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:x,86:b,87:T,88:k,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_,121:D,122:I,123:M,124:B,125:P},e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{8:[1,55],9:[1,56],10:$,15:54,18:57},e(G,[2,3]),e(G,[2,4]),e(G,[2,5]),e(G,[2,6]),e(G,[2,7]),e(G,[2,8]),{8:q,9:z,11:V,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:q,9:z,11:V,21:68},{8:q,9:z,11:V,21:69},{8:q,9:z,11:V,21:70},{8:q,9:z,11:V,21:71},{8:q,9:z,11:V,21:72},{8:q,9:z,10:[1,73],11:V,21:74},e(G,[2,36]),{35:[1,75]},{37:[1,76]},e(G,[2,39]),e(j,[2,50],{18:77,39:78,10:$,40:ee}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:ne,44:Q,60:pe,80:[1,87],89:te,95:[1,84],97:[1,85],101:86,105:de,106:ce,109:ue,111:Re,114:ve,115:Ge,116:He,120:88},e(G,[2,185]),e(G,[2,186]),e(G,[2,187]),e(G,[2,188]),e(G,[2,189]),e(Ue,[2,51]),e(Ue,[2,54],{46:[1,100]}),e(me,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:m,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:w,102:C,105:S,106:E,109:L,111:N,114:O,115:R,116:_}),e(De,[2,181]),e(De,[2,142]),e(De,[2,143]),e(De,[2,144]),e(De,[2,145]),e(De,[2,146]),e(De,[2,147]),e(De,[2,148]),e(De,[2,149]),e(De,[2,150]),e(De,[2,151]),e(De,[2,152]),e(i,[2,12]),e(i,[2,18]),e(i,[2,19]),{9:[1,114]},e(Ie,[2,26],{18:115,10:$}),e(G,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},e(G,[2,40]),e(G,[2,41]),e(G,[2,42]),e(Me,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:re,81:le,116:oe,119:he},{75:[1,126],77:[1,127]},e(xe,[2,83]),e(G,[2,28]),e(G,[2,29]),e(G,[2,30]),e(G,[2,31]),e(G,[2,32]),{10:se,12:F,14:H,27:W,28:128,32:U,44:ae,60:K,75:Y,80:[1,130],81:[1,131],83:141,84:Z,85:Ce,86:we,87:ke,88:Se,89:Ne,90:Ae,91:129,105:Fe,109:Pe,111:We,114:be,115:lt,116:$e},e(at,a,{5:154}),e(G,[2,37]),e(G,[2,38]),e(j,[2,48],{44:bt}),e(j,[2,49],{18:156,10:$,40:Et}),e(Ue,[2,44]),{44:g,47:158,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},{44:g,47:163,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},e(pt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(pt,[2,115],{120:168,10:[1,167],14:ne,44:Q,60:pe,89:te,105:de,106:ce,109:ue,111:Re,114:ve,115:Ge,116:He}),e(pt,[2,117],{10:[1,169]}),e(Ct,[2,183]),e(Ct,[2,170]),e(Ct,[2,171]),e(Ct,[2,172]),e(Ct,[2,173]),e(Ct,[2,174]),e(Ct,[2,175]),e(Ct,[2,176]),e(Ct,[2,177]),e(Ct,[2,178]),e(Ct,[2,179]),e(Ct,[2,180]),{44:g,47:170,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},{30:171,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:179,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:181,50:[1,180],67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:182,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:183,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:184,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{109:[1,185]},{30:186,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:187,65:[1,188],67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:189,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:190,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{30:191,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},e(De,[2,182]),e(i,[2,20]),e(Ie,[2,25]),e(j,[2,46],{39:192,18:193,10:$,40:ee}),e(Me,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{77:[1,197],79:198,116:oe,119:he},e(Ze,[2,79]),e(Ze,[2,81]),e(Ze,[2,82]),e(Ze,[2,168]),e(Ze,[2,169]),{76:199,79:121,80:re,81:le,116:oe,119:he},e(xe,[2,84]),{8:q,9:z,10:se,11:V,12:F,14:H,21:201,27:W,29:[1,200],32:U,44:ae,60:K,75:Y,83:141,84:Z,85:Ce,86:we,87:ke,88:Se,89:Ne,90:Ae,91:202,105:Fe,109:Pe,111:We,114:be,115:lt,116:$e},e(nt,[2,101]),e(nt,[2,103]),e(nt,[2,104]),e(nt,[2,157]),e(nt,[2,158]),e(nt,[2,159]),e(nt,[2,160]),e(nt,[2,161]),e(nt,[2,162]),e(nt,[2,163]),e(nt,[2,164]),e(nt,[2,165]),e(nt,[2,166]),e(nt,[2,167]),e(nt,[2,90]),e(nt,[2,91]),e(nt,[2,92]),e(nt,[2,93]),e(nt,[2,94]),e(nt,[2,95]),e(nt,[2,96]),e(nt,[2,97]),e(nt,[2,98]),e(nt,[2,99]),e(nt,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,203],33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:x,86:b,87:T,88:k,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_,121:D,122:I,123:M,124:B,125:P},{10:$,18:204},{44:[1,205]},e(Ue,[2,43]),{10:[1,206],44:g,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:113,114:O,115:R,116:_},{10:[1,207]},{10:[1,208],106:[1,209]},e(ft,[2,128]),{10:[1,210],44:g,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:113,114:O,115:R,116:_},{10:[1,211],44:g,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:113,114:O,115:R,116:_},{80:[1,212]},e(pt,[2,109],{10:[1,213]}),e(pt,[2,111],{10:[1,214]}),{80:[1,215]},e(Ct,[2,184]),{80:[1,216],98:[1,217]},e(Ue,[2,55],{113:113,44:g,60:m,89:w,102:C,105:S,106:E,109:L,111:N,114:O,115:R,116:_}),{31:[1,218],67:ht,82:219,116:gt,117:Qe,118:_e},e(jt,[2,86]),e(jt,[2,88]),e(jt,[2,89]),e(jt,[2,153]),e(jt,[2,154]),e(jt,[2,155]),e(jt,[2,156]),{49:[1,220],67:ht,82:219,116:gt,117:Qe,118:_e},{30:221,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{51:[1,222],67:ht,82:219,116:gt,117:Qe,118:_e},{53:[1,223],67:ht,82:219,116:gt,117:Qe,118:_e},{55:[1,224],67:ht,82:219,116:gt,117:Qe,118:_e},{57:[1,225],67:ht,82:219,116:gt,117:Qe,118:_e},{60:[1,226]},{64:[1,227],67:ht,82:219,116:gt,117:Qe,118:_e},{66:[1,228],67:ht,82:219,116:gt,117:Qe,118:_e},{30:229,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},{31:[1,230],67:ht,82:219,116:gt,117:Qe,118:_e},{67:ht,69:[1,231],71:[1,232],82:219,116:gt,117:Qe,118:_e},{67:ht,69:[1,234],71:[1,233],82:219,116:gt,117:Qe,118:_e},e(j,[2,45],{18:156,10:$,40:Et}),e(j,[2,47],{44:bt}),e(Me,[2,75]),e(Me,[2,74]),{62:[1,235],67:ht,82:219,116:gt,117:Qe,118:_e},e(Me,[2,77]),e(Ze,[2,80]),{77:[1,236],79:198,116:oe,119:he},{30:237,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},e(at,a,{5:238}),e(nt,[2,102]),e(G,[2,35]),{43:239,44:g,45:40,47:41,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},{10:$,18:240},{10:yt,60:Ht,84:Er,92:241,105:rr,107:242,108:243,109:Ot,110:Zt,111:Je,112:ut},{10:yt,60:Ht,84:Er,92:252,104:[1,253],105:rr,107:242,108:243,109:Ot,110:Zt,111:Je,112:ut},{10:yt,60:Ht,84:Er,92:254,104:[1,255],105:rr,107:242,108:243,109:Ot,110:Zt,111:Je,112:ut},{105:[1,256]},{10:yt,60:Ht,84:Er,92:257,105:rr,107:242,108:243,109:Ot,110:Zt,111:Je,112:ut},{44:g,47:258,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},e(pt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(pt,[2,116]),e(pt,[2,118],{10:[1,262]}),e(pt,[2,119]),e(me,[2,56]),e(jt,[2,87]),e(me,[2,57]),{51:[1,263],67:ht,82:219,116:gt,117:Qe,118:_e},e(me,[2,64]),e(me,[2,59]),e(me,[2,60]),e(me,[2,61]),{109:[1,264]},e(me,[2,63]),e(me,[2,65]),{66:[1,265],67:ht,82:219,116:gt,117:Qe,118:_e},e(me,[2,67]),e(me,[2,68]),e(me,[2,70]),e(me,[2,69]),e(me,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Me,[2,78]),{31:[1,266],67:ht,82:219,116:gt,117:Qe,118:_e},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,267],33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:x,86:b,87:T,88:k,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_,121:D,122:I,123:M,124:B,125:P},e(Ue,[2,53]),{43:268,44:g,45:40,47:41,60:m,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_},e(pt,[2,121],{106:kt}),e(lr,[2,130],{108:270,10:yt,60:Ht,84:Er,105:rr,109:Ot,110:Zt,111:Je,112:ut}),e(ir,[2,132]),e(ir,[2,134]),e(ir,[2,135]),e(ir,[2,136]),e(ir,[2,137]),e(ir,[2,138]),e(ir,[2,139]),e(ir,[2,140]),e(ir,[2,141]),e(pt,[2,122],{106:kt}),{10:[1,271]},e(pt,[2,123],{106:kt}),{10:[1,272]},e(ft,[2,129]),e(pt,[2,105],{106:kt}),e(pt,[2,106],{113:113,44:g,60:m,89:w,102:C,105:S,106:E,109:L,111:N,114:O,115:R,116:_}),e(pt,[2,110]),e(pt,[2,112],{10:[1,273]}),e(pt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:q,9:z,11:V,21:278},e(G,[2,34]),e(Ue,[2,52]),{10:yt,60:Ht,84:Er,105:rr,107:279,108:243,109:Ot,110:Zt,111:Je,112:ut},e(ir,[2,133]),{14:ne,44:Q,60:pe,89:te,101:280,105:de,106:ce,109:ue,111:Re,114:ve,115:Ge,116:He,120:88},{14:ne,44:Q,60:pe,89:te,101:281,105:de,106:ce,109:ue,111:Re,114:ve,115:Ge,116:He,120:88},{98:[1,282]},e(pt,[2,120]),e(me,[2,58]),{30:283,67:ht,80:Te,81:ot,82:172,116:gt,117:Qe,118:_e},e(me,[2,66]),e(at,a,{5:284}),e(lr,[2,131],{108:270,10:yt,60:Ht,84:Er,105:rr,109:Ot,110:Zt,111:Je,112:ut}),e(pt,[2,126],{120:168,10:[1,285],14:ne,44:Q,60:pe,89:te,105:de,106:ce,109:ue,111:Re,114:ve,115:Ge,116:He}),e(pt,[2,127],{120:168,10:[1,286],14:ne,44:Q,60:pe,89:te,105:de,106:ce,109:ue,111:Re,114:ve,115:Ge,116:He}),e(pt,[2,114]),{31:[1,287],67:ht,82:219,116:gt,117:Qe,118:_e},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,288],33:24,34:f,36:d,38:p,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:x,86:b,87:T,88:k,89:w,102:C,105:S,106:E,109:L,111:N,113:42,114:O,115:R,116:_,121:D,122:I,123:M,124:B,125:P},{10:yt,60:Ht,84:Er,92:289,105:rr,107:242,108:243,109:Ot,110:Zt,111:Je,112:ut},{10:yt,60:Ht,84:Er,92:290,105:rr,107:242,108:243,109:Ot,110:Zt,111:Je,112:ut},e(me,[2,62]),e(G,[2,33]),e(pt,[2,124],{106:kt}),e(pt,[2,125],{106:kt})],defaultActions:{},parseError:v(function(dt,Nt){if(Nt.recoverable)this.trace(dt);else{var Dt=new Error(dt);throw Dt.hash=Nt,Dt}},"parseError"),parse:v(function(dt){var Nt=this,Dt=[0],xt=[],Jt=[null],Le=[],Pn=this.table,Be="",Tr=0,oi=0,As=0,Ga=2,Wf=1,yh=Le.slice.call(arguments,1),mi=Object.create(this.lexer),zo={yy:{}};for(var Uf in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Uf)&&(zo.yy[Uf]=this.yy[Uf]);mi.setInput(dt,zo.yy),zo.yy.lexer=mi,zo.yy.parser=this,typeof mi.yylloc>"u"&&(mi.yylloc={});var jl=mi.yylloc;Le.push(jl);var o0=mi.options&&mi.options.ranges;typeof zo.yy.parseError=="function"?this.parseError=zo.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qa(jr){Dt.length=Dt.length-2*jr,Jt.length=Jt.length-jr,Le.length=Le.length-jr}v(qa,"popStack");function l0(){var jr;return jr=xt.pop()||mi.lex()||Wf,typeof jr!="number"&&(jr instanceof Array&&(xt=jr,jr=xt.pop()),jr=Nt.symbols_[jr]||jr),jr}v(l0,"lex");for(var Va,jx,qc,Wa,Nk,_t,Oe={},Ke,mt,Gt,Qt;;){if(qc=Dt[Dt.length-1],this.defaultActions[qc]?Wa=this.defaultActions[qc]:((Va===null||typeof Va>"u")&&(Va=l0()),Wa=Pn[qc]&&Pn[qc][Va]),typeof Wa>"u"||!Wa.length||!Wa[0]){var wr="";Qt=[];for(Ke in Pn[qc])this.terminals_[Ke]&&Ke>Ga&&Qt.push("'"+this.terminals_[Ke]+"'");mi.showPosition?wr="Parse error on line "+(Tr+1)+`: +`+mi.showPosition()+` +Expecting `+Qt.join(", ")+", got '"+(this.terminals_[Va]||Va)+"'":wr="Parse error on line "+(Tr+1)+": Unexpected "+(Va==Wf?"end of input":"'"+(this.terminals_[Va]||Va)+"'"),this.parseError(wr,{text:mi.match,token:this.terminals_[Va]||Va,line:mi.yylineno,loc:jl,expected:Qt})}if(Wa[0]instanceof Array&&Wa.length>1)throw new Error("Parse Error: multiple actions possible at state: "+qc+", token: "+Va);switch(Wa[0]){case 1:Dt.push(Va),Jt.push(mi.yytext),Le.push(mi.yylloc),Dt.push(Wa[1]),Va=null,jx?(Va=jx,jx=null):(oi=mi.yyleng,Be=mi.yytext,Tr=mi.yylineno,jl=mi.yylloc,As>0&&As--);break;case 2:if(mt=this.productions_[Wa[1]][1],Oe.$=Jt[Jt.length-mt],Oe._$={first_line:Le[Le.length-(mt||1)].first_line,last_line:Le[Le.length-1].last_line,first_column:Le[Le.length-(mt||1)].first_column,last_column:Le[Le.length-1].last_column},o0&&(Oe._$.range=[Le[Le.length-(mt||1)].range[0],Le[Le.length-1].range[1]]),_t=this.performAction.apply(Oe,[Be,oi,Tr,zo.yy,Wa[1],Jt,Le].concat(yh)),typeof _t<"u")return _t;mt&&(Dt=Dt.slice(0,-1*mt*2),Jt=Jt.slice(0,-1*mt),Le=Le.slice(0,-1*mt)),Dt.push(this.productions_[Wa[1]][0]),Jt.push(Oe.$),Le.push(Oe._$),Gt=Pn[Dt[Dt.length-2]][Dt[Dt.length-1]],Dt.push(Gt);break;case 3:return!0}}return!0},"parse")},cn=(function(){var At={EOF:1,parseError:v(function(Nt,Dt){if(this.yy.parser)this.yy.parser.parseError(Nt,Dt);else throw new Error(Nt)},"parseError"),setInput:v(function(dt,Nt){return this.yy=Nt||this.yy||{},this._input=dt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var dt=this._input[0];this.yytext+=dt,this.yyleng++,this.offset++,this.match+=dt,this.matched+=dt;var Nt=dt.match(/(?:\r\n?|\n).*/g);return Nt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),dt},"input"),unput:v(function(dt){var Nt=dt.length,Dt=dt.split(/(?:\r\n?|\n)/g);this._input=dt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Nt),this.offset-=Nt;var xt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Dt.length-1&&(this.yylineno-=Dt.length-1);var Jt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Dt?(Dt.length===xt.length?this.yylloc.first_column:0)+xt[xt.length-Dt.length].length-Dt[0].length:this.yylloc.first_column-Nt},this.options.ranges&&(this.yylloc.range=[Jt[0],Jt[0]+this.yyleng-Nt]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(dt){this.unput(this.match.slice(dt))},"less"),pastInput:v(function(){var dt=this.matched.substr(0,this.matched.length-this.match.length);return(dt.length>20?"...":"")+dt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var dt=this.match;return dt.length<20&&(dt+=this._input.substr(0,20-dt.length)),(dt.substr(0,20)+(dt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var dt=this.pastInput(),Nt=new Array(dt.length+1).join("-");return dt+this.upcomingInput()+` +`+Nt+"^"},"showPosition"),test_match:v(function(dt,Nt){var Dt,xt,Jt;if(this.options.backtrack_lexer&&(Jt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Jt.yylloc.range=this.yylloc.range.slice(0))),xt=dt[0].match(/(?:\r\n?|\n).*/g),xt&&(this.yylineno+=xt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:xt?xt[xt.length-1].length-xt[xt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+dt[0].length},this.yytext+=dt[0],this.match+=dt[0],this.matches=dt,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(dt[0].length),this.matched+=dt[0],Dt=this.performAction.call(this,this.yy,this,Nt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Dt)return Dt;if(this._backtrack){for(var Le in Jt)this[Le]=Jt[Le];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var dt,Nt,Dt,xt;this._more||(this.yytext="",this.match="");for(var Jt=this._currentRules(),Le=0;LeNt[0].length)){if(Nt=Dt,xt=Le,this.options.backtrack_lexer){if(dt=this.test_match(Dt,Jt[Le]),dt!==!1)return dt;if(this._backtrack){Nt=!1;continue}else return!1}else if(!this.options.flex)break}return Nt?(dt=this.test_match(Nt,Jt[xt]),dt!==!1?dt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var Nt=this.next();return Nt||this.lex()},"lex"),begin:v(function(Nt){this.conditionStack.push(Nt)},"begin"),popState:v(function(){var Nt=this.conditionStack.length-1;return Nt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(Nt){return Nt=this.conditionStack.length-1-Math.abs(Nt||0),Nt>=0?this.conditionStack[Nt]:"INITIAL"},"topState"),pushState:v(function(Nt){this.begin(Nt)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(Nt,Dt,xt,Jt){var Le=Jt;switch(xt){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Dt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Pn=/\n\s*/g;return Dt.yytext=Dt.yytext.replace(Pn,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return Nt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Nt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Nt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return Nt.lex.firstGraph()&&this.begin("dir"),12;break;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return this.popState(),14;break;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;break;case 71:return this.pushState("edgeText"),75;break;case 72:return 119;case 73:return this.popState(),77;break;case 74:return this.pushState("thickEdgeText"),75;break;case 75:return 119;case 76:return this.popState(),77;break;case 77:return this.pushState("dottedEdgeText"),75;break;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;break;case 83:return this.popState(),55;break;case 84:return this.pushState("text"),54;break;case 85:return this.popState(),57;break;case 86:return this.pushState("text"),56;break;case 87:return 58;case 88:return this.pushState("text"),67;break;case 89:return this.popState(),64;break;case 90:return this.pushState("text"),63;break;case 91:return this.popState(),49;break;case 92:return this.pushState("text"),48;break;case 93:return this.popState(),69;break;case 94:return this.popState(),71;break;case 95:return 117;case 96:return this.pushState("trapText"),68;break;case 97:return this.pushState("trapText"),70;break;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;break;case 110:return this.pushState("text"),62;break;case 111:return this.popState(),51;break;case 112:return this.pushState("text"),50;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),66;break;case 116:return this.pushState("text"),65;break;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),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)/,/^(?:swimlane-beta\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]*)/,/^(?:.*direction\s+TD[^\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)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],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,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return At})();xr.lexer=cn;function br(){this.yy={}}return v(br,"Parser"),br.prototype=xr,xr.Parser=br,new br})();HF.parser=HF;qTe=HF,VTe=Object.assign({},qTe);VTe.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return qTe.parse(t)};zft=VTe,Gft=v((e,t)=>{let r=d0,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return Gi(n,i,a,t)},"fade"),qft=v(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } @@ -940,12 +973,6 @@ Expecting `+lk.join(", ")+", got '"+(this.terminals_[Wa]||Wa)+"'":r8="Parse erro .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { text-anchor: middle; } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } .node .katex path { fill: #000; @@ -971,7 +998,7 @@ Expecting `+lk.join(", ")+", got '"+(this.terminals_[Wa]||Wa)+"'":r8="Parse erro fill: ${e.arrowheadColor}; } - .edgePath .path { + .edgePaths .path { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth??2}px; } @@ -996,7 +1023,7 @@ Expecting `+lk.join(", ")+", got '"+(this.terminals_[Wa]||Wa)+"'":r8="Parse erro /* For html labels only */ .labelBkg { - background-color: ${Kat(e.edgeLabelBackground,.5)}; + background-color: ${Gft(e.edgeLabelBackground,.5)}; // background-color: } @@ -1017,6 +1044,18 @@ Expecting `+lk.join(", ")+", got '"+(this.terminals_[Wa]||Wa)+"'":r8="Parse erro color: ${e.titleColor}; } */ + /* Collapsed subgraph node (@{ view: collapsed }) */ + .node .collapsed-indicator { + fill: ${e.clusterBorder}; + stroke: none; + opacity: 0.6; + } + + .node .collapsed-separator { + stroke: ${e.clusterBorder}; + stroke-width: 0.75px; + } + div.mermaidTooltip { position: absolute; text-align: center; @@ -1055,25 +1094,32 @@ Expecting `+lk.join(", ")+", got '"+(this.terminals_[Wa]||Wa)+"'":r8="Parse erro } text-align: center; } - ${nu()} -`,"getStyles"),Qat=Zat,Jat={parser:Xat,get db(){return new Uat},renderer:jat,styles:Qat,init:b(e=>{e.flowchart||(e.flowchart={}),e.layout&&Zv({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Zv({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}});var rye={};Lr(rye,{diagram:()=>sst});var EP,est,tst,tye,rst,eye,hE,ist,nst,ast,sst,iye=q(()=>{Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();Ar();Sn();EP=(function(){var e=b(function(Se,Me,ke,Ce){for(ke=ke||{},Ce=Se.length;Ce--;ke[Se[Ce]]=Me);return ke},"o"),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],n=[1,12],a=[1,13],s=[1,23],o=[1,24],l=[1,25],u=[1,26],h=[1,27],f=[1,19],d=[1,28],p=[1,29],g=[1,20],m=[1,18],y=[1,21],v=[1,22],x=[1,36],T=[1,37],C=[1,38],w=[1,39],k=[1,40],E=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],A=[1,45],N=[1,46],P=[1,55],O=[40,48,50,51,52,70,71],L=[1,66],_=[1,64],R=[1,61],D=[1,65],I=[1,67],B=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],M=[65,66,67,68,69],F=[1,84],z=[1,83],$=[1,81],G=[1,82],U=[6,10,42,47],j=[6,10,13,41,42,47,48,49],H=[1,92],Q=[1,91],Y=[1,90],se=[19,58],J=[1,101],re=[1,100],ie=[19,58,60,62],te={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,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,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},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",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},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],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:b(function(Me,ke,Ce,Ie,Pe,pe,Je){var Te=pe.length-1;switch(Pe){case 1:break;case 2:this.$=[];break;case 3:pe[Te-1].push(pe[Te]),this.$=pe[Te-1];break;case 4:case 5:this.$=pe[Te];break;case 6:case 7:this.$=[];break;case 8:Ie.addEntity(pe[Te-4]),Ie.addEntity(pe[Te-2]),Ie.addRelationship(pe[Te-4],pe[Te],pe[Te-2],pe[Te-3]);break;case 9:Ie.addEntity(pe[Te-8]),Ie.addEntity(pe[Te-4]),Ie.addRelationship(pe[Te-8],pe[Te],pe[Te-4],pe[Te-5]),Ie.setClass([pe[Te-8]],pe[Te-6]),Ie.setClass([pe[Te-4]],pe[Te-2]);break;case 10:Ie.addEntity(pe[Te-6]),Ie.addEntity(pe[Te-2]),Ie.addRelationship(pe[Te-6],pe[Te],pe[Te-2],pe[Te-3]),Ie.setClass([pe[Te-6]],pe[Te-4]);break;case 11:Ie.addEntity(pe[Te-6]),Ie.addEntity(pe[Te-4]),Ie.addRelationship(pe[Te-6],pe[Te],pe[Te-4],pe[Te-5]),Ie.setClass([pe[Te-4]],pe[Te-2]);break;case 12:Ie.addEntity(pe[Te-3]),Ie.addAttributes(pe[Te-3],pe[Te-1]);break;case 13:Ie.addEntity(pe[Te-5]),Ie.addAttributes(pe[Te-5],pe[Te-1]),Ie.setClass([pe[Te-5]],pe[Te-3]);break;case 14:Ie.addEntity(pe[Te-2]);break;case 15:Ie.addEntity(pe[Te-4]),Ie.setClass([pe[Te-4]],pe[Te-2]);break;case 16:Ie.addEntity(pe[Te]);break;case 17:Ie.addEntity(pe[Te-2]),Ie.setClass([pe[Te-2]],pe[Te]);break;case 18:Ie.addEntity(pe[Te-6],pe[Te-4]),Ie.addAttributes(pe[Te-6],pe[Te-1]);break;case 19:Ie.addEntity(pe[Te-8],pe[Te-6]),Ie.addAttributes(pe[Te-8],pe[Te-1]),Ie.setClass([pe[Te-8]],pe[Te-3]);break;case 20:Ie.addEntity(pe[Te-5],pe[Te-3]);break;case 21:Ie.addEntity(pe[Te-7],pe[Te-5]),Ie.setClass([pe[Te-7]],pe[Te-2]);break;case 22:Ie.addEntity(pe[Te-3],pe[Te-1]);break;case 23:Ie.addEntity(pe[Te-5],pe[Te-3]),Ie.setClass([pe[Te-5]],pe[Te]);break;case 24:case 25:this.$=pe[Te].trim(),Ie.setAccTitle(this.$);break;case 26:case 27:this.$=pe[Te].trim(),Ie.setAccDescription(this.$);break;case 32:Ie.setDirection("TB");break;case 33:Ie.setDirection("BT");break;case 34:Ie.setDirection("RL");break;case 35:Ie.setDirection("LR");break;case 36:this.$=pe[Te-3],Ie.addClass(pe[Te-2],pe[Te-1]);break;case 37:case 38:case 59:case 67:this.$=[pe[Te]];break;case 39:case 40:this.$=pe[Te-2].concat([pe[Te]]);break;case 41:this.$=pe[Te-2],Ie.setClass(pe[Te-1],pe[Te]);break;case 42:this.$=pe[Te-3],Ie.addCssStyles(pe[Te-2],pe[Te-1]);break;case 43:this.$=[pe[Te]];break;case 44:pe[Te-2].push(pe[Te]),this.$=pe[Te-2];break;case 46:this.$=pe[Te-1]+pe[Te];break;case 54:case 79:case 80:this.$=pe[Te].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=pe[Te];break;case 60:pe[Te].push(pe[Te-1]),this.$=pe[Te];break;case 61:this.$={type:pe[Te-1],name:pe[Te]};break;case 62:this.$={type:pe[Te-2],name:pe[Te-1],keys:pe[Te]};break;case 63:this.$={type:pe[Te-2],name:pe[Te-1],comment:pe[Te]};break;case 64:this.$={type:pe[Te-3],name:pe[Te-2],keys:pe[Te-1],comment:pe[Te]};break;case 65:case 66:case 69:this.$=pe[Te];break;case 68:pe[Te-2].push(pe[Te]),this.$=pe[Te-2];break;case 70:this.$=pe[Te].replace(/"/g,"");break;case 71:this.$={cardA:pe[Te],relType:pe[Te-1],cardB:pe[Te-2]};break;case 72:this.$=Ie.Cardinality.ZERO_OR_ONE;break;case 73:this.$=Ie.Cardinality.ZERO_OR_MORE;break;case 74:this.$=Ie.Cardinality.ONE_OR_MORE;break;case 75:this.$=Ie.Cardinality.ONLY_ONE;break;case 76:this.$=Ie.Cardinality.MD_PARENT;break;case 77:this.$=Ie.Identification.NON_IDENTIFYING;break;case 78:this.$=Ie.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,48:g,50:m,51:y,52:v},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:30,11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,48:g,50:m,51:y,52:v},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:x,66:T,67:C,68:w,69:k}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(E,[2,54]),e(E,[2,55]),e(E,[2,56]),e(E,[2,57]),e(E,[2,58]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:44,40:A,41:N},{16:47,40:A,41:N},{16:48,40:A,41:N},e(t,[2,4]),{11:49,40:f,48:g,50:m,51:y,52:v},{16:50,40:A,41:N},{18:51,19:[1,52],53:53,54:54,58:P},{11:56,40:f,48:g,50:m,51:y,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:L,38:60,41:_,42:R,45:62,46:63,48:D,49:I},e(B,[2,37]),e(B,[2,38]),{16:68,40:A,41:N,42:R},{13:L,38:69,41:_,42:R,45:62,46:63,48:D,49:I},{13:[1,70],15:[1,71]},e(t,[2,17],{63:35,12:72,17:[1,73],42:R,65:x,66:T,67:C,68:w,69:k}),{19:[1,74]},e(t,[2,14]),{18:75,19:[2,59],53:53,54:54,58:P},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:x,66:T,67:C,68:w,69:k},e(M,[2,77]),e(M,[2,78]),{6:F,10:z,39:80,42:$,47:G},{40:[1,85],41:[1,86]},e(U,[2,43],{46:87,13:L,41:_,48:D,49:I}),e(j,[2,45]),e(j,[2,50]),e(j,[2,51]),e(j,[2,52]),e(j,[2,53]),e(t,[2,41],{42:R}),{6:F,10:z,39:88,42:$,47:G},{14:89,40:H,50:Q,72:Y},{16:93,40:A,41:N},{11:94,40:f,48:g,50:m,51:y,52:v},{18:95,19:[1,96],53:53,54:54,58:P},e(t,[2,12]),{19:[2,60]},e(se,[2,61],{56:97,57:98,59:99,61:J,62:re}),e([19,58,61,62],[2,66]),e(t,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(t,[2,36]),{13:L,41:_,45:104,46:63,48:D,49:I},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(B,[2,39]),e(B,[2,40]),e(j,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,79]),e(t,[2,80]),e(t,[2,81]),{13:[1,105],42:R},{13:[1,107],15:[1,106]},{19:[1,108]},e(t,[2,15]),e(se,[2,62],{57:109,60:[1,110],62:re}),e(se,[2,63]),e(ie,[2,67]),e(se,[2,70]),e(ie,[2,69]),{18:111,19:[1,112],53:53,54:54,58:P},{16:113,40:A,41:N},e(U,[2,44],{46:87,13:L,41:_,48:D,49:I}),{14:114,40:H,50:Q,72:Y},{16:115,40:A,41:N},{14:116,40:H,50:Q,72:Y},e(t,[2,13]),e(se,[2,64]),{59:117,61:J},{19:[1,118]},e(t,[2,20]),e(t,[2,23],{17:[1,119],42:R}),e(t,[2,11]),{13:[1,120],42:R},e(t,[2,10]),e(ie,[2,68]),e(t,[2,18]),{18:121,19:[1,122],53:53,54:54,58:P},{14:123,40:H,50:Q,72:Y},{19:[1,124]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:b(function(Me,ke){if(ke.recoverable)this.trace(Me);else{var Ce=new Error(Me);throw Ce.hash=ke,Ce}},"parseError"),parse:b(function(Me){var ke=this,Ce=[0],Ie=[],Pe=[null],pe=[],Je=this.table,Te="",Be=0,He=0,nt=0,qe=2,Ue=1,ge=pe.slice.call(arguments,1),ce=Object.create(this.lexer),V={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(V.yy[le]=this.yy[le]);ce.setInput(Me,V.yy),V.yy.lexer=ce,V.yy.parser=this,typeof ce.yylloc>"u"&&(ce.yylloc={});var X=ce.yylloc;pe.push(X);var he=ce.options&&ce.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(ft){Ce.length=Ce.length-2*ft,Pe.length=Pe.length-ft,pe.length=pe.length-ft}b(Z,"popStack");function Ve(){var ft;return ft=Ie.pop()||ce.lex()||Ue,typeof ft!="number"&&(ft instanceof Array&&(Ie=ft,ft=Ie.pop()),ft=ke.symbols_[ft]||ft),ft}b(Ve,"lex");for(var ve,Oe,Ae,Fe,Re,We,De={},Ye,ue,Tt,be;;){if(Ae=Ce[Ce.length-1],this.defaultActions[Ae]?Fe=this.defaultActions[Ae]:((ve===null||typeof ve>"u")&&(ve=Ve()),Fe=Je[Ae]&&Je[Ae][ve]),typeof Fe>"u"||!Fe.length||!Fe[0]){var it="";be=[];for(Ye in Je[Ae])this.terminals_[Ye]&&Ye>qe&&be.push("'"+this.terminals_[Ye]+"'");ce.showPosition?it="Parse error on line "+(Be+1)+`: -`+ce.showPosition()+` -Expecting `+be.join(", ")+", got '"+(this.terminals_[ve]||ve)+"'":it="Parse error on line "+(Be+1)+": Unexpected "+(ve==Ue?"end of input":"'"+(this.terminals_[ve]||ve)+"'"),this.parseError(it,{text:ce.match,token:this.terminals_[ve]||ve,line:ce.yylineno,loc:X,expected:be})}if(Fe[0]instanceof Array&&Fe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ae+", token: "+ve);switch(Fe[0]){case 1:Ce.push(ve),Pe.push(ce.yytext),pe.push(ce.yylloc),Ce.push(Fe[1]),ve=null,Oe?(ve=Oe,Oe=null):(He=ce.yyleng,Te=ce.yytext,Be=ce.yylineno,X=ce.yylloc,nt>0&&nt--);break;case 2:if(ue=this.productions_[Fe[1]][1],De.$=Pe[Pe.length-ue],De._$={first_line:pe[pe.length-(ue||1)].first_line,last_line:pe[pe.length-1].last_line,first_column:pe[pe.length-(ue||1)].first_column,last_column:pe[pe.length-1].last_column},he&&(De._$.range=[pe[pe.length-(ue||1)].range[0],pe[pe.length-1].range[1]]),We=this.performAction.apply(De,[Te,He,Be,V.yy,Fe[1],Pe,pe].concat(ge)),typeof We<"u")return We;ue&&(Ce=Ce.slice(0,-1*ue*2),Pe=Pe.slice(0,-1*ue),pe=pe.slice(0,-1*ue)),Ce.push(this.productions_[Fe[1]][0]),Pe.push(De.$),pe.push(De._$),Tt=Je[Ce[Ce.length-2]][Ce[Ce.length-1]],Ce.push(Tt);break;case 3:return!0}}return!0},"parse")},xe=(function(){var Se={EOF:1,parseError:b(function(ke,Ce){if(this.yy.parser)this.yy.parser.parseError(ke,Ce);else throw new Error(ke)},"parseError"),setInput:b(function(Me,ke){return this.yy=ke||this.yy||{},this._input=Me,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Me=this._input[0];this.yytext+=Me,this.yyleng++,this.offset++,this.match+=Me,this.matched+=Me;var ke=Me.match(/(?:\r\n?|\n).*/g);return ke?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Me},"input"),unput:b(function(Me){var ke=Me.length,Ce=Me.split(/(?:\r\n?|\n)/g);this._input=Me+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ke),this.offset-=ke;var Ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ce.length-1&&(this.yylineno-=Ce.length-1);var Pe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ce?(Ce.length===Ie.length?this.yylloc.first_column:0)+Ie[Ie.length-Ce.length].length-Ce[0].length:this.yylloc.first_column-ke},this.options.ranges&&(this.yylloc.range=[Pe[0],Pe[0]+this.yyleng-ke]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Me){this.unput(this.match.slice(Me))},"less"),pastInput:b(function(){var Me=this.matched.substr(0,this.matched.length-this.match.length);return(Me.length>20?"...":"")+Me.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Me=this.match;return Me.length<20&&(Me+=this._input.substr(0,20-Me.length)),(Me.substr(0,20)+(Me.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Me=this.pastInput(),ke=new Array(Me.length+1).join("-");return Me+this.upcomingInput()+` -`+ke+"^"},"showPosition"),test_match:b(function(Me,ke){var Ce,Ie,Pe;if(this.options.backtrack_lexer&&(Pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Pe.yylloc.range=this.yylloc.range.slice(0))),Ie=Me[0].match(/(?:\r\n?|\n).*/g),Ie&&(this.yylineno+=Ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ie?Ie[Ie.length-1].length-Ie[Ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Me[0].length},this.yytext+=Me[0],this.match+=Me[0],this.matches=Me,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(Me[0].length),this.matched+=Me[0],Ce=this.performAction.call(this,this.yy,this,ke,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ce)return Ce;if(this._backtrack){for(var pe in Pe)this[pe]=Pe[pe];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Me,ke,Ce,Ie;this._more||(this.yytext="",this.match="");for(var Pe=this._currentRules(),pe=0;peke[0].length)){if(ke=Ce,Ie=pe,this.options.backtrack_lexer){if(Me=this.test_match(Ce,Pe[pe]),Me!==!1)return Me;if(this._backtrack){ke=!1;continue}else return!1}else if(!this.options.flex)break}return ke?(Me=this.test_match(ke,Pe[Ie]),Me!==!1?Me:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var ke=this.next();return ke||this.lex()},"lex"),begin:b(function(ke){this.conditionStack.push(ke)},"begin"),popState:b(function(){var ke=this.conditionStack.length-1;return ke>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(ke){return ke=this.conditionStack.length-1-Math.abs(ke||0),ke>=0?this.conditionStack[ke]:"INITIAL"},"topState"),pushState:b(function(ke){this.begin(ke)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(ke,Ce,Ie,Pe){var pe=Pe;switch(Ie){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 61;case 25:return 58;case 26:return 58;case 27:return 62;case 28:break;case 29:return this.popState(),19;break;case 30:return Ce.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 65;case 42:return 67;case 43:return 67;case 44:return 67;case 45:return 65;case 46:return 65;case 47:return 66;case 48:return 66;case 49:return 66;case 50:return 66;case 51:return 66;case 52:return 67;case 53:return 66;case 54:return 67;case 55:return 68;case 56:return 68;case 57:return 51;case 58:return 68;case 59:return 68;case 60:return 68;case 61:return 52;case 62:return 48;case 63:return 68;case 64:return 65;case 65:return 66;case 66:return 67;case 67:return 69;case 68:return 70;case 69:return 71;case 70:return 71;case 71:return 70;case 72:return 70;case 73:return 70;case 74:return 41;case 75:return 47;case 76:return 40;case 77:return Ce.yytext[0];case 78:return 6}},"anonymous"),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,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],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,69,70,71,72,73,76,77,78],inclusive:!0}}};return Se})();te.lexer=xe;function fe(){this.yy={}}return b(fe,"Parser"),fe.prototype=te,te.Parser=fe,new fe})();EP.parser=EP;est=EP,tst=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=yr,this.getAccTitle=vr,this.setAccDescription=br,this.getAccDescription=xr,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,this.getConfig=b(()=>we().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)}static{b(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,ee.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:"erBox",look:we().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),ee.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=""),r.attributes.push(t[i]),ee.debug("Added attribute ",t[i].name)}addRelationship(e,t,r,i){let n=this.entities.get(e),a=this.entities.get(r);if(!n||!a)return;let s={entityA:n.id,roleA:t,entityB:a.id,relSpec:i};this.relationships.push(s),ee.debug("Added new relationship :",s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let r of e){let i=this.classes.get(r);i?.styles&&(t=[...t,...i.styles??[]].map(n=>n.trim())),i?.textStyles&&(t=[...t,...i.textStyles??[]].map(n=>n.trim()))}return t}addCssStyles(e,t){for(let r of e){let i=this.entities.get(r);if(!t||!i)return;for(let n of t)i.cssStyles.push(n)}}addClass(e,t){e.forEach(r=>{let i=this.classes.get(r);i===void 0&&(i={id:r,styles:[],textStyles:[]},this.classes.set(r,i)),t&&t.forEach(function(n){if(/color/.exec(n)){let a=n.replace("fill","bgFill");i.textStyles.push(a)}i.styles.push(n)})})}setClass(e,t){for(let r of e){let i=this.entities.get(r);if(i)for(let n of t)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],fr()}getData(){let e=[],t=[],r=we(),i=0;for(let a of this.entities.keys()){let s=this.entities.get(a);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),s.colorIndex=i++,e.push(s))}let n=0;for(let a of this.relationships){let s={id:Mc(a.entityA,a.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:a.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:r.look,labelType:"markdown"};t.push(s)}return{nodes:e,edges:t,other:{},config:r,direction:"TB"}}},tye={};gf(tye,{draw:()=>rst});rst=b(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:s}=we(),o=i.db.getData(),l=rl(t,n);o.type=i.type,o.layoutAlgorithm=tu(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=i.db.getDirection();let{config:u}=o,{look:h}=u;h==="neo"?o.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await Ko(o,l),o.layoutAlgorithm==="elk"&&l.select(".edges").lower();let f=l.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let p=Qe(this),m=p.attr("id").replace("-background",""),y=l.select(`#${CSS.escape(m)}`);if(!y.empty()){let v=y.attr("transform");p.attr("transform",v)}});let d=8;jt.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(l,d,"erDiagram",a?.useMaxWidth??!0)},"draw"),eye=b((e,t)=>{let r=yp,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return gn(i,n,a,t)},"fade"),hE=new Set(["redux-color","redux-dark-color"]),ist=b(e=>{let{theme:t,look:r,bkgColorArray:i,borderColorArray:n}=e;if(!hE.has(t))return"";let a=i?.length>0,s="";for(let o=0;o({parser:zft,get db(){return new Pft},renderer:Fft,styles:t,init:v(r=>{r.flowchart||(r.flowchart={});let n=AS().layout??e??r.layout;n&&Tb({layout:n}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,Tb({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),WTe=mw()});var PA={};cr(PA,{createFlowDiagram:()=>mw,diagram:()=>WTe});var BA=X(()=>{XF();qu();sl();_o();cg();ko();al();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt()});var UTe={};cr(UTe,{diagram:()=>Uft});var Vft,Wft,Uft,HTe=X(()=>{XF();qu();sl();_o();cg();ko();al();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();Vft=v(e=>`${YF(e)} + .swimlane.cluster rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),Wft=Vft,Uft=mw({defaultLayout:"swimlane",styles:Wft})});var jTe={};cr(jTe,{diagram:()=>Qft});var jF,Hft,Yft,XTe,Xft,YTe,$A,jft,Kft,Zft,Qft,KTe=X(()=>{sl();_o();ko();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();zr();Qi();jF=(function(){var e=v(function(Me,re,le,oe){for(le=le||{},oe=Me.length;oe--;le[Me[oe]]=re);return le},"o"),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],n=[1,7],i=[1,9],a=[1,10],s=[1,11],o=[1,12],l=[1,30],u=[1,23],h=[1,24],f=[1,25],d=[1,26],p=[1,27],g=[1,19],m=[1,28],y=[1,29],x=[1,20],b=[1,18],T=[1,21],k=[1,22],w=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],S=[1,36],E=[1,37],L=[1,38],N=[1,39],O=[1,40],R=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],_=[1,46],D=[1,47],I=[1,57],M=[43,51,53,54,55,74,75],B=[1,70],P=[1,68],$=[1,65],G=[1,69],q=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],V=[1,78],j=[1,77],ee=[1,76],ne=[69,70,71,72,73],Q=[1,91],pe=[6,9,45,50],te=[6,9,12,44,45,50,51,52],de=[1,101],ce=[1,100],ue=[1,99],Re=[18,61],ve=[1,110],Ge=[1,109],He=[20,43,51,53,54,55],Ue=[18,61,64,66],me={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",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",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:v(function(re,le,oe,he,xe,se,F){var H=se.length-1;switch(xe){case 1:break;case 2:this.$=[];break;case 3:this.$=se[H-1].concat(se[H]);break;case 4:this.$=se[H];break;case 5:case 6:this.$=[];break;case 7:he.addEntity(se[H-4]),he.addEntity(se[H-2]),he.addRelationship(se[H-4],se[H],se[H-2],se[H-3]),this.$=[se[H-4],se[H-2]];break;case 8:he.addEntity(se[H-8]),he.addEntity(se[H-4]),he.addRelationship(se[H-8],se[H],se[H-4],se[H-5]),he.setClass([se[H-8]],se[H-6]),he.setClass([se[H-4]],se[H-2]),this.$=[se[H-8],se[H-4]];break;case 9:he.addEntity(se[H-6]),he.addEntity(se[H-2]),he.addRelationship(se[H-6],se[H],se[H-2],se[H-3]),he.setClass([se[H-6]],se[H-4]),this.$=[se[H-6],se[H-2]];break;case 10:he.addEntity(se[H-6]),he.addEntity(se[H-4]),he.addRelationship(se[H-6],se[H],se[H-4],se[H-5]),he.setClass([se[H-4]],se[H-2]),this.$=[se[H-6],se[H-4]];break;case 11:he.addEntity(se[H-3]),he.addAttributes(se[H-3],se[H-1]),this.$=[se[H-3]];break;case 12:he.addEntity(se[H-5]),he.addAttributes(se[H-5],se[H-1]),he.setClass([se[H-5]],se[H-3]),this.$=[se[H-5]];break;case 13:he.addEntity(se[H-2]),this.$=[se[H-2]];break;case 14:he.addEntity(se[H-4]),he.setClass([se[H-4]],se[H-2]),this.$=[se[H-4]];break;case 15:he.addEntity(se[H]),this.$=[se[H]];break;case 16:he.addEntity(se[H-2]),he.setClass([se[H-2]],se[H]),this.$=[se[H-2]];break;case 17:he.addEntity(se[H-6],se[H-4]),he.addAttributes(se[H-6],se[H-1]),this.$=[se[H-6]];break;case 18:he.addEntity(se[H-8],se[H-6]),he.addAttributes(se[H-8],se[H-1]),he.setClass([se[H-8]],se[H-3]),this.$=[se[H-8]];break;case 19:he.addEntity(se[H-5],se[H-3]),this.$=[se[H-5]];break;case 20:he.addEntity(se[H-7],se[H-5]),he.setClass([se[H-7]],se[H-2]),this.$=[se[H-7]];break;case 21:he.addEntity(se[H-3],se[H-1]);break;case 22:he.addEntity(se[H-5],se[H-3]),he.setClass([se[H-5]],se[H]);break;case 23:case 24:this.$=se[H].trim(),he.setAccTitle(this.$);break;case 25:case 26:this.$=se[H].trim(),he.setAccDescription(this.$);break;case 27:he.subgraphDepth?this.$=se[H]:(he.setDirection(se[H].value),this.$=[]);break;case 31:he.subgraphDepth=(he.subgraphDepth||1)-1,this.$=he.addSubGraph({text:se[H-2].id},se[H-1],{text:se[H-2].text});break;case 32:he.subgraphDepth=(he.subgraphDepth||0)+1,this.$={id:se[H-1],text:se[H-1]};break;case 33:he.subgraphDepth=(he.subgraphDepth||0)+1,this.$={id:se[H-4],text:se[H-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=se[H];break;case 35:this.$=se[H-1]+" "+se[H];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=se[H-3],he.addClass(se[H-2],se[H-1]);break;case 41:case 42:case 63:case 72:this.$=[se[H]];break;case 43:case 44:this.$=se[H-2].concat([se[H]]);break;case 45:this.$=se[H-2],he.setClass(se[H-1],se[H]);break;case 46:this.$=se[H-3],he.addCssStyles(se[H-2],se[H-1]);break;case 47:this.$=[se[H]];break;case 48:se[H-2].push(se[H]),this.$=se[H-2];break;case 50:this.$=se[H-1]+se[H];break;case 58:case 84:case 85:this.$=se[H].replace(/"/g,"");break;case 64:se[H].push(se[H-1]),this.$=se[H];break;case 65:this.$={type:se[H-1],name:se[H]};break;case 66:this.$={type:se[H-2],name:se[H-1],keys:se[H]};break;case 67:this.$={type:se[H-2],name:se[H-1],comment:se[H]};break;case 68:this.$={type:se[H-3],name:se[H-2],keys:se[H-1],comment:se[H]};break;case 69:case 71:case 74:this.$=se[H];break;case 70:this.$=se[H-1]+se[H];break;case 73:se[H-2].push(se[H]),this.$=se[H-2];break;case 75:this.$=se[H].replace(/"/g,"");break;case 76:this.$={cardA:se[H],relType:se[H-1],cardB:se[H-2]};break;case 77:this.$=he.Cardinality.ZERO_OR_ONE;break;case 78:this.$=he.Cardinality.ZERO_OR_MORE;break;case 79:this.$=he.Cardinality.ONE_OR_MORE;break;case 80:this.$=he.Cardinality.ONLY_ONE;break;case 81:this.$=he.Cardinality.MD_PARENT;break;case 82:this.$=he.Identification.NON_IDENTIFYING;break;case 83:this.$=he.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,r,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:i,23:a,25:s,27:o,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:h,39:f,40:d,41:p,43:g,46:m,47:y,51:x,53:b,54:T,55:k},e(t,w,{1:[2,1]}),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:S,70:E,71:L,72:N,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,r,{5:44}),e(R,[2,58]),e(R,[2,59]),e(R,[2,60]),e(R,[2,61]),e(R,[2,62]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),e(C,[2,39]),{15:45,43:_,44:D},{15:48,43:_,44:D},{15:49,43:_,44:D},{10:50,43:g,51:x,53:b,54:T,55:k},{10:51,43:g,51:x,53:b,54:T,55:k},{15:52,43:_,44:D},{17:53,18:[1,54],56:55,57:56,61:I},{10:58,43:g,51:x,53:b,54:T,55:k},{68:59,74:[1,60],75:[1,61]},e(M,[2,77]),e(M,[2,78]),e(M,[2,79]),e(M,[2,80]),e(M,[2,81]),e(C,[2,23]),e(C,[2,24]),e(C,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:i,23:a,25:s,27:o,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:h,39:f,40:d,41:p,43:g,46:m,47:y,51:x,53:b,54:T,55:k},{12:B,42:64,44:P,45:$,48:66,49:67,51:G,52:q},e(z,[2,41]),e(z,[2,42]),{15:72,43:_,44:D,45:$},{12:B,42:73,44:P,45:$,48:66,49:67,51:G,52:q},{6:V,9:j,19:[1,75],35:74,50:ee},{12:[1,79],14:[1,80]},e(C,[2,16],{67:35,11:81,16:[1,82],45:$,69:S,70:E,71:L,72:N,73:O}),{18:[1,83]},e(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:I},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:S,70:E,71:L,72:N,73:O},e(ne,[2,82]),e(ne,[2,83]),e(C,[2,31]),e(C,w),{6:V,9:j,35:90,45:Q,50:ee},{43:[1,92],44:[1,93]},e(pe,[2,47],{49:94,12:B,44:P,51:G,52:q}),e(te,[2,49]),e(te,[2,54]),e(te,[2,55]),e(te,[2,56]),e(te,[2,57]),e(C,[2,45],{45:$}),{6:V,9:j,35:95,45:Q,50:ee},e(C,[2,32]),{10:97,36:96,43:g,51:x,53:b,54:T,55:k},e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),{13:98,43:de,53:ce,76:ue},{15:102,43:_,44:D},{10:103,43:g,51:x,53:b,54:T,55:k},{17:104,18:[1,105],56:55,57:56,61:I},e(C,[2,11]),{18:[2,64]},e(Re,[2,65],{59:106,60:107,63:108,65:ve,66:Ge}),e([18,61,65,66],[2,71]),{61:[2,70]},e(C,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(C,[2,40]),{12:B,44:P,48:113,49:67,51:G,52:q},e(z,[2,43]),e(z,[2,44]),e(te,[2,50]),e(C,[2,46]),{10:115,20:[1,114],43:g,51:x,53:b,54:T,55:k},e(He,[2,34]),e(C,[2,7]),e(C,[2,84]),e(C,[2,85]),e(C,[2,86]),{12:[1,116],45:$},{12:[1,118],14:[1,117]},{18:[1,119]},e(C,[2,14]),e(Re,[2,66],{60:120,64:[1,121],66:Ge}),e(Re,[2,67]),e(Ue,[2,72]),e(Re,[2,75]),e(Ue,[2,74]),{17:122,18:[1,123],56:55,57:56,61:I},{15:124,43:_,44:D},e(pe,[2,48],{49:94,12:B,44:P,51:G,52:q}),{6:V,9:j,35:125,50:ee},e(He,[2,35]),{13:126,43:de,53:ce,76:ue},{15:127,43:_,44:D},{13:128,43:de,53:ce,76:ue},e(C,[2,12]),e(Re,[2,68]),{63:129,65:ve},{18:[1,130]},e(C,[2,19]),e(C,[2,22],{16:[1,131],45:$}),e(C,[2,33]),e(C,[2,10]),{12:[1,132],45:$},e(C,[2,9]),e(Ue,[2,73]),e(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:I},{13:135,43:de,53:ce,76:ue},{18:[1,136]},e(C,[2,20]),e(C,[2,8]),e(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:v(function(re,le){if(le.recoverable)this.trace(re);else{var oe=new Error(re);throw oe.hash=le,oe}},"parseError"),parse:v(function(re){var le=this,oe=[0],he=[],xe=[null],se=[],F=this.table,H="",W=0,U=0,ae=0,K=2,Y=1,Z=se.slice.call(arguments,1),Ce=Object.create(this.lexer),we={yy:{}};for(var ke in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ke)&&(we.yy[ke]=this.yy[ke]);Ce.setInput(re,we.yy),we.yy.lexer=Ce,we.yy.parser=this,typeof Ce.yylloc>"u"&&(Ce.yylloc={});var Se=Ce.yylloc;se.push(Se);var Ne=Ce.options&&Ce.options.ranges;typeof we.yy.parseError=="function"?this.parseError=we.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(ot){oe.length=oe.length-2*ot,xe.length=xe.length-ot,se.length=se.length-ot}v(Ae,"popStack");function Fe(){var ot;return ot=he.pop()||Ce.lex()||Y,typeof ot!="number"&&(ot instanceof Array&&(he=ot,ot=he.pop()),ot=le.symbols_[ot]||ot),ot}v(Fe,"lex");for(var Pe,We,be,lt,$e,at,bt={},Et,pt,Ct,ht;;){if(be=oe[oe.length-1],this.defaultActions[be]?lt=this.defaultActions[be]:((Pe===null||typeof Pe>"u")&&(Pe=Fe()),lt=F[be]&&F[be][Pe]),typeof lt>"u"||!lt.length||!lt[0]){var Te="";ht=[];for(Et in F[be])this.terminals_[Et]&&Et>K&&ht.push("'"+this.terminals_[Et]+"'");Ce.showPosition?Te="Parse error on line "+(W+1)+`: +`+Ce.showPosition()+` +Expecting `+ht.join(", ")+", got '"+(this.terminals_[Pe]||Pe)+"'":Te="Parse error on line "+(W+1)+": Unexpected "+(Pe==Y?"end of input":"'"+(this.terminals_[Pe]||Pe)+"'"),this.parseError(Te,{text:Ce.match,token:this.terminals_[Pe]||Pe,line:Ce.yylineno,loc:Se,expected:ht})}if(lt[0]instanceof Array&<.length>1)throw new Error("Parse Error: multiple actions possible at state: "+be+", token: "+Pe);switch(lt[0]){case 1:oe.push(Pe),xe.push(Ce.yytext),se.push(Ce.yylloc),oe.push(lt[1]),Pe=null,We?(Pe=We,We=null):(U=Ce.yyleng,H=Ce.yytext,W=Ce.yylineno,Se=Ce.yylloc,ae>0&&ae--);break;case 2:if(pt=this.productions_[lt[1]][1],bt.$=xe[xe.length-pt],bt._$={first_line:se[se.length-(pt||1)].first_line,last_line:se[se.length-1].last_line,first_column:se[se.length-(pt||1)].first_column,last_column:se[se.length-1].last_column},Ne&&(bt._$.range=[se[se.length-(pt||1)].range[0],se[se.length-1].range[1]]),at=this.performAction.apply(bt,[H,U,W,we.yy,lt[1],xe,se].concat(Z)),typeof at<"u")return at;pt&&(oe=oe.slice(0,-1*pt*2),xe=xe.slice(0,-1*pt),se=se.slice(0,-1*pt)),oe.push(this.productions_[lt[1]][0]),xe.push(bt.$),se.push(bt._$),Ct=F[oe[oe.length-2]][oe[oe.length-1]],oe.push(Ct);break;case 3:return!0}}return!0},"parse")},De=(function(){var Me={EOF:1,parseError:v(function(le,oe){if(this.yy.parser)this.yy.parser.parseError(le,oe);else throw new Error(le)},"parseError"),setInput:v(function(re,le){return this.yy=le||this.yy||{},this._input=re,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var re=this._input[0];this.yytext+=re,this.yyleng++,this.offset++,this.match+=re,this.matched+=re;var le=re.match(/(?:\r\n?|\n).*/g);return le?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),re},"input"),unput:v(function(re){var le=re.length,oe=re.split(/(?:\r\n?|\n)/g);this._input=re+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-le),this.offset-=le;var he=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),oe.length-1&&(this.yylineno-=oe.length-1);var xe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:oe?(oe.length===he.length?this.yylloc.first_column:0)+he[he.length-oe.length].length-oe[0].length:this.yylloc.first_column-le},this.options.ranges&&(this.yylloc.range=[xe[0],xe[0]+this.yyleng-le]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(re){this.unput(this.match.slice(re))},"less"),pastInput:v(function(){var re=this.matched.substr(0,this.matched.length-this.match.length);return(re.length>20?"...":"")+re.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var re=this.match;return re.length<20&&(re+=this._input.substr(0,20-re.length)),(re.substr(0,20)+(re.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var re=this.pastInput(),le=new Array(re.length+1).join("-");return re+this.upcomingInput()+` +`+le+"^"},"showPosition"),test_match:v(function(re,le){var oe,he,xe;if(this.options.backtrack_lexer&&(xe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(xe.yylloc.range=this.yylloc.range.slice(0))),he=re[0].match(/(?:\r\n?|\n).*/g),he&&(this.yylineno+=he.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:he?he[he.length-1].length-he[he.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+re[0].length},this.yytext+=re[0],this.match+=re[0],this.matches=re,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(re[0].length),this.matched+=re[0],oe=this.performAction.call(this,this.yy,this,le,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var se in xe)this[se]=xe[se];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var re,le,oe,he;this._more||(this.yytext="",this.match="");for(var xe=this._currentRules(),se=0;sele[0].length)){if(le=oe,he=se,this.options.backtrack_lexer){if(re=this.test_match(oe,xe[se]),re!==!1)return re;if(this._backtrack){le=!1;continue}else return!1}else if(!this.options.flex)break}return le?(re=this.test_match(le,xe[he]),re!==!1?re:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var le=this.next();return le||this.lex()},"lex"),begin:v(function(le){this.conditionStack.push(le)},"begin"),popState:v(function(){var le=this.conditionStack.length-1;return le>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(le){return le=this.conditionStack.length-1-Math.abs(le||0),le>=0?this.conditionStack[le]:"INITIAL"},"topState"),pushState:v(function(le){this.begin(le)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(le,oe,he,xe){var se=xe;switch(he){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return oe.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return oe.yytext[0];case 82:return 6}},"anonymous"),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,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/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,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/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,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,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,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return Me})();me.lexer=De;function Ie(){this.yy={}}return v(Ie,"Parser"),Ie.prototype=me,me.Parser=Ie,new Ie})();jF.parser=jF;Hft=jF,Yft=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Ar,this.getAccTitle=Lr,this.setAccDescription=Ir,this.getAccDescription=Mr,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,this.getConfig=v(()=>ze().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),this.addSubGraph=this.addSubGraph.bind(this)}static{v(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,fe.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:"erBox",look:ze().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),fe.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),n;for(n=t.length-1;n>=0;n--)t[n].keys||(t[n].keys=[]),t[n].comment||(t[n].comment=""),r.attributes.push(t[n]),fe.debug("Added attribute ",t[n].name)}addRelationship(e,t,r,n){let i;if(this.subGraphLookup.has(e))i=e;else{let o=this.addEntity(e);if(!o)return;i=o.id}let a;if(this.subGraphLookup.has(r))a=r;else{let o=this.addEntity(r);if(!o)return;a=o.id}let s={entityA:i,roleA:t,entityB:a,relSpec:n};this.relationships.push(s),fe.debug("Added new relationship :",s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let r of e){let n=this.classes.get(r);n?.styles&&(t=[...t,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(t=[...t,...n.textStyles??[]].map(i=>i.trim()))}return t}addCssStyles(e,t){for(let r of e){let n=this.entities.get(r),i=this.subGraphLookup.get(r);if(t){if(n)for(let a of t)n.cssStyles.push(a);if(i){i.cssStyles||(i.cssStyles=[]);for(let a of t)i.cssStyles.push(a)}}}}addClass(e,t){e.forEach(r=>{let n=this.classes.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.classes.set(r,n)),t&&t.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})}addSubGraph(e,t,r){let n=e.text.trim(),i=r.text,s=v(h=>{let f=new Set,d;return{nodeList:h.filter(g=>{if(g?.stmt)return g.stmt==="dir"&&(d=g.value),!1;if(typeof g!="string")return!1;let m=g.trim();return!m||f.has(m)?!1:(f.add(m),!0)}),dir:d}},"uniq")(t.flat()),o=s.nodeList,l=s.dir;n=n??"subGraph"+this.subCount,i=i||"",i=this.sanitizeText(i),this.subCount=this.subCount+1;let u={id:n,nodes:o,title:i.trim(),classes:[],cssStyles:[],dir:l,labelType:this.sanitizeNodeLabelType(r?.type)};return fe.info("Adding",u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(n,u),n}getSubGraphs(){return this.subGraphs}setClass(e,t){for(let r of e){let n=this.entities.get(r);if(n)for(let a of t)n.cssClasses+=" "+a;let i=this.subGraphLookup.get(r);if(i)for(let a of t)i.classes.push(a)}}subgraphNodeCache(e){let t=new Set;for(let r of e)for(let n of r.nodes)t.add(n);return t}makeUniq(e,t){let r=this.subgraphNodeCache(t),n=[];return e.nodes.forEach((i,a)=>{r.has(i)?fe.warn(`Entity '${i}' already belongs to another subgraph and will be ignored`):n.push(e.nodes[a])}),{nodes:n}}sanitizeText(e){return vt.sanitizeText(e,ze())}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,pr()}getData(){let e=[],t=[],r=ze(),n=this.getSubGraphs(),i=new Map,a=new Map;for(let u=n.length-1;u>=0;u--){let h=n[u];h.nodes.length>0&&a.set(h.id,!0);for(let f of h.nodes)i.set(f,h.id)}for(let u=n.length-1;u>=0;u--){let h=n[u];e.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:i.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssStyles:h.cssStyles,cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:r.look})}let s=new Set(n.map(u=>u.id)),o=0;for(let u of this.entities.keys()){if(s.has(u))continue;let h=this.entities.get(u);h&&(h.cssCompiledStyles=this.getCompiledStyles(h.cssClasses.split(" ")),h.colorIndex=o++,e.push({...h,parentId:i.get(u),isGroup:!1}))}let l=0;for(let u of this.relationships){let h={id:uu(u.entityA,u.entityB,{prefix:"id",counter:l++}),type:"normal",curve:"basis",start:u.entityA,end:u.entityB,label:u.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:u.relSpec.cardB.toLowerCase(),arrowTypeEnd:u.relSpec.cardA.toLowerCase(),pattern:u.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:r.look,labelType:"markdown"};t.push(h)}return{nodes:e,edges:t,other:{},config:r,direction:this.direction}}},XTe={};ed(XTe,{draw:()=>Xft});Xft=v(async function(e,t,r,n){fe.info("REF0:"),fe.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:a,layout:s}=ze(),o=n.db.getData(),l=$l(t,i);o.type=n.type,o.layoutAlgorithm=Fu(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection();let{config:u}=o,{look:h}=u;h==="neo"?o.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await Ol(o,l),o.layoutAlgorithm==="elk"&&l.select(".edges").lower();let f=l.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let p=ct(this),m=p.attr("id").replace("-background",""),y=l.select(`#${CSS.escape(m)}`);if(!y.empty()){let x=y.attr("transform");p.attr("transform",x)}});let d=8;ar.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Ao(l,d,"erDiagram",a?.useMaxWidth??!0)},"draw"),YTe=v((e,t)=>{let r=d0,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return Gi(n,i,a,t)},"fade"),$A=new Set(["redux-color","redux-dark-color"]),jft=v(e=>{let{theme:t,look:r,bkgColorArray:n,borderColorArray:i}=e;if(!$A.has(t))return"";let a=n?.length>0,s="";for(let o=0;o{let{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return` - ${ist(e)} + `;return s},"genColor"),Kft=v(e=>{let{look:t,theme:r,erEdgeLabelBackground:n,strokeWidth:i}=e;return` + ${jft(e)} .entityBox { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; @@ -1089,14 +1135,14 @@ Expecting `+be.join(", ")+", got '"+(this.terminals_[ve]||ve)+"'":it="Parse erro } .labelBkg { - background-color: ${hE.has(r)&&i?i:eye(e.tertiaryColor,.5)}; + background-color: ${$A.has(r)&&n?n:YTe(e.tertiaryColor,.5)}; } .edgeLabel { - background-color: ${hE.has(r)&&i?i:e.edgeLabelBackground}; + background-color: ${$A.has(r)&&n?n:e.edgeLabelBackground}; } .edgeLabel .label rect { - fill: ${hE.has(r)&&i?i:e.edgeLabelBackground}; + fill: ${$A.has(r)&&n?n:e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.textColor}; @@ -1123,12 +1169,12 @@ Expecting `+be.join(", ")+", got '"+(this.terminals_[ve]||ve)+"'":it="Parse erro { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; - stroke-width: ${t==="neo"?n:"1px"}; + stroke-width: ${t==="neo"?i:"1px"}; } .relationshipLine { stroke: ${e.lineColor}; - stroke-width: ${t==="neo"?n:"1px"}; + stroke-width: ${t==="neo"?i:"1px"}; fill: none; } @@ -1138,208 +1184,227 @@ Expecting `+be.join(", ")+", got '"+(this.terminals_[ve]||ve)+"'":it="Parse erro stroke-width: 1; } [data-look=neo].labelBkg { - background-color: ${eye(e.tertiaryColor,.5)}; + background-color: ${YTe(e.tertiaryColor,.5)}; + } + + .cluster rect { + fill: ${e.clusterBkg??e.mainBkg}; + stroke: ${e.clusterBorder??e.nodeBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor??e.textColor}; + } + + .cluster-label text { + fill: ${e.titleColor??e.textColor}; } -`},"getStyles"),ast=nst,sst={parser:est,get db(){return new tst},renderer:tye,styles:ast}});function Un(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var au=q(()=>{er();b(Un,"populateCommonDb")});var ny,fE=q(()=>{er();ny=class{constructor(e){this.init=e,this.records=this.init()}static{b(this,"ImperativeState")}reset(){this.records=this.init()}}});function Dn(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function hs(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function gu(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function jF(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function V0(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function Ih(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function yg(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function W6(e){return Ih(e)&&typeof e.fullText=="string"}function e2e(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function IT(e){return!!e&&typeof e[Symbol.iterator]=="function"}function gi(...e){if(e.length===1){let t=e[0];if(t instanceof du)return t;if(IT(t))return new du(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new du(()=>({index:0}),r=>r.index1?new du(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex{Dn(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=a,t.deep&&Ly(n,t))}):Dn(i)&&(i.$container=e,i.$containerProperty=r,t.deep&&Ly(i,t)))}function vg(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function t2e(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function ql(e){let r=ky(e).$document;if(!r)throw new Error("AST node has no document.");return r}function ky(e){for(;e.$container;)e=e.$container;return e}function e6(e){return hs(e)?e.ref?[e.ref]:[]:gu(e)?e.items.map(t=>t.ref):[]}function ZT(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new du(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),i=>{for(;i.keyIndexZT(r,t))}function Vl(e,t){if(e){if(t?.range&&!t6(e,t.range))return new _y(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new _y(e,r=>ZT(r,t),{includeRoot:!0})}function t6(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?x$(r,t):!1}function Ry(e){return new du(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexIh(t)?t.content:[],{includeRoot:!0})}function x2e(e){return Dy(e).filter(yg)}function v$(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function NT(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Ny(e){if(!e)return;let{offset:t,end:r,range:i}=e;return{range:i,offset:t,end:r,length:r-t}}function b$(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return fu.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.linefu.After}function T2e(e,t,r=T$){if(e){if(t>0){let i=t-e.offset,n=e.text.charAt(i);r.test(n)||t--}return Z6(e,t)}}function w$(e,t){if(e){let r=S$(e,!0);if(r&&m6(r,t))return r;if(W6(e)){let i=e.content.findIndex(n=>!n.hidden);for(let n=i-1;n>=0;n--){let a=e.content[n];if(m6(a,t))return a}}}}function m6(e,t){return yg(e)&&t.includes(e.tokenType.name)}function Z6(e,t){if(yg(e))return e;if(Ih(e)){let r=C$(e,t,!1);if(r)return Z6(r,t)}}function k$(e,t){if(yg(e))return e;if(Ih(e)){let r=C$(e,t,!0);if(r)return k$(r,t)}}function C$(e,t,r){let i=0,n=e.content.length-1,a;for(;i<=n;){let s=Math.floor((i+n)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,i=s+1):n=s-1}return a}function S$(e,t=!0){for(;e.container;){let r=e.container,i=r.content.indexOf(e);for(;i>0;){i--;let n=r.content[i];if(t||!n.hidden)return n}e=r}}function w2e(e,t=!0){for(;e.container;){let r=e.container,i=r.content.indexOf(e),n=r.content.length-1;for(;it.test(r))}function Gy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R$(e,t){let r=I$(e),i=t.match(r);return!!i&&i[0].length>0}function I$(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,i=0;function n(){let a="",s;function o(u){a+=r.substr(i,u),i+=u}S(o,"appendRaw");function l(u){a+="(?:"+r.substr(i,u)+"|$)",i+=u}for(S(l,"appendOptional");i",i)-i+1);break;default:l(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=i,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=i,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[i+1]==="?")switch(r[i+2]){case":":a+="(?:",i+=3,a+=n()+"|$)";break;case"=":a+="(?=",i+=3,a+=n()+")";break;case"!":s=i,i+=3,n(),a+=r.substr(s,i-s);break;case"<":switch(r[i+3]){case"=":case"!":s=i,i+=4,n(),a+=r.substr(s,i-s);break;default:o(r.indexOf(">",i)-i+1),a+=n()+"|$)";break}break}else o(1),a+=n()+"|$)";break;case")":return++i,a;default:l(1);break}return a}return S(n,"process"),new RegExp(n(),e.flags)}function D$(e){return e.rules.find(t=>ps(t)&&t.entry)}function N$(e){return e.rules.filter(t=>ll(t)&&t.hidden)}function tA(e,t){let r=new Set,i=D$(e);if(!i)return new Set(e.rules);let n=[i].concat(N$(e));for(let s of n)M$(s,r,t);let a=new Set;for(let s of e.rules)(r.has(s.name)||ll(s)&&s.hidden)&&a.add(s);return a}function M$(e,t,r){t.add(e.name),Gh(e).forEach(i=>{if(Mh(i)||r&&j6(i)){let n=i.rule.ref;n&&!t.has(n.name)&&M$(n,t,r)}})}function I2e(e){let t=new Set;return Gh(e).forEach(r=>{xg(r)&&(ps(r.type.ref)&&t.add(r.type.ref),QT(r.type.ref)&&ps(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}function O$(e){if(e.terminal)return e.terminal;if(e.type.ref)return aA(e.type.ref)?.terminal}function P$(e){return e.hidden&&!eA(tw(e))}function B$(e,t){return!e||!t?[]:iA(e,t,e.astNode,!0)}function rA(e,t,r){if(!e||!t)return;let i=iA(e,t,e.astNode,!0);if(i.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,i.length-1)):r=0,i[r]}function iA(e,t,r,i){if(!i){let n=vg(e.grammarSource,Dh);if(n&&n.feature===t)return[e]}return Ih(e)&&e.astNode===r?e.content.flatMap(n=>iA(n,t,r,!1)):[]}function D2e(e,t){return e?nA(e,t,e?.astNode):[]}function F$(e,t,r){if(!e)return;let i=nA(e,t,e?.astNode);if(i.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,i.length-1)):r=0,i[r]}function nA(e,t,r){if(e.astNode!==r)return[];if(Nh(e.grammarSource)&&e.grammarSource.value===t)return[e];let i=Dy(e).iterator(),n,a=[];do if(n=i.next(),!n.done){let s=n.value;s.astNode===r?Nh(s.grammarSource)&&s.grammarSource.value===t&&a.push(s):i.prune()}while(!n.done);return a}function $$(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=vg(e.grammarSource,Dh);if(r)return r;e=e.container}}function aA(e){let t=e;return QT(t)&&(zd(t.$container)?t=t.$container.$container:bg(t.$container)?t=t.$container:Hd(t.$container)),z$(e,t,new Map)}function z$(e,t,r){function i(n,a){let s;return vg(n,Dh)||(s=z$(a,a,r)),r.set(e,s),s}if(S(i,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let n of Gh(t)){if(Dh(n)&&n.feature.toLowerCase()==="name")return r.set(e,n),n;if(Mh(n)&&ps(n.rule.ref))return i(n,n.rule.ref);if(Y6(n)&&n.typeRef?.ref)return i(n,n.typeRef.ref)}}function G$(e){let t=e.$container;if(Tg(t)){let r=t.elements,i=r.indexOf(e);for(let n=i-1;n>=0;n--){let a=r[n];if(zd(a))return a;{let s=Gh(r[n]).find(zd);if(s)return s}}}if(U6(t))return G$(t)}function N2e(e,t){return e==="?"||e==="*"||Tg(t)&&!!t.guardCondition}function M2e(e){return e==="*"||e==="+"}function O2e(e){return e==="+="}function JT(e){return q$(e,new Set)}function q$(e,t){if(t.has(e))return!0;t.add(e);for(let r of Gh(e))if(Mh(r)){if(!r.rule.ref||ps(r.rule.ref)&&!q$(r.rule.ref,t)||Iy(r.rule.ref))return!1}else{if(Dh(r))return!1;if(zd(r))return!1}return!!e.definition}function P2e(e){return b6(e.type,new Set)}function b6(e,t){if(t.has(e))return!0;if(t.add(e),JF(e))return!1;if(c$(e))return!1;if(p$(e))return e.types.every(r=>b6(r,t));if(Y6(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return X6(r)?b6(r.type,t):!1}else return!1}else return!1}function ew(e){if(!ll(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function fg(e){if(bg(e))return ps(e)&&JT(e)?e.name:ew(e)??e.name;if(a$(e)||X6(e)||h$(e))return e.name;if(zd(e)){let t=V$(e);if(t)return t}else if(QT(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function V$(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return fg(e.type.ref)}function B2e(e){return ll(e)?e.type?.name??"string":ps(e)&&JT(e)?e.name:ew(e)??e.name}function W$(e){return ll(e)?e.type?.name??"string":ew(e)??e.name}function tw(e){let t={s:!1,i:!1,u:!1},r=wg(e.definition,t),i=Object.entries(t).filter(([,n])=>n).map(([n])=>n).join("");return new RegExp(r,i)}function wg(e,t){if(f$(e))return F2e(e);if(d$(e))return $2e(e);if(t$(e))return q2e(e);if(j6(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return mu(wg(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(s$(e))return G2e(e);if(g$(e))return z2e(e);if(u$(e)){let r=e.regex.lastIndexOf("/"),i=e.regex.substring(1,r),n=e.regex.substring(r+1);return t&&(t.i=n.includes("i"),t.s=n.includes("s"),t.u=n.includes("u")),mu(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(m$(e))return mu(U$,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}function F2e(e){return mu(e.elements.map(t=>wg(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function $2e(e){return mu(e.elements.map(t=>wg(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function z2e(e){return mu(`${U$}*?${wg(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function G2e(e){return mu(`(?!${wg(e.terminal)})${U$}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function q2e(e){return e.right?mu(`[${zE(e.left)}-${zE(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):mu(zE(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function zE(e){return Gy(e.value)}function mu(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function H$(e){let t=[],r=e.Grammar;for(let i of r.rules)ll(i)&&P$(i)&&L$(tw(i))&&t.push(i.name);return{multilineCommentRules:t,nameRegexp:T$}}function U2e(e){var t=Qst.call(e,jx),r=e[jx];try{e[jx]=void 0;var i=!0}catch{}var n=Jst.call(e);return i&&(t?e[jx]=r:delete e[jx]),n}function H2e(e){return rot.call(e)}function Y2e(e){return e==null?e===void 0?aot:not:oye&&oye in Object(e)?eot(e):iot(e)}function j2e(e){return e!=null&&typeof e=="object"}function X2e(e){return typeof e=="symbol"||Hl(e)&&Yd(e)==sot}function K2e(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r0){if(++t>=Vot)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function pbe(e){return function(){return e}}function gbe(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}function Cbe(e,t){var r=typeof e;return t=t??tlt,!!t&&(r=="number"||r!="symbol"&&rlt.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=slt}function Dbe(e){return e!=null&&Z$(e.length)&&!qh(e)}function Nbe(e,t,r){if(!ol(r))return!1;var i=typeof t;return(i=="number"?bu(r)&&oA(t,r.length):i=="string"&&t in r)?nw(r[t],e):!1}function Mbe(e){return K$(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&cA(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i-1}function hxe(e,t){var r=this.__data__,i=fA(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Eg(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(o)?t>1?rz(o,t-1,r,i,n):tz(n,o):i||(n[n.length]=o)}return n}function Axe(e){var t=e==null?0:e.length;return t?iz(e,1):[]}function Lxe(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(n);++io))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=r&Oht?new oz:void 0;for(a.set(e,t),a.set(t,e);++f=_ft&&(a=lz,s=!1,t=new oz(t));e:for(;++n-1?n[a?t[s]:s]:void 0}}function hwe(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:iw(r);return n<0&&(n=Oft(i+n,0)),vbe(e,xu(t,3),n)}function fwe(e){return e&&e.length?e[0]:void 0}function dwe(e,t){var r=-1,i=bu(e)?Array(e.length):[];return Lg(e,function(n,a,s){i[++r]=t(n,a,s)}),i}function pwe(e,t){var r=Zr(e)?rw:Fft;return r(e,xu(t,3))}function gwe(e,t){return iz(Zt(e,t),1)}function mwe(e,t){return e!=null&&Wft.call(e,t)}function ywe(e,t){return e!=null&&OTe(e,t,Uft)}function vwe(e){return typeof e=="string"||!Zr(e)&&Hl(e)&&Yd(e)==Hft}function bwe(e,t){return rw(t,function(r){return e[r]})}function xwe(e){return e==null?[]:Yft(e,yo(e))}function Twe(e,t,r,i){e=bu(e)?e:Yn(e),r=r&&!i?iw(r):0;var n=e.length;return r<0&&(r=jft(n+r,0)),Ws(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&j$(e,t,r)>-1}function wwe(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:iw(r);return n<0&&(n=Xft(i+n,0)),j$(e,t,n)}function kwe(e){if(e==null)return!0;if(bu(e)&&(Zr(e)||typeof e=="string"||typeof e.splice=="function"||MT(e)||Q$(e)||uA(e)))return!e.length;var t=Oy(e);if(t==Kft||t==Zft)return!e.size;if(sw(e))return!Xbe(e).length;for(var r in e)if(Jft.call(e,r))return!1;return!0}function Cwe(e){return Hl(e)&&Yd(e)==edt}function Swe(e){return e===void 0}function Ewe(e){if(typeof e!="function")throw new TypeError(idt);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Awe(e,t,r,i){if(!ol(e))return e;t=yA(t,e);for(var n=-1,a=t.length,s=a-1,o=e;o!=null&&++n=fdt){var u=t?null:hdt(e);if(u)return cz(u);s=!1,n=lz,l=new oz}else l=t?[]:o;e:for(;++i$T(i,t)):e instanceof gs&&vs(t,e)?!1:e instanceof Tu?(e instanceof gs&&t.push(e),Ul(e.definition,i=>$T(i,t))):!1}function qwe(e){return e instanceof Ys}function zl(e){if(e instanceof gs)return"SUBRULE";if(e instanceof Ea)return"OPTION";if(e instanceof Ys)return"OR";if(e instanceof xo)return"AT_LEAST_ONE";if(e instanceof To)return"AT_LEAST_ONE_SEP";if(e instanceof Hs)return"MANY_SEP";if(e instanceof cn)return"MANY";if(e instanceof Bi)return"CONSUME";throw Error("non exhaustive match")}function tF(e,t,r){return[new Ea({definition:[new Bi({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Wy(e){if(e instanceof gs)return Wy(e.referencedRule);if(e instanceof Bi)return Uwe(e);if(Gwe(e))return Vwe(e);if(qwe(e))return Wwe(e);throw Error("non exhaustive match")}function Vwe(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=$T(a),t=t.concat(Wy(a)),i=i+1,n=r.length>i;return fz(t)}function Wwe(e){let t=Zt(e.definition,r=>Wy(r));return fz(Wl(t))}function Uwe(e){return[e.terminalType]}function Ywe(e){let t={};return pr(e,r=>{let i=new pdt(r).startWalking();vo(t,i)}),t}function jwe(e,t){return e.name+t+Hwe}function uw(e){let t=e.toString();if(GE.hasOwnProperty(t))return GE[t];{let r=gdt.pattern(t);return GE[t]=r,r}}function Xwe(){GE={}}function Zwe(e,t=!1){try{let r=uw(e);return C6(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Kwe)t&&dz(`${k6} Unable to optimize: < ${e.toString()} > +`},"getStyles"),Zft=Kft,Qft={parser:Hft,get db(){return new Yft},renderer:XTe,styles:Zft}});var pv,FA=X(()=>{Yt();pv=class{constructor(e){this.init=e,this.records=this.init()}static{v(this,"ImperativeState")}reset(){this.records=this.init()}}});function Fn(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var Us=X(()=>{Yt();v(Fn,"populateCommonDb")});function sa(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function Ys(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function Qu(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function tV(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function Wg(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function pf(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function wm(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function S6(e){return pf(e)&&typeof e.fullText=="string"}function QCe(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function rC(e){return!!e&&typeof e[Symbol.iterator]=="function"}function zn(...e){if(e.length===1){let t=e[0];if(t instanceof Ku)return t;if(rC(t))return new Ku(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new Ku(()=>({index:0}),r=>r.index1?new Ku(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex{sa(i)&&(i.$container=e,i.$containerProperty=r,i.$containerIndex=a,t.deep&&qv(i,t))}):sa(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&qv(n,t)))}function Cm(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function JCe(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function Cc(e){let r=Pv(e).$document;if(!r)throw new Error("AST node has no document.");return r}function Pv(e){for(;e.$container;)e=e.$container;return e}function N_(e){return Ys(e)?e.ref?[e.ref]:[]:Qu(e)?e.items.map(t=>t.ref):[]}function wC(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new Ku(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexwC(r,t))}function kc(e,t){if(e){if(t?.range&&!O_(e,t.range))return new Gv(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new Gv(e,r=>wC(r,t),{includeRoot:!0})}function O_(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?AV(r,t):!1}function Vv(e){return new Ku(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexpf(t)?t.content:[],{includeRoot:!0})}function vke(e){return Uv(e).filter(wm)}function SV(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function iC(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Hv(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function EV(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return ju.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.lineju.After}function xke(e,t,r=_V){if(e){if(t>0){let n=t-e.offset,i=e.text.charAt(n);r.test(i)||t--}return M6(e,t)}}function RV(e,t){if(e){let r=MV(e,!0);if(r&&K_(r,t))return r;if(S6(e)){let n=e.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=e.content[i];if(K_(a,t))return a}}}}function K_(e,t){return wm(e)&&t.includes(e.tokenType.name)}function M6(e,t){if(wm(e))return e;if(pf(e)){let r=IV(e,t,!1);if(r)return M6(r,t)}}function LV(e,t){if(wm(e))return e;if(pf(e)){let r=IV(e,t,!0);if(r)return LV(r,t)}}function IV(e,t,r){let n=0,i=e.content.length-1,a;for(;n<=i;){let s=Math.floor((n+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,n=s+1):i=s-1}return a}function MV(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e);for(;n>0;){n--;let i=r.content[n];if(t||!i.hidden)return i}e=r}}function bke(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e),i=r.content.length-1;for(;nt.test(r))}function Jv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function BV(e,t){let r=$V(e),n=t.match(r);return!!n&&n[0].length>0}function $V(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,n=0;function i(){let a="",s;function o(u){a+=r.substr(n,u),n+=u}A(o,"appendRaw");function l(u){a+="(?:"+r.substr(n,u)+"|$)",n+=u}for(A(l,"appendOptional");n",n)-n+1);break;default:l(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":s=n,n+=3,i(),a+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),a+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else o(1),a+=i()+"|$)";break;case")":return++n,a;default:l(1);break}return a}return A(i,"process"),new RegExp(i(),e.flags)}function FV(e){return e.rules.find(t=>Ks(t)&&t.entry)}function zV(e){return e.rules.filter(t=>Vl(t)&&t.hidden)}function P6(e,t){let r=new Set,n=FV(e);if(!n)return new Set(e.rules);let i=[n].concat(zV(e));for(let s of i)GV(s,r,t);let a=new Set;for(let s of e.rules)(r.has(s.name)||Vl(s)&&s.hidden)&&a.add(s);return a}function GV(e,t,r){t.add(e.name),kf(e).forEach(n=>{if(yf(n)||r&&R6(n)){let i=n.rule.ref;i&&!t.has(i.name)&&GV(i,t,r)}})}function Rke(e){let t=new Set;return kf(e).forEach(r=>{Sm(r)&&(Ks(r.type.ref)&&t.add(r.type.ref),CC(r.type.ref)&&Ks(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}function qV(e){if(e.terminal)return e.terminal;if(e.type.ref)return z6(e.type.ref)?.terminal}function VV(e){return e.hidden&&!O6(EC(e))}function WV(e,t){return!e||!t?[]:$6(e,t,e.astNode,!0)}function B6(e,t,r){if(!e||!t)return;let n=$6(e,t,e.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function $6(e,t,r,n){if(!n){let i=Cm(e.grammarSource,gf);if(i&&i.feature===t)return[e]}return pf(e)&&e.astNode===r?e.content.flatMap(i=>$6(i,t,r,!1)):[]}function Lke(e,t){return e?F6(e,t,e?.astNode):[]}function UV(e,t,r){if(!e)return;let n=F6(e,t,e?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function F6(e,t,r){if(e.astNode!==r)return[];if(mf(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=Uv(e).iterator(),i,a=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?mf(s.grammarSource)&&s.grammarSource.value===t&&a.push(s):n.prune()}while(!i.done);return a}function HV(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=Cm(e.grammarSource,gf);if(r)return r;e=e.container}}function z6(e){let t=e;return CC(t)&&(Dp(t.$container)?t=t.$container.$container:km(t.$container)?t=t.$container:Fp(t.$container)),YV(e,t,new Map)}function YV(e,t,r){function n(i,a){let s;return Cm(i,gf)||(s=YV(a,a,r)),r.set(e,s),s}if(A(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let i of kf(t)){if(gf(i)&&i.feature.toLowerCase()==="name")return r.set(e,i),i;if(yf(i)&&Ks(i.rule.ref))return n(i,i.rule.ref);if(_6(i)&&i.typeRef?.ref)return n(i,i.typeRef.ref)}}function XV(e){let t=e.$container;if(Em(t)){let r=t.elements,n=r.indexOf(e);for(let i=n-1;i>=0;i--){let a=r[i];if(Dp(a))return a;{let s=kf(r[i]).find(Dp);if(s)return s}}}if(E6(t))return XV(t)}function Ike(e,t){return e==="?"||e==="*"||Em(t)&&!!t.guardCondition}function Mke(e){return e==="*"||e==="+"}function Dke(e){return e==="+="}function kC(e){return jV(e,new Set)}function jV(e,t){if(t.has(e))return!0;t.add(e);for(let r of kf(e))if(yf(r)){if(!r.rule.ref||Ks(r.rule.ref)&&!jV(r.rule.ref,t)||Wv(r.rule.ref))return!1}else{if(gf(r))return!1;if(Dp(r))return!1}return!!e.definition}function Nke(e){return J_(e.type,new Set)}function J_(e,t){if(t.has(e))return!0;if(t.add(e),sV(e))return!1;if(mV(e))return!1;if(TV(e))return e.types.every(r=>J_(r,t));if(_6(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return L6(r)?J_(r.type,t):!1}else return!1}else return!1}function SC(e){if(!Vl(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function ym(e){if(km(e))return Ks(e)&&kC(e)?e.name:SC(e)??e.name;if(fV(e)||L6(e)||vV(e))return e.name;if(Dp(e)){let t=KV(e);if(t)return t}else if(CC(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function KV(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return ym(e.type.ref)}function Oke(e){return Vl(e)?e.type?.name??"string":Ks(e)&&kC(e)?e.name:SC(e)??e.name}function ZV(e){return Vl(e)?e.type?.name??"string":SC(e)??e.name}function EC(e){let t={s:!1,i:!1,u:!1},r=Am(e.definition,t),n=Object.entries(t).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Am(e,t){if(xV(e))return Pke(e);if(bV(e))return Bke(e);if(lV(e))return zke(e);if(R6(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return Ju(Am(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(dV(e))return Fke(e);if(wV(e))return $ke(e);if(yV(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),i=e.regex.substring(r+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),Ju(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(CV(e))return Ju(QV,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}function Pke(e){return Ju(e.elements.map(t=>Am(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Bke(e){return Ju(e.elements.map(t=>Am(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function $ke(e){return Ju(`${QV}*?${Am(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Fke(e){return Ju(`(?!${Am(e.terminal)})${QV}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function zke(e){return e.right?Ju(`[${d_(e.left)}-${d_(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Ju(d_(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function d_(e){return Jv(e.value)}function Ju(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function JV(e){let t=[],r=e.Grammar;for(let n of r.rules)Vl(n)&&VV(n)&&PV(EC(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:_V}}function Vke(e){var t=Wdt.call(e,vw),r=e[vw];try{e[vw]=void 0;var n=!0}catch{}var i=Udt.call(e);return n&&(t?e[vw]=r:delete e[vw]),i}function Wke(e){return Xdt.call(e)}function Uke(e){return e==null?e===void 0?Zdt:Kdt:ewe&&ewe in Object(e)?Hdt(e):jdt(e)}function Hke(e){return e!=null&&typeof e=="object"}function Yke(e){return typeof e=="symbol"||Ac(e)&&zp(e)==Qdt}function Xke(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r0){if(++t>=Opt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function fSe(e){return function(){return e}}function dSe(e,t){for(var r=-1,n=e==null?0:e.length;++r-1}function wSe(e,t){var r=typeof e;return t=t??Ypt,!!t&&(r=="number"||r!="symbol"&&Xpt.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Qpt}function LSe(e){return e!=null&&iW(e.length)&&!Sf(e)}function ISe(e,t,r){if(!ql(r))return!1;var n=typeof t;return(n=="number"?rh(r)&&q6(t,r.length):n=="string"&&t in r)?LC(r[t],e):!1}function MSe(e){return nW(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&W6(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1}function c4e(e,t){var r=this.__data__,n=Y6(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Im(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(o)?t>1?cW(o,t-1,r,n,i):lW(i,o):n||(i[i.length]=o)}return i}function S4e(e){var t=e==null?0:e.length;return t?uW(e,1):[]}function A4e(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++no))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=r&Ayt?new pW:void 0;for(a.set(e,t),a.set(t,e);++f=b1t&&(a=gW,s=!1,t=new pW(t));e:for(;++i-1?i[a?t[s]:s]:void 0}}function c5e(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:_C(r);return i<0&&(i=A1t(n+i,0)),mSe(e,nh(t,3),i)}function u5e(e){return e&&e.length?e[0]:void 0}function h5e(e,t){var r=-1,n=rh(e)?Array(e.length):[];return Nm(e,function(i,a,s){n[++r]=t(i,a,s)}),n}function f5e(e,t){var r=pn(e)?AC:L1t;return r(e,nh(t,3))}function d5e(e,t){return uW(or(e,t),1)}function p5e(e,t){return e!=null&&P1t.call(e,t)}function g5e(e,t){return e!=null&&DEe(e,t,B1t)}function m5e(e){return typeof e=="string"||!pn(e)&&Ac(e)&&zp(e)==$1t}function y5e(e,t){return AC(t,function(r){return e[r]})}function v5e(e){return e==null?[]:F1t(e,cl(e))}function x5e(e,t,r,n){e=rh(e)?e:ba(e),r=r&&!n?_C(r):0;var i=e.length;return r<0&&(r=z1t(i+r,0)),Io(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&tW(e,t,r)>-1}function b5e(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:_C(r);return i<0&&(i=G1t(n+i,0)),tW(e,t,i)}function T5e(e){if(e==null)return!0;if(rh(e)&&(pn(e)||typeof e=="string"||typeof e.splice=="function"||aC(e)||aW(e)||U6(e)))return!e.length;var t=Yv(e);if(t==q1t||t==V1t)return!e.size;if(MC(e))return!YSe(e).length;for(var r in e)if(U1t.call(e,r))return!1;return!0}function w5e(e){return Ac(e)&&zp(e)==H1t}function C5e(e){return e===void 0}function k5e(e){if(typeof e!="function")throw new TypeError(j1t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function S5e(e,t,r,n){if(!ql(e))return e;t=Q6(t,e);for(var i=-1,a=t.length,s=a-1,o=e;o!=null&&++i=ivt){var u=t?null:nvt(e);if(u)return mW(u);s=!1,i=gW,l=new pW}else l=t?[]:o;e:for(;++nuC(n,t)):e instanceof Zs&&eo(t,e)?!1:e instanceof ih?(e instanceof Zs&&t.push(e),Ec(e.definition,n=>uC(n,t))):!1}function z5e(e){return e instanceof No}function Tc(e){if(e instanceof Zs)return"SUBRULE";if(e instanceof ns)return"OPTION";if(e instanceof No)return"OR";if(e instanceof fl)return"AT_LEAST_ONE";if(e instanceof dl)return"AT_LEAST_ONE_SEP";if(e instanceof Do)return"MANY_SEP";if(e instanceof $i)return"MANY";if(e instanceof si)return"CONSUME";throw Error("non exhaustive match")}function SG(e,t,r){return[new ns({definition:[new si({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function rx(e){if(e instanceof Zs)return rx(e.referencedRule);if(e instanceof si)return V5e(e);if(F5e(e))return G5e(e);if(z5e(e))return q5e(e);throw Error("non exhaustive match")}function G5e(e){let t=[],r=e.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=uC(a),t=t.concat(rx(a)),n=n+1,i=r.length>n;return xW(t)}function q5e(e){let t=or(e.definition,r=>rx(r));return xW(Sc(t))}function V5e(e){return[e.terminalType]}function U5e(e){let t={};return Or(e,r=>{let n=new svt(r).startWalking();ul(t,n)}),t}function H5e(e,t){return e.name+t+W5e}function PC(e){let t=e.toString();if(p_.hasOwnProperty(t))return p_[t];{let r=ovt.pattern(t);return p_[t]=r,r}}function Y5e(){p_={}}function j5e(e,t=!1){try{let r=PC(e);return i6(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===X5e)t&&bW(`${n6} Unable to optimize: < ${e.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let i="";t&&(i=` + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=` This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),w6(`${k6} + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),r6(`${n6} Failed parsing: < ${e.toString()} > Using the @chevrotain/regexp-to-ast library - Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+i)}}return[]}function C6(e,t,r){switch(e.type){case"Disjunction":for(let n=0;n{if(typeof l=="number")uT(l,t,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)uT(h,t,r);else{for(let h=u.from;h<=u.to&&h=fT){let h=u.from>=fT?u.from:fT,f=u.to,d=Bh(h),p=Bh(f);for(let g=d;g<=p;g++)t[g]=g}}}});break;case"Group":C6(s.value,t,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&S6(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return Yn(t)}function uT(e,t,r){let i=Bh(e);t[i]=i,r===!0&&Qwe(e,t)}function Qwe(e,t){let r=String.fromCharCode(e),i=r.toUpperCase();if(i!==r){let n=Bh(i.charCodeAt(0));t[n]=n}else{let n=r.toLowerCase();if(n!==r){let a=Bh(n.charCodeAt(0));t[a]=a}}}function rF(e,t){return Py(e.value,r=>{if(typeof r=="number")return vs(t,r);{let i=r;return Py(t,n=>i.from<=n&&n<=i.to)!==void 0}})}function S6(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Zr(e.value)?Ul(e.value,S6):S6(e.value):!1}function TA(e,t){if(t instanceof RegExp){let r=uw(t),i=new mdt(e);return i.visit(r),i.found}else return Py(t,r=>vs(e,r.charCodeAt(0)))!==void 0}function eke(e,t){t=hz(t,{useSticky:Jwe,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:S((x,T)=>T(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{Tke()});let i;r("Reject Lexer.NA",()=>{i=bA(e,x=>x[pg]===ds.NA)});let n=!1,a;r("Transform Patterns",()=>{n=!1,a=Zt(i,x=>{let T=x[pg];if(Oh(T)){let C=T.source;return C.length===1&&C!=="^"&&C!=="$"&&C!=="."&&!T.ignoreCase?C:C.length===2&&C[0]==="\\"&&!vs(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],C[1])?C[1]:t.useSticky?nF(T):iF(T)}else{if(qh(T))return n=!0,{exec:T};if(typeof T=="object")return n=!0,T;if(typeof T=="string"){if(T.length===1)return T;{let C=T.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),w=new RegExp(C);return t.useSticky?nF(w):iF(w)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=Zt(i,x=>x.tokenTypeIdx),o=Zt(i,x=>{let T=x.GROUP;if(T!==ds.SKIPPED){if(Ws(T))return T;if(Ph(T))return!1;throw Error("non exhaustive match")}}),l=Zt(i,x=>{let T=x.LONGER_ALT;if(T)return Zr(T)?Zt(T,w=>$ye(i,w)):[$ye(i,T)]}),u=Zt(i,x=>x.PUSH_MODE),h=Zt(i,x=>lr(x,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let x=vz(t.lineTerminatorCharacters);f=Zt(i,T=>!1),t.positionTracking!=="onlyOffset"&&(f=Zt(i,T=>lr(T,"LINE_BREAKS")?!!T.LINE_BREAKS:yz(T,x)===!1&&TA(x,T.PATTERN)))});let d,p,g,m;r("Misc Mapping #2",()=>{d=Zt(i,mz),p=Zt(a,bke),g=bo(i,(x,T)=>{let C=T.GROUP;return Ws(C)&&C!==ds.SKIPPED&&(x[C]=[]),x},{}),m=Zt(a,(x,T)=>({pattern:a[T],longerAlt:l[T],canLineTerminator:f[T],isCustom:d[T],short:p[T],group:o[T],push:u[T],pop:h[T],tokenTypeIdx:s[T],tokenType:i[T]}))});let y=!0,v=[];return t.safeMode||r("First Char Optimization",()=>{v=bo(i,(x,T,C)=>{if(typeof T.PATTERN=="string"){let w=T.PATTERN.charCodeAt(0),k=Bh(w);qE(x,k,m[C])}else if(Zr(T.START_CHARS_HINT)){let w;pr(T.START_CHARS_HINT,k=>{let E=typeof k=="string"?k.charCodeAt(0):k,A=Bh(E);w!==A&&(w=A,qE(x,A,m[C]))})}else if(Oh(T.PATTERN))if(T.PATTERN.unicode)y=!1,t.ensureOptimizations&&w6(`${k6} Unable to analyze < ${T.PATTERN.toString()} > pattern. + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function i6(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")Nw(l,t,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)Nw(h,t,r);else{for(let h=u.from;h<=u.to&&h=Pw){let h=u.from>=Pw?u.from:Pw,f=u.to,d=bf(h),p=bf(f);for(let g=d;g<=p;g++)t[g]=g}}}});break;case"Group":i6(s.value,t,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&a6(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return ba(t)}function Nw(e,t,r){let n=bf(e);t[n]=n,r===!0&&K5e(e,t)}function K5e(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=bf(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=bf(i.charCodeAt(0));t[a]=a}}}function EG(e,t){return Xv(e.value,r=>{if(typeof r=="number")return eo(t,r);{let n=r;return Xv(t,i=>n.from<=i&&i<=n.to)!==void 0}})}function a6(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?pn(e.value)?Ec(e.value,a6):a6(e.value):!1}function rR(e,t){if(t instanceof RegExp){let r=PC(t),n=new lvt(e);return n.visit(r),n.found}else return Xv(t,r=>eo(e,r.charCodeAt(0)))!==void 0}function Z5e(e,t){t=vW(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:A((b,T)=>T(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{v3e()});let n;r("Reject Lexer.NA",()=>{n=eR(e,b=>b[xm]===js.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=or(n,b=>{let T=b[xm];if(vf(T)){let k=T.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!T.ignoreCase?k:k.length===2&&k[0]==="\\"&&!eo(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],k[1])?k[1]:AG(T)}else{if(Sf(T))return i=!0,{exec:T};if(typeof T=="object")return i=!0,T;if(typeof T=="string"){if(T.length===1)return T;{let k=T.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),w=new RegExp(k);return AG(w)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=or(n,b=>b.tokenTypeIdx),o=or(n,b=>{let T=b.GROUP;if(T!==js.SKIPPED){if(Io(T))return T;if(xf(T))return!1;throw Error("non exhaustive match")}}),l=or(n,b=>{let T=b.LONGER_ALT;if(T)return pn(T)?or(T,w=>Mwe(n,w)):[Mwe(n,T)]}),u=or(n,b=>b.PUSH_MODE),h=or(n,b=>Sr(b,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let b=SW(t.lineTerminatorCharacters);f=or(n,T=>!1),t.positionTracking!=="onlyOffset"&&(f=or(n,T=>Sr(T,"LINE_BREAKS")?!!T.LINE_BREAKS:kW(T,b)===!1&&rR(b,T.PATTERN)))});let d,p,g,m;r("Misc Mapping #2",()=>{d=or(n,CW),p=or(a,m3e),g=hl(n,(b,T)=>{let k=T.GROUP;return Io(k)&&k!==js.SKIPPED&&(b[k]=[]),b},{}),m=or(a,(b,T)=>({pattern:a[T],longerAlt:l[T],canLineTerminator:f[T],isCustom:d[T],short:p[T],group:o[T],push:u[T],pop:h[T],tokenTypeIdx:s[T],tokenType:n[T]}))});let y=!0,x=[];return t.safeMode||r("First Char Optimization",()=>{x=hl(n,(b,T,k)=>{if(typeof T.PATTERN=="string"){let w=T.PATTERN.charCodeAt(0),C=bf(w);g_(b,C,m[k])}else if(pn(T.START_CHARS_HINT)){let w;Or(T.START_CHARS_HINT,C=>{let S=typeof C=="string"?C.charCodeAt(0):C,E=bf(S);w!==E&&(w=E,g_(b,E,m[k]))})}else if(vf(T.PATTERN))if(T.PATTERN.unicode)y=!1,t.ensureOptimizations&&r6(`${n6} Unable to analyze < ${T.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let w=Zwe(T.PATTERN,t.ensureOptimizations);Ri(w)&&(y=!1),pr(w,k=>{qE(x,k,m[C])})}else t.ensureOptimizations&&w6(`${k6} TokenType: <${T.name}> is using a custom token pattern without providing parameter. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let w=j5e(T.PATTERN,t.ensureOptimizations);ei(w)&&(y=!1),Or(w,C=>{g_(b,C,m[k])})}else t.ensureOptimizations&&r6(`${n6} TokenType: <${T.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return x},[])}),{emptyGroups:g,patternIdxToConfig:m,charCodeToPatternIdxToConfig:v,hasCustom:n,canBeOptimized:y}}function tke(e,t){let r=[],i=ike(e);r=r.concat(i.errors);let n=nke(i.valid),a=n.valid;return r=r.concat(n.errors),r=r.concat(rke(a)),r=r.concat(uke(a)),r=r.concat(hke(a,t)),r=r.concat(fke(a)),r}function rke(e){let t=[],r=cl(e,i=>Oh(i[pg]));return t=t.concat(ake(r)),t=t.concat(oke(r)),t=t.concat(lke(r)),t=t.concat(cke(r)),t=t.concat(ske(r)),t}function ike(e){let t=cl(e,n=>!lr(n,pg)),r=Zt(t,n=>({message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:un.MISSING_PATTERN,tokenTypes:[n]})),i=vA(e,t);return{errors:r,valid:i}}function nke(e){let t=cl(e,n=>{let a=n[pg];return!Oh(a)&&!qh(a)&&!lr(a,"exec")&&!Ws(a)}),r=Zt(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:un.INVALID_PATTERN,tokenTypes:[n]})),i=vA(e,t);return{errors:r,valid:i}}function ake(e){class t extends J6{static{S(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=cl(e,n=>{let a=n.PATTERN;try{let s=uw(a),o=new t;return o.visit(s),o.found}catch{return ydt.test(a.source)}});return Zt(r,n=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:un.EOI_ANCHOR_FOUND,tokenTypes:[n]}))}function ske(e){let t=cl(e,i=>i.PATTERN.test(""));return Zt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:un.EMPTY_MATCH_PATTERN,tokenTypes:[i]}))}function oke(e){class t extends J6{static{S(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=cl(e,n=>{let a=n.PATTERN;try{let s=uw(a),o=new t;return o.visit(s),o.found}catch{return vdt.test(a.source)}});return Zt(r,n=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:un.SOI_ANCHOR_FOUND,tokenTypes:[n]}))}function lke(e){let t=cl(e,i=>{let n=i[pg];return n instanceof RegExp&&(n.multiline||n.global)});return Zt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:un.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}))}function cke(e){let t=[],r=Zt(e,a=>bo(e,(s,o)=>(a.PATTERN.source===o.PATTERN.source&&!vs(t,o)&&o.PATTERN!==ds.NA&&(t.push(o),s.push(o)),s),[]));r=cw(r);let i=cl(r,a=>a.length>1);return Zt(i,a=>{let s=Zt(a,l=>l.name);return{message:`The same RegExp pattern ->${Yl(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:un.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function uke(e){let t=cl(e,i=>{if(!lr(i,"GROUP"))return!1;let n=i.GROUP;return n!==ds.SKIPPED&&n!==ds.NA&&!Ws(n)});return Zt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:un.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}))}function hke(e,t){let r=cl(e,n=>n.PUSH_MODE!==void 0&&!vs(t,n.PUSH_MODE));return Zt(r,n=>({message:`Token Type: ->${n.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${n.PUSH_MODE}<-which does not exist`,type:un.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}))}function fke(e){let t=[],r=bo(e,(i,n,a)=>{let s=n.PATTERN;return s===ds.NA||(Ws(s)?i.push({str:s,idx:a,tokenType:n}):Oh(s)&&pke(s)&&i.push({str:s.source,idx:a,tokenType:n})),i},[]);return pr(e,(i,n)=>{pr(r,({str:a,idx:s,tokenType:o})=>{if(n${o.name}<- can never be matched. -Because it appears AFTER the Token Type ->${i.name}<-in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:l,type:un.UNREACHABLE_PATTERN,tokenTypes:[i,o]})}})}),t}function dke(e,t){if(Oh(t)){if(gke(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(qh(t))return t(e,0,[],{});if(lr(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function pke(e){return Py([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function gke(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition -`,type:un.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),lr(e,gE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+gE+`> property in its definition -`,type:un.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),lr(e,gE)&&lr(e,hT)&&!lr(e.modes,e.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${hT}: <${e.defaultMode}>which does not exist -`,type:un.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),lr(e,gE)&&pr(e.modes,(n,a)=>{pr(n,(s,o)=>{if(Ph(s))i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${o}> -`,type:un.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(lr(s,"LONGER_ALT")){let l=Zr(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];pr(l,u=>{!Ph(u)&&!vs(n,u)&&i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}> -`,type:un.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),i}function yke(e,t,r){let i=[],n=!1,a=cw(Wl(Yn(e.modes))),s=bA(a,l=>l[pg]===ds.NA),o=vz(r);return t&&pr(s,l=>{let u=yz(l,o);if(u!==!1){let f={message:xke(l,u),type:u.issue,tokenType:l};i.push(f)}else lr(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):TA(o,l.PATTERN)&&(n=!0)}),t&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:m,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:y}}function Q5e(e,t){let r=[],n=e3e(e);r=r.concat(n.errors);let i=t3e(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(J5e(a)),r=r.concat(o3e(a)),r=r.concat(l3e(a,t)),r=r.concat(c3e(a)),r}function J5e(e){let t=[],r=Wl(e,n=>vf(n[xm]));return t=t.concat(r3e(r)),t=t.concat(i3e(r)),t=t.concat(a3e(r)),t=t.concat(s3e(r)),t=t.concat(n3e(r)),t}function e3e(e){let t=Wl(e,i=>!Sr(i,xm)),r=or(t,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Fi.MISSING_PATTERN,tokenTypes:[i]})),n=J6(e,t);return{errors:r,valid:n}}function t3e(e){let t=Wl(e,i=>{let a=i[xm];return!vf(a)&&!Sf(a)&&!Sr(a,"exec")&&!Io(a)}),r=or(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Fi.INVALID_PATTERN,tokenTypes:[i]})),n=J6(e,t);return{errors:r,valid:n}}function r3e(e){class t extends N6{static{A(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Wl(e,i=>{let a=i.PATTERN;try{let s=PC(a),o=new t;return o.visit(s),o.found}catch{return cvt.test(a.source)}});return or(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fi.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function n3e(e){let t=Wl(e,n=>n.PATTERN.test(""));return or(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Fi.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function i3e(e){class t extends N6{static{A(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Wl(e,i=>{let a=i.PATTERN;try{let s=PC(a),o=new t;return o.visit(s),o.found}catch{return uvt.test(a.source)}});return or(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fi.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function a3e(e){let t=Wl(e,n=>{let i=n[xm];return i instanceof RegExp&&(i.multiline||i.global)});return or(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Fi.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function s3e(e){let t=[],r=or(e,a=>hl(e,(s,o)=>(a.PATTERN.source===o.PATTERN.source&&!eo(t,o)&&o.PATTERN!==js.NA&&(t.push(o),s.push(o)),s),[]));r=OC(r);let n=Wl(r,a=>a.length>1);return or(n,a=>{let s=or(a,l=>l.name);return{message:`The same RegExp pattern ->${_c(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Fi.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function o3e(e){let t=Wl(e,n=>{if(!Sr(n,"GROUP"))return!1;let i=n.GROUP;return i!==js.SKIPPED&&i!==js.NA&&!Io(i)});return or(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Fi.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function l3e(e,t){let r=Wl(e,i=>i.PUSH_MODE!==void 0&&!eo(t,i.PUSH_MODE));return or(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Fi.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function c3e(e){let t=[],r=hl(e,(n,i,a)=>{let s=i.PATTERN;return s===js.NA||(Io(s)?n.push({str:s,idx:a,tokenType:i}):vf(s)&&h3e(s)&&n.push({str:s.source,idx:a,tokenType:i})),n},[]);return Or(e,(n,i)=>{Or(r,({str:a,idx:s,tokenType:o})=>{if(i${o.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:l,type:Fi.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),t}function u3e(e,t){if(vf(t)){if(f3e(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(Sf(t))return t(e,0,[],{});if(Sr(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function h3e(e){return Xv([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function f3e(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:Fi.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Sr(e,qA)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+qA+`> property in its definition +`,type:Fi.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Sr(e,qA)&&Sr(e,Ow)&&!Sr(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Ow}: <${e.defaultMode}>which does not exist +`,type:Fi.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Sr(e,qA)&&Or(e.modes,(i,a)=>{Or(i,(s,o)=>{if(xf(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${o}> +`,type:Fi.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Sr(s,"LONGER_ALT")){let l=pn(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];Or(l,u=>{!xf(u)&&!eo(i,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}> +`,type:Fi.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function p3e(e,t,r){let n=[],i=!1,a=OC(Sc(ba(e.modes))),s=eR(a,l=>l[xm]===js.NA),o=SW(r);return t&&Or(s,l=>{let u=kW(l,o);if(u!==!1){let f={message:y3e(l,u),type:u.issue,tokenType:l};n.push(f)}else Sr(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):rR(o,l.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:un.NO_LINE_BREAKS_FLAGS}),i}function vke(e){let t={},r=yo(e);return pr(r,i=>{let n=e[i];if(Zr(n))t[i]=[];else throw Error("non exhaustive match")}),t}function mz(e){let t=e.PATTERN;if(Oh(t))return!1;if(qh(t))return!0;if(lr(t,"exec"))return!0;if(Ws(t))return!1;throw Error("non exhaustive match")}function bke(e){return Ws(e)&&e.length===1?e.charCodeAt(0):!1}function yz(e,t){if(lr(e,"LINE_BREAKS"))return!1;if(Oh(e.PATTERN)){try{TA(t,e.PATTERN)}catch(r){return{issue:un.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Ws(e.PATTERN))return!1;if(mz(e))return{issue:un.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function xke(e,t){if(t.issue===un.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + for details.`,type:Fi.NO_LINE_BREAKS_FLAGS}),n}function g3e(e){let t={},r=cl(e);return Or(r,n=>{let i=e[n];if(pn(i))t[n]=[];else throw Error("non exhaustive match")}),t}function CW(e){let t=e.PATTERN;if(vf(t))return!1;if(Sf(t))return!0;if(Sr(t,"exec"))return!0;if(Io(t))return!1;throw Error("non exhaustive match")}function m3e(e){return Io(e)&&e.length===1?e.charCodeAt(0):!1}function kW(e,t){if(Sr(e,"LINE_BREAKS"))return!1;if(vf(e.PATTERN)){try{rR(t,e.PATTERN)}catch(r){return{issue:Fi.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Io(e.PATTERN))return!1;if(CW(e))return{issue:Fi.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function y3e(e,t){if(t.issue===Fi.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${e.name}> Token Type Root cause: ${t.errMsg}. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===un.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Fi.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${e.name}> Token Type - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function vz(e){return Zt(e,r=>Ws(r)?r.charCodeAt(0):r)}function qE(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function Bh(e){return e255?255+~~(e/255):e}}function Uy(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function zT(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function Hy(e){let t=kke(e);Cke(t),Eke(t),Ske(t),pr(t,r=>{r.isParent=r.categoryMatches.length>0})}function kke(e){let t=Aa(e),r=e,i=!0;for(;i;){r=cw(Wl(Zt(r,a=>a.CATEGORIES)));let n=vA(r,t);t=t.concat(n),Ri(n)?i=!1:r=n}return t}function Cke(e){pr(e,t=>{xz(t)||(wke[Gye]=t,t.tokenTypeIdx=Gye++),aF(t)&&!Zr(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),aF(t)||(t.CATEGORIES=[]),Ake(t)||(t.categoryMatches=[]),_ke(t)||(t.categoryMatchesMap={})})}function Ske(e){pr(e,t=>{t.categoryMatches=[],pr(t.categoryMatchesMap,(r,i)=>{t.categoryMatches.push(wke[i].tokenTypeIdx)})})}function Eke(e){pr(e,t=>{bz([],t)})}function bz(e,t){pr(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),pr(t.CATEGORIES,r=>{let i=e.concat(t);vs(i,r)||bz(i,r)})}function xz(e){return lr(e,"tokenTypeIdx")}function aF(e){return lr(e,"CATEGORIES")}function Ake(e){return lr(e,"categoryMatches")}function _ke(e){return lr(e,"categoryMatchesMap")}function Lke(e){return lr(e,"tokenTypeIdx")}function ug(e){return Tz(e)?e.LABEL:e.name}function Tz(e){return Ws(e.LABEL)&&e.LABEL!==""}function Sy(e){return Rke(e)}function Rke(e){let t=e.pattern,r={};if(r.name=e.name,Ph(t)||(r.PATTERN=t),lr(e,xdt))throw`The parent property is no longer supported. -See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return lr(e,qye)&&(r.CATEGORIES=e[qye]),Hy([r]),lr(e,Vye)&&(r.LABEL=e[Vye]),lr(e,Wye)&&(r.GROUP=e[Wye]),lr(e,Hye)&&(r.POP_MODE=e[Hye]),lr(e,Uye)&&(r.PUSH_MODE=e[Uye]),lr(e,Yye)&&(r.LONGER_ALT=e[Yye]),lr(e,jye)&&(r.LINE_BREAKS=e[jye]),lr(e,Xye)&&(r.START_CHARS_HINT=e[Xye]),r}function hw(e,t,r,i,n,a,s,o){return{image:t,startOffset:r,endOffset:i,startLine:n,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function wz(e,t){return Uy(e,t)}function Ike(e,t){let r=new wdt(e,t);return r.resolveRefs(),r.errors}function E6(e,t,r=[]){r=Aa(r);let i=[],n=0;function a(o){return o.concat(Sa(e,n+1))}S(a,"remainingPathWith");function s(o){let l=E6(a(o),t,r);return i.concat(l)}for(S(s,"getAlternativesForProd");r.length{Ri(l.definition)===!1&&(i=s(l.definition))}),i;if(o instanceof Bi)r.push(o.terminalType);else throw Error("non exhaustive match")}n++}return i.push({partialPath:r,suffixDef:Sa(e,n)}),i}function kz(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=t.length,u=l-i-1,h=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Ri(f);){let d=f.pop();if(d===s){o&&dg(f).idx<=u&&f.pop();continue}let p=d.def,g=d.idx,m=d.ruleStack,y=d.occurrenceStack;if(Ri(p))continue;let v=p[0];if(v===n){let x={idx:g,def:Sa(p),ruleStack:FT(m),occurrenceStack:FT(y)};f.push(x)}else if(v instanceof Bi)if(g=0;x--){let T=v.definition[x],C={idx:g,def:T.definition.concat(Sa(p)),ruleStack:m,occurrenceStack:y};f.push(C),f.push(s)}else if(v instanceof Us)f.push({idx:g,def:v.definition.concat(Sa(p)),ruleStack:m,occurrenceStack:y});else if(v instanceof qy)f.push(Dke(v,g,m,y));else throw Error("non exhaustive match")}return h}function Dke(e,t,r,i){let n=Aa(r);n.push(e.name);let a=Aa(i);return a.push(1),{idx:t,def:e.definition,ruleStack:n,occurrenceStack:a}}function kA(e){if(e instanceof Ea||e==="Option")return Ki.OPTION;if(e instanceof cn||e==="Repetition")return Ki.REPETITION;if(e instanceof xo||e==="RepetitionMandatory")return Ki.REPETITION_MANDATORY;if(e instanceof To||e==="RepetitionMandatoryWithSeparator")return Ki.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Hs||e==="RepetitionWithSeparator")return Ki.REPETITION_WITH_SEPARATOR;if(e instanceof Ys||e==="Alternation")return Ki.ALTERNATION;throw Error("non exhaustive match")}function oF(e){let{occurrence:t,rule:r,prodType:i,maxLookahead:n}=e,a=kA(i);return a===Ki.ALTERNATION?fw(t,r,n):dw(t,r,a,n)}function Nke(e,t,r,i,n,a){let s=fw(e,t,r),o=Sz(s)?zT:Uy;return a(s,i,o,n)}function Mke(e,t,r,i,n,a){let s=dw(e,t,n,r),o=Sz(s)?zT:Uy;return a(s[0],o,i)}function Oke(e,t,r,i){let n=e.length,a=Ul(e,s=>Ul(s,o=>o.length===1));if(t)return function(s){let o=Zt(s,l=>l.GATE);for(let l=0;lWl(l)),o=bo(s,(l,u,h)=>(pr(u,f=>{lr(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),pr(f.categoryMatches,d=>{lr(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;sa.length===1),n=e.length;if(i&&!r){let a=Wl(e);if(a.length===1&&Ri(a[0].categoryMatches)){let o=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=bo(a,(o,l,u)=>(o[l.tokenTypeIdx]=!0,pr(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;aE6([s],1)),i=lF(r.length),n=Zt(r,s=>{let o={};return pr(s,l=>{let u=WE(l.partialPath);pr(u,h=>{o[h]=!0})}),o}),a=r;for(let s=1;s<=t;s++){let o=a;a=lF(o.length);for(let l=0;l{let v=WE(y.partialPath);pr(v,x=>{n[l][x]=!0})})}}}}return i}function fw(e,t,r,i){let n=new Bke(e,Ki.ALTERNATION,i);return t.accept(n),Cz(n.result,r)}function dw(e,t,r,i){let n=new Bke(e,r);t.accept(n);let a=n.result,o=new Adt(t,e,r).startWalking(),l=new Us({definition:a}),u=new Us({definition:o});return Cz([l,u],i)}function A6(e,t){e:for(let r=0;r{let n=t[i];return r===n||n.categoryMatchesMap[r.tokenTypeIdx]})}function Sz(e){return Ul(e,t=>Ul(t,r=>Ul(r,i=>Ri(i.categoryMatches))))}function zke(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Zt(t,r=>Object.assign({type:ms.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Gke(e,t,r,i){let n=al(e,l=>qke(l,r)),a=Qke(e,t,r),s=al(e,l=>jke(l,r)),o=al(e,l=>Wke(l,e,i,r));return n.concat(a,s,o)}function qke(e,t){let r=new _dt;e.accept(r);let i=r.allProductions,n=qft(i,Vke),a=jl(n,o=>o.length>1);return Zt(Yn(a),o=>{let l=Yl(o),u=t.buildDuplicateFoundError(e,o),h=zl(l),f={message:u,type:ms.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:h,occurrence:l.idx},d=Ez(l);return d&&(f.parameter=d),f})}function Vke(e){return`${zl(e)}_#_${e.idx}_#_${Ez(e)}`}function Ez(e){return e instanceof Bi?e.terminalType.name:e instanceof gs?e.nonTerminalName:""}function Wke(e,t,r,i){let n=[];if(bo(t,(s,o)=>o.name===e.name?s+1:s,0)>1){let s=i.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});n.push({message:s,type:ms.DUPLICATE_RULE_NAME,ruleName:e.name})}return n}function Uke(e,t,r){let i=[],n;return vs(t,e)||(n=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,i.push({message:n,type:ms.INVALID_RULE_OVERRIDE,ruleName:e})),i}function Az(e,t,r,i=[]){let n=[],a=ET(t.definition);if(Ri(a))return[];{let s=e.name;vs(a,e)&&n.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:i}),type:ms.LEFT_RECURSION,ruleName:s});let l=vA(a,i.concat([e])),u=al(l,h=>{let f=Aa(i);return f.push(h),Az(e,h,r,f)});return n.concat(u)}}function ET(e){let t=[];if(Ri(e))return t;let r=Yl(e);if(r instanceof gs)t.push(r.referencedRule);else if(r instanceof Us||r instanceof Ea||r instanceof xo||r instanceof To||r instanceof Hs||r instanceof cn)t=t.concat(ET(r.definition));else if(r instanceof Ys)t=Wl(Zt(r.definition,a=>ET(a.definition)));else if(!(r instanceof Bi))throw Error("non exhaustive match");let i=$T(r),n=e.length>1;if(i&&n){let a=Sa(e);return t.concat(ET(a))}else return t}function Hke(e,t){let r=new _z;e.accept(r);let i=r.alternations;return al(i,a=>{let s=FT(a.definition);return al(s,(o,l)=>{let u=kz([o],[],Uy,1);return Ri(u)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:l}),type:ms.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:l+1}]:[]})})}function Yke(e,t,r){let i=new _z;e.accept(i);let n=i.alternations;return n=bA(n,s=>s.ignoreAmbiguities===!0),al(n,s=>{let o=s.idx,l=s.maxLookahead||t,u=fw(o,e,l,s),h=Kke(u,s,e,r),f=Zke(u,s,e,r);return h.concat(f)})}function jke(e,t){let r=new _z;e.accept(r);let i=r.alternations;return al(i,a=>a.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:a}),type:ms.TOO_MANY_ALTS,ruleName:e.name,occurrence:a.idx}]:[])}function Xke(e,t,r){let i=[];return pr(e,n=>{let a=new Ldt;n.accept(a);let s=a.allProductions;pr(s,o=>{let l=kA(o),u=o.maxLookahead||t,h=o.idx,d=dw(h,n,l,u)[0];if(Ri(Wl(d))){let p=r.buildEmptyRepetitionError({topLevelRule:n,repetition:o});i.push({message:p,type:ms.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}function Kke(e,t,r,i){let n=[],a=bo(e,(o,l,u)=>(t.definition[u].ignoreAmbiguities===!0||pr(l,h=>{let f=[u];pr(e,(d,p)=>{u!==p&&A6(d,h)&&t.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!A6(n,h)&&(n.push(h),o.push({alts:f,path:h}))}),o),[]);return Zt(a,o=>{let l=Zt(o.alts,h=>h+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:l,prefixPath:o.path}),type:ms.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:o.alts}})}function Zke(e,t,r,i){let n=bo(e,(s,o,l)=>{let u=Zt(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return cw(al(n,s=>{if(t.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=cl(n,d=>t.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{let p=[d.idx+1,l+1],g=t.idx===0?"":t.idx;return{message:i.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:p,prefixPath:d.path}),type:ms.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:p}})}))}function Qke(e,t,r){let i=[],n=Zt(t,a=>a.name);return pr(e,a=>{let s=a.name;if(vs(n,s)){let o=r.buildNamespaceConflictError(a);i.push({message:o,type:ms.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),i}function Jke(e){let t=hz(e,{errMsgProvider:Tdt}),r={};return pr(e.rules,i=>{r[i.name]=i}),Ike(r,t.errMsgProvider)}function e4e(e){return e=hz(e,{errMsgProvider:og}),Gke(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function GT(e){return vs(a4e,e.name)}function l4e(e,t,r,i,n,a,s){let o=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new a(p,n).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=qd,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(e,t,r,u)}function HE(e,t,r){return r|t|e}function h4e(e){mE.reset(),e.accept(mE);let t=mE.dslMethods;return mE.reset(),t}function fF(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsets.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function SW(e){return or(e,r=>Io(r)?r.charCodeAt(0):r)}function g_(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function bf(e){return e255?255+~~(e/255):e}}function nx(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function hC(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function ix(e){let t=b3e(e);T3e(t),C3e(t),w3e(t),Or(t,r=>{r.isParent=r.categoryMatches.length>0})}function b3e(e){let t=is(e),r=e,n=!0;for(;n;){r=OC(Sc(or(r,a=>a.CATEGORIES)));let i=J6(r,t);t=t.concat(i),ei(i)?n=!1:r=i}return t}function T3e(e){Or(e,t=>{AW(t)||(x3e[Nwe]=t,t.tokenTypeIdx=Nwe++),_G(t)&&!pn(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),_G(t)||(t.CATEGORIES=[]),k3e(t)||(t.categoryMatches=[]),S3e(t)||(t.categoryMatchesMap={})})}function w3e(e){Or(e,t=>{t.categoryMatches=[],Or(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(x3e[n].tokenTypeIdx)})})}function C3e(e){Or(e,t=>{EW([],t)})}function EW(e,t){Or(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),Or(t.CATEGORIES,r=>{let n=e.concat(t);eo(n,r)||EW(n,r)})}function AW(e){return Sr(e,"tokenTypeIdx")}function _G(e){return Sr(e,"CATEGORIES")}function k3e(e){return Sr(e,"categoryMatches")}function S3e(e){return Sr(e,"categoryMatchesMap")}function E3e(e){return Sr(e,"tokenTypeIdx")}function gm(e){return _W(e)?e.LABEL:e.name}function _W(e){return Io(e.LABEL)&&e.LABEL!==""}function $v(e){return A3e(e)}function A3e(e){let t=e.pattern,r={};if(r.name=e.name,xf(t)||(r.PATTERN=t),Sr(e,fvt))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Sr(e,Owe)&&(r.CATEGORIES=e[Owe]),ix([r]),Sr(e,Pwe)&&(r.LABEL=e[Pwe]),Sr(e,Bwe)&&(r.GROUP=e[Bwe]),Sr(e,Fwe)&&(r.POP_MODE=e[Fwe]),Sr(e,$we)&&(r.PUSH_MODE=e[$we]),Sr(e,zwe)&&(r.LONGER_ALT=e[zwe]),Sr(e,Gwe)&&(r.LINE_BREAKS=e[Gwe]),Sr(e,qwe)&&(r.START_CHARS_HINT=e[qwe]),r}function BC(e,t,r,n,i,a,s,o){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function RW(e,t){return nx(e,t)}function _3e(e,t){let r=new pvt(e,t);return r.resolveRefs(),r.errors}function s6(e,t,r=[]){r=is(r);let n=[],i=0;function a(o){return o.concat(rs(e,i+1))}A(a,"remainingPathWith");function s(o){let l=s6(a(o),t,r);return n.concat(l)}for(A(s,"getAlternativesForProd");r.length{ei(l.definition)===!1&&(n=s(l.definition))}),n;if(o instanceof si)r.push(o.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:rs(e,i)}),n}function LW(e,t,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=t.length,u=l-n-1,h=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!ei(f);){let d=f.pop();if(d===s){o&&vm(f).idx<=u&&f.pop();continue}let p=d.def,g=d.idx,m=d.ruleStack,y=d.occurrenceStack;if(ei(p))continue;let x=p[0];if(x===i){let b={idx:g,def:rs(p),ruleStack:cC(m),occurrenceStack:cC(y)};f.push(b)}else if(x instanceof si)if(g=0;b--){let T=x.definition[b],k={idx:g,def:T.definition.concat(rs(p)),ruleStack:m,occurrenceStack:y};f.push(k),f.push(s)}else if(x instanceof Mo)f.push({idx:g,def:x.definition.concat(rs(p)),ruleStack:m,occurrenceStack:y});else if(x instanceof ex)f.push(R3e(x,g,m,y));else throw Error("non exhaustive match")}return h}function R3e(e,t,r,n){let i=is(r);i.push(e.name);let a=is(n);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}function iR(e){if(e instanceof ns||e==="Option")return ki.OPTION;if(e instanceof $i||e==="Repetition")return ki.REPETITION;if(e instanceof fl||e==="RepetitionMandatory")return ki.REPETITION_MANDATORY;if(e instanceof dl||e==="RepetitionMandatoryWithSeparator")return ki.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Do||e==="RepetitionWithSeparator")return ki.REPETITION_WITH_SEPARATOR;if(e instanceof No||e==="Alternation")return ki.ALTERNATION;throw Error("non exhaustive match")}function LG(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:i}=e,a=iR(n);return a===ki.ALTERNATION?$C(t,r,i):FC(t,r,a,i)}function L3e(e,t,r,n,i,a){let s=$C(e,t,r),o=MW(s)?hC:nx;return a(s,n,o,i)}function I3e(e,t,r,n,i,a){let s=FC(e,t,i,r),o=MW(s)?hC:nx;return a(s[0],o,n)}function M3e(e,t,r,n){let i=e.length,a=Ec(e,s=>Ec(s,o=>o.length===1));if(t)return function(s){let o=or(s,l=>l.GATE);for(let l=0;lSc(l)),o=hl(s,(l,u,h)=>(Or(u,f=>{Sr(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),Or(f.categoryMatches,d=>{Sr(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;sa.length===1),i=e.length;if(n&&!r){let a=Sc(e);if(a.length===1&&ei(a[0].categoryMatches)){let o=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=hl(a,(o,l,u)=>(o[l.tokenTypeIdx]=!0,Or(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;as6([s],1)),n=IG(r.length),i=or(r,s=>{let o={};return Or(s,l=>{let u=y_(l.partialPath);Or(u,h=>{o[h]=!0})}),o}),a=r;for(let s=1;s<=t;s++){let o=a;a=IG(o.length);for(let l=0;l{let x=y_(y.partialPath);Or(x,b=>{i[l][b]=!0})})}}}}return n}function $C(e,t,r,n){let i=new N3e(e,ki.ALTERNATION,n);return t.accept(i),IW(i.result,r)}function FC(e,t,r,n){let i=new N3e(e,r);t.accept(i);let a=i.result,o=new xvt(t,e,r).startWalking(),l=new Mo({definition:a}),u=new Mo({definition:o});return IW([l,u],n)}function o6(e,t){e:for(let r=0;r{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function MW(e){return Ec(e,t=>Ec(t,r=>Ec(r,n=>ei(n.categoryMatches))))}function B3e(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return or(t,r=>Object.assign({type:Qs.CUSTOM_LOOKAHEAD_VALIDATION},r))}function $3e(e,t,r,n){let i=zl(e,l=>F3e(l,r)),a=j3e(e,t,r),s=zl(e,l=>U3e(l,r)),o=zl(e,l=>G3e(l,e,n,r));return i.concat(a,s,o)}function F3e(e,t){let r=new bvt;e.accept(r);let n=r.allProductions,i=N1t(n,z3e),a=Rc(i,o=>o.length>1);return or(ba(a),o=>{let l=_c(o),u=t.buildDuplicateFoundError(e,o),h=Tc(l),f={message:u,type:Qs.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:h,occurrence:l.idx},d=DW(l);return d&&(f.parameter=d),f})}function z3e(e){return`${Tc(e)}_#_${e.idx}_#_${DW(e)}`}function DW(e){return e instanceof si?e.terminalType.name:e instanceof Zs?e.nonTerminalName:""}function G3e(e,t,r,n){let i=[];if(hl(t,(s,o)=>o.name===e.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:s,type:Qs.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function q3e(e,t,r){let n=[],i;return eo(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Qs.INVALID_RULE_OVERRIDE,ruleName:e})),n}function NW(e,t,r,n=[]){let i=[],a=Kw(t.definition);if(ei(a))return[];{let s=e.name;eo(a,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Qs.LEFT_RECURSION,ruleName:s});let l=J6(a,n.concat([e])),u=zl(l,h=>{let f=is(n);return f.push(h),NW(e,h,r,f)});return i.concat(u)}}function Kw(e){let t=[];if(ei(e))return t;let r=_c(e);if(r instanceof Zs)t.push(r.referencedRule);else if(r instanceof Mo||r instanceof ns||r instanceof fl||r instanceof dl||r instanceof Do||r instanceof $i)t=t.concat(Kw(r.definition));else if(r instanceof No)t=Sc(or(r.definition,a=>Kw(a.definition)));else if(!(r instanceof si))throw Error("non exhaustive match");let n=uC(r),i=e.length>1;if(n&&i){let a=rs(e);return t.concat(Kw(a))}else return t}function V3e(e,t){let r=new OW;e.accept(r);let n=r.alternations;return zl(n,a=>{let s=cC(a.definition);return zl(s,(o,l)=>{let u=LW([o],[],nx,1);return ei(u)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:l}),type:Qs.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:l+1}]:[]})})}function W3e(e,t,r){let n=new OW;e.accept(n);let i=n.alternations;return i=eR(i,s=>s.ignoreAmbiguities===!0),zl(i,s=>{let o=s.idx,l=s.maxLookahead||t,u=$C(o,e,l,s),h=Y3e(u,s,e,r),f=X3e(u,s,e,r);return h.concat(f)})}function U3e(e,t){let r=new OW;e.accept(r);let n=r.alternations;return zl(n,a=>a.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:a}),type:Qs.TOO_MANY_ALTS,ruleName:e.name,occurrence:a.idx}]:[])}function H3e(e,t,r){let n=[];return Or(e,i=>{let a=new Tvt;i.accept(a);let s=a.allProductions;Or(s,o=>{let l=iR(o),u=o.maxLookahead||t,h=o.idx,d=FC(h,i,l,u)[0];if(ei(Sc(d))){let p=r.buildEmptyRepetitionError({topLevelRule:i,repetition:o});n.push({message:p,type:Qs.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function Y3e(e,t,r,n){let i=[],a=hl(e,(o,l,u)=>(t.definition[u].ignoreAmbiguities===!0||Or(l,h=>{let f=[u];Or(e,(d,p)=>{u!==p&&o6(d,h)&&t.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!o6(i,h)&&(i.push(h),o.push({alts:f,path:h}))}),o),[]);return or(a,o=>{let l=or(o.alts,h=>h+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:l,prefixPath:o.path}),type:Qs.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:o.alts}})}function X3e(e,t,r,n){let i=hl(e,(s,o,l)=>{let u=or(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return OC(zl(i,s=>{if(t.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=Wl(i,d=>t.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{let p=[d.idx+1,l+1],g=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:p,prefixPath:d.path}),type:Qs.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:p}})}))}function j3e(e,t,r){let n=[],i=or(t,a=>a.name);return Or(e,a=>{let s=a.name;if(eo(i,s)){let o=r.buildNamespaceConflictError(a);n.push({message:o,type:Qs.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}function K3e(e){let t=vW(e,{errMsgProvider:dvt}),r={};return Or(e.rules,n=>{r[n.name]=n}),_3e(r,t.errMsgProvider)}function Z3e(e){return e=vW(e,{errMsgProvider:fm}),$3e(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function fC(e){return eo(rAe,e.name)}function aAe(e,t,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new a(p,i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Op,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(e,t,r,u)}function x_(e,t,r){return r|t|e}function lAe(e){VA.reset(),e.accept(VA);let t=VA.dslMethods;return VA.reset(),t}function OG(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsets.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: ${a.join(` `).replace(/\n/g,` - `)}`)}},"validateVisitor")};return r.prototype=i,r.prototype.constructor=r,r._RULE_NAMES=t,r}function m4e(e,t,r){let i=S(function(){},"derivedConstructor");Rz(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return pr(t,a=>{n[a]=p4e}),i.prototype=n,i.prototype.constructor=i,i}function y4e(e,t){return v4e(e,t)}function v4e(e,t){let r=cl(t,n=>qh(e[n])===!1),i=Zt(r,n=>({msg:`Missing visitor method: <${n}> on ${e.constructor.name} CST Visitor.`,type:pF.MISSING_METHOD,methodName:n}));return cw(i)}function fy(e,t,r,i=!1){qT(r);let n=dg(this.recordingProdStack),a=qh(t)?t:t.DEF,s=new e({definition:[],idx:r});return i&&(s.separator=t.SEP),lr(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),n.definition.push(s),this.recordingProdStack.pop(),SA}function T4e(e,t){qT(t);let r=dg(this.recordingProdStack),i=Zr(e)===!1,n=i===!1?e:e.DEF,a=new Ys({definition:[],idx:t,ignoreAmbiguities:i&&e.IGNORE_AMBIGUITIES===!0});lr(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);let s=Owe(n,o=>qh(o.GATE));return a.hasPredicates=s,r.definition.push(a),pr(n,o=>{let l=new Us({definition:[]});a.definition.push(l),lr(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:lr(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),SA}function gF(e){return e===0?"":`${e}`}function qT(e){if(e<0||e>Jye){let t=new Error(`Invalid DSL Method idx value: <${e}> - Idx value must be a none negative value smaller than ${Jye+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function w4e(e,t){t.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(n=>{if(n==="constructor")return;let a=Object.getOwnPropertyDescriptor(i,n);a&&(a.get||a.set)?Object.defineProperty(e.prototype,n,a):e.prototype[n]=r.prototype[n]})})}function mF(e=void 0){return function(){return e}}function C4e(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r-1}function N4e(e,t){var r=this.__data__,i=EA(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Rg(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=r&l0t?new fCe:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=V0t}function PCe(e){return By(e)&&Mz(e.length)&&!!Pi[Yy(e)]}function BCe(e){return function(t){return e(t)}}function $Ce(e,t){var r=ys(e),i=!r&&RA(e),n=!r&&!i&&R6(e),a=!r&&!i&&!n&&Oz(e),s=r||i||n||a,o=s?D0t(e.length,String):[],l=o.length;for(var u in e)(t||xgt.call(e,u))&&!(s&&(u=="length"||n&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||MCe(u,l)))&&o.push(u);return o}function zCe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wgt;return e===r}function qCe(e,t){return function(r){return e(t(r))}}function VCe(e){if(!GCe(e))return Sgt(e);var t=[];for(var r in Object(e))Agt.call(e,r)&&r!="constructor"&&t.push(r);return t}function UCe(e){return e!=null&&Mz(e.length)&&!U4e(e)}function HCe(e){return IA(e)?Tgt(e):WCe(e)}function YCe(e){return E0t(e,Pz,I0t)}function jCe(e,t,r,i,n,a){var s=r&_gt,o=hve(e),l=o.length,u=hve(t),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in t:Rgt.call(t,d)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=s;++fWz(e,t,s));return Og(e,t,i,r,...n)}function G5e(e,t,r){let i=jn(e,t,r,{type:Vd});Wh(e,i);let n=Og(e,t,i,r,Xd(e,t,r));return q5e(e,t,r,n)}function Xd(e,t,r){let i=Lmt(Rh(r.definition,n=>Wz(e,t,n)),n=>n!==void 0);return i.length===1?i[0]:i.length===0?void 0:W5e(e,i)}function Uz(e,t,r,i,n){let a=i.left,s=i.right,o=jn(e,t,r,{type:Mmt});Wh(e,o);let l=jn(e,t,r,{type:D5e});return a.loopback=o,l.loopback=o,e.decisionMap[gg(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,vn(s,o),n===void 0?(vn(o,a),vn(o,l)):(vn(o,l),vn(o,n.left),vn(n.right,a)),{left:a,right:l}}function Hz(e,t,r,i,n){let a=i.left,s=i.right,o=jn(e,t,r,{type:Nmt});Wh(e,o);let l=jn(e,t,r,{type:D5e}),u=jn(e,t,r,{type:Dmt});return o.loopback=u,l.loopback=u,vn(o,a),vn(o,l),vn(s,u),n!==void 0?(vn(u,l),vn(u,n.left),vn(n.right,a)):vn(u,o),e.decisionMap[gg(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function q5e(e,t,r,i){let n=i.left,a=i.right;return vn(n,a),e.decisionMap[gg(t,"Option",r.idx)]=n,i}function Wh(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Og(e,t,r,i,...n){let a=jn(e,t,i,{type:Imt,start:r});r.end=a;for(let o of n)o!==void 0?(vn(r,o.left),vn(o.right,a)):vn(r,a);let s={left:r,right:a};return e.decisionMap[gg(t,V5e(i),i.idx)]=r,s}function V5e(e){if(e instanceof Ys)return"Alternation";if(e instanceof Ea)return"Option";if(e instanceof cn)return"Repetition";if(e instanceof Hs)return"RepetitionWithSeparator";if(e instanceof xo)return"RepetitionMandatory";if(e instanceof To)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function W5e(e,t){let r=t.length;for(let a=0;ar.stateNumber.toString()).join("_")}`}function j5e(e,t,r){for(var i=-1,n=e.length;++i0&&r(o)?t>1?jz(o,t-1,r,i,n):wCe(n,o):i||(n[n.length]=o)}return n}function J5e(e,t){return Q5e(Rh(e,t),1)}function e3e(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a-1}function a3e(e,t,r){for(var i=-1,n=e==null?0:e.length;++i=Kmt){var u=t?null:Xmt(e);if(u)return Nz(u);s=!1,n=gCe,l=new fCe}else l=t?[]:o;e:for(;++i{let n=i.toString(),a=r[n];return a!==void 0||(a={atnStartState:e,decision:t,states:{}},r[n]=a),a}}function wF(e,t=!0){let r=new Set;for(let i of e){let n=new Set;for(let a of i){if(a===void 0){if(t)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let o of s)if(r.has(o)){if(!n.has(o))return!1}else r.add(o),n.add(o)}}return!0}function b3e(e){let t=e.decisionStates.length,r=Array(t);for(let i=0;iug(n)).join(", "),r=e.production.idx===0?"":e.production.idx,i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${C3e(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function dAe(e,t,r){let n=A(function(){},"derivedConstructor");BW(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return Or(t,a=>{i[a]=hAe}),n.prototype=i,n.prototype.constructor=n,n}function pAe(e,t){return gAe(e,t)}function gAe(e,t){let r=Wl(t,i=>Sf(e[i])===!1),n=or(r,i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:BG.MISSING_METHOD,methodName:i}));return OC(n)}function wv(e,t,r,n=!1){dC(r);let i=vm(this.recordingProdStack),a=Sf(t)?t:t.DEF,s=new e({definition:[],idx:r});return n&&(s.separator=t.SEP),Sr(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),sR}function vAe(e,t){dC(t);let r=vm(this.recordingProdStack),n=pn(e)===!1,i=n===!1?e:e.DEF,a=new No({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});Sr(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);let s=D5e(i,o=>Sf(o.GATE));return a.hasPredicates=s,r.definition.push(a),Or(i,o=>{let l=new Mo({definition:[]});a.definition.push(l),Sr(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:Sr(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),sR}function $G(e){return e===0?"":`${e}`}function dC(e){if(e<0||e>Hwe){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${Hwe+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function xAe(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(e.prototype,i,a):e.prototype[i]=r.prototype[i]})})}function FG(e=void 0){return function(){return e}}function TAe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r-1}function LAe(e,t){var r=this.__data__,n=oR(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Om(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=r&ebt?new c_e:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=Obt}function D_e(e){return jv(e)&&GW(e.length)&&!!ai[ax(e)]}function N_e(e){return function(t){return e(t)}}function P_e(e,t){var r=Js(e),n=!r&&hR(e),i=!r&&!n&&u6(e),a=!r&&!n&&!i&&qW(e),s=r||n||i||a,o=s?kbt(e.length,String):[],l=o.length;for(var u in e)(t||f2t.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||I_e(u,l)))&&o.push(u);return o}function B_e(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||p2t;return e===r}function F_e(e,t){return function(r){return e(t(r))}}function z_e(e){if(!$_e(e))return y2t(e);var t=[];for(var r in Object(e))x2t.call(e,r)&&r!="constructor"&&t.push(r);return t}function q_e(e){return e!=null&&GW(e.length)&&!qAe(e)}function V_e(e){return fR(e)?d2t(e):G_e(e)}function W_e(e){return vbt(e,VW,Cbt)}function U_e(e,t,r,n,i,a){var s=r&b2t,o=iCe(e),l=o.length,u=iCe(t),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in t:w2t.call(t,d)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=s;++fZW(e,t,s));return zm(e,t,n,r,...i)}function $6e(e,t,r){let n=Ta(e,t,r,{type:Pp});Af(e,n);let i=zm(e,t,n,r,qp(e,t,r));return F6e(e,t,r,i)}function qp(e,t,r){let n=TTt(df(r.definition,i=>ZW(e,t,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:G6e(e,n)}function QW(e,t,r,n,i){let a=n.left,s=n.right,o=Ta(e,t,r,{type:ETt});Af(e,o);let l=Ta(e,t,r,{type:R6e});return a.loopback=o,l.loopback=o,e.decisionMap[bm(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,Yi(s,o),i===void 0?(Yi(o,a),Yi(o,l)):(Yi(o,l),Yi(o,i.left),Yi(i.right,a)),{left:a,right:l}}function JW(e,t,r,n,i){let a=n.left,s=n.right,o=Ta(e,t,r,{type:STt});Af(e,o);let l=Ta(e,t,r,{type:R6e}),u=Ta(e,t,r,{type:kTt});return o.loopback=u,l.loopback=u,Yi(o,a),Yi(o,l),Yi(s,u),i!==void 0?(Yi(u,l),Yi(u,i.left),Yi(i.right,a)):Yi(u,o),e.decisionMap[bm(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function F6e(e,t,r,n){let i=n.left,a=n.right;return Yi(i,a),e.decisionMap[bm(t,"Option",r.idx)]=i,n}function Af(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function zm(e,t,r,n,...i){let a=Ta(e,t,n,{type:CTt,start:r});r.end=a;for(let o of i)o!==void 0?(Yi(r,o.left),Yi(o.right,a)):Yi(r,a);let s={left:r,right:a};return e.decisionMap[bm(t,z6e(n),n.idx)]=r,s}function z6e(e){if(e instanceof No)return"Alternation";if(e instanceof ns)return"Option";if(e instanceof $i)return"Repetition";if(e instanceof Do)return"RepetitionWithSeparator";if(e instanceof fl)return"RepetitionMandatory";if(e instanceof dl)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function G6e(e,t){let r=t.length;for(let a=0;ar.stateNumber.toString()).join("_")}`}function U6e(e,t,r){for(var n=-1,i=e.length;++n0&&r(o)?t>1?tU(o,t-1,r,n,i):x_e(i,o):n||(i[i.length]=o)}return i}function K6e(e,t){return j6e(df(e,t),1)}function Z6e(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a-1}function rRe(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=qTt){var u=t?null:GTt(e);if(u)return zW(u);s=!1,i=f_e,l=new c_e}else l=t?[]:o;e:for(;++n{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:e,decision:t,states:{}},r[i]=a),a}}function UG(e,t=!0){let r=new Set;for(let n of e){let i=new Set;for(let a of n){if(a===void 0){if(t)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let o of s)if(r.has(o)){if(!i.has(o))return!1}else r.add(o),i.add(o)}}return!0}function mRe(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;ngm(i)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${TRe(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. -`;return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i}function C3e(e){if(e instanceof gs)return"SUBRULE";if(e instanceof Ea)return"OPTION";if(e instanceof Ys)return"OR";if(e instanceof xo)return"AT_LEAST_ONE";if(e instanceof To)return"AT_LEAST_ONE_SEP";if(e instanceof Hs)return"MANY_SEP";if(e instanceof cn)return"MANY";if(e instanceof Bi)return"CONSUME";throw Error("non exhaustive match")}function S3e(e,t,r){let i=$mt(t.configs.elements,a=>a.state.transitions),n=Qmt(i.filter(a=>a instanceof qz).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:n,tokenPath:e}}function E3e(e,t){return e.edges[t.tokenTypeIdx]}function A3e(e,t,r){let i=new TF,n=[];for(let s of e.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===pw){n.push(s);continue}let o=s.state.transitions.length;for(let l=0;l0&&!D3e(a))for(let s of n)a.add(s);return a}function _3e(e,t){if(e instanceof qz&&wz(t,e.tokenType))return e.target}function L3e(e,t){let r;for(let i of e.elements)if(t.is(i.alt)===!0){if(r===void 0)r=i.alt;else if(r!==i.alt)return}return r}function Xz(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function kF(e,t,r,i){return i=Kz(e,i),t.edges[r.tokenTypeIdx]=i,i}function Kz(e,t){if(t===I6)return t;let r=t.configs.key,i=e.states[r];return i!==void 0?i:(t.configs.finalize(),e.states[r]=t,t)}function R3e(e){let t=new TF,r=e.transitions.length;for(let i=0;i0){let n=[...e.stack],s={state:n.pop(),alt:e.alt,stack:n};HT(s,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let i=r.transitions.length;for(let n=0;n1)return!0;return!1}function B3e(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function XE(e){return e.$type===N6}function zA(e,t,r){return U3e({parser:t,tokens:r,ruleNames:new Map},e),t}function U3e(e,t){let r=tA(t,!1),i=gi(t.rules).filter(ps).filter(a=>r.has(a));for(let a of i){let s={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(a,Wd(s,a.definition))}let n=gi(t.rules).filter(Iy).filter(a=>r.has(a));for(let a of n)e.parser.rule(a,H3e(e,a))}function H3e(e,t){let r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(ll(r))throw new Error("Cannot use terminal rule in infix expression");let i=t.operators.precedences.flatMap(p=>p.operators),n={$type:"Group",elements:[]},a={$container:n,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:n,$type:"Group",elements:[],cardinality:"*"};n.elements.push(a,s);let l={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:i}},u={...a,$container:s};s.elements.push(l,u);let f=i.map(p=>e.tokens[p.value]).map((p,g)=>({ALT:S(()=>e.parser.consume(g,p,l),"ALT")})),d;return p=>{d??(d=GA(e,r)),e.parser.subrule(0,d,!1,a,p),e.parser.many(0,{DEF:S(()=>{e.parser.alternatives(0,f),e.parser.subrule(1,d,!1,u,p)},"DEF")})}}function Wd(e,t,r=!1){let i;if(Nh(t))i=J3e(e,t);else if(zd(t))i=Y3e(e,t);else if(Dh(t))i=Wd(e,t.terminal);else if(xg(t))i=tG(e,t);else if(Mh(t))i=j3e(e,t);else if(H6(t))i=K3e(e,t);else if(K6(t))i=Z3e(e,t);else if(Tg(t))i=Q3e(e,t);else if(n$(t)){let n=e.consume++;i=S(()=>e.parser.consume(n,qd,t),"method")}else throw new Q6(t.$cstNode,`Unexpected element type: ${t.$type}`);return rG(e,r?void 0:YT(t),i,t.cardinality)}function Y3e(e,t){let r=fg(t);return()=>e.parser.action(r,t)}function j3e(e,t){let r=t.rule.ref;if(bg(r)){let i=e.subrule++,n=ps(r)&&r.fragment,a=t.arguments.length>0?X3e(r,t.arguments):()=>({}),s;return o=>{s??(s=GA(e,r)),e.parser.subrule(i,s,n,t,a(o))}}else if(ll(r)){let i=e.consume++,n=M6(e,r.name);return()=>e.parser.consume(i,n,t)}else if(r)Hd(r);else throw new Q6(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function X3e(e,t){if(t.some(i=>i.calledByName)){let i=t.map(n=>({parameterName:n.parameter?.ref?.name,predicate:Gl(n.value)}));return n=>{let a={};for(let{parameterName:s,predicate:o}of i)s&&(a[s]=o(n));return a}}else{let i=t.map(n=>Gl(n.value));return n=>{let a={};for(let s=0;st(i)||r(i)}else if(r$(e)){let t=Gl(e.left),r=Gl(e.right);return i=>t(i)&&r(i)}else if(o$(e)){let t=Gl(e.value);return r=>!t(r)}else if(l$(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(e$(e)){let t=!!e.true;return()=>t}Hd(e)}function K3e(e,t){if(t.elements.length===1)return Wd(e,t.elements[0]);{let r=[];for(let n of t.elements){let a={ALT:Wd(e,n,!0)},s=YT(n);s&&(a.GATE=Gl(s)),r.push(a)}let i=e.or++;return n=>e.parser.alternatives(i,r.map(a=>{let s={ALT:S(()=>a.ALT(n),"ALT")},o=a.GATE;return o&&(s.GATE=()=>o(n)),s}))}}function Z3e(e,t){if(t.elements.length===1)return Wd(e,t.elements[0]);let r=[];for(let o of t.elements){let l={ALT:Wd(e,o,!0)},u=YT(o);u&&(l.GATE=Gl(u)),r.push(l)}let i=e.or++,n=S((o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},"idFunc"),a=S(o=>e.parser.alternatives(i,r.map((l,u)=>{let h={ALT:S(()=>!0,"ALT")},f=e.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=n(i,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let g=f.unorderedGroups.get(p);typeof g?.[u]>"u"&&(g[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>!f.unorderedGroups.get(n(i,f))?.[u],h})),"alternatives"),s=rG(e,YT(t),a,"*");return o=>{s(o),e.parser.isRecording()||e.parser.unorderedGroups.delete(n(i,e.parser))}}function Q3e(e,t){let r=t.elements.map(i=>Wd(e,i));return i=>r.forEach(n=>n(i))}function YT(e){if(Tg(e))return e.guardCondition}function tG(e,t,r=t.terminal){if(r)if(Mh(r)&&ps(r.rule.ref)){let i=r.rule.ref,n=e.subrule++,a;return s=>{a??(a=GA(e,i)),e.parser.subrule(n,a,!1,t,s)}}else if(Mh(r)&&ll(r.rule.ref)){let i=e.consume++,n=M6(e,r.rule.ref.name);return()=>e.parser.consume(i,n,t)}else if(Nh(r)){let i=e.consume++,n=M6(e,r.value);return()=>e.parser.consume(i,n,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let n=aA(t.type.ref)?.terminal;if(!n)throw new Error("Could not find name assignment for type: "+fg(t.type.ref));return tG(e,t,n)}}function J3e(e,t){let r=e.consume++,i=e.tokens[t.value];if(!i)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,i,t)}function rG(e,t,r,i){let n=t&&Gl(t);if(!i)if(n){let a=e.or++;return s=>e.parser.alternatives(a,[{ALT:S(()=>r(s),"ALT"),GATE:S(()=>n(s),"GATE")},{ALT:mF(),GATE:S(()=>!n(s),"GATE")}])}else return r;if(i==="*"){let a=e.many++;return s=>e.parser.many(a,{DEF:S(()=>r(s),"DEF"),GATE:n?()=>n(s):void 0})}else if(i==="+"){let a=e.many++;if(n){let s=e.or++;return o=>e.parser.alternatives(s,[{ALT:S(()=>e.parser.atLeastOne(a,{DEF:S(()=>r(o),"DEF")}),"ALT"),GATE:S(()=>n(o),"GATE")},{ALT:mF(),GATE:S(()=>!n(o),"GATE")}])}else return s=>e.parser.atLeastOne(a,{DEF:S(()=>r(s),"DEF")})}else if(i==="?"){let a=e.optional++;return s=>e.parser.optional(a,{DEF:S(()=>r(s),"DEF"),GATE:n?()=>n(s):void 0})}else Hd(i)}function GA(e,t){let r=eSe(e,t),i=e.parser.getRule(r);if(!i)throw new Error(`Rule "${r}" not found."`);return i}function eSe(e,t){if(bg(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,i=r.$container,n=t.$type;for(;!ps(i);)(Tg(i)||H6(i)||K6(i))&&(n=i.elements.indexOf(r).toString()+":"+n),r=i,i=i.$container;return n=i.name+":"+n,e.ruleNames.set(t,n),n}}function M6(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function iG(e){let t=e.Grammar,r=e.parser.Lexer,i=new V3e(e);return zA(t,i,r.definition),i.finalize(),i}function nG(e){let t=aG(e);return t.finalize(),t}function aG(e){let t=e.Grammar,r=e.parser.Lexer,i=new G3e(e);return zA(t,i,r.definition)}function VA(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function WA(){return KE=performance.now(),new Li.CancellationTokenSource}function oG(e){tSe=e}function Pg(e){return e===pu}async function la(e){if(e===Li.CancellationToken.None)return;let t=performance.now();if(t-KE>=tSe&&(KE=t,await VA(),KE=performance.now()),e.isCancellationRequested)throw pu}function P6(e,t){if(e.length<=1)return e;let r=e.length/2|0,i=e.slice(0,r),n=e.slice(r);P6(i,t),P6(n,t);let a=0,s=0,o=0;for(;ar.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function rSe(e){let t=cG(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function hG(e){return typeof e.name=="string"}function pG(e){return typeof e.$comment=="string"}function AF(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}function lg(e){return{code:e}}function gG(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=rA(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=F$(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function _T(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function mG(e){switch(e){case"error":return lg(nl.LexingError);case"warning":return lg(nl.LexingWarning);case"info":return lg(nl.LexingInfo);case"hint":return lg(nl.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function jA(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function XA(e){return e&&"modes"in e&&"defaultMode"in e}function $6(e){return!jA(e)&&!XA(e)}function bG(e,t,r){let i,n;typeof e=="string"?(n=t,i=r):(n=e.range.start,i=t),n||(n=oi.create(0,0));let a=TG(e),s=KA(i),o=ESe({lines:a,position:n,options:s});return LSe({index:0,tokens:o,position:n})}function xG(e,t){let r=KA(t),i=TG(e);if(i.length===0)return!1;let n=i[0],a=i[i.length-1],s=r.start,o=r.end;return!!s?.exec(n)&&!!o?.exec(a)}function TG(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(A2e)}function ESe(e){let t=[],r=e.position.line,i=e.position.character;for(let n=0;n=o.length){if(t.length>0){let h=oi.create(r,i);t.push({type:"break",content:"",range:Wr.create(h,h)})}}else{Ave.lastIndex=l;let h=Ave.exec(o);if(h){let f=h[0],d=h[1],p=oi.create(r,i+l),g=oi.create(r,i+l+f.length);t.push({type:"tag",content:d,range:Wr.create(p,g)}),l+=f.length,l=z6(o,l)}if(l0&&t[t.length-1].type==="break"?t.slice(0,-1):t}function ASe(e,t,r,i){let n=[];if(e.length===0){let a=oi.create(r,i),s=oi.create(r,i+t.length);n.push({type:"text",content:t,range:Wr.create(a,s)})}else{let a=0;for(let o of e){let l=o.index,u=t.substring(a,l);u.length>0&&n.push({type:"text",content:t.substring(a,l),range:Wr.create(oi.create(r,a+i),oi.create(r,l+i))});let h=u.length+1,f=o[1];if(n.push({type:"inline-tag",content:f,range:Wr.create(oi.create(r,a+h+i),oi.create(r,a+h+f.length+i))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];n.push({type:"text",content:d,range:Wr.create(oi.create(r,a+h+i),oi.create(r,a+h+d.length+i))})}else n.push({type:"text",content:"",range:Wr.create(oi.create(r,a+h+i),oi.create(r,a+h+i))});a=l+o[0].length}let s=t.substring(a);s.length>0&&n.push({type:"text",content:s,range:Wr.create(oi.create(r,a+i),oi.create(r,a+i+s.length))})}return n}function z6(e,t){let r=e.substring(t).match(m1t);return r?t+r.index:e.length}function _Se(e){let t=e.match(y1t);if(t&&typeof t.index=="number")return t.index}function LSe(e){let t=oi.create(e.position.line,e.position.character);if(e.tokens.length===0)return new _ve([],Wr.create(t,t));let r=[];for(;e.index0){let s=z6(t,i);n=t.substring(s),t=t.substring(0,i)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(n=`\`${n}\``),r.renderLink?.(t,n)??MSe(t,n)}}function MSe(e,t){try{return mo.parse(e,!0),`[${t}](${e})`}catch{return e}}function LF(e){return e.endsWith(` +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n}function TRe(e){if(e instanceof Zs)return"SUBRULE";if(e instanceof ns)return"OPTION";if(e instanceof No)return"OR";if(e instanceof fl)return"AT_LEAST_ONE";if(e instanceof dl)return"AT_LEAST_ONE_SEP";if(e instanceof Do)return"MANY_SEP";if(e instanceof $i)return"MANY";if(e instanceof si)return"CONSUME";throw Error("non exhaustive match")}function wRe(e,t,r){let n=ITt(t.configs.elements,a=>a.state.transitions),i=WTt(n.filter(a=>a instanceof jW).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:e}}function CRe(e,t){return e.edges[t.tokenTypeIdx]}function kRe(e,t,r){let n=new WG,i=[];for(let s of e.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===zC){i.push(s);continue}let o=s.state.transitions.length;for(let l=0;l0&&!RRe(a))for(let s of i)a.add(s);return a}function SRe(e,t){if(e instanceof jW&&RW(t,e.tokenType))return e.target}function ERe(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function rU(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function HG(e,t,r,n){return n=nU(e,n),t.edges[r.tokenTypeIdx]=n,n}function nU(e,t){if(t===h6)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}function ARe(e){let t=new WG,r=e.transitions.length;for(let n=0;n0){let i=[...e.stack],s={state:i.pop(),alt:e.alt,stack:i};yC(s,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function NRe(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function w_(e){return e.$type===d6}function TR(e,t,r){return qRe({parser:t,tokens:r,ruleNames:new Map},e),t}function qRe(e,t){let r=P6(t,!1),n=zn(t.rules).filter(Ks).filter(a=>r.has(a));for(let a of n){let s={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(a,Bp(s,a.definition))}let i=zn(t.rules).filter(Wv).filter(a=>r.has(a));for(let a of i)e.parser.rule(a,VRe(e,a))}function VRe(e,t){let r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Vl(r))throw new Error("Cannot use terminal rule in infix expression");let n=t.operators.precedences.flatMap(p=>p.operators),i={$type:"Group",elements:[]},a={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(a,s);let l={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},u={...a,$container:s};s.elements.push(l,u);let f=n.map(p=>e.tokens[p.value]).map((p,g)=>({ALT:A(()=>e.parser.consume(g,p,l),"ALT")})),d;return p=>{d??(d=wR(e,r)),e.parser.subrule(0,d,!1,a,p),e.parser.many(0,{DEF:A(()=>{e.parser.alternatives(0,f),e.parser.subrule(1,d,!1,u,p)},"DEF")})}}function Bp(e,t,r=!1){let n;if(mf(t))n=KRe(e,t);else if(Dp(t))n=WRe(e,t);else if(gf(t))n=Bp(e,t.terminal);else if(Sm(t))n=lU(e,t);else if(yf(t))n=URe(e,t);else if(A6(t))n=YRe(e,t);else if(I6(t))n=XRe(e,t);else if(Em(t))n=jRe(e,t);else if(hV(t)){let i=e.consume++;n=A(()=>e.parser.consume(i,Op,t),"method")}else throw new D6(t.$cstNode,`Unexpected element type: ${t.$type}`);return cU(e,r?void 0:vC(t),n,t.cardinality)}function WRe(e,t){let r=ym(t);return()=>e.parser.action(r,t)}function URe(e,t){let r=t.rule.ref;if(km(r)){let n=e.subrule++,i=Ks(r)&&r.fragment,a=t.arguments.length>0?HRe(r,t.arguments):()=>({}),s;return o=>{s??(s=wR(e,r)),e.parser.subrule(n,s,i,t,a(o))}}else if(Vl(r)){let n=e.consume++,i=p6(e,r.name);return()=>e.parser.consume(n,i,t)}else if(r)Fp(r);else throw new D6(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function HRe(e,t){if(t.some(n=>n.calledByName)){let n=t.map(i=>({parameterName:i.parameter?.ref?.name,predicate:wc(i.value)}));return i=>{let a={};for(let{parameterName:s,predicate:o}of n)s&&(a[s]=o(i));return a}}else{let n=t.map(i=>wc(i.value));return i=>{let a={};for(let s=0;st(n)||r(n)}else if(cV(e)){let t=wc(e.left),r=wc(e.right);return n=>t(n)&&r(n)}else if(pV(e)){let t=wc(e.value);return r=>!t(r)}else if(gV(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(oV(e)){let t=!!e.true;return()=>t}Fp(e)}function YRe(e,t){if(t.elements.length===1)return Bp(e,t.elements[0]);{let r=[];for(let i of t.elements){let a={ALT:Bp(e,i,!0)},s=vC(i);s&&(a.GATE=wc(s)),r.push(a)}let n=e.or++;return i=>e.parser.alternatives(n,r.map(a=>{let s={ALT:A(()=>a.ALT(i),"ALT")},o=a.GATE;return o&&(s.GATE=()=>o(i)),s}))}}function XRe(e,t){if(t.elements.length===1)return Bp(e,t.elements[0]);let r=[];for(let o of t.elements){let l={ALT:Bp(e,o,!0)},u=vC(o);u&&(l.GATE=wc(u)),r.push(l)}let n=e.or++,i=A((o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},"idFunc"),a=A(o=>e.parser.alternatives(n,r.map((l,u)=>{let h={ALT:A(()=>!0,"ALT")},f=e.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=i(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let g=f.unorderedGroups.get(p);typeof g?.[u]>"u"&&(g[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>!f.unorderedGroups.get(i(n,f))?.[u],h})),"alternatives"),s=cU(e,vC(t),a,"*");return o=>{s(o),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(n,e.parser))}}function jRe(e,t){let r=t.elements.map(n=>Bp(e,n));return n=>r.forEach(i=>i(n))}function vC(e){if(Em(e))return e.guardCondition}function lU(e,t,r=t.terminal){if(r)if(yf(r)&&Ks(r.rule.ref)){let n=r.rule.ref,i=e.subrule++,a;return s=>{a??(a=wR(e,n)),e.parser.subrule(i,a,!1,t,s)}}else if(yf(r)&&Vl(r.rule.ref)){let n=e.consume++,i=p6(e,r.rule.ref.name);return()=>e.parser.consume(n,i,t)}else if(mf(r)){let n=e.consume++,i=p6(e,r.value);return()=>e.parser.consume(n,i,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let i=z6(t.type.ref)?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+ym(t.type.ref));return lU(e,t,i)}}function KRe(e,t){let r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}function cU(e,t,r,n){let i=t&&wc(t);if(!n)if(i){let a=e.or++;return s=>e.parser.alternatives(a,[{ALT:A(()=>r(s),"ALT"),GATE:A(()=>i(s),"GATE")},{ALT:FG(),GATE:A(()=>!i(s),"GATE")}])}else return r;if(n==="*"){let a=e.many++;return s=>e.parser.many(a,{DEF:A(()=>r(s),"DEF"),GATE:i?()=>i(s):void 0})}else if(n==="+"){let a=e.many++;if(i){let s=e.or++;return o=>e.parser.alternatives(s,[{ALT:A(()=>e.parser.atLeastOne(a,{DEF:A(()=>r(o),"DEF")}),"ALT"),GATE:A(()=>i(o),"GATE")},{ALT:FG(),GATE:A(()=>!i(o),"GATE")}])}else return s=>e.parser.atLeastOne(a,{DEF:A(()=>r(s),"DEF")})}else if(n==="?"){let a=e.optional++;return s=>e.parser.optional(a,{DEF:A(()=>r(s),"DEF"),GATE:i?()=>i(s):void 0})}else Fp(n)}function wR(e,t){let r=ZRe(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function ZRe(e,t){if(km(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,i=t.$type;for(;!Ks(n);)(Em(n)||A6(n)||I6(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,e.ruleNames.set(t,i),i}}function p6(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function uU(e){let t=e.Grammar,r=e.parser.Lexer,n=new zRe(e);return TR(t,n,r.definition),n.finalize(),n}function hU(e){let t=fU(e);return t.finalize(),t}function fU(e){let t=e.Grammar,r=e.parser.Lexer,n=new $Re(e);return TR(t,n,r.definition)}function kR(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function SR(){return C_=performance.now(),new Jn.CancellationTokenSource}function pU(e){QRe=e}function Gm(e){return e===Zu}async function Fa(e){if(e===Jn.CancellationToken.None)return;let t=performance.now();if(t-C_>=QRe&&(C_=t,await kR(),C_=performance.now()),e.isCancellationRequested)throw Zu}function m6(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);m6(n,t),m6(i,t);let a=0,s=0,o=0;for(;ar.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function JRe(e){let t=mU(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function vU(e){return typeof e.name=="string"}function TU(e){return typeof e.$comment=="string"}function KG(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}function dm(e){return{code:e}}function wU(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=B6(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=UV(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Qw(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function CU(e){switch(e){case"error":return dm(Fl.LexingError);case"warning":return dm(Fl.LexingWarning);case"info":return dm(Fl.LexingInfo);case"hint":return dm(Fl.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function RR(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function LR(e){return e&&"modes"in e&&"defaultMode"in e}function x6(e){return!RR(e)&&!LR(e)}function EU(e,t,r){let n,i;typeof e=="string"?(i=t,n=r):(i=e.range.start,n=t),i||(i=Ln.create(0,0));let a=_U(e),s=IR(n),o=C7e({lines:a,position:i,options:s});return E7e({index:0,tokens:o,position:i})}function AU(e,t){let r=IR(t),n=_U(e);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],s=r.start,o=r.end;return!!s?.exec(i)&&!!o?.exec(a)}function _U(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(Ske)}function C7e(e){let t=[],r=e.position.line,n=e.position.character;for(let i=0;i=o.length){if(t.length>0){let h=Ln.create(r,n);t.push({type:"break",content:"",range:on.create(h,h)})}}else{bCe.lastIndex=l;let h=bCe.exec(o);if(h){let f=h[0],d=h[1],p=Ln.create(r,n+l),g=Ln.create(r,n+l+f.length);t.push({type:"tag",content:d,range:on.create(p,g)}),l+=f.length,l=b6(o,l)}if(l0&&t[t.length-1].type==="break"?t.slice(0,-1):t}function k7e(e,t,r,n){let i=[];if(e.length===0){let a=Ln.create(r,n),s=Ln.create(r,n+t.length);i.push({type:"text",content:t,range:on.create(a,s)})}else{let a=0;for(let o of e){let l=o.index,u=t.substring(a,l);u.length>0&&i.push({type:"text",content:t.substring(a,l),range:on.create(Ln.create(r,a+n),Ln.create(r,l+n))});let h=u.length+1,f=o[1];if(i.push({type:"inline-tag",content:f,range:on.create(Ln.create(r,a+h+n),Ln.create(r,a+h+f.length+n))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];i.push({type:"text",content:d,range:on.create(Ln.create(r,a+h+n),Ln.create(r,a+h+d.length+n))})}else i.push({type:"text",content:"",range:on.create(Ln.create(r,a+h+n),Ln.create(r,a+h+n))});a=l+o[0].length}let s=t.substring(a);s.length>0&&i.push({type:"text",content:s,range:on.create(Ln.create(r,a+n),Ln.create(r,a+n+s.length))})}return i}function b6(e,t){let r=e.substring(t).match(lwt);return r?t+r.index:e.length}function S7e(e){let t=e.match(cwt);if(t&&typeof t.index=="number")return t.index}function E7e(e){let t=Ln.create(e.position.line,e.position.character);if(e.tokens.length===0)return new TCe([],on.create(t,t));let r=[];for(;e.index0){let s=b6(t,n);i=t.substring(s),t=t.substring(0,n)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(i=`\`${i}\``),r.renderLink?.(t,i)??I7e(t,i)}}function I7e(e,t){try{return ll.parse(e,!0),`[${t}](${e})`}catch{return e}}function QG(e){return e.endsWith(` `)?` `:` -`}function Qi(e){return{documentation:{CommentProvider:S(t=>new BSe(t),"CommentProvider"),DocumentationProvider:S(t=>new PSe(t),"DocumentationProvider")},parser:{AsyncParser:S(t=>new FSe(t),"AsyncParser"),GrammarConfig:S(t=>H$(t),"GrammarConfig"),LangiumParser:S(t=>nG(t),"LangiumParser"),CompletionParser:S(t=>iG(t),"CompletionParser"),ValueConverter:S(()=>new sG,"ValueConverter"),TokenBuilder:S(()=>new qA,"TokenBuilder"),Lexer:S(t=>new vG(t),"Lexer"),ParserErrorMessageProvider:S(()=>new eG,"ParserErrorMessageProvider"),LexerErrorMessageProvider:S(()=>new SSe,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:S(()=>new xSe,"AstNodeLocator"),AstNodeDescriptionProvider:S(t=>new vSe(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:S(t=>new bSe(t),"ReferenceDescriptionProvider")},references:{Linker:S(t=>new sSe(t),"Linker"),NameProvider:S(()=>new oSe,"NameProvider"),ScopeProvider:S(t=>new fSe(t),"ScopeProvider"),ScopeComputation:S(t=>new cSe(t),"ScopeComputation"),References:S(t=>new lSe(t),"References")},serializer:{Hydrator:S(t=>new zSe(t),"Hydrator"),JsonSerializer:S(t=>new dSe(t),"JsonSerializer")},validation:{DocumentValidator:S(t=>new ySe(t),"DocumentValidator"),ValidationRegistry:S(t=>new gSe(t),"ValidationRegistry")},shared:S(()=>e.shared,"shared")}}function Ji(e){return{ServiceRegistry:S(t=>new pSe(t),"ServiceRegistry"),workspace:{LangiumDocuments:S(t=>new aSe(t),"LangiumDocuments"),LangiumDocumentFactory:S(t=>new nSe(t),"LangiumDocumentFactory"),DocumentBuilder:S(t=>new wSe(t),"DocumentBuilder"),IndexManager:S(t=>new kSe(t),"IndexManager"),WorkspaceManager:S(t=>new CSe(t),"WorkspaceManager"),FileSystemProvider:S(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:S(()=>new $Se,"WorkspaceLock"),ConfigurationProvider:S(t=>new TSe(t),"ConfigurationProvider")},profilers:{}}}function jr(e,t,r,i,n,a,s,o,l){let u=[e,t,r,i,n,a,s,o,l].reduce(Fy,{});return EG(u)}function SG(e){if(e&&e[GSe])for(let t of Object.values(e))SG(t);return e}function EG(e,t){let r=new Proxy({},{deleteProperty:S(()=>!1,"deleteProperty"),set:S(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:S((i,n)=>n===GSe?!0:IF(i,n,e,t||r),"get"),getOwnPropertyDescriptor:S((i,n)=>(IF(i,n,e,t||r),Object.getOwnPropertyDescriptor(i,n)),"getOwnPropertyDescriptor"),has:S((i,n)=>n in e,"has"),ownKeys:S(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function IF(e,t,r,i){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===Lve)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let n=r[t];e[t]=Lve;try{e[t]=typeof n=="function"?n(i):EG(n,i)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}else return}function Fy(e,t){if(t){for(let[r,i]of Object.entries(t))if(i!=null)if(typeof i=="object"){let n=e[r];typeof n=="object"&&n!==null?e[r]=Fy(n,i):e[r]=Fy({},i)}else e[r]=i}return e}function WSe(){let e=jr(Ji(hn),w1t),t=jr(Qi({shared:e}),T1t);return e.ServiceRegistry.register(t),t}function wo(e){let t=WSe(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,mo.parse(`memory:/${r.name??"grammar"}.langium`)),r}function HSe(e){return ko.isInstance(e,uu.$type)}function YSe(e){return ko.isInstance(e,LT.$type)}function jSe(e){return ko.isInstance(e,tg.$type)}function XSe(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}function ZA(e){return ko.isInstance(e,Ah.$type)}function KSe(e){return ko.isInstance(e,Fd.$type)}function ZSe(e){return ko.isInstance(e,wy.$type)}function QSe(e){return ko.isInstance(e,rg.$type)}function JSe(e){return ko.isInstance(e,ig.$type)}function eEe(e){return ko.isInstance(e,ng.$type)}function tEe(e){return ko.isInstance(e,$d.$type)}function rEe(e){return ko.isInstance(e,RT.$type)}function iEe(e){return ko.isInstance(e,ag.$type)}function nEe(e){return ko.isInstance(e,oa.$type)}var ost,jT,lst,VF,cst,ust,S,hst,_r,Ud,JE,G6,WF,UF,q6,jP,IE,XP,rT,oi,Wr,iT,KP,DE,ZP,QP,JP,eB,NE,tB,rB,iB,nT,O0,ou,P0,Ca,Sh,aT,oy,ly,cy,ME,Yx,AP,Wve,nB,aB,sT,sB,OE,uy,oB,lB,cB,uB,hB,fB,dB,pB,oT,gB,mB,yB,vB,bB,xB,TB,wB,kB,CB,SB,lT,EB,AB,_B,LB,RB,IB,DB,NB,MB,OB,PB,BB,FB,PE,BE,$B,zB,GB,qB,VB,WB,UB,HB,Uve,YB,nye,Ke,XT,mg,KT,$y,V6,Yve,Xve,fst,dst,Kve,pst,gst,mst,yst,jB,vst,zy,aye,Zi,HF,bst,xst,Tst,wst,kst,Cst,Sst,Est,Ast,_st,Lst,Rst,Ist,Dst,Nst,Mst,Ost,Pst,Bst,Fst,$st,zst,Gst,qst,Vst,Jve,YF,XF,du,Ay,us,_y,DT,KF,r2e,Wst,qs,pT,py,go,Nd,gT,i6,n6,Md,a6,Od,Pd,mT,Bd,yT,s6,_h,o6,W0,l6,cu,vT,c6,gy,my,yy,U0,u6,h6,vy,f6,$l,bT,H0,d6,Y0,by,p6,j0,Vs,X0,Lh,K0,xT,Z0,Q0,g6,TT,J0,eg,xy,y$,ar,fu,T$,E$,Q6,_$,y6,v6,sye,Ust,dE,Hst,E2e,J6,A2e,_2e,Yst,sg,R2e,U$,jst,V2e,Xst,Kst,vu,Zst,sl,W2e,Qst,Jst,jx,eot,tot,rot,iot,not,aot,oye,Yd,Hl,sot,sA,rw,oot,Zr,lot,lye,cye,cot,uot,hot,fot,dot,ol,uye,pot,got,mot,yot,vot,hye,bot,xot,iw,My,Tot,wot,kot,Cot,qh,Sot,_P,fye,Eot,Aot,_ot,kg,Lot,Rot,Iot,Dot,Not,Mot,Oot,Pot,Bot,Cg,Fot,ZB,dye,$ot,zot,Got,Hn,qot,Vot,Wot,Uot,Hot,Yot,jot,x6,Xot,Kot,Zot,Qot,mbe,vbe,Jot,elt,j$,kbe,tlt,rlt,oA,X$,nw,ilt,nlt,lA,aw,pye,alt,K$,slt,Z$,bu,cA,olt,llt,sw,clt,ult,gye,Fbe,hlt,flt,dlt,uA,plt,zbe,mye,glt,yye,mlt,ylt,MT,vlt,blt,xlt,Tlt,wlt,klt,Clt,Slt,Elt,Alt,_lt,Llt,Rlt,Ilt,Dlt,Nlt,Mlt,Olt,Plt,Blt,Flt,$lt,zlt,Glt,Oi,qlt,ow,Vbe,wT,Vlt,LP,Wlt,Gd,vye,Ult,Q$,Hlt,Ylt,Ube,Ybe,jlt,Xlt,Klt,Zlt,Xbe,yo,Qlt,Jlt,ect,vo,tct,rct,ict,nct,hA,act,sct,J$,oct,OT,lct,cct,uct,hct,fct,dct,pct,gct,mct,yct,vct,bye,bct,fA,xct,Tct,wct,kct,Cct,Sct,dA,Ect,PT,Act,_ct,pA,Lct,Rct,Ict,Dct,gA,Nct,Mct,Oct,Pct,Bct,Fct,$ct,zct,Gct,yA,qct,lw,ez,Vct,tz,xye,Wct,iz,Wl,Uct,_xe,Rxe,Hct,Yct,jct,Xct,Kct,Zct,Qct,kT,Jct,eut,$xe,Tye,tut,wye,kye,rut,nz,Vxe,iut,nut,Cye,aut,az,sut,out,lut,Uxe,cut,jxe,QB,Zxe,uut,JB,hut,eF,fut,Cy,Sye,dut,Eye,Aye,_ye,Lye,put,gut,mut,yut,vut,F0,Oy,but,xut,Tut,wut,T6,sz,kut,Cut,Sut,Rye,Iye,Eut,Aut,_ut,Lut,Rut,Iut,Dut,Nut,Mut,Out,Put,But,Fut,$ut,zut,Gut,qut,Vut,Wut,Uut,Hut,Yut,jut,Xut,Kut,Dye,Zut,Qut,Jut,eht,Nye,tht,rht,iht,nht,aht,lTe,sht,oht,lht,cht,cTe,uht,hht,fht,uTe,dht,pht,ght,mht,yht,vht,bht,xht,Tht,wht,kht,Cht,Sht,Eht,Aht,_ht,_i,Lht,Rht,Aa,cw,Iht,Dht,Nht,oz,mTe,lz,Mht,Oht,bTe,Pht,cz,Bht,Fht,$ht,zht,Ght,qht,Vht,Wht,Uht,Hht,Yht,jht,Xht,Mye,RP,Kht,Zht,Qht,Jht,eft,tft,Oye,Pye,pE,rft,Bye,ift,STe,nft,aft,sft,_Te,oft,ITe,lft,cft,OTe,uft,hft,fft,dft,pft,gft,mft,xu,yft,vft,bft,xft,Tft,wft,kft,Lg,Cft,Sft,jTe,Eft,Aft,hz,Fye,ZTe,_ft,Lft,Rft,vA,dg,Sa,FT,Ift,pr,Dft,Nft,Ul,lwe,cl,Mft,Oft,Pft,Bft,Py,Yl,Fft,Zt,al,$ft,zft,Gft,qft,Vft,Wft,Uft,lr,Hft,Ws,Yft,Yn,jft,vs,Xft,$ye,Kft,Zft,Qft,Jft,Ri,edt,tdt,zye,rdt,Oh,Ph,idt,ndt,adt,sdt,jl,odt,bo,bA,ldt,Owe,cdt,udt,hdt,fdt,ddt,fz,Tu,gs,qy,Us,Ea,xo,To,cn,Hs,Ys,Bi,Vy,xA,Hwe,pdt,GE,gdt,Kwe,k6,mdt,pg,hT,gE,Jwe,ydt,vdt,bdt,fT,VE,Gye,wke,sF,un,dT,ds,xdt,qye,Vye,Wye,Uye,Hye,Yye,jye,Xye,qd,Ty,Tdt,og,wdt,kdt,Cdt,wA,Sdt,Kye,Edt,Zye,Ki,Adt,Bke,_dt,_z,Ldt,t4e,r4e,i4e,n4e,a4e,CA,s4e,Rdt,Idt,Ddt,IP,o4e,Ndt,Mdt,Odt,jd,Pdt,c4e,u4e,cF,uF,hF,UE,kar,Lz,Bdt,Fdt,mE,$dt,pF,zdt,Gdt,qdt,Vdt,Wdt,Udt,SA,Qye,Jye,b4e,x4e,Hdt,Ydt,jdt,_6,Fh,L6,ms,Iz,Xdt,S4e,Kdt,_4e,EA,Zdt,Qdt,Jdt,ept,tpt,rpt,AA,ipt,npt,apt,spt,opt,F4e,lpt,cpt,Vh,upt,yu,$4e,hpt,fpt,Xx,dpt,ppt,gpt,mpt,ypt,vpt,eve,Yy,Dz,bpt,xpt,Tpt,wpt,U4e,kpt,DP,tve,Cpt,Spt,Ept,Ig,Apt,_pt,Lpt,Rpt,Ipt,Dpt,Npt,Mpt,Opt,jy,Ppt,VT,Bpt,WT,Fpt,$pt,zpt,Gpt,qpt,Vpt,Wpt,Upt,Hpt,Ypt,jpt,rve,Xpt,Kpt,_A,Zpt,Qpt,Jpt,e0t,LA,t0t,r0t,YE,i0t,n0t,a0t,fCe,s0t,gCe,o0t,l0t,yCe,c0t,ive,u0t,Nz,h0t,f0t,d0t,p0t,g0t,m0t,y0t,v0t,b0t,x0t,T0t,w0t,k0t,nve,NP,C0t,wCe,S0t,ys,E0t,SCe,A0t,_0t,L0t,ave,R0t,I0t,D0t,By,N0t,sve,RCe,M0t,O0t,P0t,RA,B0t,DCe,ove,F0t,lve,$0t,z0t,R6,G0t,q0t,MCe,V0t,Mz,W0t,U0t,H0t,Y0t,j0t,X0t,K0t,Z0t,Q0t,J0t,egt,tgt,rgt,igt,ngt,agt,sgt,ogt,lgt,cgt,ugt,hgt,fgt,dgt,Pi,pgt,ggt,FCe,AT,mgt,MP,ygt,cve,uve,vgt,Oz,bgt,xgt,Tgt,wgt,GCe,kgt,Cgt,Sgt,Egt,Agt,WCe,IA,Pz,hve,_gt,Lgt,Rgt,Igt,Dgt,yF,Ngt,vF,Mgt,Ey,Ogt,bF,fve,Pgt,dve,pve,gve,mve,Bgt,Fgt,$gt,zgt,Ggt,$0,xF,qgt,yve,vve,yE,Vgt,bve,Wgt,KCe,Ugt,Hgt,Ygt,JCe,jgt,r5e,Xgt,Kgt,DA,Zgt,Qgt,Fz,Jgt,emt,tmt,rmt,imt,nmt,amt,smt,omt,xve,Tve,lmt,cmt,c5e,umt,MA,f5e,hmt,fmt,dmt,pmt,gmt,mmt,ymt,zz,vmt,bmt,xmt,OA,Tmt,wmt,kmt,Cmt,Smt,Emt,PA,Amt,Rh,_mt,Lmt,Vd,Rmt,R5e,I5e,pw,Imt,Dmt,Nmt,Mmt,D5e,Gz,qz,N5e,Vz,I6,TF,Omt,Pmt,Bmt,wve,Fmt,Q5e,$mt,zmt,Gmt,qmt,Vmt,Wmt,Umt,Hmt,Ymt,jmt,Xmt,Kmt,Zmt,Qmt,Jmt,e1t,t1t,OP,r1t,i1t,n1t,a1t,s1t,o1t,l1t,kve,v3e,Cve,c1t,F3e,Zz,D6,$A,u1t,Qz,N6,Sve,z3e,Jz,G3e,q3e,eG,V3e,h1t,W3e,f1t,qA,sG,hu,Li,KE,tSe,pu,$h,Eve,O6,iSe,mo,Kx,fs,uG,Br,nSe,aSe,z0,sSe,oSe,lSe,zh,B6,cSe,EF,d1t,uSe,p1t,UA,fG,HA,hSe,dG,fSe,dSe,pSe,F6,gSe,mSe,ySe,nl,vSe,bSe,xSe,YA,TSe,vE,hg,wSe,kSe,CSe,SSe,yG,vG,Ave,g1t,m1t,y1t,_ve,PP,_F,OSe,PSe,BSe,FSe,v1t,b1t,$Se,zSe,RF,GSe,Lve,DF,cg,qSe,x1t,AG,VSe,hn,T1t,w1t,k1t,USe,NF,MF,OF,PF,BF,FF,$F,zF,GF,qF,Car,bE,xE,Zx,BP,uu,TE,LT,Rve,wE,FP,tg,kE,N0,CE,SE,Ive,ay,su,G0,Id,Qx,Dve,$P,EE,Ah,Rd,zP,lu,Nve,AE,GP,Fd,Jx,wy,eT,qP,tT,_E,M0,rg,LE,VP,ig,ng,$d,RT,WP,RE,Dd,UP,sy,HP,q0,ag,YP,QE,dy,oa,aEe,ko,Mve,C1t,Ove,S1t,Pve,E1t,Bve,A1t,Fve,_1t,$ve,L1t,zve,R1t,Gve,I1t,qve,D1t,Vve,N1t,M1t,O1t,P1t,B1t,F1t,$1t,z1t,G1t,q1t,V1t,bn,_G,LG,RG,IG,DG,NG,MG,OG,PG,BG,W1t,U1t,H1t,Y1t,ul,Xl,Nn,j1t,fn=q(()=>{ost=Object.create,jT=Object.defineProperty,lst=Object.getOwnPropertyDescriptor,VF=Object.getOwnPropertyNames,cst=Object.getPrototypeOf,ust=Object.prototype.hasOwnProperty,S=(e,t)=>jT(e,"name",{value:t,configurable:!0}),hst=(e,t)=>function(){return e&&(t=(0,e[VF(e)[0]])(e=0)),t},_r=(e,t)=>function(){return t||(0,e[VF(e)[0]])((t={exports:{}}).exports,t),t.exports},Ud=(e,t)=>{for(var r in t)jT(e,r,{get:t[r],enumerable:!0})},JE=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of VF(t))!ust.call(e,n)&&n!==r&&jT(e,n,{get:()=>t[n],enumerable:!(i=lst(t,n))||i.enumerable});return e},G6=(e,t,r)=>(JE(e,t,"default"),r&&JE(r,t,"default")),WF=(e,t,r)=>(r=e!=null?ost(cst(e)):{},JE(t||!e||!e.__esModule?jT(r,"default",{value:e,enumerable:!0}):r,e)),UF=e=>JE(jT({},"__esModule",{value:!0}),e),q6={};Ud(q6,{AnnotatedTextEdit:()=>Sh,ChangeAnnotation:()=>P0,ChangeAnnotationIdentifier:()=>Ca,CodeAction:()=>AB,CodeActionContext:()=>EB,CodeActionKind:()=>SB,CodeActionTriggerKind:()=>lT,CodeDescription:()=>iB,CodeLens:()=>_B,Color:()=>DE,ColorInformation:()=>ZP,ColorPresentation:()=>QP,Command:()=>O0,CompletionItem:()=>dB,CompletionItemKind:()=>oB,CompletionItemLabelDetails:()=>fB,CompletionItemTag:()=>cB,CompletionList:()=>pB,CreateFile:()=>oy,DeleteFile:()=>cy,Diagnostic:()=>nT,DiagnosticRelatedInformation:()=>NE,DiagnosticSeverity:()=>tB,DiagnosticTag:()=>rB,DocumentHighlight:()=>bB,DocumentHighlightKind:()=>vB,DocumentLink:()=>RB,DocumentSymbol:()=>CB,DocumentUri:()=>jP,EOL:()=>Uve,FoldingRange:()=>eB,FoldingRangeKind:()=>JP,FormattingOptions:()=>LB,Hover:()=>gB,InlayHint:()=>$B,InlayHintKind:()=>PE,InlayHintLabelPart:()=>BE,InlineCompletionContext:()=>UB,InlineCompletionItem:()=>GB,InlineCompletionList:()=>qB,InlineCompletionTriggerKind:()=>VB,InlineValueContext:()=>FB,InlineValueEvaluatableExpression:()=>BB,InlineValueText:()=>OB,InlineValueVariableLookup:()=>PB,InsertReplaceEdit:()=>uB,InsertTextFormat:()=>lB,InsertTextMode:()=>hB,Location:()=>iT,LocationLink:()=>KP,MarkedString:()=>oT,MarkupContent:()=>uy,MarkupKind:()=>OE,OptionalVersionedTextDocumentIdentifier:()=>sT,ParameterInformation:()=>mB,Position:()=>oi,Range:()=>Wr,RenameFile:()=>ly,SelectedCompletionInfo:()=>WB,SelectionRange:()=>IB,SemanticTokenModifiers:()=>NB,SemanticTokenTypes:()=>DB,SemanticTokens:()=>MB,SignatureInformation:()=>yB,StringValue:()=>zB,SymbolInformation:()=>wB,SymbolKind:()=>xB,SymbolTag:()=>TB,TextDocument:()=>YB,TextDocumentEdit:()=>aT,TextDocumentIdentifier:()=>nB,TextDocumentItem:()=>sB,TextEdit:()=>ou,URI:()=>IE,VersionedTextDocumentIdentifier:()=>aB,WorkspaceChange:()=>Wve,WorkspaceEdit:()=>ME,WorkspaceFolder:()=>HB,WorkspaceSymbol:()=>kB,integer:()=>XP,uinteger:()=>rT});XT=hst({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(r){return typeof r=="string"}S(t,"is"),e.is=t})(jP||(jP={})),(function(e){function t(r){return typeof r=="string"}S(t,"is"),e.is=t})(IE||(IE={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}S(t,"is"),e.is=t})(XP||(XP={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}S(t,"is"),e.is=t})(rT||(rT={})),(function(e){function t(i,n){return i===Number.MAX_VALUE&&(i=rT.MAX_VALUE),n===Number.MAX_VALUE&&(n=rT.MAX_VALUE),{line:i,character:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Ke.uinteger(n.line)&&Ke.uinteger(n.character)}S(r,"is"),e.is=r})(oi||(oi={})),(function(e){function t(i,n,a,s){if(Ke.uinteger(i)&&Ke.uinteger(n)&&Ke.uinteger(a)&&Ke.uinteger(s))return{start:oi.create(i,n),end:oi.create(a,s)};if(oi.is(i)&&oi.is(n))return{start:i,end:n};throw new Error(`Range#create called with invalid arguments[${i}, ${n}, ${a}, ${s}]`)}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&oi.is(n.start)&&oi.is(n.end)}S(r,"is"),e.is=r})(Wr||(Wr={})),(function(e){function t(i,n){return{uri:i,range:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Wr.is(n.range)&&(Ke.string(n.uri)||Ke.undefined(n.uri))}S(r,"is"),e.is=r})(iT||(iT={})),(function(e){function t(i,n,a,s){return{targetUri:i,targetRange:n,targetSelectionRange:a,originSelectionRange:s}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Wr.is(n.targetRange)&&Ke.string(n.targetUri)&&Wr.is(n.targetSelectionRange)&&(Wr.is(n.originSelectionRange)||Ke.undefined(n.originSelectionRange))}S(r,"is"),e.is=r})(KP||(KP={})),(function(e){function t(i,n,a,s){return{red:i,green:n,blue:a,alpha:s}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Ke.numberRange(n.red,0,1)&&Ke.numberRange(n.green,0,1)&&Ke.numberRange(n.blue,0,1)&&Ke.numberRange(n.alpha,0,1)}S(r,"is"),e.is=r})(DE||(DE={})),(function(e){function t(i,n){return{range:i,color:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Wr.is(n.range)&&DE.is(n.color)}S(r,"is"),e.is=r})(ZP||(ZP={})),(function(e){function t(i,n,a){return{label:i,textEdit:n,additionalTextEdits:a}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Ke.string(n.label)&&(Ke.undefined(n.textEdit)||ou.is(n))&&(Ke.undefined(n.additionalTextEdits)||Ke.typedArray(n.additionalTextEdits,ou.is))}S(r,"is"),e.is=r})(QP||(QP={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(JP||(JP={})),(function(e){function t(i,n,a,s,o,l){let u={startLine:i,endLine:n};return Ke.defined(a)&&(u.startCharacter=a),Ke.defined(s)&&(u.endCharacter=s),Ke.defined(o)&&(u.kind=o),Ke.defined(l)&&(u.collapsedText=l),u}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Ke.uinteger(n.startLine)&&Ke.uinteger(n.startLine)&&(Ke.undefined(n.startCharacter)||Ke.uinteger(n.startCharacter))&&(Ke.undefined(n.endCharacter)||Ke.uinteger(n.endCharacter))&&(Ke.undefined(n.kind)||Ke.string(n.kind))}S(r,"is"),e.is=r})(eB||(eB={})),(function(e){function t(i,n){return{location:i,message:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&iT.is(n.location)&&Ke.string(n.message)}S(r,"is"),e.is=r})(NE||(NE={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(tB||(tB={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(rB||(rB={})),(function(e){function t(r){let i=r;return Ke.objectLiteral(i)&&Ke.string(i.href)}S(t,"is"),e.is=t})(iB||(iB={})),(function(e){function t(i,n,a,s,o,l){let u={range:i,message:n};return Ke.defined(a)&&(u.severity=a),Ke.defined(s)&&(u.code=s),Ke.defined(o)&&(u.source=o),Ke.defined(l)&&(u.relatedInformation=l),u}S(t,"create"),e.create=t;function r(i){var n;let a=i;return Ke.defined(a)&&Wr.is(a.range)&&Ke.string(a.message)&&(Ke.number(a.severity)||Ke.undefined(a.severity))&&(Ke.integer(a.code)||Ke.string(a.code)||Ke.undefined(a.code))&&(Ke.undefined(a.codeDescription)||Ke.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(Ke.string(a.source)||Ke.undefined(a.source))&&(Ke.undefined(a.relatedInformation)||Ke.typedArray(a.relatedInformation,NE.is))}S(r,"is"),e.is=r})(nT||(nT={})),(function(e){function t(i,n,...a){let s={title:i,command:n};return Ke.defined(a)&&a.length>0&&(s.arguments=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.string(n.title)&&Ke.string(n.command)}S(r,"is"),e.is=r})(O0||(O0={})),(function(e){function t(a,s){return{range:a,newText:s}}S(t,"replace"),e.replace=t;function r(a,s){return{range:{start:a,end:a},newText:s}}S(r,"insert"),e.insert=r;function i(a){return{range:a,newText:""}}S(i,"del"),e.del=i;function n(a){let s=a;return Ke.objectLiteral(s)&&Ke.string(s.newText)&&Wr.is(s.range)}S(n,"is"),e.is=n})(ou||(ou={})),(function(e){function t(i,n,a){let s={label:i};return n!==void 0&&(s.needsConfirmation=n),a!==void 0&&(s.description=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Ke.string(n.label)&&(Ke.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(Ke.string(n.description)||n.description===void 0)}S(r,"is"),e.is=r})(P0||(P0={})),(function(e){function t(r){let i=r;return Ke.string(i)}S(t,"is"),e.is=t})(Ca||(Ca={})),(function(e){function t(a,s,o){return{range:a,newText:s,annotationId:o}}S(t,"replace"),e.replace=t;function r(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}S(r,"insert"),e.insert=r;function i(a,s){return{range:a,newText:"",annotationId:s}}S(i,"del"),e.del=i;function n(a){let s=a;return ou.is(s)&&(P0.is(s.annotationId)||Ca.is(s.annotationId))}S(n,"is"),e.is=n})(Sh||(Sh={})),(function(e){function t(i,n){return{textDocument:i,edits:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&sT.is(n.textDocument)&&Array.isArray(n.edits)}S(r,"is"),e.is=r})(aT||(aT={})),(function(e){function t(i,n,a){let s={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="create"&&Ke.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||Ke.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||Ke.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Ca.is(n.annotationId))}S(r,"is"),e.is=r})(oy||(oy={})),(function(e){function t(i,n,a,s){let o={kind:"rename",oldUri:i,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}S(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="rename"&&Ke.string(n.oldUri)&&Ke.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||Ke.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||Ke.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Ca.is(n.annotationId))}S(r,"is"),e.is=r})(ly||(ly={})),(function(e){function t(i,n,a){let s={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="delete"&&Ke.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||Ke.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||Ke.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Ca.is(n.annotationId))}S(r,"is"),e.is=r})(cy||(cy={})),(function(e){function t(r){let i=r;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(n=>Ke.string(n.kind)?oy.is(n)||ly.is(n)||cy.is(n):aT.is(n)))}S(t,"is"),e.is=t})(ME||(ME={})),Yx=class{static{S(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,n;if(r===void 0?i=ou.insert(e,t):Ca.is(r)?(n=r,i=Sh.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),i=Sh.insert(e,t,n)),this.edits.push(i),n!==void 0)return n}replace(e,t,r){let i,n;if(r===void 0?i=ou.replace(e,t):Ca.is(r)?(n=r,i=Sh.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),i=Sh.replace(e,t,n)),this.edits.push(i),n!==void 0)return n}delete(e,t){let r,i;if(t===void 0?r=ou.del(e):Ca.is(t)?(i=t,r=Sh.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=Sh.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},AP=class{static{S(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ca.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Wve=class{static{S(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new AP(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(aT.is(t)){let r=new Yx(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new Yx(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(sT.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let i=[],n={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(n),r=new Yx(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new Yx(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new AP,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;P0.is(t)||Ca.is(t)?i=t:r=t;let n,a;if(i===void 0?n=oy.create(e,r):(a=Ca.is(i)?i:this._changeAnnotations.manage(i),n=oy.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),a!==void 0)return a}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;P0.is(r)||Ca.is(r)?n=r:i=r;let a,s;if(n===void 0?a=ly.create(e,t,i):(s=Ca.is(n)?n:this._changeAnnotations.manage(n),a=ly.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;P0.is(t)||Ca.is(t)?i=t:r=t;let n,a;if(i===void 0?n=cy.create(e,r):(a=Ca.is(i)?i:this._changeAnnotations.manage(i),n=cy.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),a!==void 0)return a}},(function(e){function t(i){return{uri:i}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.string(n.uri)}S(r,"is"),e.is=r})(nB||(nB={})),(function(e){function t(i,n){return{uri:i,version:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.string(n.uri)&&Ke.integer(n.version)}S(r,"is"),e.is=r})(aB||(aB={})),(function(e){function t(i,n){return{uri:i,version:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.string(n.uri)&&(n.version===null||Ke.integer(n.version))}S(r,"is"),e.is=r})(sT||(sT={})),(function(e){function t(i,n,a,s){return{uri:i,languageId:n,version:a,text:s}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.string(n.uri)&&Ke.string(n.languageId)&&Ke.integer(n.version)&&Ke.string(n.text)}S(r,"is"),e.is=r})(sB||(sB={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let i=r;return i===e.PlainText||i===e.Markdown}S(t,"is"),e.is=t})(OE||(OE={})),(function(e){function t(r){let i=r;return Ke.objectLiteral(r)&&OE.is(i.kind)&&Ke.string(i.value)}S(t,"is"),e.is=t})(uy||(uy={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(oB||(oB={})),(function(e){e.PlainText=1,e.Snippet=2})(lB||(lB={})),(function(e){e.Deprecated=1})(cB||(cB={})),(function(e){function t(i,n,a){return{newText:i,insert:n,replace:a}}S(t,"create"),e.create=t;function r(i){let n=i;return n&&Ke.string(n.newText)&&Wr.is(n.insert)&&Wr.is(n.replace)}S(r,"is"),e.is=r})(uB||(uB={})),(function(e){e.asIs=1,e.adjustIndentation=2})(hB||(hB={})),(function(e){function t(r){let i=r;return i&&(Ke.string(i.detail)||i.detail===void 0)&&(Ke.string(i.description)||i.description===void 0)}S(t,"is"),e.is=t})(fB||(fB={})),(function(e){function t(r){return{label:r}}S(t,"create"),e.create=t})(dB||(dB={})),(function(e){function t(r,i){return{items:r||[],isIncomplete:!!i}}S(t,"create"),e.create=t})(pB||(pB={})),(function(e){function t(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}S(t,"fromPlainText"),e.fromPlainText=t;function r(i){let n=i;return Ke.string(n)||Ke.objectLiteral(n)&&Ke.string(n.language)&&Ke.string(n.value)}S(r,"is"),e.is=r})(oT||(oT={})),(function(e){function t(r){let i=r;return!!i&&Ke.objectLiteral(i)&&(uy.is(i.contents)||oT.is(i.contents)||Ke.typedArray(i.contents,oT.is))&&(r.range===void 0||Wr.is(r.range))}S(t,"is"),e.is=t})(gB||(gB={})),(function(e){function t(r,i){return i?{label:r,documentation:i}:{label:r}}S(t,"create"),e.create=t})(mB||(mB={})),(function(e){function t(r,i,...n){let a={label:r};return Ke.defined(i)&&(a.documentation=i),Ke.defined(n)?a.parameters=n:a.parameters=[],a}S(t,"create"),e.create=t})(yB||(yB={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(vB||(vB={})),(function(e){function t(r,i){let n={range:r};return Ke.number(i)&&(n.kind=i),n}S(t,"create"),e.create=t})(bB||(bB={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(xB||(xB={})),(function(e){e.Deprecated=1})(TB||(TB={})),(function(e){function t(r,i,n,a,s){let o={name:r,kind:i,location:{uri:a,range:n}};return s&&(o.containerName=s),o}S(t,"create"),e.create=t})(wB||(wB={})),(function(e){function t(r,i,n,a){return a!==void 0?{name:r,kind:i,location:{uri:n,range:a}}:{name:r,kind:i,location:{uri:n}}}S(t,"create"),e.create=t})(kB||(kB={})),(function(e){function t(i,n,a,s,o,l){let u={name:i,detail:n,kind:a,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}S(t,"create"),e.create=t;function r(i){let n=i;return n&&Ke.string(n.name)&&Ke.number(n.kind)&&Wr.is(n.range)&&Wr.is(n.selectionRange)&&(n.detail===void 0||Ke.string(n.detail))&&(n.deprecated===void 0||Ke.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}S(r,"is"),e.is=r})(CB||(CB={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(SB||(SB={})),(function(e){e.Invoked=1,e.Automatic=2})(lT||(lT={})),(function(e){function t(i,n,a){let s={diagnostics:i};return n!=null&&(s.only=n),a!=null&&(s.triggerKind=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.typedArray(n.diagnostics,nT.is)&&(n.only===void 0||Ke.typedArray(n.only,Ke.string))&&(n.triggerKind===void 0||n.triggerKind===lT.Invoked||n.triggerKind===lT.Automatic)}S(r,"is"),e.is=r})(EB||(EB={})),(function(e){function t(i,n,a){let s={title:i},o=!0;return typeof n=="string"?(o=!1,s.kind=n):O0.is(n)?s.command=n:s.edit=n,o&&a!==void 0&&(s.kind=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return n&&Ke.string(n.title)&&(n.diagnostics===void 0||Ke.typedArray(n.diagnostics,nT.is))&&(n.kind===void 0||Ke.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||O0.is(n.command))&&(n.isPreferred===void 0||Ke.boolean(n.isPreferred))&&(n.edit===void 0||ME.is(n.edit))}S(r,"is"),e.is=r})(AB||(AB={})),(function(e){function t(i,n){let a={range:i};return Ke.defined(n)&&(a.data=n),a}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Wr.is(n.range)&&(Ke.undefined(n.command)||O0.is(n.command))}S(r,"is"),e.is=r})(_B||(_B={})),(function(e){function t(i,n){return{tabSize:i,insertSpaces:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Ke.uinteger(n.tabSize)&&Ke.boolean(n.insertSpaces)}S(r,"is"),e.is=r})(LB||(LB={})),(function(e){function t(i,n,a){return{range:i,target:n,data:a}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Wr.is(n.range)&&(Ke.undefined(n.target)||Ke.string(n.target))}S(r,"is"),e.is=r})(RB||(RB={})),(function(e){function t(i,n){return{range:i,parent:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&Wr.is(n.range)&&(n.parent===void 0||e.is(n.parent))}S(r,"is"),e.is=r})(IB||(IB={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(DB||(DB={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(NB||(NB={})),(function(e){function t(r){let i=r;return Ke.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}S(t,"is"),e.is=t})(MB||(MB={})),(function(e){function t(i,n){return{range:i,text:n}}S(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&Wr.is(n.range)&&Ke.string(n.text)}S(r,"is"),e.is=r})(OB||(OB={})),(function(e){function t(i,n,a){return{range:i,variableName:n,caseSensitiveLookup:a}}S(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&Wr.is(n.range)&&Ke.boolean(n.caseSensitiveLookup)&&(Ke.string(n.variableName)||n.variableName===void 0)}S(r,"is"),e.is=r})(PB||(PB={})),(function(e){function t(i,n){return{range:i,expression:n}}S(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&Wr.is(n.range)&&(Ke.string(n.expression)||n.expression===void 0)}S(r,"is"),e.is=r})(BB||(BB={})),(function(e){function t(i,n){return{frameId:i,stoppedLocation:n}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.defined(n)&&Wr.is(i.stoppedLocation)}S(r,"is"),e.is=r})(FB||(FB={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}S(t,"is"),e.is=t})(PE||(PE={})),(function(e){function t(i){return{value:i}}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&(n.tooltip===void 0||Ke.string(n.tooltip)||uy.is(n.tooltip))&&(n.location===void 0||iT.is(n.location))&&(n.command===void 0||O0.is(n.command))}S(r,"is"),e.is=r})(BE||(BE={})),(function(e){function t(i,n,a){let s={position:i,label:n};return a!==void 0&&(s.kind=a),s}S(t,"create"),e.create=t;function r(i){let n=i;return Ke.objectLiteral(n)&&oi.is(n.position)&&(Ke.string(n.label)||Ke.typedArray(n.label,BE.is))&&(n.kind===void 0||PE.is(n.kind))&&n.textEdits===void 0||Ke.typedArray(n.textEdits,ou.is)&&(n.tooltip===void 0||Ke.string(n.tooltip)||uy.is(n.tooltip))&&(n.paddingLeft===void 0||Ke.boolean(n.paddingLeft))&&(n.paddingRight===void 0||Ke.boolean(n.paddingRight))}S(r,"is"),e.is=r})($B||($B={})),(function(e){function t(r){return{kind:"snippet",value:r}}S(t,"createSnippet"),e.createSnippet=t})(zB||(zB={})),(function(e){function t(r,i,n,a){return{insertText:r,filterText:i,range:n,command:a}}S(t,"create"),e.create=t})(GB||(GB={})),(function(e){function t(r){return{items:r}}S(t,"create"),e.create=t})(qB||(qB={})),(function(e){e.Invoked=0,e.Automatic=1})(VB||(VB={})),(function(e){function t(r,i){return{range:r,text:i}}S(t,"create"),e.create=t})(WB||(WB={})),(function(e){function t(r,i){return{triggerKind:r,selectedCompletionInfo:i}}S(t,"create"),e.create=t})(UB||(UB={})),(function(e){function t(r){let i=r;return Ke.objectLiteral(i)&&IE.is(i.uri)&&Ke.string(i.name)}S(t,"is"),e.is=t})(HB||(HB={})),Uve=[` +`}function gn(e){return{documentation:{CommentProvider:A(t=>new N7e(t),"CommentProvider"),DocumentationProvider:A(t=>new D7e(t),"DocumentationProvider")},parser:{AsyncParser:A(t=>new O7e(t),"AsyncParser"),GrammarConfig:A(t=>JV(t),"GrammarConfig"),LangiumParser:A(t=>hU(t),"LangiumParser"),CompletionParser:A(t=>uU(t),"CompletionParser"),ValueConverter:A(()=>new dU,"ValueConverter"),TokenBuilder:A(()=>new CR,"TokenBuilder"),Lexer:A(t=>new SU(t),"Lexer"),ParserErrorMessageProvider:A(()=>new oU,"ParserErrorMessageProvider"),LexerErrorMessageProvider:A(()=>new w7e,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:A(()=>new y7e,"AstNodeLocator"),AstNodeDescriptionProvider:A(t=>new g7e(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:A(t=>new m7e(t),"ReferenceDescriptionProvider")},references:{Linker:A(t=>new n7e(t),"Linker"),NameProvider:A(()=>new i7e,"NameProvider"),ScopeProvider:A(t=>new c7e(t),"ScopeProvider"),ScopeComputation:A(t=>new s7e(t),"ScopeComputation"),References:A(t=>new a7e(t),"References")},serializer:{Hydrator:A(t=>new B7e(t),"Hydrator"),JsonSerializer:A(t=>new u7e(t),"JsonSerializer")},validation:{DocumentValidator:A(t=>new p7e(t),"DocumentValidator"),ValidationRegistry:A(t=>new f7e(t),"ValidationRegistry")},shared:A(()=>e.shared,"shared")}}function mn(e){return{ServiceRegistry:A(t=>new h7e(t),"ServiceRegistry"),workspace:{LangiumDocuments:A(t=>new r7e(t),"LangiumDocuments"),LangiumDocumentFactory:A(t=>new t7e(t),"LangiumDocumentFactory"),DocumentBuilder:A(t=>new x7e(t),"DocumentBuilder"),IndexManager:A(t=>new b7e(t),"IndexManager"),WorkspaceManager:A(t=>new T7e(t),"WorkspaceManager"),FileSystemProvider:A(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:A(()=>new P7e,"WorkspaceLock"),ConfigurationProvider:A(t=>new v7e(t),"ConfigurationProvider")},profilers:{}}}function Pr(e,t,r,n,i,a,s,o,l){let u=[e,t,r,n,i,a,s,o,l].reduce(Kv,{});return DU(u)}function MU(e){if(e&&e[$7e])for(let t of Object.values(e))MU(t);return e}function DU(e,t){let r=new Proxy({},{deleteProperty:A(()=>!1,"deleteProperty"),set:A(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:A((n,i)=>i===$7e?!0:eq(n,i,e,t||r),"get"),getOwnPropertyDescriptor:A((n,i)=>(eq(n,i,e,t||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:A((n,i)=>i in e,"has"),ownKeys:A(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function eq(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===wCe)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let i=r[t];e[t]=wCe;try{e[t]=typeof i=="function"?i(n):DU(i,n)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}else return}function Kv(e,t){if(t){for(let[r,n]of Object.entries(t))if(n!=null)if(typeof n=="object"){let i=e[r];typeof i=="object"&&i!==null?e[r]=Kv(i,n):e[r]=Kv({},n)}else e[r]=n}return e}function G7e(){let e=Pr(mn(wn),pwt),t=Pr(gn({shared:e}),dwt);return e.ServiceRegistry.register(t),t}function za(e){let t=G7e(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,ll.parse(`memory:/${r.name??"grammar"}.langium`)),r}function V7e(e){return Xi.isInstance(e,bc.$type)}function W7e(e){return Xi.isInstance(e,Jw.$type)}function U7e(e){return Xi.isInstance(e,rm.$type)}function H7e(e){return Xi.isInstance(e,Lp.$type)}function Y7e(e){return Xi.isInstance(e,eC.$type)}function X7e(e){return Xi.isInstance(e,T6.$type)}function j7e(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}function MR(e){return Xi.isInstance(e,uf.$type)}function K7e(e){return Xi.isInstance(e,Ip.$type)}function Z7e(e){return Xi.isInstance(e,Nv.$type)}function Q7e(e){return Xi.isInstance(e,nm.$type)}function J7e(e){return Xi.isInstance(e,im.$type)}function eLe(e){return Xi.isInstance(e,am.$type)}function tLe(e){return Xi.isInstance(e,Mp.$type)}function rLe(e){return Xi.isInstance(e,tC.$type)}function nLe(e){return Xi.isInstance(e,sm.$type)}function iLe(e){return Xi.isInstance(e,om.$type)}function aLe(e){return Xi.isInstance(e,lm.$type)}function sLe(e){return Xi.isInstance(e,cm.$type)}function oLe(e){return Xi.isInstance(e,Ov.$type)}function lLe(e){return Xi.isInstance(e,um.$type)}function cLe(e){return Xi.isInstance(e,Ba.$type)}var Jft,xC,edt,Kq,tdt,rdt,A,ndt,qr,$p,D_,w6,Zq,Qq,C6,vz,i_,xz,Ew,Ln,on,Aw,bz,a_,Tz,wz,Cz,kz,s_,Sz,Ez,Az,_w,Ng,Wu,Og,ts,lf,Rw,yv,vv,xv,o_,yw,KF,qCe,_z,Rz,Lw,Lz,l_,bv,Iz,Mz,Dz,Nz,Oz,Pz,Bz,$z,Iw,Fz,zz,Gz,qz,Vz,Wz,Uz,Hz,Yz,Xz,jz,Mw,Kz,Zz,Qz,Jz,eG,tG,rG,nG,iG,aG,sG,oG,lG,c_,u_,cG,uG,hG,fG,dG,pG,gG,mG,VCe,yG,ZTe,rt,bC,Tm,TC,Zv,k6,UCe,YCe,idt,adt,XCe,sdt,odt,ldt,cdt,vG,udt,Qv,QTe,Si,Jq,hdt,fdt,ddt,pdt,gdt,mdt,ydt,vdt,xdt,bdt,Tdt,wdt,Cdt,kdt,Sdt,Edt,Adt,_dt,Rdt,Ldt,Idt,Mdt,Ddt,Ndt,Odt,ZCe,eV,rV,Ku,zv,Hs,Gv,nC,nV,eke,Pdt,Ro,$w,Ev,ol,Sp,Fw,B_,$_,Ep,F_,Ap,_p,zw,Rp,Gw,z_,hf,G_,Ug,q_,Yu,qw,V_,Av,_v,Rv,Hg,W_,U_,Lv,H_,xc,Vw,Yg,Y_,Xg,Iv,X_,jg,Lo,Kg,ff,Zg,Ww,Qg,Jg,j_,Uw,em,tm,Mv,kV,vr,ju,_V,DV,D6,OV,Z_,Q_,JTe,Bdt,zA,$dt,kke,N6,Ske,Eke,Fdt,hm,_ke,QV,zdt,Gke,Gdt,qdt,th,Vdt,Gl,qke,Wdt,Udt,vw,Hdt,Ydt,Xdt,jdt,Kdt,Zdt,ewe,zp,Ac,Qdt,G6,AC,Jdt,pn,ept,twe,rwe,tpt,rpt,npt,ipt,apt,ql,nwe,spt,opt,lpt,cpt,upt,iwe,hpt,fpt,_C,RC,dpt,ppt,gpt,mpt,Sf,ypt,ZF,awe,vpt,xpt,bpt,_m,Tpt,wpt,Cpt,kpt,Spt,Ept,Apt,_pt,Rpt,Rm,Lpt,TG,swe,Ipt,Mpt,Dpt,$a,Npt,Opt,Ppt,Bpt,$pt,Fpt,zpt,e6,Gpt,qpt,Vpt,Wpt,pSe,mSe,Upt,Hpt,tW,TSe,Ypt,Xpt,q6,rW,LC,jpt,Kpt,V6,IC,owe,Zpt,nW,Qpt,iW,rh,W6,Jpt,e0t,MC,t0t,r0t,lwe,PSe,n0t,i0t,a0t,U6,s0t,$Se,cwe,o0t,uwe,l0t,c0t,aC,u0t,h0t,f0t,d0t,p0t,g0t,m0t,y0t,v0t,x0t,b0t,T0t,w0t,C0t,k0t,S0t,E0t,A0t,_0t,R0t,L0t,I0t,M0t,D0t,ii,N0t,DC,GSe,Hw,O0t,QF,P0t,Np,hwe,B0t,aW,$0t,F0t,VSe,USe,z0t,G0t,q0t,V0t,YSe,cl,W0t,U0t,H0t,ul,Y0t,X0t,j0t,K0t,H6,Z0t,Q0t,sW,J0t,sC,egt,tgt,rgt,ngt,igt,agt,sgt,ogt,lgt,cgt,ugt,fwe,hgt,Y6,fgt,dgt,pgt,ggt,mgt,ygt,X6,vgt,oC,xgt,bgt,j6,Tgt,wgt,Cgt,kgt,K6,Sgt,Egt,Agt,_gt,Rgt,Lgt,Igt,Mgt,Dgt,Q6,Ngt,NC,oW,Ogt,lW,dwe,Pgt,uW,Sc,Bgt,E4e,_4e,$gt,Fgt,zgt,Ggt,qgt,Vgt,Wgt,Yw,Ugt,Hgt,B4e,pwe,Ygt,gwe,mwe,Xgt,hW,G4e,jgt,Kgt,ywe,Zgt,fW,Qgt,Jgt,emt,V4e,tmt,H4e,wG,j4e,rmt,CG,nmt,kG,imt,Bv,vwe,amt,xwe,bwe,Twe,wwe,smt,omt,lmt,cmt,umt,Bg,Yv,hmt,fmt,dmt,pmt,t6,dW,gmt,mmt,ymt,Cwe,kwe,vmt,xmt,bmt,Tmt,wmt,Cmt,kmt,Smt,Emt,Amt,_mt,Rmt,Lmt,Imt,Mmt,Dmt,Nmt,Omt,Pmt,Bmt,$mt,Fmt,zmt,Gmt,qmt,Swe,Vmt,Wmt,Umt,Hmt,Ewe,Ymt,Xmt,jmt,Kmt,Zmt,sEe,Qmt,Jmt,eyt,tyt,oEe,ryt,nyt,iyt,lEe,ayt,syt,oyt,lyt,cyt,uyt,hyt,fyt,dyt,pyt,gyt,myt,yyt,vyt,xyt,byt,Qn,Tyt,wyt,is,OC,Cyt,kyt,Syt,pW,pEe,gW,Eyt,Ayt,yEe,_yt,mW,Ryt,Lyt,Iyt,Myt,Dyt,Nyt,Oyt,Pyt,Byt,$yt,Fyt,zyt,Gyt,Awe,JF,qyt,Vyt,Wyt,Uyt,Hyt,Yyt,_we,Rwe,GA,Xyt,Lwe,jyt,CEe,Kyt,Zyt,Qyt,EEe,Jyt,REe,e1t,t1t,DEe,r1t,n1t,i1t,a1t,s1t,o1t,l1t,nh,c1t,u1t,h1t,f1t,d1t,p1t,g1t,Nm,m1t,y1t,HEe,v1t,x1t,vW,Iwe,jEe,b1t,T1t,w1t,J6,vm,rs,cC,C1t,Or,k1t,S1t,Ec,s5e,Wl,E1t,A1t,_1t,R1t,Xv,_c,L1t,or,zl,I1t,M1t,D1t,N1t,O1t,P1t,B1t,Sr,$1t,Io,F1t,ba,z1t,eo,G1t,Mwe,q1t,V1t,W1t,U1t,ei,H1t,Y1t,Dwe,X1t,vf,xf,j1t,K1t,Z1t,Q1t,Rc,J1t,hl,eR,evt,D5e,tvt,rvt,nvt,ivt,avt,xW,ih,Zs,ex,Mo,ns,fl,dl,$i,Do,No,si,tx,tR,W5e,svt,p_,ovt,X5e,n6,lvt,xm,Ow,qA,cvt,uvt,hvt,Pw,m_,Nwe,x3e,RG,Fi,Bw,js,fvt,Owe,Pwe,Bwe,$we,Fwe,zwe,Gwe,qwe,Op,Dv,dvt,fm,pvt,gvt,mvt,nR,yvt,Vwe,vvt,Wwe,ki,xvt,N3e,bvt,OW,Tvt,Q3e,J3e,eAe,tAe,rAe,aR,nAe,wvt,Cvt,kvt,ez,iAe,Svt,Evt,Avt,Gp,_vt,sAe,oAe,MG,DG,NG,v_,p0r,PW,Rvt,Lvt,VA,Ivt,BG,Mvt,Dvt,Nvt,Ovt,Pvt,Bvt,sR,Uwe,Hwe,mAe,yAe,$vt,Fvt,zvt,l6,Tf,c6,Qs,$W,Gvt,wAe,qvt,SAe,oR,Vvt,Wvt,Uvt,Hvt,Yvt,Xvt,lR,jvt,Kvt,Zvt,Qvt,Jvt,OAe,ext,txt,Ef,rxt,eh,PAe,nxt,ixt,xw,axt,sxt,oxt,lxt,cxt,uxt,Ywe,ax,FW,hxt,fxt,dxt,pxt,qAe,gxt,tz,Xwe,mxt,yxt,vxt,Pm,xxt,bxt,Txt,wxt,Cxt,kxt,Sxt,Ext,Axt,sx,_xt,pC,Rxt,gC,Lxt,Ixt,Mxt,Dxt,Nxt,Oxt,Pxt,Bxt,$xt,Fxt,zxt,jwe,Gxt,qxt,cR,Vxt,Wxt,Uxt,Hxt,uR,Yxt,Xxt,b_,jxt,Kxt,Zxt,c_e,Qxt,f_e,Jxt,ebt,p_e,tbt,Kwe,rbt,zW,nbt,ibt,abt,sbt,obt,lbt,cbt,ubt,hbt,fbt,dbt,pbt,gbt,Zwe,rz,mbt,x_e,ybt,Js,vbt,w_e,xbt,bbt,Tbt,Qwe,wbt,Cbt,kbt,jv,Sbt,Jwe,A_e,Ebt,Abt,_bt,hR,Rbt,R_e,eCe,Lbt,tCe,Ibt,Mbt,u6,Dbt,Nbt,I_e,Obt,GW,Pbt,Bbt,$bt,Fbt,zbt,Gbt,qbt,Vbt,Wbt,Ubt,Hbt,Ybt,Xbt,jbt,Kbt,Zbt,Qbt,Jbt,e2t,t2t,r2t,n2t,i2t,a2t,ai,s2t,o2t,O_e,Zw,l2t,nz,c2t,rCe,nCe,u2t,qW,h2t,f2t,d2t,p2t,$_e,g2t,m2t,y2t,v2t,x2t,G_e,fR,VW,iCe,b2t,T2t,w2t,C2t,k2t,zG,S2t,GG,E2t,Fv,A2t,qG,aCe,_2t,sCe,oCe,lCe,cCe,R2t,L2t,I2t,M2t,D2t,$g,VG,N2t,uCe,hCe,WA,O2t,fCe,P2t,Y_e,B2t,$2t,F2t,K_e,z2t,J_e,G2t,q2t,dR,V2t,W2t,UW,U2t,H2t,Y2t,X2t,j2t,K2t,Z2t,Q2t,J2t,dCe,pCe,eTt,tTt,s6e,rTt,gR,c6e,nTt,iTt,aTt,sTt,oTt,lTt,cTt,YW,uTt,hTt,fTt,mR,dTt,pTt,gTt,mTt,yTt,vTt,yR,xTt,df,bTt,TTt,Pp,wTt,A6e,_6e,zC,CTt,kTt,STt,ETt,R6e,XW,jW,L6e,KW,h6,WG,ATt,_Tt,RTt,gCe,LTt,j6e,ITt,MTt,DTt,NTt,OTt,PTt,BTt,$Tt,FTt,zTt,GTt,qTt,VTt,WTt,UTt,HTt,YTt,iz,XTt,jTt,KTt,ZTt,QTt,JTt,ewt,mCe,gRe,yCe,twt,ORe,iU,f6,bR,rwt,aU,d6,vCe,BRe,sU,$Re,FRe,oU,zRe,nwt,GRe,iwt,CR,dU,Xu,Jn,C_,QRe,Zu,wf,xCe,g6,e7e,ll,bw,Xs,yU,Jr,t7e,r7e,Fg,n7e,i7e,a7e,Cf,y6,s7e,jG,awt,o7e,swt,ER,xU,AR,l7e,bU,c7e,u7e,h7e,v6,f7e,d7e,p7e,Fl,g7e,m7e,y7e,_R,v7e,UA,mm,x7e,b7e,T7e,w7e,kU,SU,bCe,owt,lwt,cwt,TCe,az,ZG,M7e,D7e,N7e,O7e,uwt,hwt,P7e,B7e,JG,$7e,wCe,tq,pm,F7e,fwt,NU,z7e,wn,dwt,pwt,gwt,q7e,rq,nq,iq,aq,sq,oq,lq,cq,uq,hq,fq,dq,pq,gq,mq,g0r,yq,vq,S_,xq,bq,Tq,zg,E_,wq,Cq,HA,sz,YA,Tw,oz,bc,XA,Jw,CCe,jA,lz,rm,KA,Mg,ZA,Lp,QA,kCe,gv,eC,T6,kq,Sq,Eq,Aq,_q,Rq,Lq,Cv,wp,Iq,A_,Mq,Dq,__,Nq,Oq,Vu,Gg,Cp,ww,SCe,cz,JA,uf,Tp,uz,Uu,ECe,e_,hz,Ip,Cw,Nv,kw,fz,Sw,t_,Dg,nm,r_,dz,im,am,Pq,Bq,$q,Fq,zq,R_,kv,L_,Gq,I_,Mp,tC,pz,n_,kp,sm,om,qq,lm,Hu,Vq,Wq,Uq,cm,M_,Hq,Yq,Xq,jq,gz,mv,mz,qg,Ov,um,yz,Vg,Sv,Ba,uLe,Xi,ACe,mwt,_Ce,ywt,RCe,vwt,LCe,xwt,ICe,bwt,MCe,Twt,DCe,wwt,NCe,Cwt,OCe,kwt,PCe,Swt,BCe,Ewt,$Ce,Awt,FCe,_wt,zCe,Rwt,GCe,Lwt,Iwt,Mwt,Dwt,Nwt,Owt,Pwt,Bwt,$wt,Fwt,zwt,Gwt,qwt,Vwt,Wwt,Uwt,In,OU,PU,BU,$U,FU,zU,GU,qU,VU,WU,UU,HU,YU,XU,jU,Hwt,Ywt,Xwt,jwt,oa,pl,On,Kwt,Cn=X(()=>{Jft=Object.create,xC=Object.defineProperty,edt=Object.getOwnPropertyDescriptor,Kq=Object.getOwnPropertyNames,tdt=Object.getPrototypeOf,rdt=Object.prototype.hasOwnProperty,A=(e,t)=>xC(e,"name",{value:t,configurable:!0}),ndt=(e,t)=>function(){return e&&(t=(0,e[Kq(e)[0]])(e=0)),t},qr=(e,t)=>function(){return t||(0,e[Kq(e)[0]])((t={exports:{}}).exports,t),t.exports},$p=(e,t)=>{for(var r in t)xC(e,r,{get:t[r],enumerable:!0})},D_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Kq(t))!rdt.call(e,i)&&i!==r&&xC(e,i,{get:()=>t[i],enumerable:!(n=edt(t,i))||n.enumerable});return e},w6=(e,t,r)=>(D_(e,t,"default"),r&&D_(r,t,"default")),Zq=(e,t,r)=>(r=e!=null?Jft(tdt(e)):{},D_(t||!e||!e.__esModule?xC(r,"default",{value:e,enumerable:!0}):r,e)),Qq=e=>D_(xC({},"__esModule",{value:!0}),e),C6={};$p(C6,{AnnotatedTextEdit:()=>lf,ChangeAnnotation:()=>Og,ChangeAnnotationIdentifier:()=>ts,CodeAction:()=>Zz,CodeActionContext:()=>Kz,CodeActionKind:()=>jz,CodeActionTriggerKind:()=>Mw,CodeDescription:()=>Az,CodeLens:()=>Qz,Color:()=>a_,ColorInformation:()=>Tz,ColorPresentation:()=>wz,Command:()=>Ng,CompletionItem:()=>Bz,CompletionItemKind:()=>Iz,CompletionItemLabelDetails:()=>Pz,CompletionItemTag:()=>Dz,CompletionList:()=>$z,CreateFile:()=>yv,DeleteFile:()=>xv,Diagnostic:()=>_w,DiagnosticRelatedInformation:()=>s_,DiagnosticSeverity:()=>Sz,DiagnosticTag:()=>Ez,DocumentHighlight:()=>Vz,DocumentHighlightKind:()=>qz,DocumentLink:()=>eG,DocumentSymbol:()=>Xz,DocumentUri:()=>vz,EOL:()=>VCe,FoldingRange:()=>kz,FoldingRangeKind:()=>Cz,FormattingOptions:()=>Jz,Hover:()=>Fz,InlayHint:()=>cG,InlayHintKind:()=>c_,InlayHintLabelPart:()=>u_,InlineCompletionContext:()=>gG,InlineCompletionItem:()=>hG,InlineCompletionList:()=>fG,InlineCompletionTriggerKind:()=>dG,InlineValueContext:()=>lG,InlineValueEvaluatableExpression:()=>oG,InlineValueText:()=>aG,InlineValueVariableLookup:()=>sG,InsertReplaceEdit:()=>Nz,InsertTextFormat:()=>Mz,InsertTextMode:()=>Oz,Location:()=>Aw,LocationLink:()=>bz,MarkedString:()=>Iw,MarkupContent:()=>bv,MarkupKind:()=>l_,OptionalVersionedTextDocumentIdentifier:()=>Lw,ParameterInformation:()=>zz,Position:()=>Ln,Range:()=>on,RenameFile:()=>vv,SelectedCompletionInfo:()=>pG,SelectionRange:()=>tG,SemanticTokenModifiers:()=>nG,SemanticTokenTypes:()=>rG,SemanticTokens:()=>iG,SignatureInformation:()=>Gz,StringValue:()=>uG,SymbolInformation:()=>Hz,SymbolKind:()=>Wz,SymbolTag:()=>Uz,TextDocument:()=>yG,TextDocumentEdit:()=>Rw,TextDocumentIdentifier:()=>_z,TextDocumentItem:()=>Lz,TextEdit:()=>Wu,URI:()=>i_,VersionedTextDocumentIdentifier:()=>Rz,WorkspaceChange:()=>qCe,WorkspaceEdit:()=>o_,WorkspaceFolder:()=>mG,WorkspaceSymbol:()=>Yz,integer:()=>xz,uinteger:()=>Ew});bC=ndt({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(r){return typeof r=="string"}A(t,"is"),e.is=t})(vz||(vz={})),(function(e){function t(r){return typeof r=="string"}A(t,"is"),e.is=t})(i_||(i_={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}A(t,"is"),e.is=t})(xz||(xz={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}A(t,"is"),e.is=t})(Ew||(Ew={})),(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=Ew.MAX_VALUE),i===Number.MAX_VALUE&&(i=Ew.MAX_VALUE),{line:n,character:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.uinteger(i.line)&&rt.uinteger(i.character)}A(r,"is"),e.is=r})(Ln||(Ln={})),(function(e){function t(n,i,a,s){if(rt.uinteger(n)&&rt.uinteger(i)&&rt.uinteger(a)&&rt.uinteger(s))return{start:Ln.create(n,i),end:Ln.create(a,s)};if(Ln.is(n)&&Ln.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${s}]`)}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&Ln.is(i.start)&&Ln.is(i.end)}A(r,"is"),e.is=r})(on||(on={})),(function(e){function t(n,i){return{uri:n,range:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&on.is(i.range)&&(rt.string(i.uri)||rt.undefined(i.uri))}A(r,"is"),e.is=r})(Aw||(Aw={})),(function(e){function t(n,i,a,s){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:s}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&on.is(i.targetRange)&&rt.string(i.targetUri)&&on.is(i.targetSelectionRange)&&(on.is(i.originSelectionRange)||rt.undefined(i.originSelectionRange))}A(r,"is"),e.is=r})(bz||(bz={})),(function(e){function t(n,i,a,s){return{red:n,green:i,blue:a,alpha:s}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.numberRange(i.red,0,1)&&rt.numberRange(i.green,0,1)&&rt.numberRange(i.blue,0,1)&&rt.numberRange(i.alpha,0,1)}A(r,"is"),e.is=r})(a_||(a_={})),(function(e){function t(n,i){return{range:n,color:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&on.is(i.range)&&a_.is(i.color)}A(r,"is"),e.is=r})(Tz||(Tz={})),(function(e){function t(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.string(i.label)&&(rt.undefined(i.textEdit)||Wu.is(i))&&(rt.undefined(i.additionalTextEdits)||rt.typedArray(i.additionalTextEdits,Wu.is))}A(r,"is"),e.is=r})(wz||(wz={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Cz||(Cz={})),(function(e){function t(n,i,a,s,o,l){let u={startLine:n,endLine:i};return rt.defined(a)&&(u.startCharacter=a),rt.defined(s)&&(u.endCharacter=s),rt.defined(o)&&(u.kind=o),rt.defined(l)&&(u.collapsedText=l),u}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.uinteger(i.startLine)&&rt.uinteger(i.startLine)&&(rt.undefined(i.startCharacter)||rt.uinteger(i.startCharacter))&&(rt.undefined(i.endCharacter)||rt.uinteger(i.endCharacter))&&(rt.undefined(i.kind)||rt.string(i.kind))}A(r,"is"),e.is=r})(kz||(kz={})),(function(e){function t(n,i){return{location:n,message:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&Aw.is(i.location)&&rt.string(i.message)}A(r,"is"),e.is=r})(s_||(s_={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Sz||(Sz={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ez||(Ez={})),(function(e){function t(r){let n=r;return rt.objectLiteral(n)&&rt.string(n.href)}A(t,"is"),e.is=t})(Az||(Az={})),(function(e){function t(n,i,a,s,o,l){let u={range:n,message:i};return rt.defined(a)&&(u.severity=a),rt.defined(s)&&(u.code=s),rt.defined(o)&&(u.source=o),rt.defined(l)&&(u.relatedInformation=l),u}A(t,"create"),e.create=t;function r(n){var i;let a=n;return rt.defined(a)&&on.is(a.range)&&rt.string(a.message)&&(rt.number(a.severity)||rt.undefined(a.severity))&&(rt.integer(a.code)||rt.string(a.code)||rt.undefined(a.code))&&(rt.undefined(a.codeDescription)||rt.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(rt.string(a.source)||rt.undefined(a.source))&&(rt.undefined(a.relatedInformation)||rt.typedArray(a.relatedInformation,s_.is))}A(r,"is"),e.is=r})(_w||(_w={})),(function(e){function t(n,i,...a){let s={title:n,command:i};return rt.defined(a)&&a.length>0&&(s.arguments=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.title)&&rt.string(i.command)}A(r,"is"),e.is=r})(Ng||(Ng={})),(function(e){function t(a,s){return{range:a,newText:s}}A(t,"replace"),e.replace=t;function r(a,s){return{range:{start:a,end:a},newText:s}}A(r,"insert"),e.insert=r;function n(a){return{range:a,newText:""}}A(n,"del"),e.del=n;function i(a){let s=a;return rt.objectLiteral(s)&&rt.string(s.newText)&&on.is(s.range)}A(i,"is"),e.is=i})(Wu||(Wu={})),(function(e){function t(n,i,a){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),a!==void 0&&(s.description=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.string(i.label)&&(rt.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(rt.string(i.description)||i.description===void 0)}A(r,"is"),e.is=r})(Og||(Og={})),(function(e){function t(r){let n=r;return rt.string(n)}A(t,"is"),e.is=t})(ts||(ts={})),(function(e){function t(a,s,o){return{range:a,newText:s,annotationId:o}}A(t,"replace"),e.replace=t;function r(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}A(r,"insert"),e.insert=r;function n(a,s){return{range:a,newText:"",annotationId:s}}A(n,"del"),e.del=n;function i(a){let s=a;return Wu.is(s)&&(Og.is(s.annotationId)||ts.is(s.annotationId))}A(i,"is"),e.is=i})(lf||(lf={})),(function(e){function t(n,i){return{textDocument:n,edits:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&Lw.is(i.textDocument)&&Array.isArray(i.edits)}A(r,"is"),e.is=r})(Rw||(Rw={})),(function(e){function t(n,i,a){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&rt.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||rt.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||rt.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ts.is(i.annotationId))}A(r,"is"),e.is=r})(yv||(yv={})),(function(e){function t(n,i,a,s){let o={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}A(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&rt.string(i.oldUri)&&rt.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||rt.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||rt.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ts.is(i.annotationId))}A(r,"is"),e.is=r})(vv||(vv={})),(function(e){function t(n,i,a){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&rt.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||rt.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||rt.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ts.is(i.annotationId))}A(r,"is"),e.is=r})(xv||(xv={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>rt.string(i.kind)?yv.is(i)||vv.is(i)||xv.is(i):Rw.is(i)))}A(t,"is"),e.is=t})(o_||(o_={})),yw=class{static{A(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,i;if(r===void 0?n=Wu.insert(e,t):ts.is(r)?(i=r,n=lf.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=lf.insert(e,t,i)),this.edits.push(n),i!==void 0)return i}replace(e,t,r){let n,i;if(r===void 0?n=Wu.replace(e,t):ts.is(r)?(i=r,n=lf.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=lf.replace(e,t,i)),this.edits.push(n),i!==void 0)return i}delete(e,t){let r,n;if(t===void 0?r=Wu.del(e):ts.is(t)?(n=t,r=lf.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=lf.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},KF=class{static{A(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(ts.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},qCe=class{static{A(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new KF(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Rw.is(t)){let r=new yw(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new yw(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Lw.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let n=[],i={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(i),r=new yw(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new yw(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new KF,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Og.is(t)||ts.is(t)?n=t:r=t;let i,a;if(n===void 0?i=yv.create(e,r):(a=ts.is(n)?n:this._changeAnnotations.manage(n),i=yv.create(e,r,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Og.is(r)||ts.is(r)?i=r:n=r;let a,s;if(i===void 0?a=vv.create(e,t,n):(s=ts.is(i)?i:this._changeAnnotations.manage(i),a=vv.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Og.is(t)||ts.is(t)?n=t:r=t;let i,a;if(n===void 0?i=xv.create(e,r):(a=ts.is(n)?n:this._changeAnnotations.manage(n),i=xv.create(e,r,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(n){return{uri:n}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)}A(r,"is"),e.is=r})(_z||(_z={})),(function(e){function t(n,i){return{uri:n,version:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)&&rt.integer(i.version)}A(r,"is"),e.is=r})(Rz||(Rz={})),(function(e){function t(n,i){return{uri:n,version:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)&&(i.version===null||rt.integer(i.version))}A(r,"is"),e.is=r})(Lw||(Lw={})),(function(e){function t(n,i,a,s){return{uri:n,languageId:i,version:a,text:s}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)&&rt.string(i.languageId)&&rt.integer(i.version)&&rt.string(i.text)}A(r,"is"),e.is=r})(Lz||(Lz={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}A(t,"is"),e.is=t})(l_||(l_={})),(function(e){function t(r){let n=r;return rt.objectLiteral(r)&&l_.is(n.kind)&&rt.string(n.value)}A(t,"is"),e.is=t})(bv||(bv={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Iz||(Iz={})),(function(e){e.PlainText=1,e.Snippet=2})(Mz||(Mz={})),(function(e){e.Deprecated=1})(Dz||(Dz={})),(function(e){function t(n,i,a){return{newText:n,insert:i,replace:a}}A(t,"create"),e.create=t;function r(n){let i=n;return i&&rt.string(i.newText)&&on.is(i.insert)&&on.is(i.replace)}A(r,"is"),e.is=r})(Nz||(Nz={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Oz||(Oz={})),(function(e){function t(r){let n=r;return n&&(rt.string(n.detail)||n.detail===void 0)&&(rt.string(n.description)||n.description===void 0)}A(t,"is"),e.is=t})(Pz||(Pz={})),(function(e){function t(r){return{label:r}}A(t,"create"),e.create=t})(Bz||(Bz={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}A(t,"create"),e.create=t})($z||($z={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}A(t,"fromPlainText"),e.fromPlainText=t;function r(n){let i=n;return rt.string(i)||rt.objectLiteral(i)&&rt.string(i.language)&&rt.string(i.value)}A(r,"is"),e.is=r})(Iw||(Iw={})),(function(e){function t(r){let n=r;return!!n&&rt.objectLiteral(n)&&(bv.is(n.contents)||Iw.is(n.contents)||rt.typedArray(n.contents,Iw.is))&&(r.range===void 0||on.is(r.range))}A(t,"is"),e.is=t})(Fz||(Fz={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}A(t,"create"),e.create=t})(zz||(zz={})),(function(e){function t(r,n,...i){let a={label:r};return rt.defined(n)&&(a.documentation=n),rt.defined(i)?a.parameters=i:a.parameters=[],a}A(t,"create"),e.create=t})(Gz||(Gz={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(qz||(qz={})),(function(e){function t(r,n){let i={range:r};return rt.number(n)&&(i.kind=n),i}A(t,"create"),e.create=t})(Vz||(Vz={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Wz||(Wz={})),(function(e){e.Deprecated=1})(Uz||(Uz={})),(function(e){function t(r,n,i,a,s){let o={name:r,kind:n,location:{uri:a,range:i}};return s&&(o.containerName=s),o}A(t,"create"),e.create=t})(Hz||(Hz={})),(function(e){function t(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}A(t,"create"),e.create=t})(Yz||(Yz={})),(function(e){function t(n,i,a,s,o,l){let u={name:n,detail:i,kind:a,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}A(t,"create"),e.create=t;function r(n){let i=n;return i&&rt.string(i.name)&&rt.number(i.kind)&&on.is(i.range)&&on.is(i.selectionRange)&&(i.detail===void 0||rt.string(i.detail))&&(i.deprecated===void 0||rt.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}A(r,"is"),e.is=r})(Xz||(Xz={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(jz||(jz={})),(function(e){e.Invoked=1,e.Automatic=2})(Mw||(Mw={})),(function(e){function t(n,i,a){let s={diagnostics:n};return i!=null&&(s.only=i),a!=null&&(s.triggerKind=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.typedArray(i.diagnostics,_w.is)&&(i.only===void 0||rt.typedArray(i.only,rt.string))&&(i.triggerKind===void 0||i.triggerKind===Mw.Invoked||i.triggerKind===Mw.Automatic)}A(r,"is"),e.is=r})(Kz||(Kz={})),(function(e){function t(n,i,a){let s={title:n},o=!0;return typeof i=="string"?(o=!1,s.kind=i):Ng.is(i)?s.command=i:s.edit=i,o&&a!==void 0&&(s.kind=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return i&&rt.string(i.title)&&(i.diagnostics===void 0||rt.typedArray(i.diagnostics,_w.is))&&(i.kind===void 0||rt.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Ng.is(i.command))&&(i.isPreferred===void 0||rt.boolean(i.isPreferred))&&(i.edit===void 0||o_.is(i.edit))}A(r,"is"),e.is=r})(Zz||(Zz={})),(function(e){function t(n,i){let a={range:n};return rt.defined(i)&&(a.data=i),a}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&on.is(i.range)&&(rt.undefined(i.command)||Ng.is(i.command))}A(r,"is"),e.is=r})(Qz||(Qz={})),(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.uinteger(i.tabSize)&&rt.boolean(i.insertSpaces)}A(r,"is"),e.is=r})(Jz||(Jz={})),(function(e){function t(n,i,a){return{range:n,target:i,data:a}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&on.is(i.range)&&(rt.undefined(i.target)||rt.string(i.target))}A(r,"is"),e.is=r})(eG||(eG={})),(function(e){function t(n,i){return{range:n,parent:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&on.is(i.range)&&(i.parent===void 0||e.is(i.parent))}A(r,"is"),e.is=r})(tG||(tG={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(rG||(rG={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(nG||(nG={})),(function(e){function t(r){let n=r;return rt.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}A(t,"is"),e.is=t})(iG||(iG={})),(function(e){function t(n,i){return{range:n,text:i}}A(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&on.is(i.range)&&rt.string(i.text)}A(r,"is"),e.is=r})(aG||(aG={})),(function(e){function t(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}A(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&on.is(i.range)&&rt.boolean(i.caseSensitiveLookup)&&(rt.string(i.variableName)||i.variableName===void 0)}A(r,"is"),e.is=r})(sG||(sG={})),(function(e){function t(n,i){return{range:n,expression:i}}A(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&on.is(i.range)&&(rt.string(i.expression)||i.expression===void 0)}A(r,"is"),e.is=r})(oG||(oG={})),(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&on.is(n.stoppedLocation)}A(r,"is"),e.is=r})(lG||(lG={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}A(t,"is"),e.is=t})(c_||(c_={})),(function(e){function t(n){return{value:n}}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&(i.tooltip===void 0||rt.string(i.tooltip)||bv.is(i.tooltip))&&(i.location===void 0||Aw.is(i.location))&&(i.command===void 0||Ng.is(i.command))}A(r,"is"),e.is=r})(u_||(u_={})),(function(e){function t(n,i,a){let s={position:n,label:i};return a!==void 0&&(s.kind=a),s}A(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&Ln.is(i.position)&&(rt.string(i.label)||rt.typedArray(i.label,u_.is))&&(i.kind===void 0||c_.is(i.kind))&&i.textEdits===void 0||rt.typedArray(i.textEdits,Wu.is)&&(i.tooltip===void 0||rt.string(i.tooltip)||bv.is(i.tooltip))&&(i.paddingLeft===void 0||rt.boolean(i.paddingLeft))&&(i.paddingRight===void 0||rt.boolean(i.paddingRight))}A(r,"is"),e.is=r})(cG||(cG={})),(function(e){function t(r){return{kind:"snippet",value:r}}A(t,"createSnippet"),e.createSnippet=t})(uG||(uG={})),(function(e){function t(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}A(t,"create"),e.create=t})(hG||(hG={})),(function(e){function t(r){return{items:r}}A(t,"create"),e.create=t})(fG||(fG={})),(function(e){e.Invoked=0,e.Automatic=1})(dG||(dG={})),(function(e){function t(r,n){return{range:r,text:n}}A(t,"create"),e.create=t})(pG||(pG={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}A(t,"create"),e.create=t})(gG||(gG={})),(function(e){function t(r){let n=r;return rt.objectLiteral(n)&&i_.is(n.uri)&&rt.string(n.name)}A(t,"is"),e.is=t})(mG||(mG={})),VCe=[` `,`\r -`,"\r"],(function(e){function t(a,s,o,l){return new nye(a,s,o,l)}S(t,"create"),e.create=t;function r(a){let s=a;return!!(Ke.defined(s)&&Ke.string(s.uri)&&(Ke.undefined(s.languageId)||Ke.string(s.languageId))&&Ke.uinteger(s.lineCount)&&Ke.func(s.getText)&&Ke.func(s.positionAt)&&Ke.func(s.offsetAt))}S(r,"is"),e.is=r;function i(a,s){let o=a.getText(),l=n(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=a.offsetAt(f.range.start),p=a.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}S(i,"applyEdits"),e.applyEdits=i;function n(a,s){if(a.length<=1)return a;let o=a.length/2|0,l=a.slice(0,o),u=a.slice(o);n(l,s),n(u,s);let h=0,f=0,d=0;for(;h0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return oi.create(0,e);for(;re?i=a:r=a+1}let n=r-1;return oi.create(n,e-t[n])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}S(i,"undefined"),e.undefined=i;function n(p){return p===!0||p===!1}S(n,"boolean"),e.boolean=n;function a(p){return t.call(p)==="[object String]"}S(a,"string"),e.string=a;function s(p){return t.call(p)==="[object Number]"}S(s,"number"),e.number=s;function o(p,g,m){return t.call(p)==="[object Number]"&&g<=p&&p<=m}S(o,"numberRange"),e.numberRange=o;function l(p){return t.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}S(l,"integer"),e.integer=l;function u(p){return t.call(p)==="[object Number]"&&0<=p&&p<=2147483647}S(u,"uinteger"),e.uinteger=u;function h(p){return t.call(p)==="[object Function]"}S(h,"func"),e.func=h;function f(p){return p!==null&&typeof p=="object"}S(f,"objectLiteral"),e.objectLiteral=f;function d(p,g){return Array.isArray(p)&&p.every(g)}S(d,"typedArray"),e.typedArray=d})(Ke||(Ke={}))}}),mg=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}S(r,"RAL"),(function(i){function n(a){if(a===void 0)throw new Error("No runtime abstraction layer provided");t=a}S(n,"install"),i.install=n})(r||(r={})),e.default=r}}),KT=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(l){return l===!0||l===!1}S(t,"boolean"),e.boolean=t;function r(l){return typeof l=="string"||l instanceof String}S(r,"string"),e.string=r;function i(l){return typeof l=="number"||l instanceof Number}S(i,"number"),e.number=i;function n(l){return l instanceof Error}S(n,"error"),e.error=n;function a(l){return typeof l=="function"}S(a,"func"),e.func=a;function s(l){return Array.isArray(l)}S(s,"array"),e.array=s;function o(l){return s(l)&&l.every(u=>r(u))}S(o,"stringArray"),e.stringArray=o}}),$y=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=mg(),r;(function(a){let s={dispose(){}};a.None=function(){return s}})(r||(e.Event=r={}));var i=class{static{S(this,"CallbackList")}add(a,s=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(a),this._contexts.push(s),Array.isArray(o)&&o.push({dispose:S(()=>this.remove(a,s),"dispose")})}remove(a,s=null){if(!this._callbacks)return;let o=!1;for(let l=0,u=this._callbacks.length;l{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,o);let u={dispose:S(()=>{this._callbacks&&(this._callbacks.remove(s,o),u.dispose=Hve._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(l)&&l.push(u),u}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=n,n._noop=function(){}}}),V6=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=mg(),r=KT(),i=$y(),n;(function(l){l.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),l.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None});function u(h){let f=h;return f&&(f===l.None||f===l.Cancelled||r.boolean(f.isCancellationRequested)&&!!f.onCancellationRequested)}S(u,"is"),l.is=u})(n||(e.CancellationToken=n={}));var a=Object.freeze(function(l,u){let h=(0,t.default)().timer.setTimeout(l.bind(u),0);return{dispose(){h.dispose()}}}),s=class{static{S(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},o=class{static{S(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=n.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=n.None}};e.CancellationTokenSource=o}}),Yve=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=KT(),r;(function(_){_.ParseError=-32700,_.InvalidRequest=-32600,_.MethodNotFound=-32601,_.InvalidParams=-32602,_.InternalError=-32603,_.jsonrpcReservedErrorRangeStart=-32099,_.serverErrorStart=-32099,_.MessageWriteError=-32099,_.MessageReadError=-32098,_.PendingResponseRejected=-32097,_.ConnectionInactive=-32096,_.ServerNotInitialized=-32002,_.UnknownErrorCode=-32001,_.jsonrpcReservedErrorRangeEnd=-32e3,_.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var i=class jve extends Error{static{S(this,"ResponseError")}constructor(R,D,I){super(D),this.code=t.number(R)?R:r.UnknownErrorCode,this.data=I,Object.setPrototypeOf(this,jve.prototype)}toJson(){let R={code:this.code,message:this.message};return this.data!==void 0&&(R.data=this.data),R}};e.ResponseError=i;var n=class FE{static{S(this,"ParameterStructures")}constructor(R){this.kind=R}static is(R){return R===FE.auto||R===FE.byName||R===FE.byPosition}toString(){return this.kind}};e.ParameterStructures=n,n.auto=new n("auto"),n.byPosition=new n("byPosition"),n.byName=new n("byName");var a=class{static{S(this,"AbstractMessageSignature")}constructor(_,R){this.method=_,this.numberOfParams=R}get parameterStructures(){return n.auto}};e.AbstractMessageSignature=a;var s=class extends a{static{S(this,"RequestType0")}constructor(_){super(_,0)}};e.RequestType0=s;var o=class extends a{static{S(this,"RequestType")}constructor(_,R=n.auto){super(_,1),this._parameterStructures=R}get parameterStructures(){return this._parameterStructures}};e.RequestType=o;var l=class extends a{static{S(this,"RequestType1")}constructor(_,R=n.auto){super(_,1),this._parameterStructures=R}get parameterStructures(){return this._parameterStructures}};e.RequestType1=l;var u=class extends a{static{S(this,"RequestType2")}constructor(_){super(_,2)}};e.RequestType2=u;var h=class extends a{static{S(this,"RequestType3")}constructor(_){super(_,3)}};e.RequestType3=h;var f=class extends a{static{S(this,"RequestType4")}constructor(_){super(_,4)}};e.RequestType4=f;var d=class extends a{static{S(this,"RequestType5")}constructor(_){super(_,5)}};e.RequestType5=d;var p=class extends a{static{S(this,"RequestType6")}constructor(_){super(_,6)}};e.RequestType6=p;var g=class extends a{static{S(this,"RequestType7")}constructor(_){super(_,7)}};e.RequestType7=g;var m=class extends a{static{S(this,"RequestType8")}constructor(_){super(_,8)}};e.RequestType8=m;var y=class extends a{static{S(this,"RequestType9")}constructor(_){super(_,9)}};e.RequestType9=y;var v=class extends a{static{S(this,"NotificationType")}constructor(_,R=n.auto){super(_,1),this._parameterStructures=R}get parameterStructures(){return this._parameterStructures}};e.NotificationType=v;var x=class extends a{static{S(this,"NotificationType0")}constructor(_){super(_,0)}};e.NotificationType0=x;var T=class extends a{static{S(this,"NotificationType1")}constructor(_,R=n.auto){super(_,1),this._parameterStructures=R}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=T;var C=class extends a{static{S(this,"NotificationType2")}constructor(_){super(_,2)}};e.NotificationType2=C;var w=class extends a{static{S(this,"NotificationType3")}constructor(_){super(_,3)}};e.NotificationType3=w;var k=class extends a{static{S(this,"NotificationType4")}constructor(_){super(_,4)}};e.NotificationType4=k;var E=class extends a{static{S(this,"NotificationType5")}constructor(_){super(_,5)}};e.NotificationType5=E;var A=class extends a{static{S(this,"NotificationType6")}constructor(_){super(_,6)}};e.NotificationType6=A;var N=class extends a{static{S(this,"NotificationType7")}constructor(_){super(_,7)}};e.NotificationType7=N;var P=class extends a{static{S(this,"NotificationType8")}constructor(_){super(_,8)}};e.NotificationType8=P;var O=class extends a{static{S(this,"NotificationType9")}constructor(_){super(_,9)}};e.NotificationType9=O;var L;(function(_){function R(B){let M=B;return M&&t.string(M.method)&&(t.string(M.id)||t.number(M.id))}S(R,"isRequest"),_.isRequest=R;function D(B){let M=B;return M&&t.string(M.method)&&B.id===void 0}S(D,"isNotification"),_.isNotification=D;function I(B){let M=B;return M&&(M.result!==void 0||!!M.error)&&(t.string(M.id)||t.number(M.id)||M.id===null)}S(I,"isResponse"),_.isResponse=I})(L||(e.Message=L={}))}}),Xve=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var r;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(r||(e.Touch=r={}));var i=class{static{S(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(a){return this._map.has(a)}get(a,s=r.None){let o=this._map.get(a);if(o)return s!==r.None&&this.touch(o,s),o.value}set(a,s,o=r.None){let l=this._map.get(a);if(l)l.value=s,o!==r.None&&this.touch(l,o);else{switch(l={key:a,value:s,next:void 0,previous:void 0},o){case r.None:this.addItemLast(l);break;case r.First:this.addItemFirst(l);break;case r.Last:this.addItemLast(l);break;default:this.addItemLast(l);break}this._map.set(a,l),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(s)return this._map.delete(a),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,s){let o=this._state,l=this._head;for(;l;){if(s?a.bind(s)(l.value,l.key,this):a(l.value,l.key,this),this._state!==o)throw new Error("LinkedMap got modified during iteration.");l=l.next}}keys(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:S(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:S(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:S(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let s=this._head,o=this.size;for(;s&&o>a;)this._map.delete(s.key),s=s.next,o--;this._head=s,this._size=o,s&&(s.previous=void 0),this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(this._head)a.next=this._head,this._head.previous=a;else throw new Error("Invalid list");this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(this._tail)a.previous=this._tail,this._tail.next=a;else throw new Error("Invalid list");this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw new Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw new Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let s=a.next,o=a.previous;if(!s||!o)throw new Error("Invalid list");s.previous=o,o.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(s!==r.First&&s!==r.Last)){if(s===r.First){if(a===this._head)return;let o=a.next,l=a.previous;a===this._tail?(l.next=void 0,this._tail=l):(o.previous=l,l.next=o),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===r.Last){if(a===this._tail)return;let o=a.next,l=a.previous;a===this._head?(o.previous=void 0,this._head=o):(o.previous=l,l.next=o),a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}}toJSON(){let a=[];return this.forEach((s,o)=>{a.push([o,s])}),a}fromJSON(a){this.clear();for(let[s,o]of a)this.set(s,o)}};e.LinkedMap=i;var n=class extends i{static{S(this,"LRUCache")}constructor(a,s=1){super(),this._limit=a,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,s=r.AsNew){return super.get(a,s)}peek(a){return super.get(a,r.None)}set(a,s){return super.set(a,s,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),fst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function i(n){return{dispose:n}}S(i,"create"),r.create=i})(t||(e.Disposable=t={}))}}),dst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=V6(),r;(function(o){o.Continue=0,o.Cancelled=1})(r||(r={}));var i=class{static{S(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(o){if(o.id===null)return;let l=new SharedArrayBuffer(4),u=new Int32Array(l,0,1);u[0]=r.Continue,this.buffers.set(o.id,l),o.$cancellationData=l}async sendCancellation(o,l){let u=this.buffers.get(l);if(u===void 0)return;let h=new Int32Array(u,0,1);Atomics.store(h,0,r.Cancelled)}cleanup(o){this.buffers.delete(o)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=i;var n=class{static{S(this,"SharedArrayBufferCancellationToken")}constructor(o){this.data=new Int32Array(o,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},a=class{static{S(this,"SharedArrayBufferCancellationTokenSource")}constructor(o){this.token=new n(o)}cancel(){}dispose(){}},s=class{static{S(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(o){let l=o.$cancellationData;return l===void 0?new t.CancellationTokenSource:new a(l)}};e.SharedArrayReceiverStrategy=s}}),Kve=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=mg(),r=class{static{S(this,"Semaphore")}constructor(i=1){if(i<=0)throw new Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((n,a)=>{this._waiting.push({thunk:i,resolve:n,reject:a}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=i.thunk();n instanceof Promise?n.then(a=>{this._active--,i.resolve(a),this.runNext()},a=>{this._active--,i.reject(a),this.runNext()}):(this._active--,i.resolve(n),this.runNext())}catch(n){this._active--,i.reject(n),this.runNext()}}};e.Semaphore=r}}),pst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=mg(),r=KT(),i=$y(),n=Kve(),a;(function(u){function h(f){let d=f;return d&&r.func(d.listen)&&r.func(d.dispose)&&r.func(d.onError)&&r.func(d.onClose)&&r.func(d.onPartialMessage)}S(h,"is"),u.is=h})(a||(e.MessageReader=a={}));var s=class{static{S(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(u){this.errorEmitter.fire(this.asError(u))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(u){this.partialMessageEmitter.fire(u)}asError(u){return u instanceof Error?u:new Error(`Reader received error. Reason: ${r.string(u.message)?u.message:"unknown"}`)}};e.AbstractMessageReader=s;var o;(function(u){function h(f){let d,p,g,m=new Map,y,v=new Map;if(f===void 0||typeof f=="string")d=f??"utf-8";else{if(d=f.charset??"utf-8",f.contentDecoder!==void 0&&(g=f.contentDecoder,m.set(g.name,g)),f.contentDecoders!==void 0)for(let x of f.contentDecoders)m.set(x.name,x);if(f.contentTypeDecoder!==void 0&&(y=f.contentTypeDecoder,v.set(y.name,y)),f.contentTypeDecoders!==void 0)for(let x of f.contentTypeDecoders)v.set(x.name,x)}return y===void 0&&(y=(0,t.default)().applicationJson.decoder,v.set(y.name,y)),{charset:d,contentDecoder:g,contentDecoders:m,contentTypeDecoder:y,contentTypeDecoders:v}}S(h,"fromOptions"),u.fromOptions=h})(o||(o={}));var l=class extends s{static{S(this,"ReadableStreamMessageReader")}constructor(u,h){super(),this.readable=u,this.options=o.fromOptions(h),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new n.Semaphore(1)}set partialMessageTimeout(u){this._partialMessageTimeout=u}get partialMessageTimeout(){return this._partialMessageTimeout}listen(u){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=u;let h=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),h}onData(u){try{for(this.buffer.append(u);;){if(this.nextMessageLength===-1){let f=this.buffer.tryReadHeaders(!0);if(!f)return;let d=f.get("content-length");if(!d){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(f))}`));return}let p=parseInt(d);if(isNaN(p)){this.fireError(new Error(`Content-Length value must be a number. Got ${d}`));return}this.nextMessageLength=p}let h=this.buffer.tryReadBody(this.nextMessageLength);if(h===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let f=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(h):h,d=await this.options.contentTypeDecoder.decode(f,this.options);this.callback(d)}).catch(f=>{this.fireError(f)})}}catch(h){this.fireError(h)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((u,h)=>{this.partialMessageTimer=void 0,u===this.messageToken&&(this.firePartialMessage({messageToken:u,waitingTime:h}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=l}}),gst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=mg(),r=KT(),i=Kve(),n=$y(),a="Content-Length: ",s=`\r -`,o;(function(f){function d(p){let g=p;return g&&r.func(g.dispose)&&r.func(g.onClose)&&r.func(g.onError)&&r.func(g.write)}S(d,"is"),f.is=d})(o||(e.MessageWriter=o={}));var l=class{static{S(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f,d,p){this.errorEmitter.fire([this.asError(f),d,p])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${r.string(f.message)?f.message:"unknown"}`)}};e.AbstractMessageWriter=l;var u;(function(f){function d(p){return p===void 0||typeof p=="string"?{charset:p??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:p.charset??"utf-8",contentEncoder:p.contentEncoder,contentTypeEncoder:p.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}S(d,"fromOptions"),f.fromOptions=d})(u||(u={}));var h=class extends l{static{S(this,"WriteableStreamMessageWriter")}constructor(f,d){super(),this.writable=f,this.options=u.fromOptions(d),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(p=>this.fireError(p)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(p=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(p):p).then(p=>{let g=[];return g.push(a,p.byteLength.toString(),s),g.push(s),this.doWrite(f,g,p)},p=>{throw this.fireError(p),p}))}async doWrite(f,d,p){try{return await this.writable.write(d.join(""),"ascii"),this.writable.write(p)}catch(g){return this.handleError(g,f),Promise.reject(g)}}handleError(f,d){this.errorCount++,this.fireError(f,d,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=h}}),mst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,i=`\r -`,n=class{static{S(this,"AbstractMessageBuffer")}constructor(a="utf-8"){this._encoding=a,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(a){let s=typeof a=="string"?this.fromString(a,this._encoding):a;this._chunks.push(s),this._totalLength+=s.byteLength}tryReadHeaders(a=!1){if(this._chunks.length===0)return;let s=0,o=0,l=0,u=0;e:for(;othis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===a){let u=this._chunks[0];return this._chunks.shift(),this._totalLength-=a,this.asNative(u)}if(this._chunks[0].byteLength>a){let u=this._chunks[0],h=this.asNative(u,a);return this._chunks[0]=u.slice(a),this._totalLength-=a,h}let s=this.allocNative(a),o=0,l=0;for(;a>0;){let u=this._chunks[l];if(u.byteLength>a){let h=u.slice(0,a);s.set(h,o),o+=a,this._chunks[l]=u.slice(a),this._totalLength-=a,a-=a}else s.set(u,o),o+=u.byteLength,this._chunks.shift(),this._totalLength-=u.byteLength,a-=u.byteLength}return s}};e.AbstractMessageBuffer=n}}),yst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=mg(),r=KT(),i=Yve(),n=Xve(),a=$y(),s=V6(),o;(function(_){_.type=new i.NotificationType("$/cancelRequest")})(o||(o={}));var l;(function(_){function R(D){return typeof D=="string"||typeof D=="number"}S(R,"is"),_.is=R})(l||(e.ProgressToken=l={}));var u;(function(_){_.type=new i.NotificationType("$/progress")})(u||(u={}));var h=class{static{S(this,"ProgressType")}constructor(){}};e.ProgressType=h;var f;(function(_){function R(D){return r.func(D)}S(R,"is"),_.is=R})(f||(f={})),e.NullLogger=Object.freeze({error:S(()=>{},"error"),warn:S(()=>{},"warn"),info:S(()=>{},"info"),log:S(()=>{},"log")});var d;(function(_){_[_.Off=0]="Off",_[_.Messages=1]="Messages",_[_.Compact=2]="Compact",_[_.Verbose=3]="Verbose"})(d||(e.Trace=d={}));var p;(function(_){_.Off="off",_.Messages="messages",_.Compact="compact",_.Verbose="verbose"})(p||(e.TraceValues=p={})),(function(_){function R(I){if(!r.string(I))return _.Off;switch(I=I.toLowerCase(),I){case"off":return _.Off;case"messages":return _.Messages;case"compact":return _.Compact;case"verbose":return _.Verbose;default:return _.Off}}S(R,"fromString"),_.fromString=R;function D(I){switch(I){case _.Off:return"off";case _.Messages:return"messages";case _.Compact:return"compact";case _.Verbose:return"verbose";default:return"off"}}S(D,"toString"),_.toString=D})(d||(e.Trace=d={}));var g;(function(_){_.Text="text",_.JSON="json"})(g||(e.TraceFormat=g={})),(function(_){function R(D){return r.string(D)?(D=D.toLowerCase(),D==="json"?_.JSON:_.Text):_.Text}S(R,"fromString"),_.fromString=R})(g||(e.TraceFormat=g={}));var m;(function(_){_.type=new i.NotificationType("$/setTrace")})(m||(e.SetTraceNotification=m={}));var y;(function(_){_.type=new i.NotificationType("$/logTrace")})(y||(e.LogTraceNotification=y={}));var v;(function(_){_[_.Closed=1]="Closed",_[_.Disposed=2]="Disposed",_[_.AlreadyListening=3]="AlreadyListening"})(v||(e.ConnectionErrors=v={}));var x=class Zve extends Error{static{S(this,"ConnectionError")}constructor(R,D){super(D),this.code=R,Object.setPrototypeOf(this,Zve.prototype)}};e.ConnectionError=x;var T;(function(_){function R(D){let I=D;return I&&r.func(I.cancelUndispatched)}S(R,"is"),_.is=R})(T||(e.ConnectionStrategy=T={}));var C;(function(_){function R(D){let I=D;return I&&(I.kind===void 0||I.kind==="id")&&r.func(I.createCancellationTokenSource)&&(I.dispose===void 0||r.func(I.dispose))}S(R,"is"),_.is=R})(C||(e.IdCancellationReceiverStrategy=C={}));var w;(function(_){function R(D){let I=D;return I&&I.kind==="request"&&r.func(I.createCancellationTokenSource)&&(I.dispose===void 0||r.func(I.dispose))}S(R,"is"),_.is=R})(w||(e.RequestCancellationReceiverStrategy=w={}));var k;(function(_){_.Message=Object.freeze({createCancellationTokenSource(D){return new s.CancellationTokenSource}});function R(D){return C.is(D)||w.is(D)}S(R,"is"),_.is=R})(k||(e.CancellationReceiverStrategy=k={}));var E;(function(_){_.Message=Object.freeze({sendCancellation(D,I){return D.sendNotification(o.type,{id:I})},cleanup(D){}});function R(D){let I=D;return I&&r.func(I.sendCancellation)&&r.func(I.cleanup)}S(R,"is"),_.is=R})(E||(e.CancellationSenderStrategy=E={}));var A;(function(_){_.Message=Object.freeze({receiver:k.Message,sender:E.Message});function R(D){let I=D;return I&&k.is(I.receiver)&&E.is(I.sender)}S(R,"is"),_.is=R})(A||(e.CancellationStrategy=A={}));var N;(function(_){function R(D){let I=D;return I&&r.func(I.handleMessage)}S(R,"is"),_.is=R})(N||(e.MessageStrategy=N={}));var P;(function(_){function R(D){let I=D;return I&&(A.is(I.cancellationStrategy)||T.is(I.connectionStrategy)||N.is(I.messageStrategy))}S(R,"is"),_.is=R})(P||(e.ConnectionOptions=P={}));var O;(function(_){_[_.New=1]="New",_[_.Listening=2]="Listening",_[_.Closed=3]="Closed",_[_.Disposed=4]="Disposed"})(O||(O={}));function L(_,R,D,I){let B=D!==void 0?D:e.NullLogger,M=0,F=0,z=0,$="2.0",G,U=new Map,j,H=new Map,Q=new Map,Y,se=new n.LinkedMap,J=new Map,re=new Set,ie=new Map,te=d.Off,xe=g.Text,fe,Se=O.New,Me=new a.Emitter,ke=new a.Emitter,Ce=new a.Emitter,Ie=new a.Emitter,Pe=new a.Emitter,pe=I&&I.cancellationStrategy?I.cancellationStrategy:A.Message;function Je(me){if(me===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+me.toString()}S(Je,"createRequestQueueKey");function Te(me){return me===null?"res-unknown-"+(++z).toString():"res-"+me.toString()}S(Te,"createResponseQueueKey");function Be(){return"not-"+(++F).toString()}S(Be,"createNotificationQueueKey");function He(me,Ze){i.Message.isRequest(Ze)?me.set(Je(Ze.id),Ze):i.Message.isResponse(Ze)?me.set(Te(Ze.id),Ze):me.set(Be(),Ze)}S(He,"addMessageToQueue");function nt(me){}S(nt,"cancelUndispatched");function qe(){return Se===O.Listening}S(qe,"isListening");function Ue(){return Se===O.Closed}S(Ue,"isClosed");function ge(){return Se===O.Disposed}S(ge,"isDisposed");function ce(){(Se===O.New||Se===O.Listening)&&(Se=O.Closed,ke.fire(void 0))}S(ce,"closeHandler");function V(me){Me.fire([me,void 0,void 0])}S(V,"readErrorHandler");function le(me){Me.fire(me)}S(le,"writeErrorHandler"),_.onClose(ce),_.onError(V),R.onClose(ce),R.onError(le);function X(){Y||se.size===0||(Y=(0,t.default)().timer.setImmediate(()=>{Y=void 0,Z()}))}S(X,"triggerMessageQueue");function he(me){i.Message.isRequest(me)?ve(me):i.Message.isNotification(me)?Ae(me):i.Message.isResponse(me)?Oe(me):Fe(me)}S(he,"handleMessage");function Z(){if(se.size===0)return;let me=se.shift();try{let Ze=I?.messageStrategy;N.is(Ze)?Ze.handleMessage(me,he):he(me)}finally{X()}}S(Z,"processMessageQueue");let Ve=S(me=>{try{if(i.Message.isNotification(me)&&me.method===o.type.method){let Ze=me.params.id,rt=Je(Ze),at=se.get(rt);if(i.Message.isRequest(at)){let At=I?.connectionStrategy,Mt=At&&At.cancelUndispatched?At.cancelUndispatched(at,nt):void 0;if(Mt&&(Mt.error!==void 0||Mt.result!==void 0)){se.delete(rt),ie.delete(Ze),Mt.id=at.id,Ye(Mt,me.method,Date.now()),R.write(Mt).catch(()=>B.error("Sending response for canceled message failed."));return}}let _t=ie.get(Ze);if(_t!==void 0){_t.cancel(),Tt(me);return}else re.add(Ze)}He(se,me)}finally{X()}},"callback");function ve(me){if(ge())return;function Ze(Yt,Vt,Jt){let cr={jsonrpc:$,id:me.id};Yt instanceof i.ResponseError?cr.error=Yt.toJson():cr.result=Yt===void 0?null:Yt,Ye(cr,Vt,Jt),R.write(cr).catch(()=>B.error("Sending response failed."))}S(Ze,"reply");function rt(Yt,Vt,Jt){let cr={jsonrpc:$,id:me.id,error:Yt.toJson()};Ye(cr,Vt,Jt),R.write(cr).catch(()=>B.error("Sending response failed."))}S(rt,"replyError");function at(Yt,Vt,Jt){Yt===void 0&&(Yt=null);let cr={jsonrpc:$,id:me.id,result:Yt};Ye(cr,Vt,Jt),R.write(cr).catch(()=>B.error("Sending response failed."))}S(at,"replySuccess"),ue(me);let _t=U.get(me.method),At,Mt;_t&&(At=_t.type,Mt=_t.handler);let ur=Date.now();if(Mt||G){let Yt=me.id??String(Date.now()),Vt=C.is(pe.receiver)?pe.receiver.createCancellationTokenSource(Yt):pe.receiver.createCancellationTokenSource(me);me.id!==null&&re.has(me.id)&&Vt.cancel(),me.id!==null&&ie.set(Yt,Vt);try{let Jt;if(Mt)if(me.params===void 0){if(At!==void 0&&At.numberOfParams!==0){rt(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${me.method} defines ${At.numberOfParams} params but received none.`),me.method,ur);return}Jt=Mt(Vt.token)}else if(Array.isArray(me.params)){if(At!==void 0&&At.parameterStructures===i.ParameterStructures.byName){rt(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${me.method} defines parameters by name but received parameters by position`),me.method,ur);return}Jt=Mt(...me.params,Vt.token)}else{if(At!==void 0&&At.parameterStructures===i.ParameterStructures.byPosition){rt(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${me.method} defines parameters by position but received parameters by name`),me.method,ur);return}Jt=Mt(me.params,Vt.token)}else G&&(Jt=G(me.method,me.params,Vt.token));let cr=Jt;Jt?cr.then?cr.then(Ct=>{ie.delete(Yt),Ze(Ct,me.method,ur)},Ct=>{ie.delete(Yt),Ct instanceof i.ResponseError?rt(Ct,me.method,ur):Ct&&r.string(Ct.message)?rt(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${me.method} failed with message: ${Ct.message}`),me.method,ur):rt(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${me.method} failed unexpectedly without providing any details.`),me.method,ur)}):(ie.delete(Yt),Ze(Jt,me.method,ur)):(ie.delete(Yt),at(Jt,me.method,ur))}catch(Jt){ie.delete(Yt),Jt instanceof i.ResponseError?Ze(Jt,me.method,ur):Jt&&r.string(Jt.message)?rt(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${me.method} failed with message: ${Jt.message}`),me.method,ur):rt(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${me.method} failed unexpectedly without providing any details.`),me.method,ur)}}else rt(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${me.method}`),me.method,ur)}S(ve,"handleRequest");function Oe(me){if(!ge())if(me.id===null)me.error?B.error(`Received response message without id: Error is: -${JSON.stringify(me.error,void 0,4)}`):B.error("Received response message without id. No further error information provided.");else{let Ze=me.id,rt=J.get(Ze);if(be(me,rt),rt!==void 0){J.delete(Ze);try{if(me.error){let at=me.error;rt.reject(new i.ResponseError(at.code,at.message,at.data))}else if(me.result!==void 0)rt.resolve(me.result);else throw new Error("Should never happen.")}catch(at){at.message?B.error(`Response handler '${rt.method}' failed with message: ${at.message}`):B.error(`Response handler '${rt.method}' failed unexpectedly.`)}}}}S(Oe,"handleResponse");function Ae(me){if(ge())return;let Ze,rt;if(me.method===o.type.method){let at=me.params.id;re.delete(at),Tt(me);return}else{let at=H.get(me.method);at&&(rt=at.handler,Ze=at.type)}if(rt||j)try{if(Tt(me),rt)if(me.params===void 0)Ze!==void 0&&Ze.numberOfParams!==0&&Ze.parameterStructures!==i.ParameterStructures.byName&&B.error(`Notification ${me.method} defines ${Ze.numberOfParams} params but received none.`),rt();else if(Array.isArray(me.params)){let at=me.params;me.method===u.type.method&&at.length===2&&l.is(at[0])?rt({token:at[0],value:at[1]}):(Ze!==void 0&&(Ze.parameterStructures===i.ParameterStructures.byName&&B.error(`Notification ${me.method} defines parameters by name but received parameters by position`),Ze.numberOfParams!==me.params.length&&B.error(`Notification ${me.method} defines ${Ze.numberOfParams} params but received ${at.length} arguments`)),rt(...at))}else Ze!==void 0&&Ze.parameterStructures===i.ParameterStructures.byPosition&&B.error(`Notification ${me.method} defines parameters by position but received parameters by name`),rt(me.params);else j&&j(me.method,me.params)}catch(at){at.message?B.error(`Notification handler '${me.method}' failed with message: ${at.message}`):B.error(`Notification handler '${me.method}' failed unexpectedly.`)}else Ce.fire(me)}S(Ae,"handleNotification");function Fe(me){if(!me){B.error("Received empty message.");return}B.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(me,null,4)}`);let Ze=me;if(r.string(Ze.id)||r.number(Ze.id)){let rt=Ze.id,at=J.get(rt);at&&at.reject(new Error("The received response has neither a result nor an error property."))}}S(Fe,"handleInvalidMessage");function Re(me){if(me!=null)switch(te){case d.Verbose:return JSON.stringify(me,null,4);case d.Compact:return JSON.stringify(me);default:return}}S(Re,"stringifyTrace");function We(me){if(!(te===d.Off||!fe))if(xe===g.Text){let Ze;(te===d.Verbose||te===d.Compact)&&me.params&&(Ze=`Params: ${Re(me.params)} - -`),fe.log(`Sending request '${me.method} - (${me.id})'.`,Ze)}else it("send-request",me)}S(We,"traceSendingRequest");function De(me){if(!(te===d.Off||!fe))if(xe===g.Text){let Ze;(te===d.Verbose||te===d.Compact)&&(me.params?Ze=`Params: ${Re(me.params)} +`,"\r"],(function(e){function t(a,s,o,l){return new ZTe(a,s,o,l)}A(t,"create"),e.create=t;function r(a){let s=a;return!!(rt.defined(s)&&rt.string(s.uri)&&(rt.undefined(s.languageId)||rt.string(s.languageId))&&rt.uinteger(s.lineCount)&&rt.func(s.getText)&&rt.func(s.positionAt)&&rt.func(s.offsetAt))}A(r,"is"),e.is=r;function n(a,s){let o=a.getText(),l=i(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=a.offsetAt(f.range.start),p=a.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}A(n,"applyEdits"),e.applyEdits=n;function i(a,s){if(a.length<=1)return a;let o=a.length/2|0,l=a.slice(0,o),u=a.slice(o);i(l,s),i(u,s);let h=0,f=0,d=0;for(;h0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(n===0)return Ln.create(0,e);for(;re?n=a:r=a+1}let i=r-1;return Ln.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1"u"}A(n,"undefined"),e.undefined=n;function i(p){return p===!0||p===!1}A(i,"boolean"),e.boolean=i;function a(p){return t.call(p)==="[object String]"}A(a,"string"),e.string=a;function s(p){return t.call(p)==="[object Number]"}A(s,"number"),e.number=s;function o(p,g,m){return t.call(p)==="[object Number]"&&g<=p&&p<=m}A(o,"numberRange"),e.numberRange=o;function l(p){return t.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}A(l,"integer"),e.integer=l;function u(p){return t.call(p)==="[object Number]"&&0<=p&&p<=2147483647}A(u,"uinteger"),e.uinteger=u;function h(p){return t.call(p)==="[object Function]"}A(h,"func"),e.func=h;function f(p){return p!==null&&typeof p=="object"}A(f,"objectLiteral"),e.objectLiteral=f;function d(p,g){return Array.isArray(p)&&p.every(g)}A(d,"typedArray"),e.typedArray=d})(rt||(rt={}))}}),Tm=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}A(r,"RAL"),(function(n){function i(a){if(a===void 0)throw new Error("No runtime abstraction layer provided");t=a}A(i,"install"),n.install=i})(r||(r={})),e.default=r}}),TC=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(l){return l===!0||l===!1}A(t,"boolean"),e.boolean=t;function r(l){return typeof l=="string"||l instanceof String}A(r,"string"),e.string=r;function n(l){return typeof l=="number"||l instanceof Number}A(n,"number"),e.number=n;function i(l){return l instanceof Error}A(i,"error"),e.error=i;function a(l){return typeof l=="function"}A(a,"func"),e.func=a;function s(l){return Array.isArray(l)}A(s,"array"),e.array=s;function o(l){return s(l)&&l.every(u=>r(u))}A(o,"stringArray"),e.stringArray=o}}),Zv=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=Tm(),r;(function(a){let s={dispose(){}};a.None=function(){return s}})(r||(e.Event=r={}));var n=class{static{A(this,"CallbackList")}add(a,s=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(a),this._contexts.push(s),Array.isArray(o)&&o.push({dispose:A(()=>this.remove(a,s),"dispose")})}remove(a,s=null){if(!this._callbacks)return;let o=!1;for(let l=0,u=this._callbacks.length;l{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,o);let u={dispose:A(()=>{this._callbacks&&(this._callbacks.remove(s,o),u.dispose=WCe._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(l)&&l.push(u),u}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=i,i._noop=function(){}}}),k6=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=Tm(),r=TC(),n=Zv(),i;(function(l){l.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),l.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function u(h){let f=h;return f&&(f===l.None||f===l.Cancelled||r.boolean(f.isCancellationRequested)&&!!f.onCancellationRequested)}A(u,"is"),l.is=u})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(l,u){let h=(0,t.default)().timer.setTimeout(l.bind(u),0);return{dispose(){h.dispose()}}}),s=class{static{A(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},o=class{static{A(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=i.None}};e.CancellationTokenSource=o}}),UCe=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=TC(),r;(function(_){_.ParseError=-32700,_.InvalidRequest=-32600,_.MethodNotFound=-32601,_.InvalidParams=-32602,_.InternalError=-32603,_.jsonrpcReservedErrorRangeStart=-32099,_.serverErrorStart=-32099,_.MessageWriteError=-32099,_.MessageReadError=-32098,_.PendingResponseRejected=-32097,_.ConnectionInactive=-32096,_.ServerNotInitialized=-32002,_.UnknownErrorCode=-32001,_.jsonrpcReservedErrorRangeEnd=-32e3,_.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var n=class HCe extends Error{static{A(this,"ResponseError")}constructor(D,I,M){super(I),this.code=t.number(D)?D:r.UnknownErrorCode,this.data=M,Object.setPrototypeOf(this,HCe.prototype)}toJson(){let D={code:this.code,message:this.message};return this.data!==void 0&&(D.data=this.data),D}};e.ResponseError=n;var i=class h_{static{A(this,"ParameterStructures")}constructor(D){this.kind=D}static is(D){return D===h_.auto||D===h_.byName||D===h_.byPosition}toString(){return this.kind}};e.ParameterStructures=i,i.auto=new i("auto"),i.byPosition=new i("byPosition"),i.byName=new i("byName");var a=class{static{A(this,"AbstractMessageSignature")}constructor(_,D){this.method=_,this.numberOfParams=D}get parameterStructures(){return i.auto}};e.AbstractMessageSignature=a;var s=class extends a{static{A(this,"RequestType0")}constructor(_){super(_,0)}};e.RequestType0=s;var o=class extends a{static{A(this,"RequestType")}constructor(_,D=i.auto){super(_,1),this._parameterStructures=D}get parameterStructures(){return this._parameterStructures}};e.RequestType=o;var l=class extends a{static{A(this,"RequestType1")}constructor(_,D=i.auto){super(_,1),this._parameterStructures=D}get parameterStructures(){return this._parameterStructures}};e.RequestType1=l;var u=class extends a{static{A(this,"RequestType2")}constructor(_){super(_,2)}};e.RequestType2=u;var h=class extends a{static{A(this,"RequestType3")}constructor(_){super(_,3)}};e.RequestType3=h;var f=class extends a{static{A(this,"RequestType4")}constructor(_){super(_,4)}};e.RequestType4=f;var d=class extends a{static{A(this,"RequestType5")}constructor(_){super(_,5)}};e.RequestType5=d;var p=class extends a{static{A(this,"RequestType6")}constructor(_){super(_,6)}};e.RequestType6=p;var g=class extends a{static{A(this,"RequestType7")}constructor(_){super(_,7)}};e.RequestType7=g;var m=class extends a{static{A(this,"RequestType8")}constructor(_){super(_,8)}};e.RequestType8=m;var y=class extends a{static{A(this,"RequestType9")}constructor(_){super(_,9)}};e.RequestType9=y;var x=class extends a{static{A(this,"NotificationType")}constructor(_,D=i.auto){super(_,1),this._parameterStructures=D}get parameterStructures(){return this._parameterStructures}};e.NotificationType=x;var b=class extends a{static{A(this,"NotificationType0")}constructor(_){super(_,0)}};e.NotificationType0=b;var T=class extends a{static{A(this,"NotificationType1")}constructor(_,D=i.auto){super(_,1),this._parameterStructures=D}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=T;var k=class extends a{static{A(this,"NotificationType2")}constructor(_){super(_,2)}};e.NotificationType2=k;var w=class extends a{static{A(this,"NotificationType3")}constructor(_){super(_,3)}};e.NotificationType3=w;var C=class extends a{static{A(this,"NotificationType4")}constructor(_){super(_,4)}};e.NotificationType4=C;var S=class extends a{static{A(this,"NotificationType5")}constructor(_){super(_,5)}};e.NotificationType5=S;var E=class extends a{static{A(this,"NotificationType6")}constructor(_){super(_,6)}};e.NotificationType6=E;var L=class extends a{static{A(this,"NotificationType7")}constructor(_){super(_,7)}};e.NotificationType7=L;var N=class extends a{static{A(this,"NotificationType8")}constructor(_){super(_,8)}};e.NotificationType8=N;var O=class extends a{static{A(this,"NotificationType9")}constructor(_){super(_,9)}};e.NotificationType9=O;var R;(function(_){function D(B){let P=B;return P&&t.string(P.method)&&(t.string(P.id)||t.number(P.id))}A(D,"isRequest"),_.isRequest=D;function I(B){let P=B;return P&&t.string(P.method)&&B.id===void 0}A(I,"isNotification"),_.isNotification=I;function M(B){let P=B;return P&&(P.result!==void 0||!!P.error)&&(t.string(P.id)||t.number(P.id)||P.id===null)}A(M,"isResponse"),_.isResponse=M})(R||(e.Message=R={}))}}),YCe=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var r;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(r||(e.Touch=r={}));var n=class{static{A(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(a){return this._map.has(a)}get(a,s=r.None){let o=this._map.get(a);if(o)return s!==r.None&&this.touch(o,s),o.value}set(a,s,o=r.None){let l=this._map.get(a);if(l)l.value=s,o!==r.None&&this.touch(l,o);else{switch(l={key:a,value:s,next:void 0,previous:void 0},o){case r.None:this.addItemLast(l);break;case r.First:this.addItemFirst(l);break;case r.Last:this.addItemLast(l);break;default:this.addItemLast(l);break}this._map.set(a,l),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(s)return this._map.delete(a),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,s){let o=this._state,l=this._head;for(;l;){if(s?a.bind(s)(l.value,l.key,this):a(l.value,l.key,this),this._state!==o)throw new Error("LinkedMap got modified during iteration.");l=l.next}}keys(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:A(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:A(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:A(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let s=this._head,o=this.size;for(;s&&o>a;)this._map.delete(s.key),s=s.next,o--;this._head=s,this._size=o,s&&(s.previous=void 0),this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(this._head)a.next=this._head,this._head.previous=a;else throw new Error("Invalid list");this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(this._tail)a.previous=this._tail,this._tail.next=a;else throw new Error("Invalid list");this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw new Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw new Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let s=a.next,o=a.previous;if(!s||!o)throw new Error("Invalid list");s.previous=o,o.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(s!==r.First&&s!==r.Last)){if(s===r.First){if(a===this._head)return;let o=a.next,l=a.previous;a===this._tail?(l.next=void 0,this._tail=l):(o.previous=l,l.next=o),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===r.Last){if(a===this._tail)return;let o=a.next,l=a.previous;a===this._head?(o.previous=void 0,this._head=o):(o.previous=l,l.next=o),a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}}toJSON(){let a=[];return this.forEach((s,o)=>{a.push([o,s])}),a}fromJSON(a){this.clear();for(let[s,o]of a)this.set(s,o)}};e.LinkedMap=n;var i=class extends n{static{A(this,"LRUCache")}constructor(a,s=1){super(),this._limit=a,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,s=r.AsNew){return super.get(a,s)}peek(a){return super.get(a,r.None)}set(a,s){return super.set(a,s,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=i}}),idt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(i){return{dispose:i}}A(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),adt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=k6(),r;(function(o){o.Continue=0,o.Cancelled=1})(r||(r={}));var n=class{static{A(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(o){if(o.id===null)return;let l=new SharedArrayBuffer(4),u=new Int32Array(l,0,1);u[0]=r.Continue,this.buffers.set(o.id,l),o.$cancellationData=l}async sendCancellation(o,l){let u=this.buffers.get(l);if(u===void 0)return;let h=new Int32Array(u,0,1);Atomics.store(h,0,r.Cancelled)}cleanup(o){this.buffers.delete(o)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var i=class{static{A(this,"SharedArrayBufferCancellationToken")}constructor(o){this.data=new Int32Array(o,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},a=class{static{A(this,"SharedArrayBufferCancellationTokenSource")}constructor(o){this.token=new i(o)}cancel(){}dispose(){}},s=class{static{A(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(o){let l=o.$cancellationData;return l===void 0?new t.CancellationTokenSource:new a(l)}};e.SharedArrayReceiverStrategy=s}}),XCe=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=Tm(),r=class{static{A(this,"Semaphore")}constructor(n=1){if(n<=0)throw new Error("Capacity must be greater than 0");this._capacity=n,this._active=0,this._waiting=[]}lock(n){return new Promise((i,a)=>{this._waiting.push({thunk:n,resolve:i,reject:a}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let i=n.thunk();i instanceof Promise?i.then(a=>{this._active--,n.resolve(a),this.runNext()},a=>{this._active--,n.reject(a),this.runNext()}):(this._active--,n.resolve(i),this.runNext())}catch(i){this._active--,n.reject(i),this.runNext()}}};e.Semaphore=r}}),sdt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=Tm(),r=TC(),n=Zv(),i=XCe(),a;(function(u){function h(f){let d=f;return d&&r.func(d.listen)&&r.func(d.dispose)&&r.func(d.onError)&&r.func(d.onClose)&&r.func(d.onPartialMessage)}A(h,"is"),u.is=h})(a||(e.MessageReader=a={}));var s=class{static{A(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(u){this.errorEmitter.fire(this.asError(u))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(u){this.partialMessageEmitter.fire(u)}asError(u){return u instanceof Error?u:new Error(`Reader received error. Reason: ${r.string(u.message)?u.message:"unknown"}`)}};e.AbstractMessageReader=s;var o;(function(u){function h(f){let d,p,g,m=new Map,y,x=new Map;if(f===void 0||typeof f=="string")d=f??"utf-8";else{if(d=f.charset??"utf-8",f.contentDecoder!==void 0&&(g=f.contentDecoder,m.set(g.name,g)),f.contentDecoders!==void 0)for(let b of f.contentDecoders)m.set(b.name,b);if(f.contentTypeDecoder!==void 0&&(y=f.contentTypeDecoder,x.set(y.name,y)),f.contentTypeDecoders!==void 0)for(let b of f.contentTypeDecoders)x.set(b.name,b)}return y===void 0&&(y=(0,t.default)().applicationJson.decoder,x.set(y.name,y)),{charset:d,contentDecoder:g,contentDecoders:m,contentTypeDecoder:y,contentTypeDecoders:x}}A(h,"fromOptions"),u.fromOptions=h})(o||(o={}));var l=class extends s{static{A(this,"ReadableStreamMessageReader")}constructor(u,h){super(),this.readable=u,this.options=o.fromOptions(h),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(u){this._partialMessageTimeout=u}get partialMessageTimeout(){return this._partialMessageTimeout}listen(u){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=u;let h=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),h}onData(u){try{for(this.buffer.append(u);;){if(this.nextMessageLength===-1){let f=this.buffer.tryReadHeaders(!0);if(!f)return;let d=f.get("content-length");if(!d){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(f))}`));return}let p=parseInt(d);if(isNaN(p)){this.fireError(new Error(`Content-Length value must be a number. Got ${d}`));return}this.nextMessageLength=p}let h=this.buffer.tryReadBody(this.nextMessageLength);if(h===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let f=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(h):h,d=await this.options.contentTypeDecoder.decode(f,this.options);this.callback(d)}).catch(f=>{this.fireError(f)})}}catch(h){this.fireError(h)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((u,h)=>{this.partialMessageTimer=void 0,u===this.messageToken&&(this.firePartialMessage({messageToken:u,waitingTime:h}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=l}}),odt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=Tm(),r=TC(),n=XCe(),i=Zv(),a="Content-Length: ",s=`\r +`,o;(function(f){function d(p){let g=p;return g&&r.func(g.dispose)&&r.func(g.onClose)&&r.func(g.onError)&&r.func(g.write)}A(d,"is"),f.is=d})(o||(e.MessageWriter=o={}));var l=class{static{A(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f,d,p){this.errorEmitter.fire([this.asError(f),d,p])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${r.string(f.message)?f.message:"unknown"}`)}};e.AbstractMessageWriter=l;var u;(function(f){function d(p){return p===void 0||typeof p=="string"?{charset:p??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:p.charset??"utf-8",contentEncoder:p.contentEncoder,contentTypeEncoder:p.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}A(d,"fromOptions"),f.fromOptions=d})(u||(u={}));var h=class extends l{static{A(this,"WriteableStreamMessageWriter")}constructor(f,d){super(),this.writable=f,this.options=u.fromOptions(d),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(p=>this.fireError(p)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(p=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(p):p).then(p=>{let g=[];return g.push(a,p.byteLength.toString(),s),g.push(s),this.doWrite(f,g,p)},p=>{throw this.fireError(p),p}))}async doWrite(f,d,p){try{return await this.writable.write(d.join(""),"ascii"),this.writable.write(p)}catch(g){return this.handleError(g,f),Promise.reject(g)}}handleError(f,d){this.errorCount++,this.fireError(f,d,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=h}}),ldt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r +`,i=class{static{A(this,"AbstractMessageBuffer")}constructor(a="utf-8"){this._encoding=a,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(a){let s=typeof a=="string"?this.fromString(a,this._encoding):a;this._chunks.push(s),this._totalLength+=s.byteLength}tryReadHeaders(a=!1){if(this._chunks.length===0)return;let s=0,o=0,l=0,u=0;e:for(;othis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===a){let u=this._chunks[0];return this._chunks.shift(),this._totalLength-=a,this.asNative(u)}if(this._chunks[0].byteLength>a){let u=this._chunks[0],h=this.asNative(u,a);return this._chunks[0]=u.slice(a),this._totalLength-=a,h}let s=this.allocNative(a),o=0,l=0;for(;a>0;){let u=this._chunks[l];if(u.byteLength>a){let h=u.slice(0,a);s.set(h,o),o+=a,this._chunks[l]=u.slice(a),this._totalLength-=a,a-=a}else s.set(u,o),o+=u.byteLength,this._chunks.shift(),this._totalLength-=u.byteLength,a-=u.byteLength}return s}};e.AbstractMessageBuffer=i}}),cdt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=Tm(),r=TC(),n=UCe(),i=YCe(),a=Zv(),s=k6(),o;(function(_){_.type=new n.NotificationType("$/cancelRequest")})(o||(o={}));var l;(function(_){function D(I){return typeof I=="string"||typeof I=="number"}A(D,"is"),_.is=D})(l||(e.ProgressToken=l={}));var u;(function(_){_.type=new n.NotificationType("$/progress")})(u||(u={}));var h=class{static{A(this,"ProgressType")}constructor(){}};e.ProgressType=h;var f;(function(_){function D(I){return r.func(I)}A(D,"is"),_.is=D})(f||(f={})),e.NullLogger=Object.freeze({error:A(()=>{},"error"),warn:A(()=>{},"warn"),info:A(()=>{},"info"),log:A(()=>{},"log")});var d;(function(_){_[_.Off=0]="Off",_[_.Messages=1]="Messages",_[_.Compact=2]="Compact",_[_.Verbose=3]="Verbose"})(d||(e.Trace=d={}));var p;(function(_){_.Off="off",_.Messages="messages",_.Compact="compact",_.Verbose="verbose"})(p||(e.TraceValues=p={})),(function(_){function D(M){if(!r.string(M))return _.Off;switch(M=M.toLowerCase(),M){case"off":return _.Off;case"messages":return _.Messages;case"compact":return _.Compact;case"verbose":return _.Verbose;default:return _.Off}}A(D,"fromString"),_.fromString=D;function I(M){switch(M){case _.Off:return"off";case _.Messages:return"messages";case _.Compact:return"compact";case _.Verbose:return"verbose";default:return"off"}}A(I,"toString"),_.toString=I})(d||(e.Trace=d={}));var g;(function(_){_.Text="text",_.JSON="json"})(g||(e.TraceFormat=g={})),(function(_){function D(I){return r.string(I)?(I=I.toLowerCase(),I==="json"?_.JSON:_.Text):_.Text}A(D,"fromString"),_.fromString=D})(g||(e.TraceFormat=g={}));var m;(function(_){_.type=new n.NotificationType("$/setTrace")})(m||(e.SetTraceNotification=m={}));var y;(function(_){_.type=new n.NotificationType("$/logTrace")})(y||(e.LogTraceNotification=y={}));var x;(function(_){_[_.Closed=1]="Closed",_[_.Disposed=2]="Disposed",_[_.AlreadyListening=3]="AlreadyListening"})(x||(e.ConnectionErrors=x={}));var b=class jCe extends Error{static{A(this,"ConnectionError")}constructor(D,I){super(I),this.code=D,Object.setPrototypeOf(this,jCe.prototype)}};e.ConnectionError=b;var T;(function(_){function D(I){let M=I;return M&&r.func(M.cancelUndispatched)}A(D,"is"),_.is=D})(T||(e.ConnectionStrategy=T={}));var k;(function(_){function D(I){let M=I;return M&&(M.kind===void 0||M.kind==="id")&&r.func(M.createCancellationTokenSource)&&(M.dispose===void 0||r.func(M.dispose))}A(D,"is"),_.is=D})(k||(e.IdCancellationReceiverStrategy=k={}));var w;(function(_){function D(I){let M=I;return M&&M.kind==="request"&&r.func(M.createCancellationTokenSource)&&(M.dispose===void 0||r.func(M.dispose))}A(D,"is"),_.is=D})(w||(e.RequestCancellationReceiverStrategy=w={}));var C;(function(_){_.Message=Object.freeze({createCancellationTokenSource(I){return new s.CancellationTokenSource}});function D(I){return k.is(I)||w.is(I)}A(D,"is"),_.is=D})(C||(e.CancellationReceiverStrategy=C={}));var S;(function(_){_.Message=Object.freeze({sendCancellation(I,M){return I.sendNotification(o.type,{id:M})},cleanup(I){}});function D(I){let M=I;return M&&r.func(M.sendCancellation)&&r.func(M.cleanup)}A(D,"is"),_.is=D})(S||(e.CancellationSenderStrategy=S={}));var E;(function(_){_.Message=Object.freeze({receiver:C.Message,sender:S.Message});function D(I){let M=I;return M&&C.is(M.receiver)&&S.is(M.sender)}A(D,"is"),_.is=D})(E||(e.CancellationStrategy=E={}));var L;(function(_){function D(I){let M=I;return M&&r.func(M.handleMessage)}A(D,"is"),_.is=D})(L||(e.MessageStrategy=L={}));var N;(function(_){function D(I){let M=I;return M&&(E.is(M.cancellationStrategy)||T.is(M.connectionStrategy)||L.is(M.messageStrategy))}A(D,"is"),_.is=D})(N||(e.ConnectionOptions=N={}));var O;(function(_){_[_.New=1]="New",_[_.Listening=2]="Listening",_[_.Closed=3]="Closed",_[_.Disposed=4]="Disposed"})(O||(O={}));function R(_,D,I,M){let B=I!==void 0?I:e.NullLogger,P=0,$=0,G=0,q="2.0",z,V=new Map,j,ee=new Map,ne=new Map,Q,pe=new i.LinkedMap,te=new Map,de=new Set,ce=new Map,ue=d.Off,Re=g.Text,ve,Ge=O.New,He=new a.Emitter,Ue=new a.Emitter,me=new a.Emitter,De=new a.Emitter,Ie=new a.Emitter,Me=M&&M.cancellationStrategy?M.cancellationStrategy:E.Message;function re(_e){if(_e===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+_e.toString()}A(re,"createRequestQueueKey");function le(_e){return _e===null?"res-unknown-"+(++G).toString():"res-"+_e.toString()}A(le,"createResponseQueueKey");function oe(){return"not-"+(++$).toString()}A(oe,"createNotificationQueueKey");function he(_e,Ze){n.Message.isRequest(Ze)?_e.set(re(Ze.id),Ze):n.Message.isResponse(Ze)?_e.set(le(Ze.id),Ze):_e.set(oe(),Ze)}A(he,"addMessageToQueue");function xe(_e){}A(xe,"cancelUndispatched");function se(){return Ge===O.Listening}A(se,"isListening");function F(){return Ge===O.Closed}A(F,"isClosed");function H(){return Ge===O.Disposed}A(H,"isDisposed");function W(){(Ge===O.New||Ge===O.Listening)&&(Ge=O.Closed,Ue.fire(void 0))}A(W,"closeHandler");function U(_e){He.fire([_e,void 0,void 0])}A(U,"readErrorHandler");function ae(_e){He.fire(_e)}A(ae,"writeErrorHandler"),_.onClose(W),_.onError(U),D.onClose(W),D.onError(ae);function K(){Q||pe.size===0||(Q=(0,t.default)().timer.setImmediate(()=>{Q=void 0,Z()}))}A(K,"triggerMessageQueue");function Y(_e){n.Message.isRequest(_e)?we(_e):n.Message.isNotification(_e)?Se(_e):n.Message.isResponse(_e)?ke(_e):Ne(_e)}A(Y,"handleMessage");function Z(){if(pe.size===0)return;let _e=pe.shift();try{let Ze=M?.messageStrategy;L.is(Ze)?Ze.handleMessage(_e,Y):Y(_e)}finally{K()}}A(Z,"processMessageQueue");let Ce=A(_e=>{try{if(n.Message.isNotification(_e)&&_e.method===o.type.method){let Ze=_e.params.id,nt=re(Ze),ft=pe.get(nt);if(n.Message.isRequest(ft)){let yt=M?.connectionStrategy,Ht=yt&&yt.cancelUndispatched?yt.cancelUndispatched(ft,xe):void 0;if(Ht&&(Ht.error!==void 0||Ht.result!==void 0)){pe.delete(nt),ce.delete(Ze),Ht.id=ft.id,We(Ht,_e.method,Date.now()),D.write(Ht).catch(()=>B.error("Sending response for canceled message failed."));return}}let jt=ce.get(Ze);if(jt!==void 0){jt.cancel(),lt(_e);return}else de.add(Ze)}he(pe,_e)}finally{K()}},"callback");function we(_e){if(H())return;function Ze(rr,Ot,Zt){let Je={jsonrpc:q,id:_e.id};rr instanceof n.ResponseError?Je.error=rr.toJson():Je.result=rr===void 0?null:rr,We(Je,Ot,Zt),D.write(Je).catch(()=>B.error("Sending response failed."))}A(Ze,"reply");function nt(rr,Ot,Zt){let Je={jsonrpc:q,id:_e.id,error:rr.toJson()};We(Je,Ot,Zt),D.write(Je).catch(()=>B.error("Sending response failed."))}A(nt,"replyError");function ft(rr,Ot,Zt){rr===void 0&&(rr=null);let Je={jsonrpc:q,id:_e.id,result:rr};We(Je,Ot,Zt),D.write(Je).catch(()=>B.error("Sending response failed."))}A(ft,"replySuccess"),be(_e);let jt=V.get(_e.method),yt,Ht;jt&&(yt=jt.type,Ht=jt.handler);let Er=Date.now();if(Ht||z){let rr=_e.id??String(Date.now()),Ot=k.is(Me.receiver)?Me.receiver.createCancellationTokenSource(rr):Me.receiver.createCancellationTokenSource(_e);_e.id!==null&&de.has(_e.id)&&Ot.cancel(),_e.id!==null&&ce.set(rr,Ot);try{let Zt;if(Ht)if(_e.params===void 0){if(yt!==void 0&&yt.numberOfParams!==0){nt(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${_e.method} defines ${yt.numberOfParams} params but received none.`),_e.method,Er);return}Zt=Ht(Ot.token)}else if(Array.isArray(_e.params)){if(yt!==void 0&&yt.parameterStructures===n.ParameterStructures.byName){nt(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${_e.method} defines parameters by name but received parameters by position`),_e.method,Er);return}Zt=Ht(..._e.params,Ot.token)}else{if(yt!==void 0&&yt.parameterStructures===n.ParameterStructures.byPosition){nt(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${_e.method} defines parameters by position but received parameters by name`),_e.method,Er);return}Zt=Ht(_e.params,Ot.token)}else z&&(Zt=z(_e.method,_e.params,Ot.token));let Je=Zt;Zt?Je.then?Je.then(ut=>{ce.delete(rr),Ze(ut,_e.method,Er)},ut=>{ce.delete(rr),ut instanceof n.ResponseError?nt(ut,_e.method,Er):ut&&r.string(ut.message)?nt(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${_e.method} failed with message: ${ut.message}`),_e.method,Er):nt(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${_e.method} failed unexpectedly without providing any details.`),_e.method,Er)}):(ce.delete(rr),Ze(Zt,_e.method,Er)):(ce.delete(rr),ft(Zt,_e.method,Er))}catch(Zt){ce.delete(rr),Zt instanceof n.ResponseError?Ze(Zt,_e.method,Er):Zt&&r.string(Zt.message)?nt(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${_e.method} failed with message: ${Zt.message}`),_e.method,Er):nt(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${_e.method} failed unexpectedly without providing any details.`),_e.method,Er)}}else nt(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${_e.method}`),_e.method,Er)}A(we,"handleRequest");function ke(_e){if(!H())if(_e.id===null)_e.error?B.error(`Received response message without id: Error is: +${JSON.stringify(_e.error,void 0,4)}`):B.error("Received response message without id. No further error information provided.");else{let Ze=_e.id,nt=te.get(Ze);if($e(_e,nt),nt!==void 0){te.delete(Ze);try{if(_e.error){let ft=_e.error;nt.reject(new n.ResponseError(ft.code,ft.message,ft.data))}else if(_e.result!==void 0)nt.resolve(_e.result);else throw new Error("Should never happen.")}catch(ft){ft.message?B.error(`Response handler '${nt.method}' failed with message: ${ft.message}`):B.error(`Response handler '${nt.method}' failed unexpectedly.`)}}}}A(ke,"handleResponse");function Se(_e){if(H())return;let Ze,nt;if(_e.method===o.type.method){let ft=_e.params.id;de.delete(ft),lt(_e);return}else{let ft=ee.get(_e.method);ft&&(nt=ft.handler,Ze=ft.type)}if(nt||j)try{if(lt(_e),nt)if(_e.params===void 0)Ze!==void 0&&Ze.numberOfParams!==0&&Ze.parameterStructures!==n.ParameterStructures.byName&&B.error(`Notification ${_e.method} defines ${Ze.numberOfParams} params but received none.`),nt();else if(Array.isArray(_e.params)){let ft=_e.params;_e.method===u.type.method&&ft.length===2&&l.is(ft[0])?nt({token:ft[0],value:ft[1]}):(Ze!==void 0&&(Ze.parameterStructures===n.ParameterStructures.byName&&B.error(`Notification ${_e.method} defines parameters by name but received parameters by position`),Ze.numberOfParams!==_e.params.length&&B.error(`Notification ${_e.method} defines ${Ze.numberOfParams} params but received ${ft.length} arguments`)),nt(...ft))}else Ze!==void 0&&Ze.parameterStructures===n.ParameterStructures.byPosition&&B.error(`Notification ${_e.method} defines parameters by position but received parameters by name`),nt(_e.params);else j&&j(_e.method,_e.params)}catch(ft){ft.message?B.error(`Notification handler '${_e.method}' failed with message: ${ft.message}`):B.error(`Notification handler '${_e.method}' failed unexpectedly.`)}else me.fire(_e)}A(Se,"handleNotification");function Ne(_e){if(!_e){B.error("Received empty message.");return}B.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(_e,null,4)}`);let Ze=_e;if(r.string(Ze.id)||r.number(Ze.id)){let nt=Ze.id,ft=te.get(nt);ft&&ft.reject(new Error("The received response has neither a result nor an error property."))}}A(Ne,"handleInvalidMessage");function Ae(_e){if(_e!=null)switch(ue){case d.Verbose:return JSON.stringify(_e,null,4);case d.Compact:return JSON.stringify(_e);default:return}}A(Ae,"stringifyTrace");function Fe(_e){if(!(ue===d.Off||!ve))if(Re===g.Text){let Ze;(ue===d.Verbose||ue===d.Compact)&&_e.params&&(Ze=`Params: ${Ae(_e.params)} + +`),ve.log(`Sending request '${_e.method} - (${_e.id})'.`,Ze)}else at("send-request",_e)}A(Fe,"traceSendingRequest");function Pe(_e){if(!(ue===d.Off||!ve))if(Re===g.Text){let Ze;(ue===d.Verbose||ue===d.Compact)&&(_e.params?Ze=`Params: ${Ae(_e.params)} `:Ze=`No parameters provided. -`),fe.log(`Sending notification '${me.method}'.`,Ze)}else it("send-notification",me)}S(De,"traceSendingNotification");function Ye(me,Ze,rt){if(!(te===d.Off||!fe))if(xe===g.Text){let at;(te===d.Verbose||te===d.Compact)&&(me.error&&me.error.data?at=`Error data: ${Re(me.error.data)} +`),ve.log(`Sending notification '${_e.method}'.`,Ze)}else at("send-notification",_e)}A(Pe,"traceSendingNotification");function We(_e,Ze,nt){if(!(ue===d.Off||!ve))if(Re===g.Text){let ft;(ue===d.Verbose||ue===d.Compact)&&(_e.error&&_e.error.data?ft=`Error data: ${Ae(_e.error.data)} -`:me.result?at=`Result: ${Re(me.result)} +`:_e.result?ft=`Result: ${Ae(_e.result)} -`:me.error===void 0&&(at=`No result returned. +`:_e.error===void 0&&(ft=`No result returned. -`)),fe.log(`Sending response '${Ze} - (${me.id})'. Processing request took ${Date.now()-rt}ms`,at)}else it("send-response",me)}S(Ye,"traceSendingResponse");function ue(me){if(!(te===d.Off||!fe))if(xe===g.Text){let Ze;(te===d.Verbose||te===d.Compact)&&me.params&&(Ze=`Params: ${Re(me.params)} +`)),ve.log(`Sending response '${Ze} - (${_e.id})'. Processing request took ${Date.now()-nt}ms`,ft)}else at("send-response",_e)}A(We,"traceSendingResponse");function be(_e){if(!(ue===d.Off||!ve))if(Re===g.Text){let Ze;(ue===d.Verbose||ue===d.Compact)&&_e.params&&(Ze=`Params: ${Ae(_e.params)} -`),fe.log(`Received request '${me.method} - (${me.id})'.`,Ze)}else it("receive-request",me)}S(ue,"traceReceivedRequest");function Tt(me){if(!(te===d.Off||!fe||me.method===y.type.method))if(xe===g.Text){let Ze;(te===d.Verbose||te===d.Compact)&&(me.params?Ze=`Params: ${Re(me.params)} +`),ve.log(`Received request '${_e.method} - (${_e.id})'.`,Ze)}else at("receive-request",_e)}A(be,"traceReceivedRequest");function lt(_e){if(!(ue===d.Off||!ve||_e.method===y.type.method))if(Re===g.Text){let Ze;(ue===d.Verbose||ue===d.Compact)&&(_e.params?Ze=`Params: ${Ae(_e.params)} `:Ze=`No parameters provided. -`),fe.log(`Received notification '${me.method}'.`,Ze)}else it("receive-notification",me)}S(Tt,"traceReceivedNotification");function be(me,Ze){if(!(te===d.Off||!fe))if(xe===g.Text){let rt;if((te===d.Verbose||te===d.Compact)&&(me.error&&me.error.data?rt=`Error data: ${Re(me.error.data)} +`),ve.log(`Received notification '${_e.method}'.`,Ze)}else at("receive-notification",_e)}A(lt,"traceReceivedNotification");function $e(_e,Ze){if(!(ue===d.Off||!ve))if(Re===g.Text){let nt;if((ue===d.Verbose||ue===d.Compact)&&(_e.error&&_e.error.data?nt=`Error data: ${Ae(_e.error.data)} -`:me.result?rt=`Result: ${Re(me.result)} +`:_e.result?nt=`Result: ${Ae(_e.result)} -`:me.error===void 0&&(rt=`No result returned. +`:_e.error===void 0&&(nt=`No result returned. -`)),Ze){let at=me.error?` Request failed: ${me.error.message} (${me.error.code}).`:"";fe.log(`Received response '${Ze.method} - (${me.id})' in ${Date.now()-Ze.timerStart}ms.${at}`,rt)}else fe.log(`Received response ${me.id} without active response promise.`,rt)}else it("receive-response",me)}S(be,"traceReceivedResponse");function it(me,Ze){if(!fe||te===d.Off)return;let rt={isLSPMessage:!0,type:me,message:Ze,timestamp:Date.now()};fe.log(rt)}S(it,"logLSPMessage");function ft(){if(Ue())throw new x(v.Closed,"Connection is closed.");if(ge())throw new x(v.Disposed,"Connection is disposed.")}S(ft,"throwIfClosedOrDisposed");function Dt(){if(qe())throw new x(v.AlreadyListening,"Connection is already listening")}S(Dt,"throwIfListening");function mt(){if(!qe())throw new Error("Call listen() first.")}S(mt,"throwIfNotListening");function vt(me){return me===void 0?null:me}S(vt,"undefinedToNull");function ut(me){if(me!==null)return me}S(ut,"nullToUndefined");function oe(me){return me!=null&&!Array.isArray(me)&&typeof me=="object"}S(oe,"isNamedParam");function ot(me,Ze){switch(me){case i.ParameterStructures.auto:return oe(Ze)?ut(Ze):[vt(Ze)];case i.ParameterStructures.byName:if(!oe(Ze))throw new Error("Received parameters by name but param is not an object literal.");return ut(Ze);case i.ParameterStructures.byPosition:return[vt(Ze)];default:throw new Error(`Unknown parameter structure ${me.toString()}`)}}S(ot,"computeSingleParam");function ct(me,Ze){let rt,at=me.numberOfParams;switch(at){case 0:rt=void 0;break;case 1:rt=ot(me.parameterStructures,Ze[0]);break;default:rt=[];for(let _t=0;_t{ft();let rt,at;if(r.string(me)){rt=me;let At=Ze[0],Mt=0,ur=i.ParameterStructures.auto;i.ParameterStructures.is(At)&&(Mt=1,ur=At);let Yt=Ze.length,Vt=Yt-Mt;switch(Vt){case 0:at=void 0;break;case 1:at=ot(ur,Ze[Mt]);break;default:if(ur===i.ParameterStructures.byName)throw new Error(`Received ${Vt} parameters for 'by Name' notification parameter structure.`);at=Ze.slice(Mt,Yt).map(Jt=>vt(Jt));break}}else{let At=Ze;rt=me.method,at=ct(me,At)}let _t={jsonrpc:$,method:rt,params:at};return De(_t),R.write(_t).catch(At=>{throw B.error("Sending notification failed."),At})},"sendNotification"),onNotification:S((me,Ze)=>{ft();let rt;return r.func(me)?j=me:Ze&&(r.string(me)?(rt=me,H.set(me,{type:void 0,handler:Ze})):(rt=me.method,H.set(me.method,{type:me,handler:Ze}))),{dispose:S(()=>{rt!==void 0?H.delete(rt):j=void 0},"dispose")}},"onNotification"),onProgress:S((me,Ze,rt)=>{if(Q.has(Ze))throw new Error(`Progress handler for token ${Ze} already registered`);return Q.set(Ze,rt),{dispose:S(()=>{Q.delete(Ze)},"dispose")}},"onProgress"),sendProgress:S((me,Ze,rt)=>et.sendNotification(u.type,{token:Ze,value:rt}),"sendProgress"),onUnhandledProgress:Ie.event,sendRequest:S((me,...Ze)=>{ft(),mt();let rt,at,_t;if(r.string(me)){rt=me;let Yt=Ze[0],Vt=Ze[Ze.length-1],Jt=0,cr=i.ParameterStructures.auto;i.ParameterStructures.is(Yt)&&(Jt=1,cr=Yt);let Ct=Ze.length;s.CancellationToken.is(Vt)&&(Ct=Ct-1,_t=Vt);let Ee=Ct-Jt;switch(Ee){case 0:at=void 0;break;case 1:at=ot(cr,Ze[Jt]);break;default:if(cr===i.ParameterStructures.byName)throw new Error(`Received ${Ee} parameters for 'by Name' request parameter structure.`);at=Ze.slice(Jt,Ct).map(lt=>vt(lt));break}}else{let Yt=Ze;rt=me.method,at=ct(me,Yt);let Vt=me.numberOfParams;_t=s.CancellationToken.is(Yt[Vt])?Yt[Vt]:void 0}let At=M++,Mt;_t&&(Mt=_t.onCancellationRequested(()=>{let Yt=pe.sender.sendCancellation(et,At);return Yt===void 0?(B.log(`Received no promise from cancellation strategy when cancelling id ${At}`),Promise.resolve()):Yt.catch(()=>{B.log(`Sending cancellation messages for id ${At} failed`)})}));let ur={jsonrpc:$,id:At,method:rt,params:at};return We(ur),typeof pe.sender.enableCancellation=="function"&&pe.sender.enableCancellation(ur),new Promise(async(Yt,Vt)=>{let Jt=S(Ee=>{Yt(Ee),pe.sender.cleanup(At),Mt?.dispose()},"resolveWithCleanup"),cr=S(Ee=>{Vt(Ee),pe.sender.cleanup(At),Mt?.dispose()},"rejectWithCleanup"),Ct={method:rt,timerStart:Date.now(),resolve:Jt,reject:cr};try{await R.write(ur),J.set(At,Ct)}catch(Ee){throw B.error("Sending request failed."),Ct.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,Ee.message?Ee.message:"Unknown reason")),Ee}})},"sendRequest"),onRequest:S((me,Ze)=>{ft();let rt=null;return f.is(me)?(rt=void 0,G=me):r.string(me)?(rt=null,Ze!==void 0&&(rt=me,U.set(me,{handler:Ze,type:void 0}))):Ze!==void 0&&(rt=me.method,U.set(me.method,{type:me,handler:Ze})),{dispose:S(()=>{rt!==null&&(rt!==void 0?U.delete(rt):G=void 0)},"dispose")}},"onRequest"),hasPendingResponse:S(()=>J.size>0,"hasPendingResponse"),trace:S(async(me,Ze,rt)=>{let at=!1,_t=g.Text;rt!==void 0&&(r.boolean(rt)?at=rt:(at=rt.sendNotification||!1,_t=rt.traceFormat||g.Text)),te=me,xe=_t,te===d.Off?fe=void 0:fe=Ze,at&&!Ue()&&!ge()&&await et.sendNotification(m.type,{value:d.toString(me)})},"trace"),onError:Me.event,onClose:ke.event,onUnhandledNotification:Ce.event,onDispose:Pe.event,end:S(()=>{R.end()},"end"),dispose:S(()=>{if(ge())return;Se=O.Disposed,Pe.fire(void 0);let me=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Ze of J.values())Ze.reject(me);J=new Map,ie=new Map,re=new Set,se=new n.LinkedMap,r.func(R.dispose)&&R.dispose(),r.func(_.dispose)&&_.dispose()},"dispose"),listen:S(()=>{ft(),Dt(),Se=O.Listening,_.listen(Ve)},"listen"),inspect:S(()=>{(0,t.default)().console.log("inspect")},"inspect")};return et.onNotification(y.type,me=>{if(te===d.Off||!fe)return;let Ze=te===d.Verbose||te===d.Compact;fe.log(me.message,Ze?me.verbose:void 0)}),et.onNotification(u.type,me=>{let Ze=Q.get(me.token);Ze?Ze(me.value):Ie.fire(me)}),et}S(L,"createMessageConnection"),e.createMessageConnection=L}}),jB=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=Yve();Object.defineProperty(e,"Message",{enumerable:!0,get:S(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:S(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:S(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:S(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:S(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:S(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:S(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:S(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:S(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:S(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:S(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:S(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:S(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:S(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:S(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:S(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:S(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:S(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:S(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:S(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:S(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:S(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:S(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:S(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:S(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:S(function(){return t.ParameterStructures},"get")});var r=Xve();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:S(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:S(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:S(function(){return r.Touch},"get")});var i=fst();Object.defineProperty(e,"Disposable",{enumerable:!0,get:S(function(){return i.Disposable},"get")});var n=$y();Object.defineProperty(e,"Event",{enumerable:!0,get:S(function(){return n.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:S(function(){return n.Emitter},"get")});var a=V6();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:S(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:S(function(){return a.CancellationToken},"get")});var s=dst();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:S(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:S(function(){return s.SharedArrayReceiverStrategy},"get")});var o=pst();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:S(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:S(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:S(function(){return o.ReadableStreamMessageReader},"get")});var l=gst();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:S(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:S(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:S(function(){return l.WriteableStreamMessageWriter},"get")});var u=mst();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:S(function(){return u.AbstractMessageBuffer},"get")});var h=yst();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:S(function(){return h.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:S(function(){return h.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:S(function(){return h.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:S(function(){return h.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:S(function(){return h.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:S(function(){return h.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:S(function(){return h.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:S(function(){return h.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:S(function(){return h.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:S(function(){return h.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:S(function(){return h.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:S(function(){return h.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:S(function(){return h.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:S(function(){return h.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:S(function(){return h.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:S(function(){return h.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:S(function(){return h.MessageStrategy},"get")});var f=mg();e.RAL=f.default}}),vst=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=jB(),r=class Qve extends t.AbstractMessageBuffer{static{S(this,"MessageBuffer")}constructor(u="utf-8"){super(u),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return Qve.emptyBuffer}fromString(u,h){return new TextEncoder().encode(u)}toString(u,h){return h==="ascii"?this.asciiDecoder.decode(u):new TextDecoder(h).decode(u)}asNative(u,h){return h===void 0?u:u.slice(0,h)}allocNative(u){return new Uint8Array(u)}};r.emptyBuffer=new Uint8Array(0);var i=class{static{S(this,"ReadableStreamWrapper")}constructor(l){this.socket=l,this._onData=new t.Emitter,this._messageListener=u=>{u.data.arrayBuffer().then(f=>{this._onData.fire(new Uint8Array(f))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(l){return this.socket.addEventListener("close",l),t.Disposable.create(()=>this.socket.removeEventListener("close",l))}onError(l){return this.socket.addEventListener("error",l),t.Disposable.create(()=>this.socket.removeEventListener("error",l))}onEnd(l){return this.socket.addEventListener("end",l),t.Disposable.create(()=>this.socket.removeEventListener("end",l))}onData(l){return this._onData.event(l)}},n=class{static{S(this,"WritableStreamWrapper")}constructor(l){this.socket=l}onClose(l){return this.socket.addEventListener("close",l),t.Disposable.create(()=>this.socket.removeEventListener("close",l))}onError(l){return this.socket.addEventListener("error",l),t.Disposable.create(()=>this.socket.removeEventListener("error",l))}onEnd(l){return this.socket.addEventListener("end",l),t.Disposable.create(()=>this.socket.removeEventListener("end",l))}write(l,u){if(typeof l=="string"){if(u!==void 0&&u!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u}`);this.socket.send(l)}else this.socket.send(l);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:S(l=>new r(l),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:S((l,u)=>{if(u.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u.charset}`);return Promise.resolve(a.encode(JSON.stringify(l,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:S((l,u)=>{if(!(l instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(u.charset).decode(l)))},"decode")})}),stream:Object.freeze({asReadableStream:S(l=>new i(l),"asReadableStream"),asWritableStream:S(l=>new n(l),"asWritableStream")}),console,timer:Object.freeze({setTimeout(l,u,...h){let f=setTimeout(l,u,...h);return{dispose:S(()=>clearTimeout(f),"dispose")}},setImmediate(l,...u){let h=setTimeout(l,0,...u);return{dispose:S(()=>clearTimeout(h),"dispose")}},setInterval(l,u,...h){let f=setInterval(l,u,...h);return{dispose:S(()=>clearInterval(f),"dispose")}}})});function o(){return s}S(o,"RIL"),(function(l){function u(){t.RAL.install(s)}S(u,"install"),l.install=u})(o||(o={})),e.default=o}}),zy=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(l,u,h,f){f===void 0&&(f=h);var d=Object.getOwnPropertyDescriptor(u,h);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:S(function(){return u[h]},"get")}),Object.defineProperty(l,f,d)}):(function(l,u,h,f){f===void 0&&(f=h),l[f]=u[h]})),r=e&&e.__exportStar||function(l,u){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(u,h)&&t(u,l,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var i=vst();i.default.install();var n=jB();r(jB(),e);var a=class extends n.AbstractMessageReader{static{S(this,"BrowserMessageReader")}constructor(l){super(),this._onData=new n.Emitter,this._messageListener=u=>{this._onData.fire(u.data)},l.addEventListener("error",u=>this.fireError(u)),l.onmessage=this._messageListener}listen(l){return this._onData.event(l)}};e.BrowserMessageReader=a;var s=class extends n.AbstractMessageWriter{static{S(this,"BrowserMessageWriter")}constructor(l){super(),this.port=l,this.errorCount=0,l.addEventListener("error",u=>this.fireError(u))}write(l){try{return this.port.postMessage(l),Promise.resolve()}catch(u){return this.handleError(u,l),Promise.reject(u)}}handleError(l,u){this.errorCount++,this.fireError(l,u,this.errorCount)}end(){}};e.BrowserMessageWriter=s;function o(l,u,h,f){return h===void 0&&(h=n.NullLogger),n.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,n.createMessageConnection)(l,u,h,f)}S(o,"createMessageConnection"),e.createMessageConnection=o}}),aye=_r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=zy()}}),Zi=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=zy(),r;(function(l){l.clientToServer="clientToServer",l.serverToClient="serverToClient",l.both="both"})(r||(e.MessageDirection=r={}));var i=class{static{S(this,"RegistrationType")}constructor(l){this.method=l}};e.RegistrationType=i;var n=class extends t.RequestType0{static{S(this,"ProtocolRequestType0")}constructor(l){super(l)}};e.ProtocolRequestType0=n;var a=class extends t.RequestType{static{S(this,"ProtocolRequestType")}constructor(l){super(l,t.ParameterStructures.byName)}};e.ProtocolRequestType=a;var s=class extends t.NotificationType0{static{S(this,"ProtocolNotificationType0")}constructor(l){super(l)}};e.ProtocolNotificationType0=s;var o=class extends t.NotificationType{static{S(this,"ProtocolNotificationType")}constructor(l){super(l,t.ParameterStructures.byName)}};e.ProtocolNotificationType=o}}),HF=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(h){return h===!0||h===!1}S(t,"boolean"),e.boolean=t;function r(h){return typeof h=="string"||h instanceof String}S(r,"string"),e.string=r;function i(h){return typeof h=="number"||h instanceof Number}S(i,"number"),e.number=i;function n(h){return h instanceof Error}S(n,"error"),e.error=n;function a(h){return typeof h=="function"}S(a,"func"),e.func=a;function s(h){return Array.isArray(h)}S(s,"array"),e.array=s;function o(h){return s(h)&&h.every(f=>r(f))}S(o,"stringArray"),e.stringArray=o;function l(h,f){return Array.isArray(h)&&h.every(f)}S(l,"typedArray"),e.typedArray=l;function u(h){return h!==null&&typeof h=="object"}S(u,"objectLiteral"),e.objectLiteral=u}}),bst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=Zi(),r;(function(i){i.method="textDocument/implementation",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.ImplementationRequest=r={}))}}),xst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=Zi(),r;(function(i){i.method="textDocument/typeDefinition",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.TypeDefinitionRequest=r={}))}}),Tst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=Zi(),r;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType0(n.method)})(r||(e.WorkspaceFoldersRequest=r={}));var i;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolNotificationType(n.method)})(i||(e.DidChangeWorkspaceFoldersNotification=i={}))}}),wst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=Zi(),r;(function(i){i.method="workspace/configuration",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType(i.method)})(r||(e.ConfigurationRequest=r={}))}}),kst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=Zi(),r;(function(n){n.method="textDocument/documentColor",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DocumentColorRequest=r={}));var i;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(i||(e.ColorPresentationRequest=i={}))}}),Cst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=Zi(),r;(function(n){n.method="textDocument/foldingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.FoldingRangeRequest=r={}));var i;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType0(n.method)})(i||(e.FoldingRangeRefreshRequest=i={}))}}),Sst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=Zi(),r;(function(i){i.method="textDocument/declaration",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.DeclarationRequest=r={}))}}),Est=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=Zi(),r;(function(i){i.method="textDocument/selectionRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.SelectionRangeRequest=r={}))}}),Ast=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=zy(),r=Zi(),i;(function(s){s.type=new t.ProgressType;function o(l){return l===s.type}S(o,"is"),s.is=o})(i||(e.WorkDoneProgress=i={}));var n;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=r.MessageDirection.serverToClient,s.type=new r.ProtocolRequestType(s.method)})(n||(e.WorkDoneProgressCreateRequest=n={}));var a;(function(s){s.method="window/workDoneProgress/cancel",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolNotificationType(s.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),_st=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=Zi(),r;(function(a){a.method="textDocument/prepareCallHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var i;(function(a){a.method="callHierarchy/incomingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.CallHierarchyIncomingCallsRequest=i={}));var n;(function(a){a.method="callHierarchy/outgoingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.CallHierarchyOutgoingCallsRequest=n={}))}}),Lst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=Zi(),r;(function(l){l.Relative="relative"})(r||(e.TokenFormat=r={}));var i;(function(l){l.method="textDocument/semanticTokens",l.type=new t.RegistrationType(l.method)})(i||(e.SemanticTokensRegistrationType=i={}));var n;(function(l){l.method="textDocument/semanticTokens/full",l.messageDirection=t.MessageDirection.clientToServer,l.type=new t.ProtocolRequestType(l.method),l.registrationMethod=i.method})(n||(e.SemanticTokensRequest=n={}));var a;(function(l){l.method="textDocument/semanticTokens/full/delta",l.messageDirection=t.MessageDirection.clientToServer,l.type=new t.ProtocolRequestType(l.method),l.registrationMethod=i.method})(a||(e.SemanticTokensDeltaRequest=a={}));var s;(function(l){l.method="textDocument/semanticTokens/range",l.messageDirection=t.MessageDirection.clientToServer,l.type=new t.ProtocolRequestType(l.method),l.registrationMethod=i.method})(s||(e.SemanticTokensRangeRequest=s={}));var o;(function(l){l.method="workspace/semanticTokens/refresh",l.messageDirection=t.MessageDirection.serverToClient,l.type=new t.ProtocolRequestType0(l.method)})(o||(e.SemanticTokensRefreshRequest=o={}))}}),Rst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=Zi(),r;(function(i){i.method="window/showDocument",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType(i.method)})(r||(e.ShowDocumentRequest=r={}))}}),Ist=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Zi(),r;(function(i){i.method="textDocument/linkedEditingRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),Dst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=Zi(),r;(function(u){u.file="file",u.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var i;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(i||(e.WillCreateFilesRequest=i={}));var n;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(n||(e.DidCreateFilesNotification=n={}));var a;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(a||(e.WillRenameFilesRequest=a={}));var s;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(s||(e.DidRenameFilesNotification=s={}));var o;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(o||(e.DidDeleteFilesNotification=o={}));var l;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(l||(e.WillDeleteFilesRequest=l={}))}}),Nst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Zi(),r;(function(a){a.document="document",a.project="project",a.group="group",a.scheme="scheme",a.global="global"})(r||(e.UniquenessLevel=r={}));var i;(function(a){a.$import="import",a.$export="export",a.local="local"})(i||(e.MonikerKind=i={}));var n;(function(a){a.method="textDocument/moniker",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.MonikerRequest=n={}))}}),Mst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Zi(),r;(function(a){a.method="textDocument/prepareTypeHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var i;(function(a){a.method="typeHierarchy/supertypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.TypeHierarchySupertypesRequest=i={}));var n;(function(a){a.method="typeHierarchy/subtypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.TypeHierarchySubtypesRequest=n={}))}}),Ost=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=Zi(),r;(function(n){n.method="textDocument/inlineValue",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.InlineValueRequest=r={}));var i;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType0(n.method)})(i||(e.InlineValueRefreshRequest=i={}))}}),Pst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=Zi(),r;(function(a){a.method="textDocument/inlayHint",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlayHintRequest=r={}));var i;(function(a){a.method="inlayHint/resolve",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.InlayHintResolveRequest=i={}));var n;(function(a){a.method="workspace/inlayHint/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.InlayHintRefreshRequest=n={}))}}),Bst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=zy(),r=HF(),i=Zi(),n;(function(u){function h(f){let d=f;return d&&r.boolean(d.retriggerRequest)}S(h,"is"),u.is=h})(n||(e.DiagnosticServerCancellationData=n={}));var a;(function(u){u.Full="full",u.Unchanged="unchanged"})(a||(e.DocumentDiagnosticReportKind=a={}));var s;(function(u){u.method="textDocument/diagnostic",u.messageDirection=i.MessageDirection.clientToServer,u.type=new i.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(s||(e.DocumentDiagnosticRequest=s={}));var o;(function(u){u.method="workspace/diagnostic",u.messageDirection=i.MessageDirection.clientToServer,u.type=new i.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(o||(e.WorkspaceDiagnosticRequest=o={}));var l;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=i.MessageDirection.serverToClient,u.type=new i.ProtocolRequestType0(u.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),Fst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(XT(),UF(q6)),r=HF(),i=Zi(),n;(function(g){g.Markup=1,g.Code=2;function m(y){return y===1||y===2}S(m,"is"),g.is=m})(n||(e.NotebookCellKind=n={}));var a;(function(g){function m(x,T){let C={executionOrder:x};return(T===!0||T===!1)&&(C.success=T),C}S(m,"create"),g.create=m;function y(x){let T=x;return r.objectLiteral(T)&&t.uinteger.is(T.executionOrder)&&(T.success===void 0||r.boolean(T.success))}S(y,"is"),g.is=y;function v(x,T){return x===T?!0:x==null||T===null||T===void 0?!1:x.executionOrder===T.executionOrder&&x.success===T.success}S(v,"equals"),g.equals=v})(a||(e.ExecutionSummary=a={}));var s;(function(g){function m(T,C){return{kind:T,document:C}}S(m,"create"),g.create=m;function y(T){let C=T;return r.objectLiteral(C)&&n.is(C.kind)&&t.DocumentUri.is(C.document)&&(C.metadata===void 0||r.objectLiteral(C.metadata))}S(y,"is"),g.is=y;function v(T,C){let w=new Set;return T.document!==C.document&&w.add("document"),T.kind!==C.kind&&w.add("kind"),T.executionSummary!==C.executionSummary&&w.add("executionSummary"),(T.metadata!==void 0||C.metadata!==void 0)&&!x(T.metadata,C.metadata)&&w.add("metadata"),(T.executionSummary!==void 0||C.executionSummary!==void 0)&&!a.equals(T.executionSummary,C.executionSummary)&&w.add("executionSummary"),w}S(v,"diff"),g.diff=v;function x(T,C){if(T===C)return!0;if(T==null||C===null||C===void 0||typeof T!=typeof C||typeof T!="object")return!1;let w=Array.isArray(T),k=Array.isArray(C);if(w!==k)return!1;if(w&&k){if(T.length!==C.length)return!1;for(let E=0;E0}S(ot,"hasId"),oe.hasId=ot})(M||(e.StaticRegistrationOptions=M={}));var F;(function(oe){function ot(ct){let et=ct;return et&&(et.documentSelector===null||L.is(et.documentSelector))}S(ot,"is"),oe.is=ot})(F||(e.TextDocumentRegistrationOptions=F={}));var z;(function(oe){function ot(et){let me=et;return i.objectLiteral(me)&&(me.workDoneProgress===void 0||i.boolean(me.workDoneProgress))}S(ot,"is"),oe.is=ot;function ct(et){let me=et;return me&&i.boolean(me.workDoneProgress)}S(ct,"hasWorkDoneProgress"),oe.hasWorkDoneProgress=ct})(z||(e.WorkDoneProgressOptions=z={}));var $;(function(oe){oe.method="initialize",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})($||(e.InitializeRequest=$={}));var G;(function(oe){oe.unknownProtocolVersion=1})(G||(e.InitializeErrorCodes=G={}));var U;(function(oe){oe.method="initialized",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(U||(e.InitializedNotification=U={}));var j;(function(oe){oe.method="shutdown",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType0(oe.method)})(j||(e.ShutdownRequest=j={}));var H;(function(oe){oe.method="exit",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType0(oe.method)})(H||(e.ExitNotification=H={}));var Q;(function(oe){oe.method="workspace/didChangeConfiguration",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(Q||(e.DidChangeConfigurationNotification=Q={}));var Y;(function(oe){oe.Error=1,oe.Warning=2,oe.Info=3,oe.Log=4,oe.Debug=5})(Y||(e.MessageType=Y={}));var se;(function(oe){oe.method="window/showMessage",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method)})(se||(e.ShowMessageNotification=se={}));var J;(function(oe){oe.method="window/showMessageRequest",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolRequestType(oe.method)})(J||(e.ShowMessageRequest=J={}));var re;(function(oe){oe.method="window/logMessage",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method)})(re||(e.LogMessageNotification=re={}));var ie;(function(oe){oe.method="telemetry/event",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method)})(ie||(e.TelemetryEventNotification=ie={}));var te;(function(oe){oe.None=0,oe.Full=1,oe.Incremental=2})(te||(e.TextDocumentSyncKind=te={}));var xe;(function(oe){oe.method="textDocument/didOpen",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(xe||(e.DidOpenTextDocumentNotification=xe={}));var fe;(function(oe){function ot(et){let me=et;return me!=null&&typeof me.text=="string"&&me.range!==void 0&&(me.rangeLength===void 0||typeof me.rangeLength=="number")}S(ot,"isIncremental"),oe.isIncremental=ot;function ct(et){let me=et;return me!=null&&typeof me.text=="string"&&me.range===void 0&&me.rangeLength===void 0}S(ct,"isFull"),oe.isFull=ct})(fe||(e.TextDocumentContentChangeEvent=fe={}));var Se;(function(oe){oe.method="textDocument/didChange",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(Se||(e.DidChangeTextDocumentNotification=Se={}));var Me;(function(oe){oe.method="textDocument/didClose",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(Me||(e.DidCloseTextDocumentNotification=Me={}));var ke;(function(oe){oe.method="textDocument/didSave",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(ke||(e.DidSaveTextDocumentNotification=ke={}));var Ce;(function(oe){oe.Manual=1,oe.AfterDelay=2,oe.FocusOut=3})(Ce||(e.TextDocumentSaveReason=Ce={}));var Ie;(function(oe){oe.method="textDocument/willSave",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(Ie||(e.WillSaveTextDocumentNotification=Ie={}));var Pe;(function(oe){oe.method="textDocument/willSaveWaitUntil",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Pe||(e.WillSaveTextDocumentWaitUntilRequest=Pe={}));var pe;(function(oe){oe.method="workspace/didChangeWatchedFiles",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolNotificationType(oe.method)})(pe||(e.DidChangeWatchedFilesNotification=pe={}));var Je;(function(oe){oe.Created=1,oe.Changed=2,oe.Deleted=3})(Je||(e.FileChangeType=Je={}));var Te;(function(oe){function ot(ct){let et=ct;return i.objectLiteral(et)&&(r.URI.is(et.baseUri)||r.WorkspaceFolder.is(et.baseUri))&&i.string(et.pattern)}S(ot,"is"),oe.is=ot})(Te||(e.RelativePattern=Te={}));var Be;(function(oe){oe.Create=1,oe.Change=2,oe.Delete=4})(Be||(e.WatchKind=Be={}));var He;(function(oe){oe.method="textDocument/publishDiagnostics",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method)})(He||(e.PublishDiagnosticsNotification=He={}));var nt;(function(oe){oe.Invoked=1,oe.TriggerCharacter=2,oe.TriggerForIncompleteCompletions=3})(nt||(e.CompletionTriggerKind=nt={}));var qe;(function(oe){oe.method="textDocument/completion",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(qe||(e.CompletionRequest=qe={}));var Ue;(function(oe){oe.method="completionItem/resolve",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Ue||(e.CompletionResolveRequest=Ue={}));var ge;(function(oe){oe.method="textDocument/hover",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(ge||(e.HoverRequest=ge={}));var ce;(function(oe){oe.Invoked=1,oe.TriggerCharacter=2,oe.ContentChange=3})(ce||(e.SignatureHelpTriggerKind=ce={}));var V;(function(oe){oe.method="textDocument/signatureHelp",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(V||(e.SignatureHelpRequest=V={}));var le;(function(oe){oe.method="textDocument/definition",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(le||(e.DefinitionRequest=le={}));var X;(function(oe){oe.method="textDocument/references",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(X||(e.ReferencesRequest=X={}));var he;(function(oe){oe.method="textDocument/documentHighlight",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(he||(e.DocumentHighlightRequest=he={}));var Z;(function(oe){oe.method="textDocument/documentSymbol",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Z||(e.DocumentSymbolRequest=Z={}));var Ve;(function(oe){oe.method="textDocument/codeAction",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Ve||(e.CodeActionRequest=Ve={}));var ve;(function(oe){oe.method="codeAction/resolve",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(ve||(e.CodeActionResolveRequest=ve={}));var Oe;(function(oe){oe.method="workspace/symbol",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Oe||(e.WorkspaceSymbolRequest=Oe={}));var Ae;(function(oe){oe.method="workspaceSymbol/resolve",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Ae||(e.WorkspaceSymbolResolveRequest=Ae={}));var Fe;(function(oe){oe.method="textDocument/codeLens",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Fe||(e.CodeLensRequest=Fe={}));var Re;(function(oe){oe.method="codeLens/resolve",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Re||(e.CodeLensResolveRequest=Re={}));var We;(function(oe){oe.method="workspace/codeLens/refresh",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolRequestType0(oe.method)})(We||(e.CodeLensRefreshRequest=We={}));var De;(function(oe){oe.method="textDocument/documentLink",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(De||(e.DocumentLinkRequest=De={}));var Ye;(function(oe){oe.method="documentLink/resolve",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Ye||(e.DocumentLinkResolveRequest=Ye={}));var ue;(function(oe){oe.method="textDocument/formatting",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(ue||(e.DocumentFormattingRequest=ue={}));var Tt;(function(oe){oe.method="textDocument/rangeFormatting",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Tt||(e.DocumentRangeFormattingRequest=Tt={}));var be;(function(oe){oe.method="textDocument/rangesFormatting",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(be||(e.DocumentRangesFormattingRequest=be={}));var it;(function(oe){oe.method="textDocument/onTypeFormatting",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(it||(e.DocumentOnTypeFormattingRequest=it={}));var ft;(function(oe){oe.Identifier=1})(ft||(e.PrepareSupportDefaultBehavior=ft={}));var Dt;(function(oe){oe.method="textDocument/rename",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(Dt||(e.RenameRequest=Dt={}));var mt;(function(oe){oe.method="textDocument/prepareRename",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(mt||(e.PrepareRenameRequest=mt={}));var vt;(function(oe){oe.method="workspace/executeCommand",oe.messageDirection=t.MessageDirection.clientToServer,oe.type=new t.ProtocolRequestType(oe.method)})(vt||(e.ExecuteCommandRequest=vt={}));var ut;(function(oe){oe.method="workspace/applyEdit",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolRequestType("workspace/applyEdit")})(ut||(e.ApplyWorkspaceEditRequest=ut={}))}}),Gst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=zy();function r(i,n,a,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(i,n,a,s)}S(r,"createProtocolConnection"),e.createProtocolConnection=r}}),qst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(a,s,o,l){l===void 0&&(l=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:S(function(){return s[o]},"get")}),Object.defineProperty(a,l,u)}):(function(a,s,o,l){l===void 0&&(l=o),a[l]=s[o]})),r=e&&e.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(zy(),e),r((XT(),UF(q6)),e),r(Zi(),e),r(zst(),e);var i=Gst();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:S(function(){return i.createProtocolConnection},"get")});var n;(function(a){a.lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800})(n||(e.LSPErrorCodes=n={}))}}),Vst=_r({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(a,s,o,l){l===void 0&&(l=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:S(function(){return s[o]},"get")}),Object.defineProperty(a,l,u)}):(function(a,s,o,l){l===void 0&&(l=o),a[l]=s[o]})),r=e&&e.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var i=aye();r(aye(),e),r(qst(),e);function n(a,s,o,l){return(0,i.createMessageConnection)(a,s,o,l)}S(n,"createProtocolConnection"),e.createProtocolConnection=n}}),Jve={};Ud(Jve,{AbstractAstReflection:()=>XF,AbstractCstNode:()=>Zz,AbstractLangiumParser:()=>Jz,AbstractParserErrorMessageProvider:()=>q3e,AbstractThreadedAsyncParser:()=>v1t,AstUtils:()=>KF,BiMap:()=>B6,Cancellation:()=>Li,CompositeCstNodeImpl:()=>$A,ContextCache:()=>HA,CstNodeBuilder:()=>F3e,CstUtils:()=>YF,DEFAULT_TOKENIZE_OPTIONS:()=>yG,DONE_RESULT:()=>us,DatatypeSymbol:()=>N6,DefaultAstNodeDescriptionProvider:()=>vSe,DefaultAstNodeLocator:()=>xSe,DefaultAsyncParser:()=>FSe,DefaultCommentProvider:()=>BSe,DefaultConfigurationProvider:()=>TSe,DefaultDocumentBuilder:()=>wSe,DefaultDocumentValidator:()=>ySe,DefaultHydrator:()=>zSe,DefaultIndexManager:()=>kSe,DefaultJsonSerializer:()=>dSe,DefaultLangiumDocumentFactory:()=>nSe,DefaultLangiumDocuments:()=>aSe,DefaultLangiumProfiler:()=>k1t,DefaultLexer:()=>vG,DefaultLexerErrorMessageProvider:()=>SSe,DefaultLinker:()=>sSe,DefaultNameProvider:()=>oSe,DefaultReferenceDescriptionProvider:()=>bSe,DefaultReferences:()=>lSe,DefaultScopeComputation:()=>cSe,DefaultScopeProvider:()=>fSe,DefaultServiceRegistry:()=>pSe,DefaultTokenBuilder:()=>qA,DefaultValueConverter:()=>sG,DefaultWorkspaceLock:()=>$Se,DefaultWorkspaceManager:()=>CSe,Deferred:()=>$h,Disposable:()=>hg,DisposableCache:()=>UA,DocumentCache:()=>hSe,DocumentState:()=>Br,DocumentValidator:()=>nl,EMPTY_SCOPE:()=>p1t,EMPTY_STREAM:()=>Ay,EmptyFileSystem:()=>hn,EmptyFileSystemProvider:()=>VSe,ErrorWithLocation:()=>Q6,GrammarAST:()=>r2e,GrammarUtils:()=>E$,IndentationAwareLexer:()=>x1t,IndentationAwareTokenBuilder:()=>qSe,JSDocDocumentationProvider:()=>PSe,LangiumCompletionParser:()=>V3e,LangiumParser:()=>G3e,LangiumParserErrorMessageProvider:()=>eG,LeafCstNodeImpl:()=>D6,LexingMode:()=>cg,MapScope:()=>d1t,Module:()=>RF,MultiMap:()=>zh,MultiMapScope:()=>uSe,OperationCancelled:()=>pu,ParserWorker:()=>b1t,ProfilingTask:()=>USe,Reduction:()=>DT,RefResolving:()=>z0,RegExpUtils:()=>_$,RootCstNodeImpl:()=>Qz,SimpleCache:()=>fG,StreamImpl:()=>du,StreamScope:()=>EF,TextDocument:()=>O6,TreeStreamImpl:()=>_y,URI:()=>mo,UriTrie:()=>uG,UriUtils:()=>fs,VALIDATE_EACH_NODE:()=>mSe,ValidationCategory:()=>F6,ValidationRegistry:()=>gSe,ValueConverter:()=>hu,WorkspaceCache:()=>dG,assertCondition:()=>A$,assertUnreachable:()=>Hd,createCompletionParser:()=>iG,createDefaultCoreModule:()=>Qi,createDefaultSharedCoreModule:()=>Ji,createGrammarConfig:()=>H$,createLangiumParser:()=>nG,createParser:()=>zA,delayNextTick:()=>VA,diagnosticData:()=>lg,eagerLoad:()=>SG,getDiagnosticRange:()=>gG,indentationBuilderDefaultOptions:()=>DF,inject:()=>jr,interruptAndCheck:()=>la,isAstNode:()=>Dn,isAstNodeDescription:()=>jF,isAstNodeWithComment:()=>pG,isCompositeCstNode:()=>Ih,isIMultiModeLexerDefinition:()=>XA,isJSDoc:()=>xG,isLeafCstNode:()=>yg,isLinkingError:()=>V0,isMultiReference:()=>gu,isNamed:()=>hG,isOperationCancelled:()=>Pg,isReference:()=>hs,isRootCstNode:()=>W6,isTokenTypeArray:()=>jA,isTokenTypeDictionary:()=>$6,loadGrammarFromJson:()=>wo,parseJSDoc:()=>bG,prepareLangiumParser:()=>aG,setInterruptionPeriod:()=>oG,startCancelableOperation:()=>WA,stream:()=>gi,toDiagnosticData:()=>mG,toDiagnosticSeverity:()=>_T});YF={};Ud(YF,{DefaultNameRegexp:()=>T$,RangeComparison:()=>fu,compareRange:()=>b$,findCommentNode:()=>w$,findDeclarationNodeAtOffset:()=>T2e,findLeafNodeAtOffset:()=>Z6,findLeafNodeBeforeOffset:()=>k$,flattenCst:()=>x2e,getDatatypeNode:()=>b2e,getInteriorNodes:()=>C2e,getNextNode:()=>w2e,getPreviousNode:()=>S$,getStartlineNode:()=>k2e,inRange:()=>x$,isChildNode:()=>v$,isCommentNode:()=>m6,streamCst:()=>Dy,toDocumentSegment:()=>Ny,tokenToRange:()=>NT});S(Dn,"isAstNode");S(hs,"isReference");S(gu,"isMultiReference");S(jF,"isAstNodeDescription");S(V0,"isLinkingError");XF=class{static{S(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);let r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){let t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Dn(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});let i=r[t];if(i!==void 0)return i;{let n=this.types[e],a=n?n.superTypes.some(s=>this.isSubtype(s,t)):!1;return r[t]=a,a}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let r=this.getAllTypes(),i=[];for(let n of r)this.isSubtype(n,e)&&i.push(n);return this.allSubtypes[e]=i,i}}};S(Ih,"isCompositeCstNode");S(yg,"isLeafCstNode");S(W6,"isRootCstNode");du=class Eh{static{S(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:S(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),r=0,i=t.next();for(;!i.done;)r++,i=t.next();return r}toArray(){let t=[],r=this.iterator(),i;do i=r.next(),i.value!==void 0&&t.push(i.value);while(!i.done);return t}toSet(){return new Set(this)}toMap(t,r){let i=this.map(n=>[t?t(n):n,r?r(n):n]);return new Map(i)}toString(){return this.join()}concat(t){return new Eh(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=r.iterator.next(),!i.done)return i;while(!i.done);return us})}join(t=","){let r=this.iterator(),i="",n,a=!1;do n=r.next(),n.done||(a&&(i+=t),i+=e2e(n.value)),a=!0;while(!n.done);return i}indexOf(t,r=0){let i=this.iterator(),n=0,a=i.next();for(;!a.done;){if(n>=r&&a.value===t)return n;a=i.next(),n++}return-1}every(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(!t(i.value))return!1;i=r.next()}return!0}some(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(t(i.value))return!0;i=r.next()}return!1}forEach(t){let r=this.iterator(),i=0,n=r.next();for(;!n.done;)t(n.value,i),n=r.next(),i++}map(t){return new Eh(this.startFn,r=>{let{done:i,value:n}=this.nextFn(r);return i?us:{done:!1,value:t(n)}})}filter(t){return new Eh(this.startFn,r=>{let i;do if(i=this.nextFn(r),!i.done&&t(i.value))return i;while(!i.done);return us})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let i=this.iterator(),n=r,a=i.next();for(;!a.done;)n===void 0?n=a.value:n=t(n,a.value),a=i.next();return n}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,i){let n=t.next();if(n.done)return i;let a=this.recursiveReduce(t,r,i);return a===void 0?n.value:r(a,n.value)}find(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(t(i.value))return i.value;i=r.next()}}findIndex(t){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(t(n.value))return i;n=r.next(),i++}return-1}includes(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(i.value===t)return!0;i=r.next()}return!1}flatMap(t){return new Eh(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:i,value:n}=this.nextFn(r.this);if(!i){let a=t(n);if(IT(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return us})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new Eh(()=>({this:r.startFn()}),i=>{do{if(i.iterator){let s=i.iterator.next();if(s.done)i.iterator=void 0;else return s}let{done:n,value:a}=r.nextFn(i.this);if(!n)if(IT(a))i.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(i.iterator);return us})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new Eh(()=>{let r=this.startFn();for(let i=0;i({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?us:this.nextFn(r.state)))}distinct(t){return new Eh(()=>({set:new Set,internalState:this.startFn()}),r=>{let i;do if(i=this.nextFn(r.internalState),!i.done){let n=t?t(i.value):i.value;if(!r.set.has(n))return r.set.add(n),i}while(!i.done);return us})}exclude(t,r){let i=new Set;for(let n of t){let a=r?r(n):n;i.add(a)}return this.filter(n=>{let a=r?r(n):n;return!i.has(a)})}};S(e2e,"toString");S(IT,"isIterable");Ay=new du(()=>{},()=>us),us=Object.freeze({done:!0,value:void 0});S(gi,"stream");_y=class extends du{static{S(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(t(a.value)[Symbol.iterator]()),a}return us})}iterator(){let e={state:this.startFn(),next:S(()=>this.nextFn(e.state),"next"),prune:S(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(e){function t(a){return a.reduce((s,o)=>s+o,0)}S(t,"sum"),e.sum=t;function r(a){return a.reduce((s,o)=>s*o,0)}S(r,"product"),e.product=r;function i(a){return a.reduce((s,o)=>Math.min(s,o))}S(i,"min"),e.min=i;function n(a){return a.reduce((s,o)=>Math.max(s,o))}S(n,"max"),e.max=n})(DT||(DT={}));KF={};Ud(KF,{assignMandatoryProperties:()=>ZF,copyAstNode:()=>r6,findRootNode:()=>ky,getContainerOfType:()=>vg,getDocument:()=>ql,getReferenceNodes:()=>e6,hasContainerOfType:()=>t2e,linkContentToContainer:()=>Ly,streamAllContents:()=>Gh,streamAst:()=>Vl,streamContents:()=>ZT,streamReferences:()=>Ry});S(Ly,"linkContentToContainer");S(vg,"getContainerOfType");S(t2e,"hasContainerOfType");S(ql,"getDocument");S(ky,"findRootNode");S(e6,"getReferenceNodes");S(ZT,"streamContents");S(Gh,"streamAllContents");S(Vl,"streamAst");S(t6,"isAstNodeInRange");S(Ry,"streamReferences");S(ZF,"assignMandatoryProperties");S(QF,"copyDefaultValue");S(r6,"copyAstNode");r2e={};Ud(r2e,{AbstractElement:()=>qs,AbstractParserRule:()=>pT,AbstractRule:()=>py,AbstractType:()=>go,Action:()=>Nd,Alternatives:()=>gT,ArrayLiteral:()=>i6,ArrayType:()=>n6,Assignment:()=>Md,BooleanLiteral:()=>a6,CharacterRange:()=>Od,Condition:()=>Pd,Conjunction:()=>mT,CrossReference:()=>Bd,Disjunction:()=>yT,EndOfFile:()=>s6,Grammar:()=>_h,GrammarImport:()=>o6,Group:()=>W0,InferredType:()=>l6,InfixRule:()=>cu,InfixRuleOperatorList:()=>vT,InfixRuleOperators:()=>c6,Interface:()=>gy,Keyword:()=>my,LangiumGrammarAstReflection:()=>y$,LangiumGrammarTerminals:()=>Wst,NamedArgument:()=>yy,NegatedToken:()=>U0,Negation:()=>u6,NumberLiteral:()=>h6,Parameter:()=>vy,ParameterReference:()=>f6,ParserRule:()=>$l,ReferenceType:()=>bT,RegexToken:()=>H0,ReturnType:()=>d6,RuleCall:()=>Y0,SimpleType:()=>by,StringLiteral:()=>p6,TerminalAlternatives:()=>j0,TerminalElement:()=>Vs,TerminalGroup:()=>X0,TerminalRule:()=>Lh,TerminalRuleCall:()=>K0,Type:()=>xT,TypeAttribute:()=>Z0,TypeDefinition:()=>Q0,UnionType:()=>g6,UnorderedGroup:()=>TT,UntilToken:()=>J0,ValueLiteral:()=>eg,Wildcard:()=>xy,isAbstractElement:()=>U6,isAbstractParserRule:()=>bg,isAbstractRule:()=>i2e,isAbstractType:()=>n2e,isAction:()=>zd,isAlternatives:()=>H6,isArrayLiteral:()=>a2e,isArrayType:()=>JF,isAssignment:()=>Dh,isBooleanLiteral:()=>e$,isCharacterRange:()=>t$,isCondition:()=>s2e,isConjunction:()=>r$,isCrossReference:()=>xg,isDisjunction:()=>i$,isEndOfFile:()=>n$,isGrammar:()=>o2e,isGrammarImport:()=>l2e,isGroup:()=>Tg,isInferredType:()=>QT,isInfixRule:()=>Iy,isInfixRuleOperatorList:()=>c2e,isInfixRuleOperators:()=>u2e,isInterface:()=>a$,isKeyword:()=>Nh,isNamedArgument:()=>h2e,isNegatedToken:()=>s$,isNegation:()=>o$,isNumberLiteral:()=>f2e,isParameter:()=>d2e,isParameterReference:()=>l$,isParserRule:()=>ps,isReferenceType:()=>c$,isRegexToken:()=>u$,isReturnType:()=>h$,isRuleCall:()=>Mh,isSimpleType:()=>Y6,isStringLiteral:()=>p2e,isTerminalAlternatives:()=>f$,isTerminalElement:()=>g2e,isTerminalGroup:()=>d$,isTerminalRule:()=>ll,isTerminalRuleCall:()=>j6,isType:()=>X6,isTypeAttribute:()=>m2e,isTypeDefinition:()=>y2e,isUnionType:()=>p$,isUnorderedGroup:()=>K6,isUntilToken:()=>g$,isValueLiteral:()=>v2e,isWildcard:()=>m$,reflection:()=>ar});Wst={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},qs={$type:"AbstractElement",cardinality:"cardinality"};S(U6,"isAbstractElement");pT={$type:"AbstractParserRule"};S(bg,"isAbstractParserRule");py={$type:"AbstractRule"};S(i2e,"isAbstractRule");go={$type:"AbstractType"};S(n2e,"isAbstractType");Nd={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};S(zd,"isAction");gT={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};S(H6,"isAlternatives");i6={$type:"ArrayLiteral",elements:"elements"};S(a2e,"isArrayLiteral");n6={$type:"ArrayType",elementType:"elementType"};S(JF,"isArrayType");Md={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};S(Dh,"isAssignment");a6={$type:"BooleanLiteral",true:"true"};S(e$,"isBooleanLiteral");Od={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};S(t$,"isCharacterRange");Pd={$type:"Condition"};S(s2e,"isCondition");mT={$type:"Conjunction",left:"left",right:"right"};S(r$,"isConjunction");Bd={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};S(xg,"isCrossReference");yT={$type:"Disjunction",left:"left",right:"right"};S(i$,"isDisjunction");s6={$type:"EndOfFile",cardinality:"cardinality"};S(n$,"isEndOfFile");_h={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};S(o2e,"isGrammar");o6={$type:"GrammarImport",path:"path"};S(l2e,"isGrammarImport");W0={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};S(Tg,"isGroup");l6={$type:"InferredType",name:"name"};S(QT,"isInferredType");cu={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};S(Iy,"isInfixRule");vT={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};S(c2e,"isInfixRuleOperatorList");c6={$type:"InfixRuleOperators",precedences:"precedences"};S(u2e,"isInfixRuleOperators");gy={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};S(a$,"isInterface");my={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};S(Nh,"isKeyword");yy={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};S(h2e,"isNamedArgument");U0={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};S(s$,"isNegatedToken");u6={$type:"Negation",value:"value"};S(o$,"isNegation");h6={$type:"NumberLiteral",value:"value"};S(f2e,"isNumberLiteral");vy={$type:"Parameter",name:"name"};S(d2e,"isParameter");f6={$type:"ParameterReference",parameter:"parameter"};S(l$,"isParameterReference");$l={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};S(ps,"isParserRule");bT={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};S(c$,"isReferenceType");H0={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};S(u$,"isRegexToken");d6={$type:"ReturnType",name:"name"};S(h$,"isReturnType");Y0={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};S(Mh,"isRuleCall");by={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};S(Y6,"isSimpleType");p6={$type:"StringLiteral",value:"value"};S(p2e,"isStringLiteral");j0={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};S(f$,"isTerminalAlternatives");Vs={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};S(g2e,"isTerminalElement");X0={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};S(d$,"isTerminalGroup");Lh={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};S(ll,"isTerminalRule");K0={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};S(j6,"isTerminalRuleCall");xT={$type:"Type",name:"name",type:"type"};S(X6,"isType");Z0={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};S(m2e,"isTypeAttribute");Q0={$type:"TypeDefinition"};S(y2e,"isTypeDefinition");g6={$type:"UnionType",types:"types"};S(p$,"isUnionType");TT={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};S(K6,"isUnorderedGroup");J0={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};S(g$,"isUntilToken");eg={$type:"ValueLiteral"};S(v2e,"isValueLiteral");xy={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};S(m$,"isWildcard");y$=class extends XF{static{S(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:qs.$type,properties:{cardinality:{name:qs.cardinality}},superTypes:[]},AbstractParserRule:{name:pT.$type,properties:{},superTypes:[py.$type,go.$type]},AbstractRule:{name:py.$type,properties:{},superTypes:[]},AbstractType:{name:go.$type,properties:{},superTypes:[]},Action:{name:Nd.$type,properties:{cardinality:{name:Nd.cardinality},feature:{name:Nd.feature},inferredType:{name:Nd.inferredType},operator:{name:Nd.operator},type:{name:Nd.type,referenceType:go.$type}},superTypes:[qs.$type]},Alternatives:{name:gT.$type,properties:{cardinality:{name:gT.cardinality},elements:{name:gT.elements,defaultValue:[]}},superTypes:[qs.$type]},ArrayLiteral:{name:i6.$type,properties:{elements:{name:i6.elements,defaultValue:[]}},superTypes:[eg.$type]},ArrayType:{name:n6.$type,properties:{elementType:{name:n6.elementType}},superTypes:[Q0.$type]},Assignment:{name:Md.$type,properties:{cardinality:{name:Md.cardinality},feature:{name:Md.feature},operator:{name:Md.operator},predicate:{name:Md.predicate},terminal:{name:Md.terminal}},superTypes:[qs.$type]},BooleanLiteral:{name:a6.$type,properties:{true:{name:a6.true,defaultValue:!1}},superTypes:[Pd.$type,eg.$type]},CharacterRange:{name:Od.$type,properties:{cardinality:{name:Od.cardinality},left:{name:Od.left},lookahead:{name:Od.lookahead},parenthesized:{name:Od.parenthesized,defaultValue:!1},right:{name:Od.right}},superTypes:[Vs.$type]},Condition:{name:Pd.$type,properties:{},superTypes:[]},Conjunction:{name:mT.$type,properties:{left:{name:mT.left},right:{name:mT.right}},superTypes:[Pd.$type]},CrossReference:{name:Bd.$type,properties:{cardinality:{name:Bd.cardinality},deprecatedSyntax:{name:Bd.deprecatedSyntax,defaultValue:!1},isMulti:{name:Bd.isMulti,defaultValue:!1},terminal:{name:Bd.terminal},type:{name:Bd.type,referenceType:go.$type}},superTypes:[qs.$type]},Disjunction:{name:yT.$type,properties:{left:{name:yT.left},right:{name:yT.right}},superTypes:[Pd.$type]},EndOfFile:{name:s6.$type,properties:{cardinality:{name:s6.cardinality}},superTypes:[qs.$type]},Grammar:{name:_h.$type,properties:{imports:{name:_h.imports,defaultValue:[]},interfaces:{name:_h.interfaces,defaultValue:[]},isDeclared:{name:_h.isDeclared,defaultValue:!1},name:{name:_h.name},rules:{name:_h.rules,defaultValue:[]},types:{name:_h.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:o6.$type,properties:{path:{name:o6.path}},superTypes:[]},Group:{name:W0.$type,properties:{cardinality:{name:W0.cardinality},elements:{name:W0.elements,defaultValue:[]},guardCondition:{name:W0.guardCondition},predicate:{name:W0.predicate}},superTypes:[qs.$type]},InferredType:{name:l6.$type,properties:{name:{name:l6.name}},superTypes:[go.$type]},InfixRule:{name:cu.$type,properties:{call:{name:cu.call},dataType:{name:cu.dataType},inferredType:{name:cu.inferredType},name:{name:cu.name},operators:{name:cu.operators},parameters:{name:cu.parameters,defaultValue:[]},returnType:{name:cu.returnType,referenceType:go.$type}},superTypes:[pT.$type]},InfixRuleOperatorList:{name:vT.$type,properties:{associativity:{name:vT.associativity},operators:{name:vT.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:c6.$type,properties:{precedences:{name:c6.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:gy.$type,properties:{attributes:{name:gy.attributes,defaultValue:[]},name:{name:gy.name},superTypes:{name:gy.superTypes,defaultValue:[],referenceType:go.$type}},superTypes:[go.$type]},Keyword:{name:my.$type,properties:{cardinality:{name:my.cardinality},predicate:{name:my.predicate},value:{name:my.value}},superTypes:[qs.$type]},NamedArgument:{name:yy.$type,properties:{calledByName:{name:yy.calledByName,defaultValue:!1},parameter:{name:yy.parameter,referenceType:vy.$type},value:{name:yy.value}},superTypes:[]},NegatedToken:{name:U0.$type,properties:{cardinality:{name:U0.cardinality},lookahead:{name:U0.lookahead},parenthesized:{name:U0.parenthesized,defaultValue:!1},terminal:{name:U0.terminal}},superTypes:[Vs.$type]},Negation:{name:u6.$type,properties:{value:{name:u6.value}},superTypes:[Pd.$type]},NumberLiteral:{name:h6.$type,properties:{value:{name:h6.value}},superTypes:[eg.$type]},Parameter:{name:vy.$type,properties:{name:{name:vy.name}},superTypes:[]},ParameterReference:{name:f6.$type,properties:{parameter:{name:f6.parameter,referenceType:vy.$type}},superTypes:[Pd.$type]},ParserRule:{name:$l.$type,properties:{dataType:{name:$l.dataType},definition:{name:$l.definition},entry:{name:$l.entry,defaultValue:!1},fragment:{name:$l.fragment,defaultValue:!1},inferredType:{name:$l.inferredType},name:{name:$l.name},parameters:{name:$l.parameters,defaultValue:[]},returnType:{name:$l.returnType,referenceType:go.$type}},superTypes:[pT.$type]},ReferenceType:{name:bT.$type,properties:{isMulti:{name:bT.isMulti,defaultValue:!1},referenceType:{name:bT.referenceType}},superTypes:[Q0.$type]},RegexToken:{name:H0.$type,properties:{cardinality:{name:H0.cardinality},lookahead:{name:H0.lookahead},parenthesized:{name:H0.parenthesized,defaultValue:!1},regex:{name:H0.regex}},superTypes:[Vs.$type]},ReturnType:{name:d6.$type,properties:{name:{name:d6.name}},superTypes:[]},RuleCall:{name:Y0.$type,properties:{arguments:{name:Y0.arguments,defaultValue:[]},cardinality:{name:Y0.cardinality},predicate:{name:Y0.predicate},rule:{name:Y0.rule,referenceType:py.$type}},superTypes:[qs.$type]},SimpleType:{name:by.$type,properties:{primitiveType:{name:by.primitiveType},stringType:{name:by.stringType},typeRef:{name:by.typeRef,referenceType:go.$type}},superTypes:[Q0.$type]},StringLiteral:{name:p6.$type,properties:{value:{name:p6.value}},superTypes:[eg.$type]},TerminalAlternatives:{name:j0.$type,properties:{cardinality:{name:j0.cardinality},elements:{name:j0.elements,defaultValue:[]},lookahead:{name:j0.lookahead},parenthesized:{name:j0.parenthesized,defaultValue:!1}},superTypes:[Vs.$type]},TerminalElement:{name:Vs.$type,properties:{cardinality:{name:Vs.cardinality},lookahead:{name:Vs.lookahead},parenthesized:{name:Vs.parenthesized,defaultValue:!1}},superTypes:[qs.$type]},TerminalGroup:{name:X0.$type,properties:{cardinality:{name:X0.cardinality},elements:{name:X0.elements,defaultValue:[]},lookahead:{name:X0.lookahead},parenthesized:{name:X0.parenthesized,defaultValue:!1}},superTypes:[Vs.$type]},TerminalRule:{name:Lh.$type,properties:{definition:{name:Lh.definition},fragment:{name:Lh.fragment,defaultValue:!1},hidden:{name:Lh.hidden,defaultValue:!1},name:{name:Lh.name},type:{name:Lh.type}},superTypes:[py.$type]},TerminalRuleCall:{name:K0.$type,properties:{cardinality:{name:K0.cardinality},lookahead:{name:K0.lookahead},parenthesized:{name:K0.parenthesized,defaultValue:!1},rule:{name:K0.rule,referenceType:Lh.$type}},superTypes:[Vs.$type]},Type:{name:xT.$type,properties:{name:{name:xT.name},type:{name:xT.type}},superTypes:[go.$type]},TypeAttribute:{name:Z0.$type,properties:{defaultValue:{name:Z0.defaultValue},isOptional:{name:Z0.isOptional,defaultValue:!1},name:{name:Z0.name},type:{name:Z0.type}},superTypes:[]},TypeDefinition:{name:Q0.$type,properties:{},superTypes:[]},UnionType:{name:g6.$type,properties:{types:{name:g6.types,defaultValue:[]}},superTypes:[Q0.$type]},UnorderedGroup:{name:TT.$type,properties:{cardinality:{name:TT.cardinality},elements:{name:TT.elements,defaultValue:[]}},superTypes:[qs.$type]},UntilToken:{name:J0.$type,properties:{cardinality:{name:J0.cardinality},lookahead:{name:J0.lookahead},parenthesized:{name:J0.parenthesized,defaultValue:!1},terminal:{name:J0.terminal}},superTypes:[Vs.$type]},ValueLiteral:{name:eg.$type,properties:{},superTypes:[]},Wildcard:{name:xy.$type,properties:{cardinality:{name:xy.cardinality},lookahead:{name:xy.lookahead},parenthesized:{name:xy.parenthesized,defaultValue:!1}},superTypes:[Vs.$type]}}}},ar=new y$;S(b2e,"getDatatypeNode");S(Dy,"streamCst");S(x2e,"flattenCst");S(v$,"isChildNode");S(NT,"tokenToRange");S(Ny,"toDocumentSegment");(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(fu||(fu={}));S(b$,"compareRange");S(x$,"inRange");T$=/^[\w\p{L}]$/u;S(T2e,"findDeclarationNodeAtOffset");S(w$,"findCommentNode");S(m6,"isCommentNode");S(Z6,"findLeafNodeAtOffset");S(k$,"findLeafNodeBeforeOffset");S(C$,"binarySearch");S(S$,"getPreviousNode");S(w2e,"getNextNode");S(k2e,"getStartlineNode");S(C2e,"getInteriorNodes");S(S2e,"getCommonParent");S(XB,"getParentChain");E$={};Ud(E$,{findAssignment:()=>$$,findNameAssignment:()=>aA,findNodeForKeyword:()=>F$,findNodeForProperty:()=>rA,findNodesForKeyword:()=>D2e,findNodesForKeywordInternal:()=>nA,findNodesForProperty:()=>B$,getActionAtElement:()=>G$,getActionType:()=>V$,getAllReachableRules:()=>tA,getAllRulesUsedForCrossReferences:()=>I2e,getCrossReferenceTerminal:()=>O$,getEntryRule:()=>D$,getExplicitRuleType:()=>ew,getHiddenRules:()=>N$,getRuleType:()=>W$,getRuleTypeName:()=>B2e,getTypeName:()=>fg,isArrayCardinality:()=>M2e,isArrayOperator:()=>O2e,isCommentTerminal:()=>P$,isDataType:()=>P2e,isDataTypeRule:()=>JT,isOptionalCardinality:()=>N2e,terminalRegex:()=>tw});Q6=class extends Error{static{S(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};S(Hd,"assertUnreachable");S(A$,"assertCondition");_$={};Ud(_$,{NEWLINE_REGEXP:()=>A2e,escapeRegExp:()=>Gy,getTerminalParts:()=>L2e,isMultilineComment:()=>L$,isWhitespace:()=>eA,partialMatches:()=>R$,partialRegExp:()=>I$,whitespaceCharacters:()=>R2e});S(dr,"cc");S($E,"insertToSet");S(hy,"addFlag");S(B0,"ASSERT_EXISTS");S(cT,"ASSERT_NEVER_REACH_HERE");S(KB,"isCharacter");y6=[];for(let e=dr("0");e<=dr("9");e++)y6.push(e);v6=[dr("_")].concat(y6);for(let e=dr("a");e<=dr("z");e++)v6.push(e);for(let e=dr("A");e<=dr("Z");e++)v6.push(e);sye=[dr(" "),dr("\f"),dr(` -`),dr("\r"),dr(" "),dr("\v"),dr(" "),dr("\xA0"),dr("\u1680"),dr("\u2000"),dr("\u2001"),dr("\u2002"),dr("\u2003"),dr("\u2004"),dr("\u2005"),dr("\u2006"),dr("\u2007"),dr("\u2008"),dr("\u2009"),dr("\u200A"),dr("\u2028"),dr("\u2029"),dr("\u202F"),dr("\u205F"),dr("\u3000"),dr("\uFEFF")],Ust=/[0-9a-fA-F]/,dE=/[0-9]/,Hst=/[1-9]/,E2e=class{static{S(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":hy(r,"global");break;case"i":hy(r,"ignoreCase");break;case"m":hy(r,"multiLine");break;case"u":hy(r,"unicode");break;case"y":hy(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}B0(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return cT()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let n;this.isDigit()?(n=this.integerIncludingZero(),t={atLeast:i,atMost:n}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;B0(t);break}if(!(e===!0&&t===void 0)&&B0(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),B0(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):cT()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[dr(` -`),dr("\r"),dr("\u2028"),dr("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=y6;break;case"D":e=y6,t=!0;break;case"s":e=sye;break;case"S":e=sye,t=!0;break;case"w":e=v6;break;case"W":e=v6,t=!0;break}return B0(e)?{type:"Set",value:e,complement:t}:cT()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=dr("\f");break;case"n":e=dr(` -`);break;case"r":e=dr("\r");break;case"t":e=dr(" ");break;case"v":e=dr("\v");break}return B0(e)?{type:"Character",value:e}:cT()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:dr("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:dr(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:dr(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let r=this.classAtom(),i=r.type==="Character";if(KB(r)&&this.isRangeDash()){this.consumeChar("-");let n=this.classAtom(),a=n.type==="Character";if(KB(n)){if(n.value{bt();let nt,ft;if(r.string(_e)){nt=_e;let yt=Ze[0],Ht=0,Er=n.ParameterStructures.auto;n.ParameterStructures.is(yt)&&(Ht=1,Er=yt);let rr=Ze.length,Ot=rr-Ht;switch(Ot){case 0:ft=void 0;break;case 1:ft=ot(Er,Ze[Ht]);break;default:if(Er===n.ParameterStructures.byName)throw new Error(`Received ${Ot} parameters for 'by Name' notification parameter structure.`);ft=Ze.slice(Ht,rr).map(Zt=>Ct(Zt));break}}else{let yt=Ze;nt=_e.method,ft=gt(_e,yt)}let jt={jsonrpc:q,method:nt,params:ft};return Pe(jt),D.write(jt).catch(yt=>{throw B.error("Sending notification failed."),yt})},"sendNotification"),onNotification:A((_e,Ze)=>{bt();let nt;return r.func(_e)?j=_e:Ze&&(r.string(_e)?(nt=_e,ee.set(_e,{type:void 0,handler:Ze})):(nt=_e.method,ee.set(_e.method,{type:_e,handler:Ze}))),{dispose:A(()=>{nt!==void 0?ee.delete(nt):j=void 0},"dispose")}},"onNotification"),onProgress:A((_e,Ze,nt)=>{if(ne.has(Ze))throw new Error(`Progress handler for token ${Ze} already registered`);return ne.set(Ze,nt),{dispose:A(()=>{ne.delete(Ze)},"dispose")}},"onProgress"),sendProgress:A((_e,Ze,nt)=>Qe.sendNotification(u.type,{token:Ze,value:nt}),"sendProgress"),onUnhandledProgress:De.event,sendRequest:A((_e,...Ze)=>{bt(),pt();let nt,ft,jt;if(r.string(_e)){nt=_e;let rr=Ze[0],Ot=Ze[Ze.length-1],Zt=0,Je=n.ParameterStructures.auto;n.ParameterStructures.is(rr)&&(Zt=1,Je=rr);let ut=Ze.length;s.CancellationToken.is(Ot)&&(ut=ut-1,jt=Ot);let kt=ut-Zt;switch(kt){case 0:ft=void 0;break;case 1:ft=ot(Je,Ze[Zt]);break;default:if(Je===n.ParameterStructures.byName)throw new Error(`Received ${kt} parameters for 'by Name' request parameter structure.`);ft=Ze.slice(Zt,ut).map(lr=>Ct(lr));break}}else{let rr=Ze;nt=_e.method,ft=gt(_e,rr);let Ot=_e.numberOfParams;jt=s.CancellationToken.is(rr[Ot])?rr[Ot]:void 0}let yt=P++,Ht;jt&&(Ht=jt.onCancellationRequested(()=>{let rr=Me.sender.sendCancellation(Qe,yt);return rr===void 0?(B.log(`Received no promise from cancellation strategy when cancelling id ${yt}`),Promise.resolve()):rr.catch(()=>{B.log(`Sending cancellation messages for id ${yt} failed`)})}));let Er={jsonrpc:q,id:yt,method:nt,params:ft};return Fe(Er),typeof Me.sender.enableCancellation=="function"&&Me.sender.enableCancellation(Er),new Promise(async(rr,Ot)=>{let Zt=A(kt=>{rr(kt),Me.sender.cleanup(yt),Ht?.dispose()},"resolveWithCleanup"),Je=A(kt=>{Ot(kt),Me.sender.cleanup(yt),Ht?.dispose()},"rejectWithCleanup"),ut={method:nt,timerStart:Date.now(),resolve:Zt,reject:Je};try{await D.write(Er),te.set(yt,ut)}catch(kt){throw B.error("Sending request failed."),ut.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,kt.message?kt.message:"Unknown reason")),kt}})},"sendRequest"),onRequest:A((_e,Ze)=>{bt();let nt=null;return f.is(_e)?(nt=void 0,z=_e):r.string(_e)?(nt=null,Ze!==void 0&&(nt=_e,V.set(_e,{handler:Ze,type:void 0}))):Ze!==void 0&&(nt=_e.method,V.set(_e.method,{type:_e,handler:Ze})),{dispose:A(()=>{nt!==null&&(nt!==void 0?V.delete(nt):z=void 0)},"dispose")}},"onRequest"),hasPendingResponse:A(()=>te.size>0,"hasPendingResponse"),trace:A(async(_e,Ze,nt)=>{let ft=!1,jt=g.Text;nt!==void 0&&(r.boolean(nt)?ft=nt:(ft=nt.sendNotification||!1,jt=nt.traceFormat||g.Text)),ue=_e,Re=jt,ue===d.Off?ve=void 0:ve=Ze,ft&&!F()&&!H()&&await Qe.sendNotification(m.type,{value:d.toString(_e)})},"trace"),onError:He.event,onClose:Ue.event,onUnhandledNotification:me.event,onDispose:Ie.event,end:A(()=>{D.end()},"end"),dispose:A(()=>{if(H())return;Ge=O.Disposed,Ie.fire(void 0);let _e=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Ze of te.values())Ze.reject(_e);te=new Map,ce=new Map,de=new Set,pe=new i.LinkedMap,r.func(D.dispose)&&D.dispose(),r.func(_.dispose)&&_.dispose()},"dispose"),listen:A(()=>{bt(),Et(),Ge=O.Listening,_.listen(Ce)},"listen"),inspect:A(()=>{(0,t.default)().console.log("inspect")},"inspect")};return Qe.onNotification(y.type,_e=>{if(ue===d.Off||!ve)return;let Ze=ue===d.Verbose||ue===d.Compact;ve.log(_e.message,Ze?_e.verbose:void 0)}),Qe.onNotification(u.type,_e=>{let Ze=ne.get(_e.token);Ze?Ze(_e.value):De.fire(_e)}),Qe}A(R,"createMessageConnection"),e.createMessageConnection=R}}),vG=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=UCe();Object.defineProperty(e,"Message",{enumerable:!0,get:A(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:A(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:A(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:A(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:A(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:A(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:A(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:A(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:A(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:A(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:A(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:A(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:A(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:A(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:A(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:A(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:A(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:A(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:A(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:A(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:A(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:A(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:A(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:A(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:A(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:A(function(){return t.ParameterStructures},"get")});var r=YCe();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:A(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:A(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:A(function(){return r.Touch},"get")});var n=idt();Object.defineProperty(e,"Disposable",{enumerable:!0,get:A(function(){return n.Disposable},"get")});var i=Zv();Object.defineProperty(e,"Event",{enumerable:!0,get:A(function(){return i.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:A(function(){return i.Emitter},"get")});var a=k6();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:A(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:A(function(){return a.CancellationToken},"get")});var s=adt();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:A(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:A(function(){return s.SharedArrayReceiverStrategy},"get")});var o=sdt();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:A(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:A(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:A(function(){return o.ReadableStreamMessageReader},"get")});var l=odt();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:A(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:A(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:A(function(){return l.WriteableStreamMessageWriter},"get")});var u=ldt();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:A(function(){return u.AbstractMessageBuffer},"get")});var h=cdt();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:A(function(){return h.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:A(function(){return h.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:A(function(){return h.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:A(function(){return h.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:A(function(){return h.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:A(function(){return h.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:A(function(){return h.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:A(function(){return h.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:A(function(){return h.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:A(function(){return h.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:A(function(){return h.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:A(function(){return h.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:A(function(){return h.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:A(function(){return h.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:A(function(){return h.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:A(function(){return h.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:A(function(){return h.MessageStrategy},"get")});var f=Tm();e.RAL=f.default}}),udt=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=vG(),r=class KCe extends t.AbstractMessageBuffer{static{A(this,"MessageBuffer")}constructor(u="utf-8"){super(u),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return KCe.emptyBuffer}fromString(u,h){return new TextEncoder().encode(u)}toString(u,h){return h==="ascii"?this.asciiDecoder.decode(u):new TextDecoder(h).decode(u)}asNative(u,h){return h===void 0?u:u.slice(0,h)}allocNative(u){return new Uint8Array(u)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{A(this,"ReadableStreamWrapper")}constructor(l){this.socket=l,this._onData=new t.Emitter,this._messageListener=u=>{u.data.arrayBuffer().then(f=>{this._onData.fire(new Uint8Array(f))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(l){return this.socket.addEventListener("close",l),t.Disposable.create(()=>this.socket.removeEventListener("close",l))}onError(l){return this.socket.addEventListener("error",l),t.Disposable.create(()=>this.socket.removeEventListener("error",l))}onEnd(l){return this.socket.addEventListener("end",l),t.Disposable.create(()=>this.socket.removeEventListener("end",l))}onData(l){return this._onData.event(l)}},i=class{static{A(this,"WritableStreamWrapper")}constructor(l){this.socket=l}onClose(l){return this.socket.addEventListener("close",l),t.Disposable.create(()=>this.socket.removeEventListener("close",l))}onError(l){return this.socket.addEventListener("error",l),t.Disposable.create(()=>this.socket.removeEventListener("error",l))}onEnd(l){return this.socket.addEventListener("end",l),t.Disposable.create(()=>this.socket.removeEventListener("end",l))}write(l,u){if(typeof l=="string"){if(u!==void 0&&u!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u}`);this.socket.send(l)}else this.socket.send(l);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:A(l=>new r(l),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:A((l,u)=>{if(u.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u.charset}`);return Promise.resolve(a.encode(JSON.stringify(l,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:A((l,u)=>{if(!(l instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(u.charset).decode(l)))},"decode")})}),stream:Object.freeze({asReadableStream:A(l=>new n(l),"asReadableStream"),asWritableStream:A(l=>new i(l),"asWritableStream")}),console,timer:Object.freeze({setTimeout(l,u,...h){let f=setTimeout(l,u,...h);return{dispose:A(()=>clearTimeout(f),"dispose")}},setImmediate(l,...u){let h=setTimeout(l,0,...u);return{dispose:A(()=>clearTimeout(h),"dispose")}},setInterval(l,u,...h){let f=setInterval(l,u,...h);return{dispose:A(()=>clearInterval(f),"dispose")}}})});function o(){return s}A(o,"RIL"),(function(l){function u(){t.RAL.install(s)}A(u,"install"),l.install=u})(o||(o={})),e.default=o}}),Qv=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(l,u,h,f){f===void 0&&(f=h);var d=Object.getOwnPropertyDescriptor(u,h);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:A(function(){return u[h]},"get")}),Object.defineProperty(l,f,d)}):(function(l,u,h,f){f===void 0&&(f=h),l[f]=u[h]})),r=e&&e.__exportStar||function(l,u){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(u,h)&&t(u,l,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var n=udt();n.default.install();var i=vG();r(vG(),e);var a=class extends i.AbstractMessageReader{static{A(this,"BrowserMessageReader")}constructor(l){super(),this._onData=new i.Emitter,this._messageListener=u=>{this._onData.fire(u.data)},l.addEventListener("error",u=>this.fireError(u)),l.onmessage=this._messageListener}listen(l){return this._onData.event(l)}};e.BrowserMessageReader=a;var s=class extends i.AbstractMessageWriter{static{A(this,"BrowserMessageWriter")}constructor(l){super(),this.port=l,this.errorCount=0,l.addEventListener("error",u=>this.fireError(u))}write(l){try{return this.port.postMessage(l),Promise.resolve()}catch(u){return this.handleError(u,l),Promise.reject(u)}}handleError(l,u){this.errorCount++,this.fireError(l,u,this.errorCount)}end(){}};e.BrowserMessageWriter=s;function o(l,u,h,f){return h===void 0&&(h=i.NullLogger),i.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,i.createMessageConnection)(l,u,h,f)}A(o,"createMessageConnection"),e.createMessageConnection=o}}),QTe=qr({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=Qv()}}),Si=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Qv(),r;(function(l){l.clientToServer="clientToServer",l.serverToClient="serverToClient",l.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{A(this,"RegistrationType")}constructor(l){this.method=l}};e.RegistrationType=n;var i=class extends t.RequestType0{static{A(this,"ProtocolRequestType0")}constructor(l){super(l)}};e.ProtocolRequestType0=i;var a=class extends t.RequestType{static{A(this,"ProtocolRequestType")}constructor(l){super(l,t.ParameterStructures.byName)}};e.ProtocolRequestType=a;var s=class extends t.NotificationType0{static{A(this,"ProtocolNotificationType0")}constructor(l){super(l)}};e.ProtocolNotificationType0=s;var o=class extends t.NotificationType{static{A(this,"ProtocolNotificationType")}constructor(l){super(l,t.ParameterStructures.byName)}};e.ProtocolNotificationType=o}}),Jq=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(h){return h===!0||h===!1}A(t,"boolean"),e.boolean=t;function r(h){return typeof h=="string"||h instanceof String}A(r,"string"),e.string=r;function n(h){return typeof h=="number"||h instanceof Number}A(n,"number"),e.number=n;function i(h){return h instanceof Error}A(i,"error"),e.error=i;function a(h){return typeof h=="function"}A(a,"func"),e.func=a;function s(h){return Array.isArray(h)}A(s,"array"),e.array=s;function o(h){return s(h)&&h.every(f=>r(f))}A(o,"stringArray"),e.stringArray=o;function l(h,f){return Array.isArray(h)&&h.every(f)}A(l,"typedArray"),e.typedArray=l;function u(h){return h!==null&&typeof h=="object"}A(u,"objectLiteral"),e.objectLiteral=u}}),hdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=Si(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),fdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=Si(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),ddt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=Si(),r;(function(i){i.method="workspace/workspaceFolders",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(r||(e.WorkspaceFoldersRequest=r={}));var n;(function(i){i.method="workspace/didChangeWorkspaceFolders",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolNotificationType(i.method)})(n||(e.DidChangeWorkspaceFoldersNotification=n={}))}}),pdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=Si(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),gdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=Si(),r;(function(i){i.method="textDocument/documentColor",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.DocumentColorRequest=r={}));var n;(function(i){i.method="textDocument/colorPresentation",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(e.ColorPresentationRequest=n={}))}}),mdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=Si(),r;(function(i){i.method="textDocument/foldingRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.FoldingRangeRequest=r={}));var n;(function(i){i.method="workspace/foldingRange/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(n||(e.FoldingRangeRefreshRequest=n={}))}}),ydt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=Si(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),vdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=Si(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),xdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Qv(),r=Si(),n;(function(s){s.type=new t.ProgressType;function o(l){return l===s.type}A(o,"is"),s.is=o})(n||(e.WorkDoneProgress=n={}));var i;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=r.MessageDirection.serverToClient,s.type=new r.ProtocolRequestType(s.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(s){s.method="window/workDoneProgress/cancel",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolNotificationType(s.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),bdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=Si(),r;(function(a){a.method="textDocument/prepareCallHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var n;(function(a){a.method="callHierarchy/incomingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.CallHierarchyIncomingCallsRequest=n={}));var i;(function(a){a.method="callHierarchy/outgoingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Tdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=Si(),r;(function(l){l.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(l){l.method="textDocument/semanticTokens",l.type=new t.RegistrationType(l.method)})(n||(e.SemanticTokensRegistrationType=n={}));var i;(function(l){l.method="textDocument/semanticTokens/full",l.messageDirection=t.MessageDirection.clientToServer,l.type=new t.ProtocolRequestType(l.method),l.registrationMethod=n.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(l){l.method="textDocument/semanticTokens/full/delta",l.messageDirection=t.MessageDirection.clientToServer,l.type=new t.ProtocolRequestType(l.method),l.registrationMethod=n.method})(a||(e.SemanticTokensDeltaRequest=a={}));var s;(function(l){l.method="textDocument/semanticTokens/range",l.messageDirection=t.MessageDirection.clientToServer,l.type=new t.ProtocolRequestType(l.method),l.registrationMethod=n.method})(s||(e.SemanticTokensRangeRequest=s={}));var o;(function(l){l.method="workspace/semanticTokens/refresh",l.messageDirection=t.MessageDirection.serverToClient,l.type=new t.ProtocolRequestType0(l.method)})(o||(e.SemanticTokensRefreshRequest=o={}))}}),wdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=Si(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),Cdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Si(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),kdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=Si(),r;(function(u){u.file="file",u.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(n||(e.WillCreateFilesRequest=n={}));var i;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(a||(e.WillRenameFilesRequest=a={}));var s;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(s||(e.DidRenameFilesNotification=s={}));var o;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(o||(e.DidDeleteFilesNotification=o={}));var l;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(l||(e.WillDeleteFilesRequest=l={}))}}),Sdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Si(),r;(function(a){a.document="document",a.project="project",a.group="group",a.scheme="scheme",a.global="global"})(r||(e.UniquenessLevel=r={}));var n;(function(a){a.$import="import",a.$export="export",a.local="local"})(n||(e.MonikerKind=n={}));var i;(function(a){a.method="textDocument/moniker",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.MonikerRequest=i={}))}}),Edt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Si(),r;(function(a){a.method="textDocument/prepareTypeHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var n;(function(a){a.method="typeHierarchy/supertypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.TypeHierarchySupertypesRequest=n={}));var i;(function(a){a.method="typeHierarchy/subtypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Adt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=Si(),r;(function(i){i.method="textDocument/inlineValue",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.InlineValueRequest=r={}));var n;(function(i){i.method="workspace/inlineValue/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(n||(e.InlineValueRefreshRequest=n={}))}}),_dt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=Si(),r;(function(a){a.method="textDocument/inlayHint",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlayHintRequest=r={}));var n;(function(a){a.method="inlayHint/resolve",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.InlayHintResolveRequest=n={}));var i;(function(a){a.method="workspace/inlayHint/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),Rdt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Qv(),r=Jq(),n=Si(),i;(function(u){function h(f){let d=f;return d&&r.boolean(d.retriggerRequest)}A(h,"is"),u.is=h})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(u){u.Full="full",u.Unchanged="unchanged"})(a||(e.DocumentDiagnosticReportKind=a={}));var s;(function(u){u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(s||(e.DocumentDiagnosticRequest=s={}));var o;(function(u){u.method="workspace/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(o||(e.WorkspaceDiagnosticRequest=o={}));var l;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),Ldt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(bC(),Qq(C6)),r=Jq(),n=Si(),i;(function(g){g.Markup=1,g.Code=2;function m(y){return y===1||y===2}A(m,"is"),g.is=m})(i||(e.NotebookCellKind=i={}));var a;(function(g){function m(b,T){let k={executionOrder:b};return(T===!0||T===!1)&&(k.success=T),k}A(m,"create"),g.create=m;function y(b){let T=b;return r.objectLiteral(T)&&t.uinteger.is(T.executionOrder)&&(T.success===void 0||r.boolean(T.success))}A(y,"is"),g.is=y;function x(b,T){return b===T?!0:b==null||T===null||T===void 0?!1:b.executionOrder===T.executionOrder&&b.success===T.success}A(x,"equals"),g.equals=x})(a||(e.ExecutionSummary=a={}));var s;(function(g){function m(T,k){return{kind:T,document:k}}A(m,"create"),g.create=m;function y(T){let k=T;return r.objectLiteral(k)&&i.is(k.kind)&&t.DocumentUri.is(k.document)&&(k.metadata===void 0||r.objectLiteral(k.metadata))}A(y,"is"),g.is=y;function x(T,k){let w=new Set;return T.document!==k.document&&w.add("document"),T.kind!==k.kind&&w.add("kind"),T.executionSummary!==k.executionSummary&&w.add("executionSummary"),(T.metadata!==void 0||k.metadata!==void 0)&&!b(T.metadata,k.metadata)&&w.add("metadata"),(T.executionSummary!==void 0||k.executionSummary!==void 0)&&!a.equals(T.executionSummary,k.executionSummary)&&w.add("executionSummary"),w}A(x,"diff"),g.diff=x;function b(T,k){if(T===k)return!0;if(T==null||k===null||k===void 0||typeof T!=typeof k||typeof T!="object")return!1;let w=Array.isArray(T),C=Array.isArray(k);if(w!==C)return!1;if(w&&C){if(T.length!==k.length)return!1;for(let S=0;S0}A(ot,"hasId"),Te.hasId=ot})(P||(e.StaticRegistrationOptions=P={}));var $;(function(Te){function ot(gt){let Qe=gt;return Qe&&(Qe.documentSelector===null||R.is(Qe.documentSelector))}A(ot,"is"),Te.is=ot})($||(e.TextDocumentRegistrationOptions=$={}));var G;(function(Te){function ot(Qe){let _e=Qe;return n.objectLiteral(_e)&&(_e.workDoneProgress===void 0||n.boolean(_e.workDoneProgress))}A(ot,"is"),Te.is=ot;function gt(Qe){let _e=Qe;return _e&&n.boolean(_e.workDoneProgress)}A(gt,"hasWorkDoneProgress"),Te.hasWorkDoneProgress=gt})(G||(e.WorkDoneProgressOptions=G={}));var q;(function(Te){Te.method="initialize",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(q||(e.InitializeRequest=q={}));var z;(function(Te){Te.unknownProtocolVersion=1})(z||(e.InitializeErrorCodes=z={}));var V;(function(Te){Te.method="initialized",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(V||(e.InitializedNotification=V={}));var j;(function(Te){Te.method="shutdown",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType0(Te.method)})(j||(e.ShutdownRequest=j={}));var ee;(function(Te){Te.method="exit",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType0(Te.method)})(ee||(e.ExitNotification=ee={}));var ne;(function(Te){Te.method="workspace/didChangeConfiguration",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(ne||(e.DidChangeConfigurationNotification=ne={}));var Q;(function(Te){Te.Error=1,Te.Warning=2,Te.Info=3,Te.Log=4,Te.Debug=5})(Q||(e.MessageType=Q={}));var pe;(function(Te){Te.method="window/showMessage",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolNotificationType(Te.method)})(pe||(e.ShowMessageNotification=pe={}));var te;(function(Te){Te.method="window/showMessageRequest",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolRequestType(Te.method)})(te||(e.ShowMessageRequest=te={}));var de;(function(Te){Te.method="window/logMessage",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolNotificationType(Te.method)})(de||(e.LogMessageNotification=de={}));var ce;(function(Te){Te.method="telemetry/event",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolNotificationType(Te.method)})(ce||(e.TelemetryEventNotification=ce={}));var ue;(function(Te){Te.None=0,Te.Full=1,Te.Incremental=2})(ue||(e.TextDocumentSyncKind=ue={}));var Re;(function(Te){Te.method="textDocument/didOpen",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(Re||(e.DidOpenTextDocumentNotification=Re={}));var ve;(function(Te){function ot(Qe){let _e=Qe;return _e!=null&&typeof _e.text=="string"&&_e.range!==void 0&&(_e.rangeLength===void 0||typeof _e.rangeLength=="number")}A(ot,"isIncremental"),Te.isIncremental=ot;function gt(Qe){let _e=Qe;return _e!=null&&typeof _e.text=="string"&&_e.range===void 0&&_e.rangeLength===void 0}A(gt,"isFull"),Te.isFull=gt})(ve||(e.TextDocumentContentChangeEvent=ve={}));var Ge;(function(Te){Te.method="textDocument/didChange",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(Ge||(e.DidChangeTextDocumentNotification=Ge={}));var He;(function(Te){Te.method="textDocument/didClose",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(He||(e.DidCloseTextDocumentNotification=He={}));var Ue;(function(Te){Te.method="textDocument/didSave",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(Ue||(e.DidSaveTextDocumentNotification=Ue={}));var me;(function(Te){Te.Manual=1,Te.AfterDelay=2,Te.FocusOut=3})(me||(e.TextDocumentSaveReason=me={}));var De;(function(Te){Te.method="textDocument/willSave",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(De||(e.WillSaveTextDocumentNotification=De={}));var Ie;(function(Te){Te.method="textDocument/willSaveWaitUntil",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Ie||(e.WillSaveTextDocumentWaitUntilRequest=Ie={}));var Me;(function(Te){Te.method="workspace/didChangeWatchedFiles",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolNotificationType(Te.method)})(Me||(e.DidChangeWatchedFilesNotification=Me={}));var re;(function(Te){Te.Created=1,Te.Changed=2,Te.Deleted=3})(re||(e.FileChangeType=re={}));var le;(function(Te){function ot(gt){let Qe=gt;return n.objectLiteral(Qe)&&(r.URI.is(Qe.baseUri)||r.WorkspaceFolder.is(Qe.baseUri))&&n.string(Qe.pattern)}A(ot,"is"),Te.is=ot})(le||(e.RelativePattern=le={}));var oe;(function(Te){Te.Create=1,Te.Change=2,Te.Delete=4})(oe||(e.WatchKind=oe={}));var he;(function(Te){Te.method="textDocument/publishDiagnostics",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolNotificationType(Te.method)})(he||(e.PublishDiagnosticsNotification=he={}));var xe;(function(Te){Te.Invoked=1,Te.TriggerCharacter=2,Te.TriggerForIncompleteCompletions=3})(xe||(e.CompletionTriggerKind=xe={}));var se;(function(Te){Te.method="textDocument/completion",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(se||(e.CompletionRequest=se={}));var F;(function(Te){Te.method="completionItem/resolve",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(F||(e.CompletionResolveRequest=F={}));var H;(function(Te){Te.method="textDocument/hover",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(H||(e.HoverRequest=H={}));var W;(function(Te){Te.Invoked=1,Te.TriggerCharacter=2,Te.ContentChange=3})(W||(e.SignatureHelpTriggerKind=W={}));var U;(function(Te){Te.method="textDocument/signatureHelp",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(U||(e.SignatureHelpRequest=U={}));var ae;(function(Te){Te.method="textDocument/definition",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(ae||(e.DefinitionRequest=ae={}));var K;(function(Te){Te.method="textDocument/references",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(K||(e.ReferencesRequest=K={}));var Y;(function(Te){Te.method="textDocument/documentHighlight",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Y||(e.DocumentHighlightRequest=Y={}));var Z;(function(Te){Te.method="textDocument/documentSymbol",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Z||(e.DocumentSymbolRequest=Z={}));var Ce;(function(Te){Te.method="textDocument/codeAction",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Ce||(e.CodeActionRequest=Ce={}));var we;(function(Te){Te.method="codeAction/resolve",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(we||(e.CodeActionResolveRequest=we={}));var ke;(function(Te){Te.method="workspace/symbol",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(ke||(e.WorkspaceSymbolRequest=ke={}));var Se;(function(Te){Te.method="workspaceSymbol/resolve",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Se||(e.WorkspaceSymbolResolveRequest=Se={}));var Ne;(function(Te){Te.method="textDocument/codeLens",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Ne||(e.CodeLensRequest=Ne={}));var Ae;(function(Te){Te.method="codeLens/resolve",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Ae||(e.CodeLensResolveRequest=Ae={}));var Fe;(function(Te){Te.method="workspace/codeLens/refresh",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolRequestType0(Te.method)})(Fe||(e.CodeLensRefreshRequest=Fe={}));var Pe;(function(Te){Te.method="textDocument/documentLink",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Pe||(e.DocumentLinkRequest=Pe={}));var We;(function(Te){Te.method="documentLink/resolve",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(We||(e.DocumentLinkResolveRequest=We={}));var be;(function(Te){Te.method="textDocument/formatting",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(be||(e.DocumentFormattingRequest=be={}));var lt;(function(Te){Te.method="textDocument/rangeFormatting",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(lt||(e.DocumentRangeFormattingRequest=lt={}));var $e;(function(Te){Te.method="textDocument/rangesFormatting",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})($e||(e.DocumentRangesFormattingRequest=$e={}));var at;(function(Te){Te.method="textDocument/onTypeFormatting",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(at||(e.DocumentOnTypeFormattingRequest=at={}));var bt;(function(Te){Te.Identifier=1})(bt||(e.PrepareSupportDefaultBehavior=bt={}));var Et;(function(Te){Te.method="textDocument/rename",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Et||(e.RenameRequest=Et={}));var pt;(function(Te){Te.method="textDocument/prepareRename",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(pt||(e.PrepareRenameRequest=pt={}));var Ct;(function(Te){Te.method="workspace/executeCommand",Te.messageDirection=t.MessageDirection.clientToServer,Te.type=new t.ProtocolRequestType(Te.method)})(Ct||(e.ExecuteCommandRequest=Ct={}));var ht;(function(Te){Te.method="workspace/applyEdit",Te.messageDirection=t.MessageDirection.serverToClient,Te.type=new t.ProtocolRequestType("workspace/applyEdit")})(ht||(e.ApplyWorkspaceEditRequest=ht={}))}}),Ddt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=Qv();function r(n,i,a,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(n,i,a,s)}A(r,"createProtocolConnection"),e.createProtocolConnection=r}}),Ndt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(a,s,o,l){l===void 0&&(l=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:A(function(){return s[o]},"get")}),Object.defineProperty(a,l,u)}):(function(a,s,o,l){l===void 0&&(l=o),a[l]=s[o]})),r=e&&e.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(Qv(),e),r((bC(),Qq(C6)),e),r(Si(),e),r(Mdt(),e);var n=Ddt();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:A(function(){return n.createProtocolConnection},"get")});var i;(function(a){a.lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),Odt=qr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(a,s,o,l){l===void 0&&(l=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:A(function(){return s[o]},"get")}),Object.defineProperty(a,l,u)}):(function(a,s,o,l){l===void 0&&(l=o),a[l]=s[o]})),r=e&&e.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=QTe();r(QTe(),e),r(Ndt(),e);function i(a,s,o,l){return(0,n.createMessageConnection)(a,s,o,l)}A(i,"createProtocolConnection"),e.createProtocolConnection=i}}),ZCe={};$p(ZCe,{AbstractAstReflection:()=>rV,AbstractCstNode:()=>iU,AbstractLangiumParser:()=>sU,AbstractParserErrorMessageProvider:()=>FRe,AbstractThreadedAsyncParser:()=>uwt,AstUtils:()=>nV,BiMap:()=>y6,Cancellation:()=>Jn,CompositeCstNodeImpl:()=>bR,ContextCache:()=>AR,CstNodeBuilder:()=>ORe,CstUtils:()=>eV,DEFAULT_TOKENIZE_OPTIONS:()=>kU,DONE_RESULT:()=>Hs,DatatypeSymbol:()=>d6,DefaultAstNodeDescriptionProvider:()=>g7e,DefaultAstNodeLocator:()=>y7e,DefaultAsyncParser:()=>O7e,DefaultCommentProvider:()=>N7e,DefaultConfigurationProvider:()=>v7e,DefaultDocumentBuilder:()=>x7e,DefaultDocumentValidator:()=>p7e,DefaultHydrator:()=>B7e,DefaultIndexManager:()=>b7e,DefaultJsonSerializer:()=>u7e,DefaultLangiumDocumentFactory:()=>t7e,DefaultLangiumDocuments:()=>r7e,DefaultLangiumProfiler:()=>gwt,DefaultLexer:()=>SU,DefaultLexerErrorMessageProvider:()=>w7e,DefaultLinker:()=>n7e,DefaultNameProvider:()=>i7e,DefaultReferenceDescriptionProvider:()=>m7e,DefaultReferences:()=>a7e,DefaultScopeComputation:()=>s7e,DefaultScopeProvider:()=>c7e,DefaultServiceRegistry:()=>h7e,DefaultTokenBuilder:()=>CR,DefaultValueConverter:()=>dU,DefaultWorkspaceLock:()=>P7e,DefaultWorkspaceManager:()=>T7e,Deferred:()=>wf,Disposable:()=>mm,DisposableCache:()=>ER,DocumentCache:()=>l7e,DocumentState:()=>Jr,DocumentValidator:()=>Fl,EMPTY_SCOPE:()=>swt,EMPTY_STREAM:()=>zv,EmptyFileSystem:()=>wn,EmptyFileSystemProvider:()=>z7e,ErrorWithLocation:()=>D6,GrammarAST:()=>eke,GrammarUtils:()=>DV,IndentationAwareLexer:()=>fwt,IndentationAwareTokenBuilder:()=>F7e,JSDocDocumentationProvider:()=>D7e,LangiumCompletionParser:()=>zRe,LangiumParser:()=>$Re,LangiumParserErrorMessageProvider:()=>oU,LeafCstNodeImpl:()=>f6,LexingMode:()=>pm,MapScope:()=>awt,Module:()=>JG,MultiMap:()=>Cf,MultiMapScope:()=>o7e,OperationCancelled:()=>Zu,ParserWorker:()=>hwt,ProfilingTask:()=>q7e,Reduction:()=>nC,RefResolving:()=>Fg,RegExpUtils:()=>OV,RootCstNodeImpl:()=>aU,SimpleCache:()=>xU,StreamImpl:()=>Ku,StreamScope:()=>jG,TextDocument:()=>g6,TreeStreamImpl:()=>Gv,URI:()=>ll,UriTrie:()=>yU,UriUtils:()=>Xs,VALIDATE_EACH_NODE:()=>d7e,ValidationCategory:()=>v6,ValidationRegistry:()=>f7e,ValueConverter:()=>Xu,WorkspaceCache:()=>bU,assertCondition:()=>NV,assertUnreachable:()=>Fp,createCompletionParser:()=>uU,createDefaultCoreModule:()=>gn,createDefaultSharedCoreModule:()=>mn,createGrammarConfig:()=>JV,createLangiumParser:()=>hU,createParser:()=>TR,delayNextTick:()=>kR,diagnosticData:()=>dm,eagerLoad:()=>MU,getDiagnosticRange:()=>wU,indentationBuilderDefaultOptions:()=>tq,inject:()=>Pr,interruptAndCheck:()=>Fa,isAstNode:()=>sa,isAstNodeDescription:()=>tV,isAstNodeWithComment:()=>TU,isCompositeCstNode:()=>pf,isIMultiModeLexerDefinition:()=>LR,isJSDoc:()=>AU,isLeafCstNode:()=>wm,isLinkingError:()=>Wg,isMultiReference:()=>Qu,isNamed:()=>vU,isOperationCancelled:()=>Gm,isReference:()=>Ys,isRootCstNode:()=>S6,isTokenTypeArray:()=>RR,isTokenTypeDictionary:()=>x6,loadGrammarFromJson:()=>za,parseJSDoc:()=>EU,prepareLangiumParser:()=>fU,setInterruptionPeriod:()=>pU,startCancelableOperation:()=>SR,stream:()=>zn,toDiagnosticData:()=>CU,toDiagnosticSeverity:()=>Qw});eV={};$p(eV,{DefaultNameRegexp:()=>_V,RangeComparison:()=>ju,compareRange:()=>EV,findCommentNode:()=>RV,findDeclarationNodeAtOffset:()=>xke,findLeafNodeAtOffset:()=>M6,findLeafNodeBeforeOffset:()=>LV,flattenCst:()=>vke,getDatatypeNode:()=>yke,getInteriorNodes:()=>wke,getNextNode:()=>bke,getPreviousNode:()=>MV,getStartlineNode:()=>Tke,inRange:()=>AV,isChildNode:()=>SV,isCommentNode:()=>K_,streamCst:()=>Uv,toDocumentSegment:()=>Hv,tokenToRange:()=>iC});A(sa,"isAstNode");A(Ys,"isReference");A(Qu,"isMultiReference");A(tV,"isAstNodeDescription");A(Wg,"isLinkingError");rV=class{static{A(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);let r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){let t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return sa(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});let n=r[t];if(n!==void 0)return n;{let i=this.types[e],a=i?i.superTypes.some(s=>this.isSubtype(s,t)):!1;return r[t]=a,a}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let r=this.getAllTypes(),n=[];for(let i of r)this.isSubtype(i,e)&&n.push(i);return this.allSubtypes[e]=n,n}}};A(pf,"isCompositeCstNode");A(wm,"isLeafCstNode");A(S6,"isRootCstNode");Ku=class cf{static{A(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:A(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),r=0,n=t.next();for(;!n.done;)r++,n=t.next();return r}toArray(){let t=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){let n=this.map(i=>[t?t(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(t){return new cf(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Hs})}join(t=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=t),n+=QCe(i.value)),a=!0;while(!i.done);return n}indexOf(t,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===t)return i;a=n.next(),i++}return-1}every(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(!t(n.value))return!1;n=r.next()}return!0}some(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)t(i.value,n),i=r.next(),n++}map(t){return new cf(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Hs:{done:!1,value:t(i)}})}filter(t){return new cf(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return Hs})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=t(i,a.value),a=n.next();return i}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let i=t.next();if(i.done)return n;let a=this.recursiveReduce(t,r,n);return a===void 0?i.value:r(a,i.value)}find(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return n.value;n=r.next()}}findIndex(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(t(i.value))return n;i=r.next(),n++}return-1}includes(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new cf(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=t(i);if(rC(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Hs})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new cf(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(rC(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Hs})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new cf(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?Hs:this.nextFn(r.state)))}distinct(t){return new cf(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=t?t(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Hs})}exclude(t,r){let n=new Set;for(let i of t){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};A(QCe,"toString");A(rC,"isIterable");zv=new Ku(()=>{},()=>Hs),Hs=Object.freeze({done:!0,value:void 0});A(zn,"stream");Gv=class extends Ku{static{A(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),n=>{for(n.pruned&&(n.iterators.pop(),n.pruned=!1);n.iterators.length>0;){let a=n.iterators[n.iterators.length-1].next();if(a.done)n.iterators.pop();else return n.iterators.push(t(a.value)[Symbol.iterator]()),a}return Hs})}iterator(){let e={state:this.startFn(),next:A(()=>this.nextFn(e.state),"next"),prune:A(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(e){function t(a){return a.reduce((s,o)=>s+o,0)}A(t,"sum"),e.sum=t;function r(a){return a.reduce((s,o)=>s*o,0)}A(r,"product"),e.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}A(n,"min"),e.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}A(i,"max"),e.max=i})(nC||(nC={}));nV={};$p(nV,{assignMandatoryProperties:()=>iV,copyAstNode:()=>P_,findRootNode:()=>Pv,getContainerOfType:()=>Cm,getDocument:()=>Cc,getReferenceNodes:()=>N_,hasContainerOfType:()=>JCe,linkContentToContainer:()=>qv,streamAllContents:()=>kf,streamAst:()=>kc,streamContents:()=>wC,streamReferences:()=>Vv});A(qv,"linkContentToContainer");A(Cm,"getContainerOfType");A(JCe,"hasContainerOfType");A(Cc,"getDocument");A(Pv,"findRootNode");A(N_,"getReferenceNodes");A(wC,"streamContents");A(kf,"streamAllContents");A(kc,"streamAst");A(O_,"isAstNodeInRange");A(Vv,"streamReferences");A(iV,"assignMandatoryProperties");A(aV,"copyDefaultValue");A(P_,"copyAstNode");eke={};$p(eke,{AbstractElement:()=>Ro,AbstractParserRule:()=>$w,AbstractRule:()=>Ev,AbstractType:()=>ol,Action:()=>Sp,Alternatives:()=>Fw,ArrayLiteral:()=>B_,ArrayType:()=>$_,Assignment:()=>Ep,BooleanLiteral:()=>F_,CharacterRange:()=>Ap,Condition:()=>_p,Conjunction:()=>zw,CrossReference:()=>Rp,Disjunction:()=>Gw,EndOfFile:()=>z_,Grammar:()=>hf,GrammarImport:()=>G_,Group:()=>Ug,InferredType:()=>q_,InfixRule:()=>Yu,InfixRuleOperatorList:()=>qw,InfixRuleOperators:()=>V_,Interface:()=>Av,Keyword:()=>_v,LangiumGrammarAstReflection:()=>kV,LangiumGrammarTerminals:()=>Pdt,NamedArgument:()=>Rv,NegatedToken:()=>Hg,Negation:()=>W_,NumberLiteral:()=>U_,Parameter:()=>Lv,ParameterReference:()=>H_,ParserRule:()=>xc,ReferenceType:()=>Vw,RegexToken:()=>Yg,ReturnType:()=>Y_,RuleCall:()=>Xg,SimpleType:()=>Iv,StringLiteral:()=>X_,TerminalAlternatives:()=>jg,TerminalElement:()=>Lo,TerminalGroup:()=>Kg,TerminalRule:()=>ff,TerminalRuleCall:()=>Zg,Type:()=>Ww,TypeAttribute:()=>Qg,TypeDefinition:()=>Jg,UnionType:()=>j_,UnorderedGroup:()=>Uw,UntilToken:()=>em,ValueLiteral:()=>tm,Wildcard:()=>Mv,isAbstractElement:()=>E6,isAbstractParserRule:()=>km,isAbstractRule:()=>tke,isAbstractType:()=>rke,isAction:()=>Dp,isAlternatives:()=>A6,isArrayLiteral:()=>nke,isArrayType:()=>sV,isAssignment:()=>gf,isBooleanLiteral:()=>oV,isCharacterRange:()=>lV,isCondition:()=>ike,isConjunction:()=>cV,isCrossReference:()=>Sm,isDisjunction:()=>uV,isEndOfFile:()=>hV,isGrammar:()=>ake,isGrammarImport:()=>ske,isGroup:()=>Em,isInferredType:()=>CC,isInfixRule:()=>Wv,isInfixRuleOperatorList:()=>oke,isInfixRuleOperators:()=>lke,isInterface:()=>fV,isKeyword:()=>mf,isNamedArgument:()=>cke,isNegatedToken:()=>dV,isNegation:()=>pV,isNumberLiteral:()=>uke,isParameter:()=>hke,isParameterReference:()=>gV,isParserRule:()=>Ks,isReferenceType:()=>mV,isRegexToken:()=>yV,isReturnType:()=>vV,isRuleCall:()=>yf,isSimpleType:()=>_6,isStringLiteral:()=>fke,isTerminalAlternatives:()=>xV,isTerminalElement:()=>dke,isTerminalGroup:()=>bV,isTerminalRule:()=>Vl,isTerminalRuleCall:()=>R6,isType:()=>L6,isTypeAttribute:()=>pke,isTypeDefinition:()=>gke,isUnionType:()=>TV,isUnorderedGroup:()=>I6,isUntilToken:()=>wV,isValueLiteral:()=>mke,isWildcard:()=>CV,reflection:()=>vr});Pdt={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Ro={$type:"AbstractElement",cardinality:"cardinality"};A(E6,"isAbstractElement");$w={$type:"AbstractParserRule"};A(km,"isAbstractParserRule");Ev={$type:"AbstractRule"};A(tke,"isAbstractRule");ol={$type:"AbstractType"};A(rke,"isAbstractType");Sp={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};A(Dp,"isAction");Fw={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};A(A6,"isAlternatives");B_={$type:"ArrayLiteral",elements:"elements"};A(nke,"isArrayLiteral");$_={$type:"ArrayType",elementType:"elementType"};A(sV,"isArrayType");Ep={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};A(gf,"isAssignment");F_={$type:"BooleanLiteral",true:"true"};A(oV,"isBooleanLiteral");Ap={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};A(lV,"isCharacterRange");_p={$type:"Condition"};A(ike,"isCondition");zw={$type:"Conjunction",left:"left",right:"right"};A(cV,"isConjunction");Rp={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};A(Sm,"isCrossReference");Gw={$type:"Disjunction",left:"left",right:"right"};A(uV,"isDisjunction");z_={$type:"EndOfFile",cardinality:"cardinality"};A(hV,"isEndOfFile");hf={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};A(ake,"isGrammar");G_={$type:"GrammarImport",path:"path"};A(ske,"isGrammarImport");Ug={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};A(Em,"isGroup");q_={$type:"InferredType",name:"name"};A(CC,"isInferredType");Yu={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};A(Wv,"isInfixRule");qw={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};A(oke,"isInfixRuleOperatorList");V_={$type:"InfixRuleOperators",precedences:"precedences"};A(lke,"isInfixRuleOperators");Av={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};A(fV,"isInterface");_v={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};A(mf,"isKeyword");Rv={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};A(cke,"isNamedArgument");Hg={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};A(dV,"isNegatedToken");W_={$type:"Negation",value:"value"};A(pV,"isNegation");U_={$type:"NumberLiteral",value:"value"};A(uke,"isNumberLiteral");Lv={$type:"Parameter",name:"name"};A(hke,"isParameter");H_={$type:"ParameterReference",parameter:"parameter"};A(gV,"isParameterReference");xc={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};A(Ks,"isParserRule");Vw={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};A(mV,"isReferenceType");Yg={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};A(yV,"isRegexToken");Y_={$type:"ReturnType",name:"name"};A(vV,"isReturnType");Xg={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};A(yf,"isRuleCall");Iv={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};A(_6,"isSimpleType");X_={$type:"StringLiteral",value:"value"};A(fke,"isStringLiteral");jg={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};A(xV,"isTerminalAlternatives");Lo={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};A(dke,"isTerminalElement");Kg={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};A(bV,"isTerminalGroup");ff={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};A(Vl,"isTerminalRule");Zg={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};A(R6,"isTerminalRuleCall");Ww={$type:"Type",name:"name",type:"type"};A(L6,"isType");Qg={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};A(pke,"isTypeAttribute");Jg={$type:"TypeDefinition"};A(gke,"isTypeDefinition");j_={$type:"UnionType",types:"types"};A(TV,"isUnionType");Uw={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};A(I6,"isUnorderedGroup");em={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};A(wV,"isUntilToken");tm={$type:"ValueLiteral"};A(mke,"isValueLiteral");Mv={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};A(CV,"isWildcard");kV=class extends rV{static{A(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:Ro.$type,properties:{cardinality:{name:Ro.cardinality}},superTypes:[]},AbstractParserRule:{name:$w.$type,properties:{},superTypes:[Ev.$type,ol.$type]},AbstractRule:{name:Ev.$type,properties:{},superTypes:[]},AbstractType:{name:ol.$type,properties:{},superTypes:[]},Action:{name:Sp.$type,properties:{cardinality:{name:Sp.cardinality},feature:{name:Sp.feature},inferredType:{name:Sp.inferredType},operator:{name:Sp.operator},type:{name:Sp.type,referenceType:ol.$type}},superTypes:[Ro.$type]},Alternatives:{name:Fw.$type,properties:{cardinality:{name:Fw.cardinality},elements:{name:Fw.elements,defaultValue:[]}},superTypes:[Ro.$type]},ArrayLiteral:{name:B_.$type,properties:{elements:{name:B_.elements,defaultValue:[]}},superTypes:[tm.$type]},ArrayType:{name:$_.$type,properties:{elementType:{name:$_.elementType}},superTypes:[Jg.$type]},Assignment:{name:Ep.$type,properties:{cardinality:{name:Ep.cardinality},feature:{name:Ep.feature},operator:{name:Ep.operator},predicate:{name:Ep.predicate},terminal:{name:Ep.terminal}},superTypes:[Ro.$type]},BooleanLiteral:{name:F_.$type,properties:{true:{name:F_.true,defaultValue:!1}},superTypes:[_p.$type,tm.$type]},CharacterRange:{name:Ap.$type,properties:{cardinality:{name:Ap.cardinality},left:{name:Ap.left},lookahead:{name:Ap.lookahead},parenthesized:{name:Ap.parenthesized,defaultValue:!1},right:{name:Ap.right}},superTypes:[Lo.$type]},Condition:{name:_p.$type,properties:{},superTypes:[]},Conjunction:{name:zw.$type,properties:{left:{name:zw.left},right:{name:zw.right}},superTypes:[_p.$type]},CrossReference:{name:Rp.$type,properties:{cardinality:{name:Rp.cardinality},deprecatedSyntax:{name:Rp.deprecatedSyntax,defaultValue:!1},isMulti:{name:Rp.isMulti,defaultValue:!1},terminal:{name:Rp.terminal},type:{name:Rp.type,referenceType:ol.$type}},superTypes:[Ro.$type]},Disjunction:{name:Gw.$type,properties:{left:{name:Gw.left},right:{name:Gw.right}},superTypes:[_p.$type]},EndOfFile:{name:z_.$type,properties:{cardinality:{name:z_.cardinality}},superTypes:[Ro.$type]},Grammar:{name:hf.$type,properties:{imports:{name:hf.imports,defaultValue:[]},interfaces:{name:hf.interfaces,defaultValue:[]},isDeclared:{name:hf.isDeclared,defaultValue:!1},name:{name:hf.name},rules:{name:hf.rules,defaultValue:[]},types:{name:hf.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:G_.$type,properties:{path:{name:G_.path}},superTypes:[]},Group:{name:Ug.$type,properties:{cardinality:{name:Ug.cardinality},elements:{name:Ug.elements,defaultValue:[]},guardCondition:{name:Ug.guardCondition},predicate:{name:Ug.predicate}},superTypes:[Ro.$type]},InferredType:{name:q_.$type,properties:{name:{name:q_.name}},superTypes:[ol.$type]},InfixRule:{name:Yu.$type,properties:{call:{name:Yu.call},dataType:{name:Yu.dataType},inferredType:{name:Yu.inferredType},name:{name:Yu.name},operators:{name:Yu.operators},parameters:{name:Yu.parameters,defaultValue:[]},returnType:{name:Yu.returnType,referenceType:ol.$type}},superTypes:[$w.$type]},InfixRuleOperatorList:{name:qw.$type,properties:{associativity:{name:qw.associativity},operators:{name:qw.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:V_.$type,properties:{precedences:{name:V_.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Av.$type,properties:{attributes:{name:Av.attributes,defaultValue:[]},name:{name:Av.name},superTypes:{name:Av.superTypes,defaultValue:[],referenceType:ol.$type}},superTypes:[ol.$type]},Keyword:{name:_v.$type,properties:{cardinality:{name:_v.cardinality},predicate:{name:_v.predicate},value:{name:_v.value}},superTypes:[Ro.$type]},NamedArgument:{name:Rv.$type,properties:{calledByName:{name:Rv.calledByName,defaultValue:!1},parameter:{name:Rv.parameter,referenceType:Lv.$type},value:{name:Rv.value}},superTypes:[]},NegatedToken:{name:Hg.$type,properties:{cardinality:{name:Hg.cardinality},lookahead:{name:Hg.lookahead},parenthesized:{name:Hg.parenthesized,defaultValue:!1},terminal:{name:Hg.terminal}},superTypes:[Lo.$type]},Negation:{name:W_.$type,properties:{value:{name:W_.value}},superTypes:[_p.$type]},NumberLiteral:{name:U_.$type,properties:{value:{name:U_.value}},superTypes:[tm.$type]},Parameter:{name:Lv.$type,properties:{name:{name:Lv.name}},superTypes:[]},ParameterReference:{name:H_.$type,properties:{parameter:{name:H_.parameter,referenceType:Lv.$type}},superTypes:[_p.$type]},ParserRule:{name:xc.$type,properties:{dataType:{name:xc.dataType},definition:{name:xc.definition},entry:{name:xc.entry,defaultValue:!1},fragment:{name:xc.fragment,defaultValue:!1},inferredType:{name:xc.inferredType},name:{name:xc.name},parameters:{name:xc.parameters,defaultValue:[]},returnType:{name:xc.returnType,referenceType:ol.$type}},superTypes:[$w.$type]},ReferenceType:{name:Vw.$type,properties:{isMulti:{name:Vw.isMulti,defaultValue:!1},referenceType:{name:Vw.referenceType}},superTypes:[Jg.$type]},RegexToken:{name:Yg.$type,properties:{cardinality:{name:Yg.cardinality},lookahead:{name:Yg.lookahead},parenthesized:{name:Yg.parenthesized,defaultValue:!1},regex:{name:Yg.regex}},superTypes:[Lo.$type]},ReturnType:{name:Y_.$type,properties:{name:{name:Y_.name}},superTypes:[]},RuleCall:{name:Xg.$type,properties:{arguments:{name:Xg.arguments,defaultValue:[]},cardinality:{name:Xg.cardinality},predicate:{name:Xg.predicate},rule:{name:Xg.rule,referenceType:Ev.$type}},superTypes:[Ro.$type]},SimpleType:{name:Iv.$type,properties:{primitiveType:{name:Iv.primitiveType},stringType:{name:Iv.stringType},typeRef:{name:Iv.typeRef,referenceType:ol.$type}},superTypes:[Jg.$type]},StringLiteral:{name:X_.$type,properties:{value:{name:X_.value}},superTypes:[tm.$type]},TerminalAlternatives:{name:jg.$type,properties:{cardinality:{name:jg.cardinality},elements:{name:jg.elements,defaultValue:[]},lookahead:{name:jg.lookahead},parenthesized:{name:jg.parenthesized,defaultValue:!1}},superTypes:[Lo.$type]},TerminalElement:{name:Lo.$type,properties:{cardinality:{name:Lo.cardinality},lookahead:{name:Lo.lookahead},parenthesized:{name:Lo.parenthesized,defaultValue:!1}},superTypes:[Ro.$type]},TerminalGroup:{name:Kg.$type,properties:{cardinality:{name:Kg.cardinality},elements:{name:Kg.elements,defaultValue:[]},lookahead:{name:Kg.lookahead},parenthesized:{name:Kg.parenthesized,defaultValue:!1}},superTypes:[Lo.$type]},TerminalRule:{name:ff.$type,properties:{definition:{name:ff.definition},fragment:{name:ff.fragment,defaultValue:!1},hidden:{name:ff.hidden,defaultValue:!1},name:{name:ff.name},type:{name:ff.type}},superTypes:[Ev.$type]},TerminalRuleCall:{name:Zg.$type,properties:{cardinality:{name:Zg.cardinality},lookahead:{name:Zg.lookahead},parenthesized:{name:Zg.parenthesized,defaultValue:!1},rule:{name:Zg.rule,referenceType:ff.$type}},superTypes:[Lo.$type]},Type:{name:Ww.$type,properties:{name:{name:Ww.name},type:{name:Ww.type}},superTypes:[ol.$type]},TypeAttribute:{name:Qg.$type,properties:{defaultValue:{name:Qg.defaultValue},isOptional:{name:Qg.isOptional,defaultValue:!1},name:{name:Qg.name},type:{name:Qg.type}},superTypes:[]},TypeDefinition:{name:Jg.$type,properties:{},superTypes:[]},UnionType:{name:j_.$type,properties:{types:{name:j_.types,defaultValue:[]}},superTypes:[Jg.$type]},UnorderedGroup:{name:Uw.$type,properties:{cardinality:{name:Uw.cardinality},elements:{name:Uw.elements,defaultValue:[]}},superTypes:[Ro.$type]},UntilToken:{name:em.$type,properties:{cardinality:{name:em.cardinality},lookahead:{name:em.lookahead},parenthesized:{name:em.parenthesized,defaultValue:!1},terminal:{name:em.terminal}},superTypes:[Lo.$type]},ValueLiteral:{name:tm.$type,properties:{},superTypes:[]},Wildcard:{name:Mv.$type,properties:{cardinality:{name:Mv.cardinality},lookahead:{name:Mv.lookahead},parenthesized:{name:Mv.parenthesized,defaultValue:!1}},superTypes:[Lo.$type]}}}},vr=new kV;A(yke,"getDatatypeNode");A(Uv,"streamCst");A(vke,"flattenCst");A(SV,"isChildNode");A(iC,"tokenToRange");A(Hv,"toDocumentSegment");(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(ju||(ju={}));A(EV,"compareRange");A(AV,"inRange");_V=/^[\w\p{L}]$/u;A(xke,"findDeclarationNodeAtOffset");A(RV,"findCommentNode");A(K_,"isCommentNode");A(M6,"findLeafNodeAtOffset");A(LV,"findLeafNodeBeforeOffset");A(IV,"binarySearch");A(MV,"getPreviousNode");A(bke,"getNextNode");A(Tke,"getStartlineNode");A(wke,"getInteriorNodes");A(Cke,"getCommonParent");A(xG,"getParentChain");DV={};$p(DV,{findAssignment:()=>HV,findNameAssignment:()=>z6,findNodeForKeyword:()=>UV,findNodeForProperty:()=>B6,findNodesForKeyword:()=>Lke,findNodesForKeywordInternal:()=>F6,findNodesForProperty:()=>WV,getActionAtElement:()=>XV,getActionType:()=>KV,getAllReachableRules:()=>P6,getAllRulesUsedForCrossReferences:()=>Rke,getCrossReferenceTerminal:()=>qV,getEntryRule:()=>FV,getExplicitRuleType:()=>SC,getHiddenRules:()=>zV,getRuleType:()=>ZV,getRuleTypeName:()=>Oke,getTypeName:()=>ym,isArrayCardinality:()=>Mke,isArrayOperator:()=>Dke,isCommentTerminal:()=>VV,isDataType:()=>Nke,isDataTypeRule:()=>kC,isOptionalCardinality:()=>Ike,terminalRegex:()=>EC});D6=class extends Error{static{A(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};A(Fp,"assertUnreachable");A(NV,"assertCondition");OV={};$p(OV,{NEWLINE_REGEXP:()=>Ske,escapeRegExp:()=>Jv,getTerminalParts:()=>Ake,isMultilineComment:()=>PV,isWhitespace:()=>O6,partialMatches:()=>BV,partialRegExp:()=>$V,whitespaceCharacters:()=>_ke});A(Nr,"cc");A(f_,"insertToSet");A(Tv,"addFlag");A(Pg,"ASSERT_EXISTS");A(Dw,"ASSERT_NEVER_REACH_HERE");A(bG,"isCharacter");Z_=[];for(let e=Nr("0");e<=Nr("9");e++)Z_.push(e);Q_=[Nr("_")].concat(Z_);for(let e=Nr("a");e<=Nr("z");e++)Q_.push(e);for(let e=Nr("A");e<=Nr("Z");e++)Q_.push(e);JTe=[Nr(" "),Nr("\f"),Nr(` +`),Nr("\r"),Nr(" "),Nr("\v"),Nr(" "),Nr("\xA0"),Nr("\u1680"),Nr("\u2000"),Nr("\u2001"),Nr("\u2002"),Nr("\u2003"),Nr("\u2004"),Nr("\u2005"),Nr("\u2006"),Nr("\u2007"),Nr("\u2008"),Nr("\u2009"),Nr("\u200A"),Nr("\u2028"),Nr("\u2029"),Nr("\u202F"),Nr("\u205F"),Nr("\u3000"),Nr("\uFEFF")],Bdt=/[0-9a-fA-F]/,zA=/[0-9]/,$dt=/[1-9]/,kke=class{static{A(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Tv(r,"global");break;case"i":Tv(r,"ignoreCase");break;case"m":Tv(r,"multiLine");break;case"u":Tv(r,"unicode");break;case"y":Tv(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Pg(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Dw()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),t={atLeast:n,atMost:i}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Pg(t);break}if(!(e===!0&&t===void 0)&&Pg(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Pg(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Dw()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Nr(` +`),Nr("\r"),Nr("\u2028"),Nr("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=Z_;break;case"D":e=Z_,t=!0;break;case"s":e=JTe;break;case"S":e=JTe,t=!0;break;case"w":e=Q_;break;case"W":e=Q_,t=!0;break}return Pg(e)?{type:"Set",value:e,complement:t}:Dw()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Nr("\f");break;case"n":e=Nr(` +`);break;case"r":e=Nr("\r");break;case"t":e=Nr(" ");break;case"v":e=Nr("\v");break}return Pg(e)?{type:"Character",value:e}:Dw()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Nr("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:Nr(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:Nr(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let r=this.classAtom(),n=r.type==="Character";if(bG(r)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),a=i.type==="Character";if(bG(i)){if(i.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},J6=class{static{S(this,"BaseRegExpVisitor")}visitChildren(e){for(let t in e){let r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},A2e=/\r?\n/gm,_2e=new E2e,Yst=class extends J6{static{S(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` -`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=Gy(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` -`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},sg=new Yst;S(L2e,"getTerminalParts");S(L$,"isMultilineComment");R2e=`\f -\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");S(eA,"isWhitespace");S(Gy,"escapeRegExp");S(R$,"partialMatches");S(I$,"partialRegExp");S(D$,"getEntryRule");S(N$,"getHiddenRules");S(tA,"getAllReachableRules");S(M$,"ruleDfs");S(I2e,"getAllRulesUsedForCrossReferences");S(O$,"getCrossReferenceTerminal");S(P$,"isCommentTerminal");S(B$,"findNodesForProperty");S(rA,"findNodeForProperty");S(iA,"findNodesForPropertyInternal");S(D2e,"findNodesForKeyword");S(F$,"findNodeForKeyword");S(nA,"findNodesForKeywordInternal");S($$,"findAssignment");S(aA,"findNameAssignment");S(z$,"findNameAssignmentInternal");S(G$,"getActionAtElement");S(N2e,"isOptionalCardinality");S(M2e,"isArrayCardinality");S(O2e,"isArrayOperator");S(JT,"isDataTypeRule");S(q$,"isDataTypeRuleInternal");S(P2e,"isDataType");S(b6,"isDataTypeInternal");S(ew,"getExplicitRuleType");S(fg,"getTypeName");S(V$,"getActionType");S(B2e,"getRuleTypeName");S(W$,"getRuleType");S(tw,"terminalRegex");U$=/[\s\S]/.source;S(wg,"abstractElementToRegex");S(F2e,"terminalAlternativesToRegex");S($2e,"terminalGroupToRegex");S(z2e,"untilTokenToRegex");S(G2e,"negateTokenToRegex");S(q2e,"characterRangeToRegex");S(zE,"keywordToRegex");S(mu,"withCardinality");S(H$,"createGrammarConfig");jst=typeof global=="object"&&global&&global.Object===Object&&global,V2e=jst,Xst=typeof self=="object"&&self&&self.Object===Object&&self,Kst=V2e||Xst||Function("return this")(),vu=Kst,Zst=vu.Symbol,sl=Zst,W2e=Object.prototype,Qst=W2e.hasOwnProperty,Jst=W2e.toString,jx=sl?sl.toStringTag:void 0;S(U2e,"getRawTag");eot=U2e,tot=Object.prototype,rot=tot.toString;S(H2e,"objectToString");iot=H2e,not="[object Null]",aot="[object Undefined]",oye=sl?sl.toStringTag:void 0;S(Y2e,"baseGetTag");Yd=Y2e;S(j2e,"isObjectLike");Hl=j2e,sot="[object Symbol]";S(X2e,"isSymbol");sA=X2e;S(K2e,"arrayMap");rw=K2e,oot=Array.isArray,Zr=oot,lot=1/0,lye=sl?sl.prototype:void 0,cye=lye?lye.toString:void 0;S(Y$,"baseToString");cot=Y$,uot=/\s/;S(Z2e,"trimmedEndIndex");hot=Z2e,fot=/^\s+/;S(Q2e,"baseTrim");dot=Q2e;S(J2e,"isObject");ol=J2e,uye=NaN,pot=/^[-+]0x[0-9a-f]+$/i,got=/^0b[01]+$/i,mot=/^0o[0-7]+$/i,yot=parseInt;S(ebe,"toNumber");vot=ebe,hye=1/0,bot=17976931348623157e292;S(tbe,"toFinite");xot=tbe;S(rbe,"toInteger");iw=rbe;S(ibe,"identity");My=ibe,Tot="[object AsyncFunction]",wot="[object Function]",kot="[object GeneratorFunction]",Cot="[object Proxy]";S(nbe,"isFunction");qh=nbe,Sot=vu["__core-js_shared__"],_P=Sot,fye=(function(){var e=/[^.]+$/.exec(_P&&_P.keys&&_P.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();S(abe,"isMasked");Eot=abe,Aot=Function.prototype,_ot=Aot.toString;S(sbe,"toSource");kg=sbe,Lot=/[\\^$.*+?()[\]{}|]/g,Rot=/^\[object .+?Constructor\]$/,Iot=Function.prototype,Dot=Object.prototype,Not=Iot.toString,Mot=Dot.hasOwnProperty,Oot=RegExp("^"+Not.call(Mot).replace(Lot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");S(obe,"baseIsNative");Pot=obe;S(lbe,"getValue");Bot=lbe;S(cbe,"getNative");Cg=cbe,Fot=Cg(vu,"WeakMap"),ZB=Fot,dye=Object.create,$ot=(function(){function e(){}return S(e,"object"),function(t){if(!ol(t))return{};if(dye)return dye(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),zot=$ot;S(ube,"apply");Got=ube;S(hbe,"noop");Hn=hbe;S(fbe,"copyArray");qot=fbe,Vot=800,Wot=16,Uot=Date.now;S(dbe,"shortOut");Hot=dbe;S(pbe,"constant");Yot=pbe,jot=(function(){try{var e=Cg(Object,"defineProperty");return e({},"",{}),e}catch{}})(),x6=jot,Xot=x6?function(e,t){return x6(e,"toString",{configurable:!0,enumerable:!1,value:Yot(t),writable:!0})}:My,Kot=Xot,Zot=Hot(Kot),Qot=Zot;S(gbe,"arrayEach");mbe=gbe;S(ybe,"baseFindIndex");vbe=ybe;S(bbe,"baseIsNaN");Jot=bbe;S(xbe,"strictIndexOf");elt=xbe;S(Tbe,"baseIndexOf");j$=Tbe;S(wbe,"arrayIncludes");kbe=wbe,tlt=9007199254740991,rlt=/^(?:0|[1-9]\d*)$/;S(Cbe,"isIndex");oA=Cbe;S(Sbe,"baseAssignValue");X$=Sbe;S(Ebe,"eq");nw=Ebe,ilt=Object.prototype,nlt=ilt.hasOwnProperty;S(Abe,"assignValue");lA=Abe;S(_be,"copyObject");aw=_be,pye=Math.max;S(Lbe,"overRest");alt=Lbe;S(Rbe,"baseRest");K$=Rbe,slt=9007199254740991;S(Ibe,"isLength");Z$=Ibe;S(Dbe,"isArrayLike");bu=Dbe;S(Nbe,"isIterateeCall");cA=Nbe;S(Mbe,"createAssigner");olt=Mbe,llt=Object.prototype;S(Obe,"isPrototype");sw=Obe;S(Pbe,"baseTimes");clt=Pbe,ult="[object Arguments]";S(Bbe,"baseIsArguments");gye=Bbe,Fbe=Object.prototype,hlt=Fbe.hasOwnProperty,flt=Fbe.propertyIsEnumerable,dlt=gye((function(){return arguments})())?gye:function(e){return Hl(e)&&hlt.call(e,"callee")&&!flt.call(e,"callee")},uA=dlt;S($be,"stubFalse");plt=$be,zbe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mye=zbe&&typeof module=="object"&&module&&!module.nodeType&&module,glt=mye&&mye.exports===zbe,yye=glt?vu.Buffer:void 0,mlt=yye?yye.isBuffer:void 0,ylt=mlt||plt,MT=ylt,vlt="[object Arguments]",blt="[object Array]",xlt="[object Boolean]",Tlt="[object Date]",wlt="[object Error]",klt="[object Function]",Clt="[object Map]",Slt="[object Number]",Elt="[object Object]",Alt="[object RegExp]",_lt="[object Set]",Llt="[object String]",Rlt="[object WeakMap]",Ilt="[object ArrayBuffer]",Dlt="[object DataView]",Nlt="[object Float32Array]",Mlt="[object Float64Array]",Olt="[object Int8Array]",Plt="[object Int16Array]",Blt="[object Int32Array]",Flt="[object Uint8Array]",$lt="[object Uint8ClampedArray]",zlt="[object Uint16Array]",Glt="[object Uint32Array]",Oi={};Oi[Nlt]=Oi[Mlt]=Oi[Olt]=Oi[Plt]=Oi[Blt]=Oi[Flt]=Oi[$lt]=Oi[zlt]=Oi[Glt]=!0;Oi[vlt]=Oi[blt]=Oi[Ilt]=Oi[xlt]=Oi[Dlt]=Oi[Tlt]=Oi[wlt]=Oi[klt]=Oi[Clt]=Oi[Slt]=Oi[Elt]=Oi[Alt]=Oi[_lt]=Oi[Llt]=Oi[Rlt]=!1;S(Gbe,"baseIsTypedArray");qlt=Gbe;S(qbe,"baseUnary");ow=qbe,Vbe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wT=Vbe&&typeof module=="object"&&module&&!module.nodeType&&module,Vlt=wT&&wT.exports===Vbe,LP=Vlt&&V2e.process,Wlt=(function(){try{var e=wT&&wT.require&&wT.require("util").types;return e||LP&&LP.binding&&LP.binding("util")}catch{}})(),Gd=Wlt,vye=Gd&&Gd.isTypedArray,Ult=vye?ow(vye):qlt,Q$=Ult,Hlt=Object.prototype,Ylt=Hlt.hasOwnProperty;S(Wbe,"arrayLikeKeys");Ube=Wbe;S(Hbe,"overArg");Ybe=Hbe,jlt=Ybe(Object.keys,Object),Xlt=jlt,Klt=Object.prototype,Zlt=Klt.hasOwnProperty;S(jbe,"baseKeys");Xbe=jbe;S(Kbe,"keys");yo=Kbe,Qlt=Object.prototype,Jlt=Qlt.hasOwnProperty,ect=olt(function(e,t){if(sw(t)||bu(t)){aw(t,yo(t),e);return}for(var r in t)Jlt.call(t,r)&&lA(e,r,t[r])}),vo=ect;S(Zbe,"nativeKeysIn");tct=Zbe,rct=Object.prototype,ict=rct.hasOwnProperty;S(Qbe,"baseKeysIn");nct=Qbe;S(Jbe,"keysIn");hA=Jbe,act=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sct=/^\w*$/;S(exe,"isKey");J$=exe,oct=Cg(Object,"create"),OT=oct;S(txe,"hashClear");lct=txe;S(rxe,"hashDelete");cct=rxe,uct="__lodash_hash_undefined__",hct=Object.prototype,fct=hct.hasOwnProperty;S(ixe,"hashGet");dct=ixe,pct=Object.prototype,gct=pct.hasOwnProperty;S(nxe,"hashHas");mct=nxe,yct="__lodash_hash_undefined__";S(axe,"hashSet");vct=axe;S(Sg,"Hash");Sg.prototype.clear=lct;Sg.prototype.delete=cct;Sg.prototype.get=dct;Sg.prototype.has=mct;Sg.prototype.set=vct;bye=Sg;S(sxe,"listCacheClear");bct=sxe;S(oxe,"assocIndexOf");fA=oxe,xct=Array.prototype,Tct=xct.splice;S(lxe,"listCacheDelete");wct=lxe;S(cxe,"listCacheGet");kct=cxe;S(uxe,"listCacheHas");Cct=uxe;S(hxe,"listCacheSet");Sct=hxe;S(Eg,"ListCache");Eg.prototype.clear=bct;Eg.prototype.delete=wct;Eg.prototype.get=kct;Eg.prototype.has=Cct;Eg.prototype.set=Sct;dA=Eg,Ect=Cg(vu,"Map"),PT=Ect;S(fxe,"mapCacheClear");Act=fxe;S(dxe,"isKeyable");_ct=dxe;S(pxe,"getMapData");pA=pxe;S(gxe,"mapCacheDelete");Lct=gxe;S(mxe,"mapCacheGet");Rct=mxe;S(yxe,"mapCacheHas");Ict=yxe;S(vxe,"mapCacheSet");Dct=vxe;S(Ag,"MapCache");Ag.prototype.clear=Act;Ag.prototype.delete=Lct;Ag.prototype.get=Rct;Ag.prototype.has=Ict;Ag.prototype.set=Dct;gA=Ag,Nct="Expected a function";S(mA,"memoize");mA.Cache=gA;Mct=mA,Oct=500;S(bxe,"memoizeCapped");Pct=bxe,Bct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fct=/\\(\\)?/g,$ct=Pct(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Bct,function(r,i,n,a){t.push(n?a.replace(Fct,"$1"):i||r)}),t}),zct=$ct;S(xxe,"toString");Gct=xxe;S(Txe,"castPath");yA=Txe,qct=1/0;S(wxe,"toKey");lw=wxe;S(kxe,"baseGet");ez=kxe;S(Cxe,"get");Vct=Cxe;S(Sxe,"arrayPush");tz=Sxe,xye=sl?sl.isConcatSpreadable:void 0;S(Exe,"isFlattenable");Wct=Exe;S(rz,"baseFlatten");iz=rz;S(Axe,"flatten");Wl=Axe,Uct=Ybe(Object.getPrototypeOf,Object),_xe=Uct;S(Lxe,"baseSlice");Rxe=Lxe;S(Ixe,"arrayReduce");Hct=Ixe;S(Dxe,"stackClear");Yct=Dxe;S(Nxe,"stackDelete");jct=Nxe;S(Mxe,"stackGet");Xct=Mxe;S(Oxe,"stackHas");Kct=Oxe,Zct=200;S(Pxe,"stackSet");Qct=Pxe;S(_g,"Stack");_g.prototype.clear=Yct;_g.prototype.delete=jct;_g.prototype.get=Xct;_g.prototype.has=Kct;_g.prototype.set=Qct;kT=_g;S(Bxe,"baseAssign");Jct=Bxe;S(Fxe,"baseAssignIn");eut=Fxe,$xe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tye=$xe&&typeof module=="object"&&module&&!module.nodeType&&module,tut=Tye&&Tye.exports===$xe,wye=tut?vu.Buffer:void 0,kye=wye?wye.allocUnsafe:void 0;S(zxe,"cloneBuffer");rut=zxe;S(Gxe,"arrayFilter");nz=Gxe;S(qxe,"stubArray");Vxe=qxe,iut=Object.prototype,nut=iut.propertyIsEnumerable,Cye=Object.getOwnPropertySymbols,aut=Cye?function(e){return e==null?[]:(e=Object(e),nz(Cye(e),function(t){return nut.call(e,t)}))}:Vxe,az=aut;S(Wxe,"copySymbols");sut=Wxe,out=Object.getOwnPropertySymbols,lut=out?function(e){for(var t=[];e;)tz(t,az(e)),e=_xe(e);return t}:Vxe,Uxe=lut;S(Hxe,"copySymbolsIn");cut=Hxe;S(Yxe,"baseGetAllKeys");jxe=Yxe;S(Xxe,"getAllKeys");QB=Xxe;S(Kxe,"getAllKeysIn");Zxe=Kxe,uut=Cg(vu,"DataView"),JB=uut,hut=Cg(vu,"Promise"),eF=hut,fut=Cg(vu,"Set"),Cy=fut,Sye="[object Map]",dut="[object Object]",Eye="[object Promise]",Aye="[object Set]",_ye="[object WeakMap]",Lye="[object DataView]",put=kg(JB),gut=kg(PT),mut=kg(eF),yut=kg(Cy),vut=kg(ZB),F0=Yd;(JB&&F0(new JB(new ArrayBuffer(1)))!=Lye||PT&&F0(new PT)!=Sye||eF&&F0(eF.resolve())!=Eye||Cy&&F0(new Cy)!=Aye||ZB&&F0(new ZB)!=_ye)&&(F0=S(function(e){var t=Yd(e),r=t==dut?e.constructor:void 0,i=r?kg(r):"";if(i)switch(i){case put:return Lye;case gut:return Sye;case mut:return Eye;case yut:return Aye;case vut:return _ye}return t},"getTag"));Oy=F0,but=Object.prototype,xut=but.hasOwnProperty;S(Qxe,"initCloneArray");Tut=Qxe,wut=vu.Uint8Array,T6=wut;S(Jxe,"cloneArrayBuffer");sz=Jxe;S(eTe,"cloneDataView");kut=eTe,Cut=/\w*$/;S(tTe,"cloneRegExp");Sut=tTe,Rye=sl?sl.prototype:void 0,Iye=Rye?Rye.valueOf:void 0;S(rTe,"cloneSymbol");Eut=rTe;S(iTe,"cloneTypedArray");Aut=iTe,_ut="[object Boolean]",Lut="[object Date]",Rut="[object Map]",Iut="[object Number]",Dut="[object RegExp]",Nut="[object Set]",Mut="[object String]",Out="[object Symbol]",Put="[object ArrayBuffer]",But="[object DataView]",Fut="[object Float32Array]",$ut="[object Float64Array]",zut="[object Int8Array]",Gut="[object Int16Array]",qut="[object Int32Array]",Vut="[object Uint8Array]",Wut="[object Uint8ClampedArray]",Uut="[object Uint16Array]",Hut="[object Uint32Array]";S(nTe,"initCloneByTag");Yut=nTe;S(aTe,"initCloneObject");jut=aTe,Xut="[object Map]";S(sTe,"baseIsMap");Kut=sTe,Dye=Gd&&Gd.isMap,Zut=Dye?ow(Dye):Kut,Qut=Zut,Jut="[object Set]";S(oTe,"baseIsSet");eht=oTe,Nye=Gd&&Gd.isSet,tht=Nye?ow(Nye):eht,rht=tht,iht=1,nht=2,aht=4,lTe="[object Arguments]",sht="[object Array]",oht="[object Boolean]",lht="[object Date]",cht="[object Error]",cTe="[object Function]",uht="[object GeneratorFunction]",hht="[object Map]",fht="[object Number]",uTe="[object Object]",dht="[object RegExp]",pht="[object Set]",ght="[object String]",mht="[object Symbol]",yht="[object WeakMap]",vht="[object ArrayBuffer]",bht="[object DataView]",xht="[object Float32Array]",Tht="[object Float64Array]",wht="[object Int8Array]",kht="[object Int16Array]",Cht="[object Int32Array]",Sht="[object Uint8Array]",Eht="[object Uint8ClampedArray]",Aht="[object Uint16Array]",_ht="[object Uint32Array]",_i={};_i[lTe]=_i[sht]=_i[vht]=_i[bht]=_i[oht]=_i[lht]=_i[xht]=_i[Tht]=_i[wht]=_i[kht]=_i[Cht]=_i[hht]=_i[fht]=_i[uTe]=_i[dht]=_i[pht]=_i[ght]=_i[mht]=_i[Sht]=_i[Eht]=_i[Aht]=_i[_ht]=!0;_i[cht]=_i[cTe]=_i[yht]=!1;S(CT,"baseClone");Lht=CT,Rht=4;S(hTe,"clone");Aa=hTe;S(fTe,"compact");cw=fTe,Iht="__lodash_hash_undefined__";S(dTe,"setCacheAdd");Dht=dTe;S(pTe,"setCacheHas");Nht=pTe;S(BT,"SetCache");BT.prototype.add=BT.prototype.push=Dht;BT.prototype.has=Nht;oz=BT;S(gTe,"arraySome");mTe=gTe;S(yTe,"cacheHas");lz=yTe,Mht=1,Oht=2;S(vTe,"equalArrays");bTe=vTe;S(xTe,"mapToArray");Pht=xTe;S(TTe,"setToArray");cz=TTe,Bht=1,Fht=2,$ht="[object Boolean]",zht="[object Date]",Ght="[object Error]",qht="[object Map]",Vht="[object Number]",Wht="[object RegExp]",Uht="[object Set]",Hht="[object String]",Yht="[object Symbol]",jht="[object ArrayBuffer]",Xht="[object DataView]",Mye=sl?sl.prototype:void 0,RP=Mye?Mye.valueOf:void 0;S(wTe,"equalByTag");Kht=wTe,Zht=1,Qht=Object.prototype,Jht=Qht.hasOwnProperty;S(kTe,"equalObjects");eft=kTe,tft=1,Oye="[object Arguments]",Pye="[object Array]",pE="[object Object]",rft=Object.prototype,Bye=rft.hasOwnProperty;S(CTe,"baseIsEqualDeep");ift=CTe;S(uz,"baseIsEqual");STe=uz,nft=1,aft=2;S(ETe,"baseIsMatch");sft=ETe;S(ATe,"isStrictComparable");_Te=ATe;S(LTe,"getMatchData");oft=LTe;S(RTe,"matchesStrictComparable");ITe=RTe;S(DTe,"baseMatches");lft=DTe;S(NTe,"baseHasIn");cft=NTe;S(MTe,"hasPath");OTe=MTe;S(PTe,"hasIn");uft=PTe,hft=1,fft=2;S(BTe,"baseMatchesProperty");dft=BTe;S(FTe,"baseProperty");pft=FTe;S($Te,"basePropertyDeep");gft=$Te;S(zTe,"property");mft=zTe;S(GTe,"baseIteratee");xu=GTe;S(qTe,"arrayAggregator");yft=qTe;S(VTe,"createBaseFor");vft=VTe,bft=vft(),xft=bft;S(WTe,"baseForOwn");Tft=WTe;S(UTe,"createBaseEach");wft=UTe,kft=wft(Tft),Lg=kft;S(HTe,"baseAggregator");Cft=HTe;S(YTe,"createAggregator");Sft=YTe,jTe=Object.prototype,Eft=jTe.hasOwnProperty,Aft=K$(function(e,t){e=Object(e);var r=-1,i=t.length,n=i>2?t[2]:void 0;for(n&&cA(t[0],t[1],n)&&(i=1);++r{t.accept(e)})}},gs=class extends Tu{static{S(this,"NonTerminal")}constructor(e){super([]),this.idx=1,vo(this,jl(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},qy=class extends Tu{static{S(this,"Rule")}constructor(e){super(e.definition),this.orgText="",vo(this,jl(e,t=>t!==void 0))}},Us=class extends Tu{static{S(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,vo(this,jl(e,t=>t!==void 0))}},Ea=class extends Tu{static{S(this,"Option")}constructor(e){super(e.definition),this.idx=1,vo(this,jl(e,t=>t!==void 0))}},xo=class extends Tu{static{S(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,vo(this,jl(e,t=>t!==void 0))}},To=class extends Tu{static{S(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,vo(this,jl(e,t=>t!==void 0))}},cn=class extends Tu{static{S(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,vo(this,jl(e,t=>t!==void 0))}},Hs=class extends Tu{static{S(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,vo(this,jl(e,t=>t!==void 0))}},Ys=class extends Tu{static{S(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,vo(this,jl(e,t=>t!==void 0))}},Bi=class{static{S(this,"Terminal")}constructor(e){this.idx=1,vo(this,jl(e,t=>t!==void 0))}accept(e){e.visit(this)}};S(zwe,"serializeGrammar");S(ST,"serializeProduction");Vy=class{static{S(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case gs:return this.visitNonTerminal(t);case Us:return this.visitAlternative(t);case Ea:return this.visitOption(t);case xo:return this.visitRepetitionMandatory(t);case To:return this.visitRepetitionMandatoryWithSeparator(t);case Hs:return this.visitRepetitionWithSeparator(t);case cn:return this.visitRepetition(t);case Ys:return this.visitAlternation(t);case Bi:return this.visitTerminal(t);case qy:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};S(Gwe,"isSequenceProd");S($T,"isOptionalProd");S(qwe,"isBranchingProd");S(zl,"getProductionDslName");xA=class{static{S(this,"RestWalker")}walk(e,t=[]){pr(e.definition,(r,i)=>{let n=Sa(e.definition,i+1);if(r instanceof gs)this.walkProdRef(r,n,t);else if(r instanceof Bi)this.walkTerminal(r,n,t);else if(r instanceof Us)this.walkFlat(r,n,t);else if(r instanceof Ea)this.walkOption(r,n,t);else if(r instanceof xo)this.walkAtLeastOne(r,n,t);else if(r instanceof To)this.walkAtLeastOneSep(r,n,t);else if(r instanceof Hs)this.walkManySep(r,n,t);else if(r instanceof cn)this.walkMany(r,n,t);else if(r instanceof Ys)this.walkOr(r,n,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let i=t.concat(r);this.walk(e,i)}walkOption(e,t,r){let i=t.concat(r);this.walk(e,i)}walkAtLeastOne(e,t,r){let i=[new Ea({definition:e.definition})].concat(t,r);this.walk(e,i)}walkAtLeastOneSep(e,t,r){let i=tF(e,t,r);this.walk(e,i)}walkMany(e,t,r){let i=[new Ea({definition:e.definition})].concat(t,r);this.walk(e,i)}walkManySep(e,t,r){let i=tF(e,t,r);this.walk(e,i)}walkOr(e,t,r){let i=t.concat(r);pr(e.definition,n=>{let a=new Us({definition:[n]});this.walk(a,i)})}};S(tF,"restForRepetitionWithSeparator");S(Wy,"first");S(Vwe,"firstForSequence");S(Wwe,"firstForBranching");S(Uwe,"firstForTerminal");Hwe="_~IN~_",pdt=class extends xA{static{S(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let i=jwe(e.referencedRule,e.idx)+this.topProd.name,n=t.concat(r),a=new Us({definition:n}),s=Wy(a);this.follows[i]=s}};S(Ywe,"computeAllProdsFollows");S(jwe,"buildBetweenProdsFollowPrefix");GE={},gdt=new E2e;S(uw,"getRegExpAst");S(Xwe,"clearRegExpParserCache");Kwe="Complement Sets are not supported for first char optimization",k6=`Unable to use "first char" lexer optimizations: -`;S(Zwe,"getOptimizedStartCodesIndices");S(C6,"firstCharOptimizedIndices");S(uT,"addOptimizedIdxToResult");S(Qwe,"handleIgnoreCase");S(rF,"findCode");S(S6,"isWholeOptional");mdt=class extends J6{static{S(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){vs(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?rF(e,this.targetCharCodes)===void 0&&(this.found=!0):rF(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};S(TA,"canMatchCharCode");pg="PATTERN",hT="defaultMode",gE="modes",Jwe=typeof new RegExp("(?:)").sticky=="boolean";S(eke,"analyzeTokenTypes");S(tke,"validatePatterns");S(rke,"validateRegExpPattern");S(ike,"findMissingPatterns");S(nke,"findInvalidPatterns");ydt=/[^\\][$]/;S(ake,"findEndOfInputAnchor");S(ske,"findEmptyMatchRegExps");vdt=/[^\\[][\^]|^\^/;S(oke,"findStartOfInputAnchor");S(lke,"findUnsupportedFlags");S(cke,"findDuplicatePatterns");S(uke,"findInvalidGroupType");S(hke,"findModesThatDoNotExist");S(fke,"findUnreachablePatterns");S(dke,"tryToMatchStrToPattern");S(pke,"noMetaChar");S(gke,"usesLookAheadOrBehind");S(iF,"addStartOfInput");S(nF,"addStickyFlag");S(mke,"performRuntimeChecks");S(yke,"performWarningRuntimeChecks");S(vke,"cloneEmptyGroups");S(mz,"isCustomPattern");S(bke,"isShortPattern");bdt={test:S(function(e){let t=e.length;for(let r=this.lastIndex;r${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,i,n,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(un||(un={}));dT={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:sF,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(dT);ds=class{static{S(this,"Lexer")}constructor(e,t=dT){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,n)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:s,value:o}=pz(n),l=s>10?console.warn:console.log;return this.traceInitIndent time: ${s}ms`),this.traceInitIndent--,o}else return n()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=vo({},dT,t);let r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===dT.lineTerminatorsPattern)this.config.lineTerminatorsPattern=bdt;else if(this.config.lineTerminatorCharacters===dT.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Zr(e)?i={modes:{defaultMode:Aa(e)},defaultMode:hT}:(n=!1,i=Aa(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(mke(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(yke(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},pr(i.modes,(s,o)=>{i.modes[o]=bA(s,l=>Ph(l))});let a=yo(i.modes);if(pr(i.modes,(s,o)=>{this.TRACE_INIT(`Mode: <${o}> processing`,()=>{if(this.modes.push(o),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(tke(s,a))}),Ri(this.lexerDefinitionErrors)){Hy(s);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=eke(s,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[o]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[o]=l.charCodeToPatternIdxToConfig,this.emptyGroups=vo({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[o]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Ri(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let o=Zt(this.lexerDefinitionErrors,l=>l.message).join(`----------------------- +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},N6=class{static{A(this,"BaseRegExpVisitor")}visitChildren(e){for(let t in e){let r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(n=>{this.visit(n)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},Ske=/\r?\n/gm,Eke=new kke,Fdt=class extends N6{static{A(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=Jv(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},hm=new Fdt;A(Ake,"getTerminalParts");A(PV,"isMultilineComment");_ke=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");A(O6,"isWhitespace");A(Jv,"escapeRegExp");A(BV,"partialMatches");A($V,"partialRegExp");A(FV,"getEntryRule");A(zV,"getHiddenRules");A(P6,"getAllReachableRules");A(GV,"ruleDfs");A(Rke,"getAllRulesUsedForCrossReferences");A(qV,"getCrossReferenceTerminal");A(VV,"isCommentTerminal");A(WV,"findNodesForProperty");A(B6,"findNodeForProperty");A($6,"findNodesForPropertyInternal");A(Lke,"findNodesForKeyword");A(UV,"findNodeForKeyword");A(F6,"findNodesForKeywordInternal");A(HV,"findAssignment");A(z6,"findNameAssignment");A(YV,"findNameAssignmentInternal");A(XV,"getActionAtElement");A(Ike,"isOptionalCardinality");A(Mke,"isArrayCardinality");A(Dke,"isArrayOperator");A(kC,"isDataTypeRule");A(jV,"isDataTypeRuleInternal");A(Nke,"isDataType");A(J_,"isDataTypeInternal");A(SC,"getExplicitRuleType");A(ym,"getTypeName");A(KV,"getActionType");A(Oke,"getRuleTypeName");A(ZV,"getRuleType");A(EC,"terminalRegex");QV=/[\s\S]/.source;A(Am,"abstractElementToRegex");A(Pke,"terminalAlternativesToRegex");A(Bke,"terminalGroupToRegex");A($ke,"untilTokenToRegex");A(Fke,"negateTokenToRegex");A(zke,"characterRangeToRegex");A(d_,"keywordToRegex");A(Ju,"withCardinality");A(JV,"createGrammarConfig");zdt=typeof global=="object"&&global&&global.Object===Object&&global,Gke=zdt,Gdt=typeof self=="object"&&self&&self.Object===Object&&self,qdt=Gke||Gdt||Function("return this")(),th=qdt,Vdt=th.Symbol,Gl=Vdt,qke=Object.prototype,Wdt=qke.hasOwnProperty,Udt=qke.toString,vw=Gl?Gl.toStringTag:void 0;A(Vke,"getRawTag");Hdt=Vke,Ydt=Object.prototype,Xdt=Ydt.toString;A(Wke,"objectToString");jdt=Wke,Kdt="[object Null]",Zdt="[object Undefined]",ewe=Gl?Gl.toStringTag:void 0;A(Uke,"baseGetTag");zp=Uke;A(Hke,"isObjectLike");Ac=Hke,Qdt="[object Symbol]";A(Yke,"isSymbol");G6=Yke;A(Xke,"arrayMap");AC=Xke,Jdt=Array.isArray,pn=Jdt,ept=1/0,twe=Gl?Gl.prototype:void 0,rwe=twe?twe.toString:void 0;A(eW,"baseToString");tpt=eW,rpt=/\s/;A(jke,"trimmedEndIndex");npt=jke,ipt=/^\s+/;A(Kke,"baseTrim");apt=Kke;A(Zke,"isObject");ql=Zke,nwe=NaN,spt=/^[-+]0x[0-9a-f]+$/i,opt=/^0b[01]+$/i,lpt=/^0o[0-7]+$/i,cpt=parseInt;A(Qke,"toNumber");upt=Qke,iwe=1/0,hpt=17976931348623157e292;A(Jke,"toFinite");fpt=Jke;A(eSe,"toInteger");_C=eSe;A(tSe,"identity");RC=tSe,dpt="[object AsyncFunction]",ppt="[object Function]",gpt="[object GeneratorFunction]",mpt="[object Proxy]";A(rSe,"isFunction");Sf=rSe,ypt=th["__core-js_shared__"],ZF=ypt,awe=(function(){var e=/[^.]+$/.exec(ZF&&ZF.keys&&ZF.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();A(nSe,"isMasked");vpt=nSe,xpt=Function.prototype,bpt=xpt.toString;A(iSe,"toSource");_m=iSe,Tpt=/[\\^$.*+?()[\]{}|]/g,wpt=/^\[object .+?Constructor\]$/,Cpt=Function.prototype,kpt=Object.prototype,Spt=Cpt.toString,Ept=kpt.hasOwnProperty,Apt=RegExp("^"+Spt.call(Ept).replace(Tpt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");A(aSe,"baseIsNative");_pt=aSe;A(sSe,"getValue");Rpt=sSe;A(oSe,"getNative");Rm=oSe,Lpt=Rm(th,"WeakMap"),TG=Lpt,swe=Object.create,Ipt=(function(){function e(){}return A(e,"object"),function(t){if(!ql(t))return{};if(swe)return swe(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Mpt=Ipt;A(lSe,"apply");Dpt=lSe;A(cSe,"noop");$a=cSe;A(uSe,"copyArray");Npt=uSe,Opt=800,Ppt=16,Bpt=Date.now;A(hSe,"shortOut");$pt=hSe;A(fSe,"constant");Fpt=fSe,zpt=(function(){try{var e=Rm(Object,"defineProperty");return e({},"",{}),e}catch{}})(),e6=zpt,Gpt=e6?function(e,t){return e6(e,"toString",{configurable:!0,enumerable:!1,value:Fpt(t),writable:!0})}:RC,qpt=Gpt,Vpt=$pt(qpt),Wpt=Vpt;A(dSe,"arrayEach");pSe=dSe;A(gSe,"baseFindIndex");mSe=gSe;A(ySe,"baseIsNaN");Upt=ySe;A(vSe,"strictIndexOf");Hpt=vSe;A(xSe,"baseIndexOf");tW=xSe;A(bSe,"arrayIncludes");TSe=bSe,Ypt=9007199254740991,Xpt=/^(?:0|[1-9]\d*)$/;A(wSe,"isIndex");q6=wSe;A(CSe,"baseAssignValue");rW=CSe;A(kSe,"eq");LC=kSe,jpt=Object.prototype,Kpt=jpt.hasOwnProperty;A(SSe,"assignValue");V6=SSe;A(ESe,"copyObject");IC=ESe,owe=Math.max;A(ASe,"overRest");Zpt=ASe;A(_Se,"baseRest");nW=_Se,Qpt=9007199254740991;A(RSe,"isLength");iW=RSe;A(LSe,"isArrayLike");rh=LSe;A(ISe,"isIterateeCall");W6=ISe;A(MSe,"createAssigner");Jpt=MSe,e0t=Object.prototype;A(DSe,"isPrototype");MC=DSe;A(NSe,"baseTimes");t0t=NSe,r0t="[object Arguments]";A(OSe,"baseIsArguments");lwe=OSe,PSe=Object.prototype,n0t=PSe.hasOwnProperty,i0t=PSe.propertyIsEnumerable,a0t=lwe((function(){return arguments})())?lwe:function(e){return Ac(e)&&n0t.call(e,"callee")&&!i0t.call(e,"callee")},U6=a0t;A(BSe,"stubFalse");s0t=BSe,$Se=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cwe=$Se&&typeof module=="object"&&module&&!module.nodeType&&module,o0t=cwe&&cwe.exports===$Se,uwe=o0t?th.Buffer:void 0,l0t=uwe?uwe.isBuffer:void 0,c0t=l0t||s0t,aC=c0t,u0t="[object Arguments]",h0t="[object Array]",f0t="[object Boolean]",d0t="[object Date]",p0t="[object Error]",g0t="[object Function]",m0t="[object Map]",y0t="[object Number]",v0t="[object Object]",x0t="[object RegExp]",b0t="[object Set]",T0t="[object String]",w0t="[object WeakMap]",C0t="[object ArrayBuffer]",k0t="[object DataView]",S0t="[object Float32Array]",E0t="[object Float64Array]",A0t="[object Int8Array]",_0t="[object Int16Array]",R0t="[object Int32Array]",L0t="[object Uint8Array]",I0t="[object Uint8ClampedArray]",M0t="[object Uint16Array]",D0t="[object Uint32Array]",ii={};ii[S0t]=ii[E0t]=ii[A0t]=ii[_0t]=ii[R0t]=ii[L0t]=ii[I0t]=ii[M0t]=ii[D0t]=!0;ii[u0t]=ii[h0t]=ii[C0t]=ii[f0t]=ii[k0t]=ii[d0t]=ii[p0t]=ii[g0t]=ii[m0t]=ii[y0t]=ii[v0t]=ii[x0t]=ii[b0t]=ii[T0t]=ii[w0t]=!1;A(FSe,"baseIsTypedArray");N0t=FSe;A(zSe,"baseUnary");DC=zSe,GSe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hw=GSe&&typeof module=="object"&&module&&!module.nodeType&&module,O0t=Hw&&Hw.exports===GSe,QF=O0t&&Gke.process,P0t=(function(){try{var e=Hw&&Hw.require&&Hw.require("util").types;return e||QF&&QF.binding&&QF.binding("util")}catch{}})(),Np=P0t,hwe=Np&&Np.isTypedArray,B0t=hwe?DC(hwe):N0t,aW=B0t,$0t=Object.prototype,F0t=$0t.hasOwnProperty;A(qSe,"arrayLikeKeys");VSe=qSe;A(WSe,"overArg");USe=WSe,z0t=USe(Object.keys,Object),G0t=z0t,q0t=Object.prototype,V0t=q0t.hasOwnProperty;A(HSe,"baseKeys");YSe=HSe;A(XSe,"keys");cl=XSe,W0t=Object.prototype,U0t=W0t.hasOwnProperty,H0t=Jpt(function(e,t){if(MC(t)||rh(t)){IC(t,cl(t),e);return}for(var r in t)U0t.call(t,r)&&V6(e,r,t[r])}),ul=H0t;A(jSe,"nativeKeysIn");Y0t=jSe,X0t=Object.prototype,j0t=X0t.hasOwnProperty;A(KSe,"baseKeysIn");K0t=KSe;A(ZSe,"keysIn");H6=ZSe,Z0t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q0t=/^\w*$/;A(QSe,"isKey");sW=QSe,J0t=Rm(Object,"create"),sC=J0t;A(JSe,"hashClear");egt=JSe;A(e4e,"hashDelete");tgt=e4e,rgt="__lodash_hash_undefined__",ngt=Object.prototype,igt=ngt.hasOwnProperty;A(t4e,"hashGet");agt=t4e,sgt=Object.prototype,ogt=sgt.hasOwnProperty;A(r4e,"hashHas");lgt=r4e,cgt="__lodash_hash_undefined__";A(n4e,"hashSet");ugt=n4e;A(Lm,"Hash");Lm.prototype.clear=egt;Lm.prototype.delete=tgt;Lm.prototype.get=agt;Lm.prototype.has=lgt;Lm.prototype.set=ugt;fwe=Lm;A(i4e,"listCacheClear");hgt=i4e;A(a4e,"assocIndexOf");Y6=a4e,fgt=Array.prototype,dgt=fgt.splice;A(s4e,"listCacheDelete");pgt=s4e;A(o4e,"listCacheGet");ggt=o4e;A(l4e,"listCacheHas");mgt=l4e;A(c4e,"listCacheSet");ygt=c4e;A(Im,"ListCache");Im.prototype.clear=hgt;Im.prototype.delete=pgt;Im.prototype.get=ggt;Im.prototype.has=mgt;Im.prototype.set=ygt;X6=Im,vgt=Rm(th,"Map"),oC=vgt;A(u4e,"mapCacheClear");xgt=u4e;A(h4e,"isKeyable");bgt=h4e;A(f4e,"getMapData");j6=f4e;A(d4e,"mapCacheDelete");Tgt=d4e;A(p4e,"mapCacheGet");wgt=p4e;A(g4e,"mapCacheHas");Cgt=g4e;A(m4e,"mapCacheSet");kgt=m4e;A(Mm,"MapCache");Mm.prototype.clear=xgt;Mm.prototype.delete=Tgt;Mm.prototype.get=wgt;Mm.prototype.has=Cgt;Mm.prototype.set=kgt;K6=Mm,Sgt="Expected a function";A(Z6,"memoize");Z6.Cache=K6;Egt=Z6,Agt=500;A(y4e,"memoizeCapped");_gt=y4e,Rgt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lgt=/\\(\\)?/g,Igt=_gt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rgt,function(r,n,i,a){t.push(i?a.replace(Lgt,"$1"):n||r)}),t}),Mgt=Igt;A(v4e,"toString");Dgt=v4e;A(x4e,"castPath");Q6=x4e,Ngt=1/0;A(b4e,"toKey");NC=b4e;A(T4e,"baseGet");oW=T4e;A(w4e,"get");Ogt=w4e;A(C4e,"arrayPush");lW=C4e,dwe=Gl?Gl.isConcatSpreadable:void 0;A(k4e,"isFlattenable");Pgt=k4e;A(cW,"baseFlatten");uW=cW;A(S4e,"flatten");Sc=S4e,Bgt=USe(Object.getPrototypeOf,Object),E4e=Bgt;A(A4e,"baseSlice");_4e=A4e;A(R4e,"arrayReduce");$gt=R4e;A(L4e,"stackClear");Fgt=L4e;A(I4e,"stackDelete");zgt=I4e;A(M4e,"stackGet");Ggt=M4e;A(D4e,"stackHas");qgt=D4e,Vgt=200;A(N4e,"stackSet");Wgt=N4e;A(Dm,"Stack");Dm.prototype.clear=Fgt;Dm.prototype.delete=zgt;Dm.prototype.get=Ggt;Dm.prototype.has=qgt;Dm.prototype.set=Wgt;Yw=Dm;A(O4e,"baseAssign");Ugt=O4e;A(P4e,"baseAssignIn");Hgt=P4e,B4e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pwe=B4e&&typeof module=="object"&&module&&!module.nodeType&&module,Ygt=pwe&&pwe.exports===B4e,gwe=Ygt?th.Buffer:void 0,mwe=gwe?gwe.allocUnsafe:void 0;A($4e,"cloneBuffer");Xgt=$4e;A(F4e,"arrayFilter");hW=F4e;A(z4e,"stubArray");G4e=z4e,jgt=Object.prototype,Kgt=jgt.propertyIsEnumerable,ywe=Object.getOwnPropertySymbols,Zgt=ywe?function(e){return e==null?[]:(e=Object(e),hW(ywe(e),function(t){return Kgt.call(e,t)}))}:G4e,fW=Zgt;A(q4e,"copySymbols");Qgt=q4e,Jgt=Object.getOwnPropertySymbols,emt=Jgt?function(e){for(var t=[];e;)lW(t,fW(e)),e=E4e(e);return t}:G4e,V4e=emt;A(W4e,"copySymbolsIn");tmt=W4e;A(U4e,"baseGetAllKeys");H4e=U4e;A(Y4e,"getAllKeys");wG=Y4e;A(X4e,"getAllKeysIn");j4e=X4e,rmt=Rm(th,"DataView"),CG=rmt,nmt=Rm(th,"Promise"),kG=nmt,imt=Rm(th,"Set"),Bv=imt,vwe="[object Map]",amt="[object Object]",xwe="[object Promise]",bwe="[object Set]",Twe="[object WeakMap]",wwe="[object DataView]",smt=_m(CG),omt=_m(oC),lmt=_m(kG),cmt=_m(Bv),umt=_m(TG),Bg=zp;(CG&&Bg(new CG(new ArrayBuffer(1)))!=wwe||oC&&Bg(new oC)!=vwe||kG&&Bg(kG.resolve())!=xwe||Bv&&Bg(new Bv)!=bwe||TG&&Bg(new TG)!=Twe)&&(Bg=A(function(e){var t=zp(e),r=t==amt?e.constructor:void 0,n=r?_m(r):"";if(n)switch(n){case smt:return wwe;case omt:return vwe;case lmt:return xwe;case cmt:return bwe;case umt:return Twe}return t},"getTag"));Yv=Bg,hmt=Object.prototype,fmt=hmt.hasOwnProperty;A(K4e,"initCloneArray");dmt=K4e,pmt=th.Uint8Array,t6=pmt;A(Z4e,"cloneArrayBuffer");dW=Z4e;A(Q4e,"cloneDataView");gmt=Q4e,mmt=/\w*$/;A(J4e,"cloneRegExp");ymt=J4e,Cwe=Gl?Gl.prototype:void 0,kwe=Cwe?Cwe.valueOf:void 0;A(eEe,"cloneSymbol");vmt=eEe;A(tEe,"cloneTypedArray");xmt=tEe,bmt="[object Boolean]",Tmt="[object Date]",wmt="[object Map]",Cmt="[object Number]",kmt="[object RegExp]",Smt="[object Set]",Emt="[object String]",Amt="[object Symbol]",_mt="[object ArrayBuffer]",Rmt="[object DataView]",Lmt="[object Float32Array]",Imt="[object Float64Array]",Mmt="[object Int8Array]",Dmt="[object Int16Array]",Nmt="[object Int32Array]",Omt="[object Uint8Array]",Pmt="[object Uint8ClampedArray]",Bmt="[object Uint16Array]",$mt="[object Uint32Array]";A(rEe,"initCloneByTag");Fmt=rEe;A(nEe,"initCloneObject");zmt=nEe,Gmt="[object Map]";A(iEe,"baseIsMap");qmt=iEe,Swe=Np&&Np.isMap,Vmt=Swe?DC(Swe):qmt,Wmt=Vmt,Umt="[object Set]";A(aEe,"baseIsSet");Hmt=aEe,Ewe=Np&&Np.isSet,Ymt=Ewe?DC(Ewe):Hmt,Xmt=Ymt,jmt=1,Kmt=2,Zmt=4,sEe="[object Arguments]",Qmt="[object Array]",Jmt="[object Boolean]",eyt="[object Date]",tyt="[object Error]",oEe="[object Function]",ryt="[object GeneratorFunction]",nyt="[object Map]",iyt="[object Number]",lEe="[object Object]",ayt="[object RegExp]",syt="[object Set]",oyt="[object String]",lyt="[object Symbol]",cyt="[object WeakMap]",uyt="[object ArrayBuffer]",hyt="[object DataView]",fyt="[object Float32Array]",dyt="[object Float64Array]",pyt="[object Int8Array]",gyt="[object Int16Array]",myt="[object Int32Array]",yyt="[object Uint8Array]",vyt="[object Uint8ClampedArray]",xyt="[object Uint16Array]",byt="[object Uint32Array]",Qn={};Qn[sEe]=Qn[Qmt]=Qn[uyt]=Qn[hyt]=Qn[Jmt]=Qn[eyt]=Qn[fyt]=Qn[dyt]=Qn[pyt]=Qn[gyt]=Qn[myt]=Qn[nyt]=Qn[iyt]=Qn[lEe]=Qn[ayt]=Qn[syt]=Qn[oyt]=Qn[lyt]=Qn[yyt]=Qn[vyt]=Qn[xyt]=Qn[byt]=!0;Qn[tyt]=Qn[oEe]=Qn[cyt]=!1;A(Xw,"baseClone");Tyt=Xw,wyt=4;A(cEe,"clone");is=cEe;A(uEe,"compact");OC=uEe,Cyt="__lodash_hash_undefined__";A(hEe,"setCacheAdd");kyt=hEe;A(fEe,"setCacheHas");Syt=fEe;A(lC,"SetCache");lC.prototype.add=lC.prototype.push=kyt;lC.prototype.has=Syt;pW=lC;A(dEe,"arraySome");pEe=dEe;A(gEe,"cacheHas");gW=gEe,Eyt=1,Ayt=2;A(mEe,"equalArrays");yEe=mEe;A(vEe,"mapToArray");_yt=vEe;A(xEe,"setToArray");mW=xEe,Ryt=1,Lyt=2,Iyt="[object Boolean]",Myt="[object Date]",Dyt="[object Error]",Nyt="[object Map]",Oyt="[object Number]",Pyt="[object RegExp]",Byt="[object Set]",$yt="[object String]",Fyt="[object Symbol]",zyt="[object ArrayBuffer]",Gyt="[object DataView]",Awe=Gl?Gl.prototype:void 0,JF=Awe?Awe.valueOf:void 0;A(bEe,"equalByTag");qyt=bEe,Vyt=1,Wyt=Object.prototype,Uyt=Wyt.hasOwnProperty;A(TEe,"equalObjects");Hyt=TEe,Yyt=1,_we="[object Arguments]",Rwe="[object Array]",GA="[object Object]",Xyt=Object.prototype,Lwe=Xyt.hasOwnProperty;A(wEe,"baseIsEqualDeep");jyt=wEe;A(yW,"baseIsEqual");CEe=yW,Kyt=1,Zyt=2;A(kEe,"baseIsMatch");Qyt=kEe;A(SEe,"isStrictComparable");EEe=SEe;A(AEe,"getMatchData");Jyt=AEe;A(_Ee,"matchesStrictComparable");REe=_Ee;A(LEe,"baseMatches");e1t=LEe;A(IEe,"baseHasIn");t1t=IEe;A(MEe,"hasPath");DEe=MEe;A(NEe,"hasIn");r1t=NEe,n1t=1,i1t=2;A(OEe,"baseMatchesProperty");a1t=OEe;A(PEe,"baseProperty");s1t=PEe;A(BEe,"basePropertyDeep");o1t=BEe;A($Ee,"property");l1t=$Ee;A(FEe,"baseIteratee");nh=FEe;A(zEe,"arrayAggregator");c1t=zEe;A(GEe,"createBaseFor");u1t=GEe,h1t=u1t(),f1t=h1t;A(qEe,"baseForOwn");d1t=qEe;A(VEe,"createBaseEach");p1t=VEe,g1t=p1t(d1t),Nm=g1t;A(WEe,"baseAggregator");m1t=WEe;A(UEe,"createAggregator");y1t=UEe,HEe=Object.prototype,v1t=HEe.hasOwnProperty,x1t=nW(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&W6(t[0],t[1],i)&&(n=1);++r{t.accept(e)})}},Zs=class extends ih{static{A(this,"NonTerminal")}constructor(e){super([]),this.idx=1,ul(this,Rc(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},ex=class extends ih{static{A(this,"Rule")}constructor(e){super(e.definition),this.orgText="",ul(this,Rc(e,t=>t!==void 0))}},Mo=class extends ih{static{A(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ul(this,Rc(e,t=>t!==void 0))}},ns=class extends ih{static{A(this,"Option")}constructor(e){super(e.definition),this.idx=1,ul(this,Rc(e,t=>t!==void 0))}},fl=class extends ih{static{A(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,ul(this,Rc(e,t=>t!==void 0))}},dl=class extends ih{static{A(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,ul(this,Rc(e,t=>t!==void 0))}},$i=class extends ih{static{A(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,ul(this,Rc(e,t=>t!==void 0))}},Do=class extends ih{static{A(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,ul(this,Rc(e,t=>t!==void 0))}},No=class extends ih{static{A(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,ul(this,Rc(e,t=>t!==void 0))}},si=class{static{A(this,"Terminal")}constructor(e){this.idx=1,ul(this,Rc(e,t=>t!==void 0))}accept(e){e.visit(this)}};A($5e,"serializeGrammar");A(jw,"serializeProduction");tx=class{static{A(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case Zs:return this.visitNonTerminal(t);case Mo:return this.visitAlternative(t);case ns:return this.visitOption(t);case fl:return this.visitRepetitionMandatory(t);case dl:return this.visitRepetitionMandatoryWithSeparator(t);case Do:return this.visitRepetitionWithSeparator(t);case $i:return this.visitRepetition(t);case No:return this.visitAlternation(t);case si:return this.visitTerminal(t);case ex:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};A(F5e,"isSequenceProd");A(uC,"isOptionalProd");A(z5e,"isBranchingProd");A(Tc,"getProductionDslName");tR=class{static{A(this,"RestWalker")}walk(e,t=[]){Or(e.definition,(r,n)=>{let i=rs(e.definition,n+1);if(r instanceof Zs)this.walkProdRef(r,i,t);else if(r instanceof si)this.walkTerminal(r,i,t);else if(r instanceof Mo)this.walkFlat(r,i,t);else if(r instanceof ns)this.walkOption(r,i,t);else if(r instanceof fl)this.walkAtLeastOne(r,i,t);else if(r instanceof dl)this.walkAtLeastOneSep(r,i,t);else if(r instanceof Do)this.walkManySep(r,i,t);else if(r instanceof $i)this.walkMany(r,i,t);else if(r instanceof No)this.walkOr(r,i,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){let n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){let n=[new ns({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=SG(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new ns({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=SG(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);Or(e.definition,i=>{let a=new Mo({definition:[i]});this.walk(a,n)})}};A(SG,"restForRepetitionWithSeparator");A(rx,"first");A(G5e,"firstForSequence");A(q5e,"firstForBranching");A(V5e,"firstForTerminal");W5e="_~IN~_",svt=class extends tR{static{A(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let n=H5e(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(r),a=new Mo({definition:i}),s=rx(a);this.follows[n]=s}};A(U5e,"computeAllProdsFollows");A(H5e,"buildBetweenProdsFollowPrefix");p_={},ovt=new kke;A(PC,"getRegExpAst");A(Y5e,"clearRegExpParserCache");X5e="Complement Sets are not supported for first char optimization",n6=`Unable to use "first char" lexer optimizations: +`;A(j5e,"getOptimizedStartCodesIndices");A(i6,"firstCharOptimizedIndices");A(Nw,"addOptimizedIdxToResult");A(K5e,"handleIgnoreCase");A(EG,"findCode");A(a6,"isWholeOptional");lvt=class extends N6{static{A(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){eo(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?EG(e,this.targetCharCodes)===void 0&&(this.found=!0):EG(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};A(rR,"canMatchCharCode");xm="PATTERN",Ow="defaultMode",qA="modes";A(Z5e,"analyzeTokenTypes");A(Q5e,"validatePatterns");A(J5e,"validateRegExpPattern");A(e3e,"findMissingPatterns");A(t3e,"findInvalidPatterns");cvt=/[^\\][$]/;A(r3e,"findEndOfInputAnchor");A(n3e,"findEmptyMatchRegExps");uvt=/[^\\[][\^]|^\^/;A(i3e,"findStartOfInputAnchor");A(a3e,"findUnsupportedFlags");A(s3e,"findDuplicatePatterns");A(o3e,"findInvalidGroupType");A(l3e,"findModesThatDoNotExist");A(c3e,"findUnreachablePatterns");A(u3e,"tryToMatchStrToPattern");A(h3e,"noMetaChar");A(f3e,"usesLookAheadOrBehind");A(AG,"addStickyFlag");A(d3e,"performRuntimeChecks");A(p3e,"performWarningRuntimeChecks");A(g3e,"cloneEmptyGroups");A(CW,"isCustomPattern");A(m3e,"isShortPattern");hvt={test:A(function(e){let t=e.length;for(let r=this.lastIndex;r${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Fi||(Fi={}));Bw={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:RG,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Bw);js=class{static{A(this,"Lexer")}constructor(e,t=Bw){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(n,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${n}>`);let{time:s,value:o}=TW(i),l=s>10?console.warn:console.log;return this.traceInitIndent time: ${s}ms`),this.traceInitIndent--,o}else return i()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=ul({},Bw,t);let r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Bw.lineTerminatorsPattern)this.config.lineTerminatorsPattern=hvt;else if(this.config.lineTerminatorCharacters===Bw.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),pn(e)?n={modes:{defaultMode:is(e)},defaultMode:Ow}:(i=!1,n=is(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(d3e(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(p3e(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Or(n.modes,(s,o)=>{n.modes[o]=eR(s,l=>xf(l))});let a=cl(n.modes);if(Or(n.modes,(s,o)=>{this.TRACE_INIT(`Mode: <${o}> processing`,()=>{if(this.modes.push(o),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Q5e(s,a))}),ei(this.lexerDefinitionErrors)){ix(s);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=Z5e(s,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[o]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[o]=l.charCodeToPatternIdxToConfig,this.emptyGroups=ul({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[o]=l.canBeOptimized}})}),this.defaultMode=n.defaultMode,!ei(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let o=or(this.lexerDefinitionErrors,l=>l.message).join(`----------------------- `);throw new Error(`Errors detected in definition of Lexer: -`+o)}pr(this.lexerDefinitionWarning,s=>{dz(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Jwe?(this.chopInput=My,this.match=this.matchWithTest):(this.updateLastIndex=Hn,this.match=this.matchWithExec),n&&(this.handleModes=Hn),this.trackStartLines===!1&&(this.computeNewColumn=My),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Hn),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let s=bo(this.canModeBeOptimized,(o,l,u)=>(l===!1&&o.push(u),o),[]);if(t.ensureOptimizations&&!Ri(s))throw Error(`Lexer Modes: < ${s.join(", ")} > cannot be optimized. +`+o)}Or(this.lexerDefinitionWarning,s=>{bW(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(i&&(this.handleModes=$a),this.trackStartLines===!1&&(this.computeNewColumn=RC),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=$a),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let s=hl(this.canModeBeOptimized,(o,l,u)=>(l===!1&&o.push(u),o),[]);if(t.ensureOptimizations&&!ei(s))throw Error(`Lexer Modes: < ${s.join(", ")} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Xwe()}),this.TRACE_INIT("toFastProperties",()=>{gz(this)})})}tokenize(e,t=this.defaultMode){if(!Ri(this.lexerDefinitionErrors)){let i=Zt(this.lexerDefinitionErrors,n=>n.message).join(`----------------------- + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Y5e()}),this.TRACE_INIT("toFastProperties",()=>{wW(this)})})}tokenize(e,t=this.defaultMode){if(!ei(this.lexerDefinitionErrors)){let n=or(this.lexerDefinitionErrors,i=>i.message).join(`----------------------- `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+i)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,i,n,a,s,o,l,u,h,f,d,p,g,m,y,v,x=e,T=x.length,C=0,w=0,k=this.hasCustom?0:Math.floor(e.length/10),E=new Array(k),A=[],N=this.trackStartLines?1:void 0,P=this.trackStartLines?1:void 0,O=vke(this.emptyGroups),L=this.trackStartLines,_=this.config.lineTerminatorsPattern,R=0,D=[],I=[],B=[],M=[];Object.freeze(M);let F;function z(){return D}S(z,"getPossiblePatternsSlow");function $(Q){let Y=Bh(Q),se=I[Y];return se===void 0?M:se}S($,"getPossiblePatternsOptimized");let G=S(Q=>{if(B.length===1&&Q.tokenType.PUSH_MODE===void 0){let Y=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Q);A.push({offset:Q.startOffset,line:Q.startLine,column:Q.startColumn,length:Q.image.length,message:Y})}else{B.pop();let Y=dg(B);D=this.patternIdxToConfig[Y],I=this.charCodeToPatternIdxToConfig[Y],R=D.length;let se=this.canModeBeOptimized[Y]&&this.config.safeMode===!1;I&&se?F=$:F=z}},"pop_mode");function U(Q){B.push(Q),I=this.charCodeToPatternIdxToConfig[Q],D=this.patternIdxToConfig[Q],R=D.length,R=D.length;let Y=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;I&&Y?F=$:F=z}S(U,"push_mode"),U.call(this,t);let j,H=this.config.recoveryEnabled;for(;Co.length){o=a,l=u,j=te;break}}}break}}if(o!==null){if(h=o.length,f=j.group,f!==void 0&&(d=j.tokenTypeIdx,p=this.createTokenInstance(o,C,d,j.tokenType,N,P,h),this.handlePayload(p,l),f===!1?w=this.addToken(E,w,p):O[f].push(p)),e=this.chopInput(e,h),C=C+h,P=this.computeNewColumn(P,h),L===!0&&j.canLineTerminator===!0){let J=0,re,ie;_.lastIndex=0;do re=_.test(o),re===!0&&(ie=_.lastIndex-1,J++);while(re===!0);J!==0&&(N=N+J,P=h-ie,this.updateTokenEndLineColumnLocation(p,f,ie,J,N,P,h))}this.handleModes(j,G,U,p)}else{let J=C,re=N,ie=P,te=H===!1;for(;te===!1&&C ${ug(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:i,ruleName:n}){let a="Expecting: ",o=` -but found: '`+Yl(t).image+"'";if(i)return a+i+o;{let l=bo(e,(d,p)=>d.concat(p),[]),u=Zt(l,d=>`[${Zt(d,p=>ug(p)).join(", ")}]`),f=`one of these possible Token sequences: -${Zt(u,(d,p)=>` ${p+1}. ${d}`).join(` -`)}`;return a+f+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:i}){let n="Expecting: ",s=` -but found: '`+Yl(t).image+"'";if(r)return n+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences:: - <${Zt(e,u=>`[${Zt(u,h=>ug(h)).join(",")}]`).join(" ,")}>`;return n+l+s}}};Object.freeze(Ty);Tdt={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- -inside top level rule: ->`+e.name+"<-"}},og={buildDuplicateFoundError(e,t){function r(h){return h instanceof Bi?h.terminalType.name:h instanceof gs?h.nonTerminalName:""}S(r,"getExtraProductionArgument");let i=e.name,n=Yl(t),a=n.idx,s=zl(n),o=r(n),l=a>0,u=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} - appears more than once (${t.length} times) in the top level rule: ->${i}<-. +`+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,i,a,s,o,l,u,h,f,d,p,g,m,y,x=e,b=x.length,T=0,k=0,w=this.hasCustom?0:Math.floor(e.length/10),C=new Array(w),S=[],E=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,N=g3e(this.emptyGroups),O=this.trackStartLines,R=this.config.lineTerminatorsPattern,_=0,D=[],I=[],M=[],B=[];Object.freeze(B);let P=!1,$=A(V=>{if(M.length===1&&V.tokenType.PUSH_MODE===void 0){let j=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(V);S.push({offset:V.startOffset,line:V.startLine,column:V.startColumn,length:V.image.length,message:j})}else{M.pop();let j=vm(M);D=this.patternIdxToConfig[j],I=this.charCodeToPatternIdxToConfig[j],_=D.length;let ee=this.canModeBeOptimized[j]&&this.config.safeMode===!1;I&&ee?P=!0:P=!1}},"pop_mode");function G(V){M.push(V),I=this.charCodeToPatternIdxToConfig[V],D=this.patternIdxToConfig[V],_=D.length,_=D.length;let j=this.canModeBeOptimized[V]&&this.config.safeMode===!1;I&&j?P=!0:P=!1}A(G,"push_mode"),G.call(this,t);let q,z=this.config.recoveryEnabled;for(;To.length){o=a,h=a.length,l=u,q=te;break}}}break}}if(h!==-1){if(f=q.group,f!==void 0&&(o=o!==null?o:e.substring(T,T+h),d=q.tokenTypeIdx,p=this.createTokenInstance(o,T,d,q.tokenType,E,L,h),this.handlePayload(p,l),f===!1?k=this.addToken(C,k,p):N[f].push(p)),O===!0&&q.canLineTerminator===!0){let ne=0,Q,pe;R.lastIndex=0;do o=o!==null?o:e.substring(T,T+h),Q=R.test(o),Q===!0&&(pe=R.lastIndex-1,ne++);while(Q===!0);ne!==0?(E=E+ne,L=h-pe,this.updateTokenEndLineColumnLocation(p,f,pe,ne,E,L,h)):L=this.computeNewColumn(L,h)}else L=this.computeNewColumn(L,h);T=T+h,this.handleModes(q,$,G,p)}else{let ne=T,Q=E,pe=L,te=z===!1;for(;te===!1&&T ${gm(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",o=` +but found: '`+_c(t).image+"'";if(n)return a+n+o;{let l=hl(e,(d,p)=>d.concat(p),[]),u=or(l,d=>`[${or(d,p=>gm(p)).join(", ")}]`),f=`one of these possible Token sequences: +${or(u,(d,p)=>` ${p+1}. ${d}`).join(` +`)}`;return a+f+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=` +but found: '`+_c(t).image+"'";if(r)return i+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${or(e,u=>`[${or(u,h=>gm(h)).join(",")}]`).join(" ,")}>`;return i+l+s}}};Object.freeze(Dv);dvt={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},fm={buildDuplicateFoundError(e,t){function r(h){return h instanceof si?h.terminalType.name:h instanceof Zs?h.nonTerminalName:""}A(r,"getExtraProductionArgument");let n=e.name,i=_c(t),a=i.idx,s=Tc(i),o=r(i),l=a>0,u=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${n}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` `),u},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=Zt(e.prefixPath,n=>ug(n)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=or(e.prefixPath,i=>gm(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`},buildAlternationAmbiguityError(e){let t=Zt(e.prefixPath,n=>ug(n)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, -<${t}> may appears as a prefix path in all these alternatives. -`;return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i},buildEmptyRepetitionError(e){let t=zl(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. +For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?"":e.alternation.idx,r=e.prefixPath.length===0,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable. +Only the last alternative may be empty. +`;else{let i=or(e.prefixPath,a=>gm(a)).join(", ");n+=`<${i}> may appears as a prefix path in all these alternatives. +`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(e){let t=Tc(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: inside <${e.topLevelRule.name}> Rule. - has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=Zt(e.leftRecursionPath,a=>a.name),i=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar. + has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=or(e.leftRecursionPath,a=>a.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar. rule: <${t}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: - ${i} + ${n} To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof qy?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};S(Ike,"resolveGrammar");wdt=class extends Vy{static{S(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){pr(Yn(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:ms.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},kdt=class extends xA{static{S(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Aa(this.path.ruleStack).reverse(),this.occurrenceStack=Aa(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Ri(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Cdt=class extends kdt{static{S(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=t.concat(r),n=new Us({definition:i});this.possibleTokTypes=Wy(n),this.found=!0}}},wA=class extends xA{static{S(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},Sdt=class extends wA{static{S(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let i=Yl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Bi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,t,r)}},Kye=class extends wA{static{S(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let i=Yl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Bi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,t,r)}},Edt=class extends wA{static{S(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let i=Yl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Bi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,t,r)}},Zye=class extends wA{static{S(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let i=Yl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof Bi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,t,r)}};S(E6,"possiblePathsFrom");S(kz,"nextPossibleTokensAfter");S(Dke,"expandTopLevelRule");(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Ki||(Ki={}));S(kA,"getProdType");S(oF,"getLookaheadPaths");S(Nke,"buildLookaheadFuncForOr");S(Mke,"buildLookaheadFuncForOptionalProd");S(Oke,"buildAlternativesLookAheadFunc");S(Pke,"buildSingleAlternativeLookaheadFunction");Adt=class extends xA{static{S(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,i){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=r.concat(i),!0):!1}walkOption(e,t,r){this.checkIsTarget(e,Ki.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Ki.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Ki.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Ki.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Ki.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},Bke=class extends Vy{static{S(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Ki.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ki.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ki.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ki.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ki.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ki.ALTERNATION)}};S(lF,"initializeArrayOfArrays");S(WE,"pathToHashKeys");S(Fke,"isUniquePrefixHash");S(Cz,"lookAheadSequenceFromAlternatives");S(fw,"getLookaheadPathsForOr");S(dw,"getLookaheadPathsForOptionalProd");S(A6,"containsPath");S($ke,"isStrictPrefixOfPath");S(Sz,"areTokenCategoriesNotUsed");S(zke,"validateLookahead");S(Gke,"validateGrammar");S(qke,"validateDuplicateProductions");S(Vke,"identifyProductionForDuplicates");S(Ez,"getExtraProductionArgument");_dt=class extends Vy{static{S(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};S(Wke,"validateRuleDoesNotAlreadyExist");S(Uke,"validateRuleIsOverridden");S(Az,"validateNoLeftRecursion");S(ET,"getFirstNoneTerminal");_z=class extends Vy{static{S(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};S(Hke,"validateEmptyOrAlternative");S(Yke,"validateAmbiguousAlternationAlternatives");Ldt=class extends Vy{static{S(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};S(jke,"validateTooManyAlts");S(Xke,"validateSomeNonEmptyLookaheadPath");S(Kke,"checkAlternativesAmbiguities");S(Zke,"checkPrefixAlternativesAmbiguities");S(Qke,"checkTerminalAndNoneTerminalsNameSpace");S(Jke,"resolveGrammar");S(e4e,"validateGrammar");t4e="MismatchedTokenException",r4e="NoViableAltException",i4e="EarlyExitException",n4e="NotAllInputParsedException",a4e=[t4e,r4e,i4e,n4e];Object.freeze(a4e);S(GT,"isRecognitionException");CA=class extends Error{static{S(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},s4e=class extends CA{static{S(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=t4e}},Rdt=class extends CA{static{S(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=r4e}},Idt=class extends CA{static{S(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=n4e}},Ddt=class extends CA{static{S(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=i4e}},IP={},o4e="InRuleRecoveryException",Ndt=class extends Error{static{S(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=o4e}},Mdt=class{static{S(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=lr(e,"recoveryEnabled")?e.recoveryEnabled:Fh.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=l4e)}getTokenToInsert(e){let t=hw(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),u=this.LA(1),h=S(()=>{let f=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:f,ruleName:this.getCurrRuleFullName()}),p=new s4e(d,l,this.LA(0));p.resyncedTokens=FT(s),this.SAVE_ERROR(p)},"generateErrorMessage");for(;!o;)if(this.tokenMatcher(u,i)){h();return}else if(r.call(this)){h(),e.apply(this,t);return}else this.tokenMatcher(u,n)?o=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new Ndt("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ri(t))return!1;let r=this.LA(1);return Py(t,n=>this.tokenMatcher(r,n))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return vs(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){let i=Py(e,n=>wz(t,n));if(i!==void 0)return i;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return IP;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return Zt(e,(r,i)=>i===0?IP:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=Zt(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Wl(e)}getFollowSetFromFollowKey(e){if(e===IP)return[qd];let t=e.ruleName+e.idxInCallingRule+Hwe+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,qd)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return FT(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),i=Aa(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Zt(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};S(l4e,"attemptInRepetitionRecovery");Odt=4,jd=8,Pdt=8,c4e=1<Az(t,t,og))}validateEmptyOrAlternatives(e){return al(e,t=>Hke(t,og))}validateAmbiguousAlternationAlternatives(e,t){return al(e,r=>Yke(r,t,og))}validateSomeNonEmptyLookaheadPath(e,t){return Xke(e,t,og)}buildLookaheadForAlternation(e){return Nke(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Oke)}buildLookaheadForOptional(e){return Mke(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,kA(e.prodType),Pke)}},Bdt=class{static{S(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=lr(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Fh.dynamicTokensEnabled,this.maxLookahead=lr(e,"maxLookahead")?e.maxLookahead:Fh.maxLookahead,this.lookaheadStrategy=lr(e,"lookaheadStrategy")?e.lookaheadStrategy:new Lz({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){pr(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:i,option:n,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=h4e(t);pr(r,l=>{let u=l.idx===0?"":l.idx;this.TRACE_INIT(`${zl(l)}${u}`,()=>{let h=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:t,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=HE(this.fullRuleNameToShort[t.name],c4e,l.idx);this.setLaFuncCache(f,h)})}),pr(i,l=>{this.computeLookaheadFunc(t,l.idx,cF,"Repetition",l.maxLookahead,zl(l))}),pr(n,l=>{this.computeLookaheadFunc(t,l.idx,u4e,"Option",l.maxLookahead,zl(l))}),pr(a,l=>{this.computeLookaheadFunc(t,l.idx,uF,"RepetitionMandatory",l.maxLookahead,zl(l))}),pr(s,l=>{this.computeLookaheadFunc(t,l.idx,UE,"RepetitionMandatoryWithSeparator",l.maxLookahead,zl(l))}),pr(o,l=>{this.computeLookaheadFunc(t,l.idx,hF,"RepetitionWithSeparator",l.maxLookahead,zl(l))})})})}computeLookaheadFunc(e,t,r,i,n,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:n||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),o=HE(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(o,s)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return HE(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},Fdt=class extends Vy{static{S(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},mE=new Fdt;S(h4e,"collectMethods");S(fF,"setNodeLocationOnlyOffset");S(dF,"setNodeLocationFull");S(f4e,"addTerminalToCst");S(d4e,"addNoneTerminalToCst");$dt="name";S(Rz,"defineNameProp");S(p4e,"defaultVisit");S(g4e,"createBaseSemanticVisitorConstructor");S(m4e,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(pF||(pF={}));S(y4e,"validateVisitor");S(v4e,"validateMissingCstMethods");zdt=class{static{S(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=lr(e,"nodeLocationTracking")?e.nodeLocationTracking:Fh.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Hn,this.cstFinallyStateUpdate=Hn,this.cstPostTerminal=Hn,this.cstPostNonTerminal=Hn,this.cstPostRule=Hn;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=dF,this.setNodeLocationFromNode=dF,this.cstPostRule=Hn,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Hn,this.setNodeLocationFromNode=Hn,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=fF,this.setNodeLocationFromNode=fF,this.cstPostRule=Hn,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Hn,this.setNodeLocationFromNode=Hn,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Hn,this.setNodeLocationFromNode=Hn,this.cstPostRule=Hn,this.setInitialNodeLocation=Hn;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];f4e(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];d4e(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(Ph(this.baseCstVisitorConstructor)){let e=g4e(this.className,yo(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Ph(this.baseCstVisitorWithDefaultsConstructor)){let e=m4e(this.className,yo(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},Gdt=class{static{S(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):_6}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?_6:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},qdt=class{static{S(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=L6){if(vs(this.definedRulesNames,e)){let a={message:og.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ms.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);let i=this.defineRule(e,t,r);return this[e]=i,i}OVERRIDE_RULE(e,t,r=L6){let i=Uke(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let n=this.defineRule(e,t,r);return this[e]=n,n}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(i){if(GT(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return zwe(Yn(this.gastProductionsCache))}},Vdt=class{static{S(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=zT,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},lr(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof ex?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};A(_3e,"resolveGrammar");pvt=class extends tx{static{A(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Or(ba(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:Qs.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},gvt=class extends tR{static{A(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=is(this.path.ruleStack).reverse(),this.occurrenceStack=is(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){ei(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},mvt=class extends gvt{static{A(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let n=t.concat(r),i=new Mo({definition:n});this.possibleTokTypes=rx(i),this.found=!0}}},nR=class extends tR{static{A(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},yvt=class extends nR{static{A(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let n=_c(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof si&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},Vwe=class extends nR{static{A(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let n=_c(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof si&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},vvt=class extends nR{static{A(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=_c(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof si&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},Wwe=class extends nR{static{A(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=_c(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof si&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};A(s6,"possiblePathsFrom");A(LW,"nextPossibleTokensAfter");A(R3e,"expandTopLevelRule");(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(ki||(ki={}));A(iR,"getProdType");A(LG,"getLookaheadPaths");A(L3e,"buildLookaheadFuncForOr");A(I3e,"buildLookaheadFuncForOptionalProd");A(M3e,"buildAlternativesLookAheadFunc");A(D3e,"buildSingleAlternativeLookaheadFunction");xvt=class extends tR{static{A(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=r.concat(n),!0):!1}walkOption(e,t,r){this.checkIsTarget(e,ki.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,ki.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,ki.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,ki.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,ki.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},N3e=class extends tx{static{A(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,ki.OPTION)}visitRepetition(e){this.checkIsTarget(e,ki.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,ki.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,ki.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,ki.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,ki.ALTERNATION)}};A(IG,"initializeArrayOfArrays");A(y_,"pathToHashKeys");A(O3e,"isUniquePrefixHash");A(IW,"lookAheadSequenceFromAlternatives");A($C,"getLookaheadPathsForOr");A(FC,"getLookaheadPathsForOptionalProd");A(o6,"containsPath");A(P3e,"isStrictPrefixOfPath");A(MW,"areTokenCategoriesNotUsed");A(B3e,"validateLookahead");A($3e,"validateGrammar");A(F3e,"validateDuplicateProductions");A(z3e,"identifyProductionForDuplicates");A(DW,"getExtraProductionArgument");bvt=class extends tx{static{A(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};A(G3e,"validateRuleDoesNotAlreadyExist");A(q3e,"validateRuleIsOverridden");A(NW,"validateNoLeftRecursion");A(Kw,"getFirstNoneTerminal");OW=class extends tx{static{A(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};A(V3e,"validateEmptyOrAlternative");A(W3e,"validateAmbiguousAlternationAlternatives");Tvt=class extends tx{static{A(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};A(U3e,"validateTooManyAlts");A(H3e,"validateSomeNonEmptyLookaheadPath");A(Y3e,"checkAlternativesAmbiguities");A(X3e,"checkPrefixAlternativesAmbiguities");A(j3e,"checkTerminalAndNoneTerminalsNameSpace");A(K3e,"resolveGrammar");A(Z3e,"validateGrammar");Q3e="MismatchedTokenException",J3e="NoViableAltException",eAe="EarlyExitException",tAe="NotAllInputParsedException",rAe=[Q3e,J3e,eAe,tAe];Object.freeze(rAe);A(fC,"isRecognitionException");aR=class extends Error{static{A(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},nAe=class extends aR{static{A(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Q3e}},wvt=class extends aR{static{A(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=J3e}},Cvt=class extends aR{static{A(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=tAe}},kvt=class extends aR{static{A(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=eAe}},ez={},iAe="InRuleRecoveryException",Svt=class extends Error{static{A(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=iAe}},Evt=class{static{A(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Sr(e,"recoveryEnabled")?e.recoveryEnabled:Tf.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=aAe)}getTokenToInsert(e){let t=BC(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),u=this.LA(1),h=A(()=>{let f=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:f,ruleName:this.getCurrRuleFullName()}),p=new nAe(d,l,this.LA(0));p.resyncedTokens=cC(s),this.SAVE_ERROR(p)},"generateErrorMessage");for(;!o;)if(this.tokenMatcher(u,n)){h();return}else if(r.call(this)){h(),e.apply(this,t);return}else this.tokenMatcher(u,i)?o=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new Svt("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||ei(t))return!1;let r=this.LA(1);return Xv(t,i=>this.tokenMatcher(r,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return eo(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){let n=Xv(e,i=>RW(t,i));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return ez;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return or(e,(r,n)=>n===0?ez:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){let e=or(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Sc(e)}getFollowSetFromFollowKey(e){if(e===ez)return[Op];let t=e.ruleName+e.idxInCallingRule+W5e+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Op)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return cC(t)}attemptInRepetitionRecovery(e,t,r,n,i,a,s){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=is(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return or(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};A(aAe,"attemptInRepetitionRecovery");Avt=4,Gp=8,_vt=8,sAe=1<NW(t,t,fm))}validateEmptyOrAlternatives(e){return zl(e,t=>V3e(t,fm))}validateAmbiguousAlternationAlternatives(e,t){return zl(e,r=>W3e(r,t,fm))}validateSomeNonEmptyLookaheadPath(e,t){return H3e(e,t,fm)}buildLookaheadForAlternation(e){return L3e(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,M3e)}buildLookaheadForOptional(e){return I3e(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,iR(e.prodType),D3e)}},Rvt=class{static{A(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=Sr(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Tf.dynamicTokensEnabled,this.maxLookahead=Sr(e,"maxLookahead")?e.maxLookahead:Tf.maxLookahead,this.lookaheadStrategy=Sr(e,"lookaheadStrategy")?e.lookaheadStrategy:new PW({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){Or(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:i,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=lAe(t);Or(r,l=>{let u=l.idx===0?"":l.idx;this.TRACE_INIT(`${Tc(l)}${u}`,()=>{let h=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:t,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=x_(this.fullRuleNameToShort[t.name],sAe,l.idx);this.setLaFuncCache(f,h)})}),Or(n,l=>{this.computeLookaheadFunc(t,l.idx,MG,"Repetition",l.maxLookahead,Tc(l))}),Or(i,l=>{this.computeLookaheadFunc(t,l.idx,oAe,"Option",l.maxLookahead,Tc(l))}),Or(a,l=>{this.computeLookaheadFunc(t,l.idx,DG,"RepetitionMandatory",l.maxLookahead,Tc(l))}),Or(s,l=>{this.computeLookaheadFunc(t,l.idx,v_,"RepetitionMandatoryWithSeparator",l.maxLookahead,Tc(l))}),Or(o,l=>{this.computeLookaheadFunc(t,l.idx,NG,"RepetitionWithSeparator",l.maxLookahead,Tc(l))})})})}computeLookaheadFunc(e,t,r,n,i,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),o=x_(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(o,s)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return x_(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},Lvt=class extends tx{static{A(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},VA=new Lvt;A(lAe,"collectMethods");A(OG,"setNodeLocationOnlyOffset");A(PG,"setNodeLocationFull");A(cAe,"addTerminalToCst");A(uAe,"addNoneTerminalToCst");Ivt="name";A(BW,"defineNameProp");A(hAe,"defaultVisit");A(fAe,"createBaseSemanticVisitorConstructor");A(dAe,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(BG||(BG={}));A(pAe,"validateVisitor");A(gAe,"validateMissingCstMethods");Mvt=class{static{A(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Sr(e,"nodeLocationTracking")?e.nodeLocationTracking:Tf.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=$a,this.cstFinallyStateUpdate=$a,this.cstPostTerminal=$a,this.cstPostNonTerminal=$a,this.cstPostRule=$a;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=PG,this.setNodeLocationFromNode=PG,this.cstPostRule=$a,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=$a,this.setNodeLocationFromNode=$a,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=OG,this.setNodeLocationFromNode=OG,this.cstPostRule=$a,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=$a,this.setNodeLocationFromNode=$a,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=$a,this.setNodeLocationFromNode=$a,this.cstPostRule=$a,this.setInitialNodeLocation=$a;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];cAe(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];uAe(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(xf(this.baseCstVisitorConstructor)){let e=fAe(this.className,cl(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(xf(this.baseCstVisitorWithDefaultsConstructor)){let e=dAe(this.className,cl(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},Dvt=class{static{A(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):l6}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?l6:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},Nvt=class{static{A(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=c6){if(eo(this.definedRulesNames,e)){let a={message:fm.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Qs.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);let n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=c6){let n=q3e(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let i=this.defineRule(e,t,r);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(fC(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return $5e(ba(this.gastProductionsCache))}},Ovt=class{static{A(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=hC,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Sr(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if(Zr(e)){if(Ri(e))throw Error(`A Token Vocabulary cannot be empty. + For Further details.`);if(pn(e)){if(ei(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if(Zr(e))this.tokensMap=bo(e,(n,a)=>(n[a.name]=a,n),{});else if(lr(e,"modes")&&Ul(Wl(Yn(e.modes)),Lke)){let n=Wl(Yn(e.modes)),a=fz(n);this.tokensMap=bo(a,(s,o)=>(s[o.name]=o,s),{})}else if(ol(e))this.tokensMap=Aa(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=qd;let r=lr(e,"modes")?Wl(Yn(e.modes)):Yn(e),i=Ul(r,n=>Ri(n.categoryMatches));this.tokenMatcher=i?zT:Uy,Hy(Yn(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=lr(r,"resyncEnabled")?r.resyncEnabled:L6.resyncEnabled,n=lr(r,"recoveryValueFunc")?r.recoveryValueFunc:L6.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&s.call(this),"lookAheadFunc")}}else n=e;if(i.call(this)===!0)return n.call(this)}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(uF,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if(typeof t!="function"){n=t.DEF;let a=t.GATE;if(a!==void 0){let s=i;i=S(()=>a.call(this)&&s.call(this),"lookAheadFunc")}}else n=t;if(i.call(this)===!0){let a=this.doSingleRepetition(n);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(n)}else throw this.raiseEarlyExitException(e,Ki.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,uF,e,Edt)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(UE,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);let s=S(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),n)===!0;)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,s,i,Zye],s,UE,e,Zye)}else throw this.raiseEarlyExitException(e,Ki.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(cF,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if(typeof t!="function"){n=t.DEF;let s=t.GATE;if(s!==void 0){let o=i;i=S(()=>s.call(this)&&o.call(this),"lookaheadFunction")}}else n=t;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,cF,e,Sdt,a)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(hF,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);let s=S(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),n)===!0;)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,s,i,Kye],s,hF,e,Kye)}}repetitionSepSecondInternal(e,t,r,i,n){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,n],r,UE,e,n)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(c4e,t),i=Zr(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Idt(t,e))}}subruleInternal(e,t,r){let i;try{let n=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,n),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(n){throw this.subruleInternalError(n,r,e.ruleName)}}subruleInternalError(e,t,r){throw GT(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{let n=this.LA(1);this.tokenMatcher(n,e)===!0?(this.consumeToken(),i=n):this.consumeInternalError(e,n,r)}catch(n){i=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){let i,n=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new s4e(i,t,n))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(n){throw n.name===o4e?r:n}}else throw r}saveRecogState(){let e=this.errors,t=Aa(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),qd)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Wdt=class{static{S(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=lr(e,"errorMessageProvider")?e.errorMessageProvider:Fh.errorMessageProvider}SAVE_ERROR(e){if(GT(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Aa(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Aa(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=dw(e,n,t,this.maxLookahead)[0],o=[];for(let u=1;u<=this.maxLookahead;u++)o.push(this.LA(u));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:o,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new Ddt(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],n=fw(e,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));let s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:a,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Rdt(o,this.LA(1),s))}},Udt=class{static{S(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(Ph(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return kz([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Yl(e.ruleStack),i=this.getGAstProductions()[t];return new Cdt(i,e).startWalking()}},SA={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(SA);Qye=!0,Jye=Math.pow(2,jd)-1,b4e=Sy({name:"RECORDING_PHASE_TOKEN",pattern:ds.NA});Hy([b4e]);x4e=hw(b4e,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(x4e);Hdt={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Ydt=class{static{S(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${t}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let t=0;t<10;t++){let r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return _6}topLevelRuleRecord(e,t){try{let r=new qy({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` + For Further details.`)}if(pn(e))this.tokensMap=hl(e,(i,a)=>(i[a.name]=a,i),{});else if(Sr(e,"modes")&&Ec(Sc(ba(e.modes)),E3e)){let i=Sc(ba(e.modes)),a=xW(i);this.tokensMap=hl(a,(s,o)=>(s[o.name]=o,s),{})}else if(ql(e))this.tokensMap=is(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Op;let r=Sr(e,"modes")?Sc(ba(e.modes)):ba(e),n=Ec(r,i=>ei(i.categoryMatches));this.tokenMatcher=n?hC:nx,ix(ba(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=Sr(r,"resyncEnabled")?r.resyncEnabled:c6.resyncEnabled,i=Sr(r,"recoveryValueFunc")?r.recoveryValueFunc:c6.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&s.call(this),"lookAheadFunc")}}else i=e;if(n.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(DG,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof t!="function"){i=t.DEF;let a=t.GATE;if(a!==void 0){let s=n;n=A(()=>a.call(this)&&s.call(this),"lookAheadFunc")}}else i=t;if(n.call(this)===!0){let a=this.doSingleRepetition(i);for(;n.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,ki.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,DG,e,vvt)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(v_,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let s=A(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,n,Wwe],s,v_,e,Wwe)}else throw this.raiseEarlyExitException(e,ki.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(MG,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof t!="function"){i=t.DEF;let s=t.GATE;if(s!==void 0){let o=n;n=A(()=>s.call(this)&&o.call(this),"lookaheadFunction")}}else i=t;let a=!0;for(;n.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,MG,e,yvt,a)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(NG,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let s=A(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,n,Vwe],s,NG,e,Vwe)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,v_,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(sAe,t),n=pn(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,n);if(a!==void 0)return n[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Cvt(t,e))}}subruleInternal(e,t,r){let n;try{let i=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,i),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(i){throw this.subruleInternalError(i,r,e.ruleName)}}subruleInternalError(e,t,r){throw fC(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{let i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),n=i):this.consumeInternalError(e,i,r)}catch(i){n=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,i=this.LA(0);throw r!==void 0&&r.ERR_MSG?n=r.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new nAe(n,t,i))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(i){throw i.name===iAe?r:i}}else throw r}saveRecogState(){let e=this.errors,t=is(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Op)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Pvt=class{static{A(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=Sr(e,"errorMessageProvider")?e.errorMessageProvider:Tf.errorMessageProvider}SAVE_ERROR(e){if(fC(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:is(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return is(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],s=FC(e,i,t,this.maxLookahead)[0],o=[];for(let u=1;u<=this.maxLookahead;u++)o.push(this.LA(u));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:o,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new kvt(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],i=$C(e,n,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));let s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new wvt(o,this.LA(1),s))}},Bvt=class{static{A(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(xf(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return LW([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=_c(e.ruleStack),n=this.getGAstProductions()[t];return new mvt(n,e).startWalking()}},sR={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(sR);Uwe=!0,Hwe=Math.pow(2,Gp)-1,mAe=$v({name:"RECORDING_PHASE_TOKEN",pattern:js.NA});ix([mAe]);yAe=BC(mAe,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(yAe);$vt={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Fvt=class{static{A(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,n){return this.consumeInternalRecord(r,e,n)},this[`SUBRULE${t}`]=function(r,n){return this.subruleInternalRecord(r,e,n)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let t=0;t<10;t++){let r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return l6}topLevelRuleRecord(e,t){try{let r=new ex({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return fy.call(this,Ea,e,t)}atLeastOneInternalRecord(e,t){fy.call(this,xo,t,e)}atLeastOneSepFirstInternalRecord(e,t){fy.call(this,To,t,e,Qye)}manyInternalRecord(e,t){fy.call(this,cn,t,e)}manySepFirstInternalRecord(e,t){fy.call(this,Hs,t,e,Qye)}orInternalRecord(e,t){return T4e.call(this,e,t)}subruleInternalRecord(e,t,r){if(qT(t),!e||lr(e,"ruleName")===!1){let s=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=dg(this.recordingProdStack),n=e.ruleName,a=new gs({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?Hdt:SA}consumeInternalRecord(e,t,r){if(qT(t),!xz(e)){let a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=dg(this.recordingProdStack),n=new Bi({idx:t,terminalType:e,label:r?.LABEL});return i.definition.push(n),x4e}};S(fy,"recordProd");S(T4e,"recordOrProd");S(gF,"getIdxSuffix");S(qT,"assertMethodIdxIsValid");jdt=class{static{S(this,"PerformanceTracer")}initPerformanceTracer(e){if(lr(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Fh.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:i,value:n}=pz(t),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,n}else return t()}};S(w4e,"applyMixins");_6=hw(qd,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(_6);Fh=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ty,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),L6=Object.freeze({recoveryValueFunc:S(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ms||(ms={}));S(mF,"EMPTY_ALT");Iz=class k4e{static{S(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{gz(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),pr(this.definedRulesNames,n=>{let s=this[n].originalGrammarAction,o;this.TRACE_INIT(`${n} Rule`,()=>{o=this.topLevelRuleRecord(n,s)}),this.gastProductionsCache[n]=o})}finally{this.disableRecording()}});let i=[];if(this.TRACE_INIT("Grammar Resolving",()=>{i=Jke({rules:Yn(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{if(Ri(i)&&this.skipValidations===!1){let n=e4e({rules:Yn(this.gastProductionsCache),tokenTypes:Yn(this.tokensMap),errMsgProvider:og,grammarName:r}),a=zke({lookaheadStrategy:this.lookaheadStrategy,rules:Yn(this.gastProductionsCache),tokenTypes:Yn(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(n,a)}}),Ri(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let n=Ywe(Yn(this.gastProductionsCache));this.resyncFollows=n}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var n,a;(a=(n=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(n,{rules:Yn(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Yn(this.gastProductionsCache))})),!k4e.DEFER_DEFINITION_ERRORS_HANDLING&&!Ri(this.definitionErrors))throw t=Zt(this.definitionErrors,n=>n.message),new Error(`Parser Definition Errors detected: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return wv.call(this,ns,e,t)}atLeastOneInternalRecord(e,t){wv.call(this,fl,t,e)}atLeastOneSepFirstInternalRecord(e,t){wv.call(this,dl,t,e,Uwe)}manyInternalRecord(e,t){wv.call(this,$i,t,e)}manySepFirstInternalRecord(e,t){wv.call(this,Do,t,e,Uwe)}orInternalRecord(e,t){return vAe.call(this,e,t)}subruleInternalRecord(e,t,r){if(dC(t),!e||Sr(e,"ruleName")===!1){let s=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let n=vm(this.recordingProdStack),i=e.ruleName,a=new Zs({idx:t,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0});return n.definition.push(a),this.outputCst?$vt:sR}consumeInternalRecord(e,t,r){if(dC(t),!AW(e)){let a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let n=vm(this.recordingProdStack),i=new si({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(i),yAe}};A(wv,"recordProd");A(vAe,"recordOrProd");A($G,"getIdxSuffix");A(dC,"assertMethodIdxIsValid");zvt=class{static{A(this,"PerformanceTracer")}initPerformanceTracer(e){if(Sr(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Tf.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:n,value:i}=TW(t),a=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,i}else return t()}};A(xAe,"applyMixins");l6=BC(Op,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(l6);Tf=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Dv,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),c6=Object.freeze({recoveryValueFunc:A(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Qs||(Qs={}));A(FG,"EMPTY_ALT");$W=class bAe{static{A(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{wW(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),Or(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=K3e({rules:ba(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(ei(n)&&this.skipValidations===!1){let i=Z3e({rules:ba(this.gastProductionsCache),tokenTypes:ba(this.tokensMap),errMsgProvider:fm,grammarName:r}),a=B3e({lookaheadStrategy:this.lookaheadStrategy,rules:ba(this.gastProductionsCache),tokenTypes:ba(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),ei(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=U5e(ba(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:ba(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(ba(this.gastProductionsCache))})),!bAe.DEFER_DEFINITION_ERRORS_HANDLING&&!ei(this.definitionErrors))throw t=or(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: ${t.join(` ------------------------------- -`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(t,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),lr(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Sr(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=lr(r,"skipValidations")?r.skipValidations:Fh.skipValidations}};Iz.DEFER_DEFINITION_ERRORS_HANDLING=!1;w4e(Iz,[Mdt,Bdt,zdt,Gdt,Vdt,qdt,Wdt,Udt,Ydt,jdt]);Xdt=class extends Iz{static{S(this,"EmbeddedActionsParser")}constructor(e,t=Fh){let r=Aa(t);r.outputCst=!1,super(e,r)}};S(C4e,"arrayMap");S4e=C4e;S(E4e,"listCacheClear");Kdt=E4e;S(A4e,"eq");_4e=A4e;S(L4e,"assocIndexOf");EA=L4e,Zdt=Array.prototype,Qdt=Zdt.splice;S(R4e,"listCacheDelete");Jdt=R4e;S(I4e,"listCacheGet");ept=I4e;S(D4e,"listCacheHas");tpt=D4e;S(N4e,"listCacheSet");rpt=N4e;S(Rg,"ListCache");Rg.prototype.clear=Kdt;Rg.prototype.delete=Jdt;Rg.prototype.get=ept;Rg.prototype.has=tpt;Rg.prototype.set=rpt;AA=Rg;S(M4e,"stackClear");ipt=M4e;S(O4e,"stackDelete");npt=O4e;S(P4e,"stackGet");apt=P4e;S(B4e,"stackHas");spt=B4e,opt=typeof global=="object"&&global&&global.Object===Object&&global,F4e=opt,lpt=typeof self=="object"&&self&&self.Object===Object&&self,cpt=F4e||lpt||Function("return this")(),Vh=cpt,upt=Vh.Symbol,yu=upt,$4e=Object.prototype,hpt=$4e.hasOwnProperty,fpt=$4e.toString,Xx=yu?yu.toStringTag:void 0;S(z4e,"getRawTag");dpt=z4e,ppt=Object.prototype,gpt=ppt.toString;S(G4e,"objectToString");mpt=G4e,ypt="[object Null]",vpt="[object Undefined]",eve=yu?yu.toStringTag:void 0;S(q4e,"baseGetTag");Yy=q4e;S(V4e,"isObject");Dz=V4e,bpt="[object AsyncFunction]",xpt="[object Function]",Tpt="[object GeneratorFunction]",wpt="[object Proxy]";S(W4e,"isFunction");U4e=W4e,kpt=Vh["__core-js_shared__"],DP=kpt,tve=(function(){var e=/[^.]+$/.exec(DP&&DP.keys&&DP.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();S(H4e,"isMasked");Cpt=H4e,Spt=Function.prototype,Ept=Spt.toString;S(Y4e,"toSource");Ig=Y4e,Apt=/[\\^$.*+?()[\]{}|]/g,_pt=/^\[object .+?Constructor\]$/,Lpt=Function.prototype,Rpt=Object.prototype,Ipt=Lpt.toString,Dpt=Rpt.hasOwnProperty,Npt=RegExp("^"+Ipt.call(Dpt).replace(Apt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");S(j4e,"baseIsNative");Mpt=j4e;S(X4e,"getValue");Opt=X4e;S(K4e,"getNative");jy=K4e,Ppt=jy(Vh,"Map"),VT=Ppt,Bpt=jy(Object,"create"),WT=Bpt;S(Z4e,"hashClear");Fpt=Z4e;S(Q4e,"hashDelete");$pt=Q4e,zpt="__lodash_hash_undefined__",Gpt=Object.prototype,qpt=Gpt.hasOwnProperty;S(J4e,"hashGet");Vpt=J4e,Wpt=Object.prototype,Upt=Wpt.hasOwnProperty;S(eCe,"hashHas");Hpt=eCe,Ypt="__lodash_hash_undefined__";S(tCe,"hashSet");jpt=tCe;S(Dg,"Hash");Dg.prototype.clear=Fpt;Dg.prototype.delete=$pt;Dg.prototype.get=Vpt;Dg.prototype.has=Hpt;Dg.prototype.set=jpt;rve=Dg;S(rCe,"mapCacheClear");Xpt=rCe;S(iCe,"isKeyable");Kpt=iCe;S(nCe,"getMapData");_A=nCe;S(aCe,"mapCacheDelete");Zpt=aCe;S(sCe,"mapCacheGet");Qpt=sCe;S(oCe,"mapCacheHas");Jpt=oCe;S(lCe,"mapCacheSet");e0t=lCe;S(Ng,"MapCache");Ng.prototype.clear=Xpt;Ng.prototype.delete=Zpt;Ng.prototype.get=Qpt;Ng.prototype.has=Jpt;Ng.prototype.set=e0t;LA=Ng,t0t=200;S(cCe,"stackSet");r0t=cCe;S(Mg,"Stack");Mg.prototype.clear=ipt;Mg.prototype.delete=npt;Mg.prototype.get=apt;Mg.prototype.has=spt;Mg.prototype.set=r0t;YE=Mg,i0t="__lodash_hash_undefined__";S(uCe,"setCacheAdd");n0t=uCe;S(hCe,"setCacheHas");a0t=hCe;S(UT,"SetCache");UT.prototype.add=UT.prototype.push=n0t;UT.prototype.has=a0t;fCe=UT;S(dCe,"arraySome");s0t=dCe;S(pCe,"cacheHas");gCe=pCe,o0t=1,l0t=2;S(mCe,"equalArrays");yCe=mCe,c0t=Vh.Uint8Array,ive=c0t;S(vCe,"mapToArray");u0t=vCe;S(bCe,"setToArray");Nz=bCe,h0t=1,f0t=2,d0t="[object Boolean]",p0t="[object Date]",g0t="[object Error]",m0t="[object Map]",y0t="[object Number]",v0t="[object RegExp]",b0t="[object Set]",x0t="[object String]",T0t="[object Symbol]",w0t="[object ArrayBuffer]",k0t="[object DataView]",nve=yu?yu.prototype:void 0,NP=nve?nve.valueOf:void 0;S(xCe,"equalByTag");C0t=xCe;S(TCe,"arrayPush");wCe=TCe,S0t=Array.isArray,ys=S0t;S(kCe,"baseGetAllKeys");E0t=kCe;S(CCe,"arrayFilter");SCe=CCe;S(ECe,"stubArray");A0t=ECe,_0t=Object.prototype,L0t=_0t.propertyIsEnumerable,ave=Object.getOwnPropertySymbols,R0t=ave?function(e){return e==null?[]:(e=Object(e),SCe(ave(e),function(t){return L0t.call(e,t)}))}:A0t,I0t=R0t;S(ACe,"baseTimes");D0t=ACe;S(_Ce,"isObjectLike");By=_Ce,N0t="[object Arguments]";S(LCe,"baseIsArguments");sve=LCe,RCe=Object.prototype,M0t=RCe.hasOwnProperty,O0t=RCe.propertyIsEnumerable,P0t=sve((function(){return arguments})())?sve:function(e){return By(e)&&M0t.call(e,"callee")&&!O0t.call(e,"callee")},RA=P0t;S(ICe,"stubFalse");B0t=ICe,DCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ove=DCe&&typeof module=="object"&&module&&!module.nodeType&&module,F0t=ove&&ove.exports===DCe,lve=F0t?Vh.Buffer:void 0,$0t=lve?lve.isBuffer:void 0,z0t=$0t||B0t,R6=z0t,G0t=9007199254740991,q0t=/^(?:0|[1-9]\d*)$/;S(NCe,"isIndex");MCe=NCe,V0t=9007199254740991;S(OCe,"isLength");Mz=OCe,W0t="[object Arguments]",U0t="[object Array]",H0t="[object Boolean]",Y0t="[object Date]",j0t="[object Error]",X0t="[object Function]",K0t="[object Map]",Z0t="[object Number]",Q0t="[object Object]",J0t="[object RegExp]",egt="[object Set]",tgt="[object String]",rgt="[object WeakMap]",igt="[object ArrayBuffer]",ngt="[object DataView]",agt="[object Float32Array]",sgt="[object Float64Array]",ogt="[object Int8Array]",lgt="[object Int16Array]",cgt="[object Int32Array]",ugt="[object Uint8Array]",hgt="[object Uint8ClampedArray]",fgt="[object Uint16Array]",dgt="[object Uint32Array]",Pi={};Pi[agt]=Pi[sgt]=Pi[ogt]=Pi[lgt]=Pi[cgt]=Pi[ugt]=Pi[hgt]=Pi[fgt]=Pi[dgt]=!0;Pi[W0t]=Pi[U0t]=Pi[igt]=Pi[H0t]=Pi[ngt]=Pi[Y0t]=Pi[j0t]=Pi[X0t]=Pi[K0t]=Pi[Z0t]=Pi[Q0t]=Pi[J0t]=Pi[egt]=Pi[tgt]=Pi[rgt]=!1;S(PCe,"baseIsTypedArray");pgt=PCe;S(BCe,"baseUnary");ggt=BCe,FCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,AT=FCe&&typeof module=="object"&&module&&!module.nodeType&&module,mgt=AT&&AT.exports===FCe,MP=mgt&&F4e.process,ygt=(function(){try{var e=AT&&AT.require&&AT.require("util").types;return e||MP&&MP.binding&&MP.binding("util")}catch{}})(),cve=ygt,uve=cve&&cve.isTypedArray,vgt=uve?ggt(uve):pgt,Oz=vgt,bgt=Object.prototype,xgt=bgt.hasOwnProperty;S($Ce,"arrayLikeKeys");Tgt=$Ce,wgt=Object.prototype;S(zCe,"isPrototype");GCe=zCe;S(qCe,"overArg");kgt=qCe,Cgt=kgt(Object.keys,Object),Sgt=Cgt,Egt=Object.prototype,Agt=Egt.hasOwnProperty;S(VCe,"baseKeys");WCe=VCe;S(UCe,"isArrayLike");IA=UCe;S(HCe,"keys");Pz=HCe;S(YCe,"getAllKeys");hve=YCe,_gt=1,Lgt=Object.prototype,Rgt=Lgt.hasOwnProperty;S(jCe,"equalObjects");Igt=jCe,Dgt=jy(Vh,"DataView"),yF=Dgt,Ngt=jy(Vh,"Promise"),vF=Ngt,Mgt=jy(Vh,"Set"),Ey=Mgt,Ogt=jy(Vh,"WeakMap"),bF=Ogt,fve="[object Map]",Pgt="[object Object]",dve="[object Promise]",pve="[object Set]",gve="[object WeakMap]",mve="[object DataView]",Bgt=Ig(yF),Fgt=Ig(VT),$gt=Ig(vF),zgt=Ig(Ey),Ggt=Ig(bF),$0=Yy;(yF&&$0(new yF(new ArrayBuffer(1)))!=mve||VT&&$0(new VT)!=fve||vF&&$0(vF.resolve())!=dve||Ey&&$0(new Ey)!=pve||bF&&$0(new bF)!=gve)&&($0=S(function(e){var t=Yy(e),r=t==Pgt?e.constructor:void 0,i=r?Ig(r):"";if(i)switch(i){case Bgt:return mve;case Fgt:return fve;case $gt:return dve;case zgt:return pve;case Ggt:return gve}return t},"getTag"));xF=$0,qgt=1,yve="[object Arguments]",vve="[object Array]",yE="[object Object]",Vgt=Object.prototype,bve=Vgt.hasOwnProperty;S(XCe,"baseIsEqualDeep");Wgt=XCe;S(Bz,"baseIsEqual");KCe=Bz,Ugt=1,Hgt=2;S(ZCe,"baseIsMatch");Ygt=ZCe;S(QCe,"isStrictComparable");JCe=QCe;S(e5e,"getMatchData");jgt=e5e;S(t5e,"matchesStrictComparable");r5e=t5e;S(i5e,"baseMatches");Xgt=i5e,Kgt="[object Symbol]";S(n5e,"isSymbol");DA=n5e,Zgt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qgt=/^\w*$/;S(a5e,"isKey");Fz=a5e,Jgt="Expected a function";S(NA,"memoize");NA.Cache=LA;emt=NA,tmt=500;S(s5e,"memoizeCapped");rmt=s5e,imt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nmt=/\\(\\)?/g,amt=rmt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(imt,function(r,i,n,a){t.push(n?a.replace(nmt,"$1"):i||r)}),t}),smt=amt,omt=1/0,xve=yu?yu.prototype:void 0,Tve=xve?xve.toString:void 0;S($z,"baseToString");lmt=$z;S(o5e,"toString");cmt=o5e;S(l5e,"castPath");c5e=l5e,umt=1/0;S(u5e,"toKey");MA=u5e;S(h5e,"baseGet");f5e=h5e;S(d5e,"get");hmt=d5e;S(p5e,"baseHasIn");fmt=p5e;S(g5e,"hasPath");dmt=g5e;S(m5e,"hasIn");pmt=m5e,gmt=1,mmt=2;S(y5e,"baseMatchesProperty");ymt=y5e;S(v5e,"identity");zz=v5e;S(b5e,"baseProperty");vmt=b5e;S(x5e,"basePropertyDeep");bmt=x5e;S(T5e,"property");xmt=T5e;S(w5e,"baseIteratee");OA=w5e;S(k5e,"createBaseFor");Tmt=k5e,wmt=Tmt(),kmt=wmt;S(C5e,"baseForOwn");Cmt=C5e;S(S5e,"createBaseEach");Smt=S5e,Emt=Smt(Cmt),PA=Emt;S(E5e,"baseMap");Amt=E5e;S(A5e,"map");Rh=A5e;S(_5e,"baseFilter");_mt=_5e;S(L5e,"filter");Lmt=L5e;S(gg,"buildATNKey");Vd=1,Rmt=2,R5e=4,I5e=5,pw=7,Imt=8,Dmt=9,Nmt=10,Mmt=11,D5e=12,Gz=class{static{S(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},qz=class extends Gz{static{S(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},N5e=class extends Gz{static{S(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Vz=class extends Gz{static{S(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};S(M5e,"createATN");S(O5e,"createRuleStartAndStopATNStates");S(Wz,"atom");S(P5e,"repetition");S(B5e,"repetitionSep");S(F5e,"repetitionMandatory");S($5e,"repetitionMandatorySep");S(z5e,"alternation");S(G5e,"option");S(Xd,"block");S(Uz,"plus");S(Hz,"star");S(q5e,"optional");S(Wh,"defineDecisionState");S(Og,"makeAlts");S(V5e,"getProdType");S(W5e,"makeBlock");S(BA,"tokenRef");S(U5e,"ruleRef");S(H5e,"buildRuleHandle");S(vn,"epsilon");S(jn,"newState");S(FA,"addTransition");S(Y5e,"removeState");I6={},TF=class{static{S(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=Yz(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Rh(this.configs,e=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};S(Yz,"getATNConfigKey");S(j5e,"baseExtremum");Omt=j5e;S(X5e,"baseLt");Pmt=X5e;S(K5e,"min");Bmt=K5e,wve=yu?yu.isConcatSpreadable:void 0;S(Z5e,"isFlattenable");Fmt=Z5e;S(jz,"baseFlatten");Q5e=jz;S(J5e,"flatMap");$mt=J5e;S(e3e,"baseFindIndex");zmt=e3e;S(t3e,"baseIsNaN");Gmt=t3e;S(r3e,"strictIndexOf");qmt=r3e;S(i3e,"baseIndexOf");Vmt=i3e;S(n3e,"arrayIncludes");Wmt=n3e;S(a3e,"arrayIncludesWith");Umt=a3e;S(s3e,"noop");Hmt=s3e,Ymt=1/0,jmt=Ey&&1/Nz(new Ey([,-0]))[1]==Ymt?function(e){return new Ey(e)}:Hmt,Xmt=jmt,Kmt=200;S(o3e,"baseUniq");Zmt=o3e;S(l3e,"uniqBy");Qmt=l3e;S(c3e,"flatten");Jmt=c3e;S(u3e,"arrayEach");e1t=u3e;S(h3e,"castFunction");t1t=h3e;S(f3e,"forEach");OP=f3e,r1t="[object Map]",i1t="[object Set]",n1t=Object.prototype,a1t=n1t.hasOwnProperty;S(d3e,"isEmpty");s1t=d3e;S(p3e,"arrayReduce");o1t=p3e;S(g3e,"baseReduce");l1t=g3e;S(m3e,"reduce");kve=m3e;S(y3e,"createDFACache");v3e=class{static{S(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;rconsole.log(r))}initialize(e){this.atn=M5e(e.rules),this.dfas=b3e(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=e,a=this.dfas,s=this.logging,o=gg(r,"Alternation",t),u=this.atn.decisionMap[o].decision,h=Rh(oF({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>Rh(f,d=>d[0]));if(wF(h,!1)&&!n){let f=kve(h,(d,p,g)=>(OP(p,m=>{m&&(d[m.tokenTypeIdx]=g,OP(m.categoryMatches,y=>{d[y]=g}))}),d),{});return i?function(d){var p;let g=this.LA(1),m=f[g.tokenTypeIdx];if(d!==void 0&&m!==void 0){let y=(p=d[m])===null||p===void 0?void 0:p.GATE;if(y!==void 0&&y.call(this)===!1)return}return m}:function(){let d=this.LA(1);return f[d.tokenTypeIdx]}}else return i?function(f){let d=new v3e,p=f===void 0?0:f.length;for(let m=0;mRh(f,d=>d[0]));if(wF(h)&&h[0][0]&&!n){let f=h[0],d=Jmt(f);if(d.length===1&&s1t(d[0].categoryMatches)){let g=d[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{let p=kve(d,(g,m)=>(m!==void 0&&(g[m.tokenTypeIdx]=!0,OP(m.categoryMatches,y=>{g[y]=!0})),g),{});return function(){let g=this.LA(1);return p[g.tokenTypeIdx]===!0}}}return function(){let f=jE.call(this,a,u,Cve,s);return typeof f=="object"?!1:f===0}}};S(wF,"isLL1Sequence");S(b3e,"initATNSimulator");S(jE,"adaptivePredict");S(x3e,"performLookahead");S(T3e,"computeLookaheadTarget");S(w3e,"reportLookaheadAmbiguity");S(k3e,"buildAmbiguityError");S(C3e,"getProductionDslName");S(S3e,"buildAdaptivePredictError");S(E3e,"getExistingTargetState");S(A3e,"computeReachSet");S(_3e,"getReachableTarget");S(L3e,"getUniqueAlt");S(Xz,"newDFAState");S(kF,"addDFAEdge");S(Kz,"addDFAState");S(R3e,"computeStartState");S(HT,"closure");S(I3e,"getEpsilonTarget");S(D3e,"hasConfigInRuleStopState");S(N3e,"allConfigsInRuleStopStates");S(M3e,"hasConflictTerminatingPrediction");S(O3e,"getConflictingAltSets");S(P3e,"hasConflictingAltSet");S(B3e,"hasStateAssociatedWithOneAlt");XT();F3e=class{static{S(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Qz(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new $A;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new D6(e.startOffset,e.image.length,NT(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){let t=e.container;if(t){let r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){let t=[];for(let n of e){let a=new D6(n.startOffset,n.image.length,NT(n),n.tokenType,!0);a.root=this.rootNode,t.push(a)}let r=this.current,i=!1;if(r.content.length>0){r.content.push(...t);return}for(;r.container;){let n=r.container.content.indexOf(r);if(n>0){r.container.content.splice(n,0,...t),i=!0;break}r=r.container}i||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},Zz=class{static{S(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},D6=class extends Zz{static{S(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,i,n=!1){super(),this._hidden=n,this._offset=e,this._tokenType=i,this._length=t,this._range=r}},$A=class extends Zz{static{S(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new u1t(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:r}=e,{range:i}=t;this._rangeCache={start:r.start,end:i.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},u1t=class $3e extends Array{static{S(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,$3e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...i){return this.addParents(i),super.splice(t,r,...i)}addParents(t){for(let r of t)r.container=this.parent}},Qz=class extends $A{static{S(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},N6=Symbol("Datatype");S(XE,"isDataTypeNode");Sve="\u200B",z3e=S(e=>e.endsWith(Sve)?e:e+Sve,"withRuleSuffix"),Jz=class{static{S(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new f1t(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new W3e(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},G3e=class extends Jz{static{S(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new F3e,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),i;Iy(e)&&(i=e.name,this.registerPrecedenceMap(e));let n=this.wrapper.DEFINE_RULE(z3e(e.name),this.startImplementation(r,i,t).bind(this));return this.allRules.set(e.name,n),ps(e)&&e.entry&&(this.mainRule=n),n}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let i=0;i0&&(t=this.construct()),t===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return i=>{let n=!this.isRecording()&&e!==void 0;if(n){let a={$type:e};this.stack.push(a),e===N6?a.value="":t!==void 0&&(a.$infixName=t)}return r(i),n?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let i=0;ir)return t.splice(0,i);return t.splice(0,t.length)}consume(e,t,r){let i=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(i)){let n=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(n);let a=this.nodeBuilder.buildLeafNode(i,r),{assignment:s,crossRef:o}=this.getAssignment(r),l=this.current;if(s){let u=Nh(r)?i.image:this.converter.convert(i.image,a);this.assign(s.operator,s.feature,u,a,o)}else if(XE(l)){let u=i.image;Nh(r)||(u=this.converter.convert(u,a).toString()),l.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,i,n){let a;!this.isRecording()&&!r&&(a=this.nodeBuilder.buildCompositeNode(i));let s;try{s=this.wrapper.wrapSubrule(e,t,n)}finally{this.isRecording()||(s===void 0&&!r&&(s=this.construct()),s!==void 0&&a&&a.length>0&&this.performSubruleAssignment(s,i,a))}}performSubruleAssignment(e,t,r){let{assignment:i,crossRef:n}=this.getAssignment(t);if(i)this.assign(i.operator,i.feature,e,r,n);else if(!i){let a=this.current;if(XE(a))a.value+=e.toString();else if(typeof e=="object"&&e){let o=this.assignWithoutOverride(e,a);this.stack.pop(),this.stack.push(o)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);let n={$type:e};this.stack.push(n),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):XE(e)?this.converter.convert(e.value,e.$cstNode):(ZF(this.astReflection,e),e)}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let i=e.operators;if(!Array.isArray(i)||r.length<2)return r[0];let n=0,a=-1;for(let g=0;ga?(a=y.precedence,n=g):y.precedence===a&&(y.rightAssoc||(n=g))}let s=i.slice(0,n),o=i.slice(n+1),l=r.slice(0,n+1),u=r.slice(n+1),h={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d=this.constructInfix(h,t),p=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:d,operator:i[n],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=vg(e,Dh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&xg(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,i,n){let a=this.current,s;switch(n==="single"&&typeof r=="string"?s=this.linker.buildReference(a,t,i,r):n==="multi"&&typeof r=="string"?s=this.linker.buildMultiReference(a,t,i,r):s=r,e){case"=":{a[t]=s;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(let[i,n]of Object.entries(t)){let a=e[i];a===void 0?e[i]=n:Array.isArray(a)&&Array.isArray(n)&&(n.push(...a),e[i]=n)}let r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},q3e=class{static{S(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Ty.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Ty.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Ty.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Ty.buildEarlyExitMessage(e)}},eG=class extends q3e{static{S(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},V3e=class extends Jz{static{S(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let r=this.wrapper.DEFINE_RULE(z3e(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i,n){this.before(i),this.wrapper.wrapSubrule(e,t,n),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},h1t={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new eG},W3e=class extends Xdt{static{S(this,"ChevrotainWrapper")}constructor(e,t){let r=t&&"maxLookahead"in t;super(e,{...h1t,lookaheadStrategy:r?new Lz({maxLookahead:t.maxLookahead}):new c1t({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},f1t=class extends W3e{static{S(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};S(zA,"createParser");S(U3e,"buildRules");S(H3e,"buildInfixRule");S(Wd,"buildElement");S(Y3e,"buildAction");S(j3e,"buildRuleCall");S(X3e,"buildRuleCallPredicate");S(Gl,"buildPredicate");S(K3e,"buildAlternatives");S(Z3e,"buildUnorderedGroup");S(Q3e,"buildGroup");S(YT,"getGuardCondition");S(tG,"buildCrossReference");S(J3e,"buildKeyword");S(rG,"wrap");S(GA,"getRule");S(eSe,"getRuleName");S(M6,"getToken");S(iG,"createCompletionParser");S(nG,"createLangiumParser");S(aG,"prepareLangiumParser");qA=class{static{S(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=gi(tA(e,!1)),i=this.buildTerminalTokens(r),n=this.buildKeywordTokens(r,i,t);return n.push(...i),n}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(ll).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=tw(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r};return typeof r=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=eA(t)?ds.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,i)=>(t.lastIndex=i,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(bg).flatMap(i=>Gh(i).filter(Nh)).distinct(i=>i.value).toArray().sort((i,n)=>n.value.length-i.value.length).map(i=>this.buildKeywordToken(i,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let i=this.buildKeywordPattern(e,r),n={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,t)};return typeof i=="function"&&(n.LINE_BREAKS=!0),n}buildKeywordPattern(e,t){return t?new RegExp(Gy(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,i)=>{let n=i?.PATTERN;return n?.source&&R$("^"+n.source+"$",e.value)&&r.push(i),r},[])}},sG=class{static{S(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(xg(r)&&(r=O$(r)),Mh(r)){let i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return hu.convertInt(t);case"STRING":return hu.convertString(t);case"ID":return hu.convertID(t)}switch(W$(e)?.toLowerCase()){case"number":return hu.convertNumber(t);case"boolean":return hu.convertBoolean(t);case"bigint":return hu.convertBigint(t);case"date":return hu.convertDate(t);default:return t}}};(function(e){function t(u){let h="";for(let f=1;f{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},Eve=class CF{static{S(this,"FullTextDocument")}constructor(t,r,i,n){this._uri=t,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),i=this.offsetAt(t.end);return this._content.substring(r,i)}return this._content}update(t,r){for(let i of t)if(CF.isIncremental(i)){let n=cG(i.range),a=this.offsetAt(n.start),s=this.offsetAt(n.end);this._content=this._content.substring(0,a)+i.text+this._content.substring(s,this._content.length);let o=Math.max(n.start.line,0),l=Math.max(n.end.line,0),u=this._lineOffsets,h=SF(i.text,!1,a);if(l-o===h.length)for(let d=0,p=h.length;dt?n=s:i=s+1}let a=i-1;return t=this.ensureBeforeEOL(t,r[a]),{line:a,character:t-r[a]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let i=r[t.line];if(t.character<=0)return i;let n=t.line+1r&&lG(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(n,a,s,o){return new Eve(n,a,s,o)}S(t,"create"),e.create=t;function r(n,a,s){if(n instanceof Eve)return n.update(a,s),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}S(r,"update"),e.update=r;function i(n,a){let s=n.getText(),o=P6(a.map(rSe),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=n.offsetAt(h.range.start);if(fl&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=n.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}S(i,"applyEdits"),e.applyEdits=i})(O6||(O6={}));S(P6,"mergeSort");S(SF,"computeLineOffsets");S(lG,"isEOL");S(cG,"getWellformedRange");S(rSe,"getWellformedEdit");(()=>{"use strict";var e={975:O=>{function L(D){if(typeof D!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(D))}S(L,"e");function _(D,I){for(var B,M="",F=0,z=-1,$=0,G=0;G<=D.length;++G){if(G2){var U=M.lastIndexOf("/");if(U!==M.length-1){U===-1?(M="",F=0):F=(M=M.slice(0,U)).length-1-M.lastIndexOf("/"),z=G,$=0;continue}}else if(M.length===2||M.length===1){M="",F=0,z=G,$=0;continue}}I&&(M.length>0?M+="/..":M="..",F=2)}else M.length>0?M+="/"+D.slice(z+1,G):M=D.slice(z+1,G),F=G-z-1;z=G,$=0}else B===46&&$!==-1?++$:$=-1}return M}S(_,"r");var R={resolve:S(function(){for(var D,I="",B=!1,M=arguments.length-1;M>=-1&&!B;M--){var F;M>=0?F=arguments[M]:(D===void 0&&(D=process.cwd()),F=D),L(F),F.length!==0&&(I=F+"/"+I,B=F.charCodeAt(0)===47)}return I=_(I,!B),B?I.length>0?"/"+I:"/":I.length>0?I:"."},"resolve"),normalize:S(function(D){if(L(D),D.length===0)return".";var I=D.charCodeAt(0)===47,B=D.charCodeAt(D.length-1)===47;return(D=_(D,!I)).length!==0||I||(D="."),D.length>0&&B&&(D+="/"),I?"/"+D:D},"normalize"),isAbsolute:S(function(D){return L(D),D.length>0&&D.charCodeAt(0)===47},"isAbsolute"),join:S(function(){if(arguments.length===0)return".";for(var D,I=0;I0&&(D===void 0?D=B:D+="/"+B)}return D===void 0?".":R.normalize(D)},"join"),relative:S(function(D,I){if(L(D),L(I),D===I||(D=R.resolve(D))===(I=R.resolve(I)))return"";for(var B=1;BG){if(I.charCodeAt(z+j)===47)return I.slice(z+j+1);if(j===0)return I.slice(z+j)}else F>G&&(D.charCodeAt(B+j)===47?U=j:j===0&&(U=0));break}var H=D.charCodeAt(B+j);if(H!==I.charCodeAt(z+j))break;H===47&&(U=j)}var Q="";for(j=B+U+1;j<=M;++j)j!==M&&D.charCodeAt(j)!==47||(Q.length===0?Q+="..":Q+="/..");return Q.length>0?Q+I.slice(z+U):(z+=U,I.charCodeAt(z)===47&&++z,I.slice(z))},"relative"),_makeLong:S(function(D){return D},"_makeLong"),dirname:S(function(D){if(L(D),D.length===0)return".";for(var I=D.charCodeAt(0),B=I===47,M=-1,F=!0,z=D.length-1;z>=1;--z)if((I=D.charCodeAt(z))===47){if(!F){M=z;break}}else F=!1;return M===-1?B?"/":".":B&&M===1?"//":D.slice(0,M)},"dirname"),basename:S(function(D,I){if(I!==void 0&&typeof I!="string")throw new TypeError('"ext" argument must be a string');L(D);var B,M=0,F=-1,z=!0;if(I!==void 0&&I.length>0&&I.length<=D.length){if(I.length===D.length&&I===D)return"";var $=I.length-1,G=-1;for(B=D.length-1;B>=0;--B){var U=D.charCodeAt(B);if(U===47){if(!z){M=B+1;break}}else G===-1&&(z=!1,G=B+1),$>=0&&(U===I.charCodeAt($)?--$==-1&&(F=B):($=-1,F=G))}return M===F?F=G:F===-1&&(F=D.length),D.slice(M,F)}for(B=D.length-1;B>=0;--B)if(D.charCodeAt(B)===47){if(!z){M=B+1;break}}else F===-1&&(z=!1,F=B+1);return F===-1?"":D.slice(M,F)},"basename"),extname:S(function(D){L(D);for(var I=-1,B=0,M=-1,F=!0,z=0,$=D.length-1;$>=0;--$){var G=D.charCodeAt($);if(G!==47)M===-1&&(F=!1,M=$+1),G===46?I===-1?I=$:z!==1&&(z=1):I!==-1&&(z=-1);else if(!F){B=$+1;break}}return I===-1||M===-1||z===0||z===1&&I===M-1&&I===B+1?"":D.slice(I,M)},"extname"),format:S(function(D){if(D===null||typeof D!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof D);return(function(I,B){var M=B.dir||B.root,F=B.base||(B.name||"")+(B.ext||"");return M?M===B.root?M+F:M+"/"+F:F})(0,D)},"format"),parse:S(function(D){L(D);var I={root:"",dir:"",base:"",ext:"",name:""};if(D.length===0)return I;var B,M=D.charCodeAt(0),F=M===47;F?(I.root="/",B=1):B=0;for(var z=-1,$=0,G=-1,U=!0,j=D.length-1,H=0;j>=B;--j)if((M=D.charCodeAt(j))!==47)G===-1&&(U=!1,G=j+1),M===46?z===-1?z=j:H!==1&&(H=1):z!==-1&&(H=-1);else if(!U){$=j+1;break}return z===-1||G===-1||H===0||H===1&&z===G-1&&z===$+1?G!==-1&&(I.base=I.name=$===0&&F?D.slice(1,G):D.slice($,G)):($===0&&F?(I.name=D.slice(1,z),I.base=D.slice(1,G)):(I.name=D.slice($,z),I.base=D.slice($,G)),I.ext=D.slice(z,G)),$>0?I.dir=D.slice(0,$-1):F&&(I.dir="/"),I},"parse"),sep:"/",delimiter:":",win32:null,posix:null};R.posix=R,O.exports=R}},t={};function r(O){var L=t[O];if(L!==void 0)return L.exports;var _=t[O]={exports:{}};return e[O](_,_.exports,r),_.exports}S(r,"r"),r.d=(O,L)=>{for(var _ in L)r.o(L,_)&&!r.o(O,_)&&Object.defineProperty(O,_,{enumerable:!0,get:L[_]})},r.o=(O,L)=>Object.prototype.hasOwnProperty.call(O,L),r.r=O=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var i={};let n;r.r(i),r.d(i,{URI:S(()=>d,"URI"),Utils:S(()=>P,"Utils")}),typeof process=="object"?n=process.platform==="win32":typeof navigator=="object"&&(n=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(O,L){if(!O.scheme&&L)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!a.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!s.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}S(l,"a");let u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{S(this,"l")}static isUri(L){return L instanceof d||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="string"&&typeof L.with=="function"&&typeof L.toString=="function"}scheme;authority;path;query;fragment;constructor(L,_,R,D,I,B=!1){typeof L=="object"?(this.scheme=L.scheme||u,this.authority=L.authority||u,this.path=L.path||u,this.query=L.query||u,this.fragment=L.fragment||u):(this.scheme=(function(M,F){return M||F?M:"file"})(L,B),this.authority=_||u,this.path=(function(M,F){switch(M){case"https":case"http":case"file":F?F[0]!==h&&(F=h+F):F=h}return F})(this.scheme,R||u),this.query=D||u,this.fragment=I||u,l(this,B))}get fsPath(){return x(this,!1)}with(L){if(!L)return this;let{scheme:_,authority:R,path:D,query:I,fragment:B}=L;return _===void 0?_=this.scheme:_===null&&(_=u),R===void 0?R=this.authority:R===null&&(R=u),D===void 0?D=this.path:D===null&&(D=u),I===void 0?I=this.query:I===null&&(I=u),B===void 0?B=this.fragment:B===null&&(B=u),_===this.scheme&&R===this.authority&&D===this.path&&I===this.query&&B===this.fragment?this:new g(_,R,D,I,B)}static parse(L,_=!1){let R=f.exec(L);return R?new g(R[2]||u,k(R[4]||u),k(R[5]||u),k(R[7]||u),k(R[9]||u),_):new g(u,u,u,u,u)}static file(L){let _=u;if(n&&(L=L.replace(/\\/g,h)),L[0]===h&&L[1]===h){let R=L.indexOf(h,2);R===-1?(_=L.substring(2),L=h):(_=L.substring(2,R),L=L.substring(R)||h)}return new g("file",_,L,u,u)}static from(L){let _=new g(L.scheme,L.authority,L.path,L.query,L.fragment);return l(_,!0),_}toString(L=!1){return T(this,L)}toJSON(){return this}static revive(L){if(L){if(L instanceof d)return L;{let _=new g(L);return _._formatted=L.external,_._fsPath=L._sep===p?L.fsPath:null,_}}return L}}let p=n?1:void 0;class g extends d{static{S(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath}toString(L=!1){return L?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let L={$mid:1};return this._fsPath&&(L.fsPath=this._fsPath,L._sep=p),this._formatted&&(L.external=this._formatted),this.path&&(L.path=this.path),this.scheme&&(L.scheme=this.scheme),this.authority&&(L.authority=this.authority),this.query&&(L.query=this.query),this.fragment&&(L.fragment=this.fragment),L}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(O,L,_){let R,D=-1;for(let I=0;I=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||L&&B===47||_&&B===91||_&&B===93||_&&B===58)D!==-1&&(R+=encodeURIComponent(O.substring(D,I)),D=-1),R!==void 0&&(R+=O.charAt(I));else{R===void 0&&(R=O.substr(0,I));let M=m[B];M!==void 0?(D!==-1&&(R+=encodeURIComponent(O.substring(D,I)),D=-1),R+=M):D===-1&&(D=I)}}return D!==-1&&(R+=encodeURIComponent(O.substring(D))),R!==void 0?R:O}S(y,"m");function v(O){let L;for(let _=0;_1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?L?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,n&&(_=_.replace(/\//g,"\\")),_}S(x,"v");function T(O,L){let _=L?v:y,R="",{scheme:D,authority:I,path:B,query:M,fragment:F}=O;if(D&&(R+=D,R+=":"),(I||D==="file")&&(R+=h,R+=h),I){let z=I.indexOf("@");if(z!==-1){let $=I.substr(0,z);I=I.substr(z+1),z=$.lastIndexOf(":"),z===-1?R+=_($,!1,!1):(R+=_($.substr(0,z),!1,!1),R+=":",R+=_($.substr(z+1),!1,!0)),R+="@"}I=I.toLowerCase(),z=I.lastIndexOf(":"),z===-1?R+=_(I,!1,!0):(R+=_(I.substr(0,z),!1,!0),R+=I.substr(z))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){let z=B.charCodeAt(1);z>=65&&z<=90&&(B=`/${String.fromCharCode(z+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){let z=B.charCodeAt(0);z>=65&&z<=90&&(B=`${String.fromCharCode(z+32)}:${B.substr(2)}`)}R+=_(B,!0,!1)}return M&&(R+="?",R+=_(M,!1,!1)),F&&(R+="#",R+=L?F:y(F,!1,!1)),R}S(T,"b");function C(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+C(O.substr(3)):O}}S(C,"C");let w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(O){return O.match(w)?O.replace(w,(L=>C(L))):O}S(k,"w");var E=r(975);let A=E.posix||E,N="/";var P;(function(O){O.joinPath=function(L,..._){return L.with({path:A.join(L.path,..._)})},O.resolvePath=function(L,..._){let R=L.path,D=!1;R[0]!==N&&(R=N+R,D=!0);let I=A.resolve(R,..._);return D&&I[0]===N&&!L.authority&&(I=I.substring(1)),L.with({path:I})},O.dirname=function(L){if(L.path.length===0||L.path===N)return L;let _=A.dirname(L.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),L.with({path:_})},O.basename=function(L){return A.basename(L.path)},O.extname=function(L){return A.extname(L.path)}})(P||(P={})),iSe=i})();({URI:mo,Utils:Kx}=iSe);(function(e){e.basename=Kx.basename,e.dirname=Kx.dirname,e.extname=Kx.extname,e.joinPath=Kx.joinPath,e.resolvePath=Kx.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(s,o){return s?.toString()===o?.toString()}S(r,"equals"),e.equals=r;function i(s,o){let l=typeof s=="string"?mo.parse(s).path:s.path,u=typeof o=="string"?mo.parse(o).path:o.path,h=l.split("/").filter(m=>m.length>0),f=u.split("/").filter(m=>m.length>0);if(t){let m=/^[A-Z]:$/;if(h[0]&&m.test(h[0])&&(h[0]=h[0].toLowerCase()),f[0]&&m.test(f[0])&&(f[0]=f[0].toLowerCase()),h[0]!==f[0])return u.substring(1)}let d=0;for(;d({name:i.name,uri:fs.joinPath(mo.parse(t),i.name).toString(),element:i.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(fs.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let i=this.root;for(let n of r){let a=i.children.get(n);if(!a)if(t)a={name:n,children:new Map,parent:i},i.children.set(n,a);else return;i=a}return i}collectValues(e){let t=[];e.element&&t.push(e.element);for(let r of e.children.values())t.push(...this.collectValues(r));return t}};(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(Br||(Br={}));nSe=class{static{S(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Li.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??mo.parse(e.uri),Li.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Li.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t=="string"){let i=this.parse(e,t,r);return this.createLangiumDocument(i,e,void 0,t)}else if("$model"in t){let i={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e)}else{let i=this.parse(e,t.getText(),r);return this.createLangiumDocument(i,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){let i=await this.parseAsync(e,t,r);return this.createLangiumDocument(i,e,void 0,t)}else{let i=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(i,e,t)}}createLangiumDocument(e,t,r,i){let n;if(r)n={parseResult:e,uri:t,state:Br.Parsed,references:[],textDocument:r};else{let a=this.createTextDocumentGetter(t,i);n={parseResult:e,uri:t,state:Br.Parsed,references:[],get textDocument(){return a()}}}return e.value.$document=n,n}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{let a=this.createTextDocumentGetter(e.uri,n);Object.defineProperty(e,"textDocument",{get:a})}return r!==n&&(e.parseResult=await this.parseAsync(e.uri,n,t),e.parseResult.value.$document=e),e.state=Br.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,i;return()=>i??(i=O6.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},aSe=class{static{S(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new uG,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return gi(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(i),i}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,Br.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=Br.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let i of r)i.state=Br.Changed;return this.documentTrie.delete(t),r}},z0=Symbol("RefResolving"),sSe=class{static{S(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Li.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let i of Vl(e.parseResult.value))await la(t),Ry(i).forEach(n=>{let a=`${i.$type}:${n.property}`;r.startSubTask(a);try{this.doLink(n,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(let r of Vl(e.parseResult.value))await la(t),Ry(r).forEach(i=>this.doLink(i,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=z0;try{let i=this.getCandidate(e);if(V0(i))r._ref=i;else{r._nodeDescription=i;let n=this.loadAstNode(i);r._ref=n??this.createLinkingError(e,i)}}catch(i){console.error(`An error occurred while resolving reference to '${r.$refText}':`,i);let n=i.message??String(i);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=z0;try{let i=this.getCandidates(e),n=[];if(V0(i))r._linkingError=i;else for(let a of i){let s=this.loadAstNode(a);s&&n.push({ref:s,$nodeDescription:a})}r._items=n}catch(i){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${i}`},r._items=[]}t.references.push(r)}}unlink(e){for(let t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(i=>`${i.documentUri}#${i.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,t,r,i){let n=this,a={$refNode:r,$refText:i,_ref:void 0,get ref(){if(Dn(this._ref))return this._ref;if(jF(this._nodeDescription)){let s=n.loadAstNode(this._nodeDescription);this._ref=s??n.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=z0;let s=ky(e).$document,o=n.getLinkedNode({reference:a,container:e,property:t});if(o.error&&s&&s.state0))return this._linkingError=n.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(V0(t))return{error:t};let r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let r=ky(e.container).$document;r&&r.statexg(t)&&t.isMulti)}findDeclarations(e){if(e){let t=$$(e),r=e.astNode;if(t&&r){let i=r[t.feature];if(hs(i)||gu(i))return e6(i);if(Array.isArray(i)){for(let n of i)if((hs(n)||gu(n))&&n.$refNode&&n.$refNode.offset<=e.offset&&n.$refNode.end>=e.end)return e6(n)}}if(r){let i=this.nameProvider.getNameNode(r);if(i&&(i===e||v$(e,i)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(let i of Ry(r))if(gu(i.reference)&&i.reference.items.some(n=>n.ref===e))return i.reference.items.map(n=>n.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),r=[];for(let i of t){let n=this.nameProvider.getNameNode(i)??i.$cstNode;n&&r.push(n)}return r}findReferences(e,t){let r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(n=>fs.equals(n.sourceUri,t.documentUri))),r.push(...i),gi(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let i of t){let n=this.nameProvider.getNameNode(i);if(n){let a=ql(i),s=this.nodeLocator.getAstNodePath(i);r.push({sourceUri:a.uri,sourcePath:s,targetUri:a.uri,targetPath:s,segment:Ny(n),local:!0})}}return r}},zh=class{static{S(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return DT.sum(gi(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let r=this.map.get(e);if(r){let i=r.indexOf(t);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?gi(t):Ay}has(e,t){if(t===void 0)return this.map.has(e);{let r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return gi(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return gi(this.map.keys())}values(){return gi(this.map.values()).flat()}entriesGroupedByKey(){return gi(this.map.entries())}},B6=class{static{S(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}},cSe=class{static{S(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Li.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=ZT,i=Li.CancellationToken.None){let n=[];this.addExportedSymbol(e,n,t);for(let a of r(e))await la(i),this.addExportedSymbol(a,n,t);return n}addExportedSymbol(e,t,r){let i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async collectLocalSymbols(e,t=Li.CancellationToken.None){let r=e.parseResult.value,i=new zh;for(let n of Gh(r))await la(t),this.addLocalSymbol(n,e,i);return i}addLocalSymbol(e,t,r){let i=e.$container;if(i){let n=this.nameProvider.getName(e);n&&r.add(i,this.descriptions.createDescription(e,n,t))}}},EF=class{static{S(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(i=>i.name.toLowerCase()===t):this.elements.find(i=>i.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(i=>i.name.toLowerCase()===t):this.elements.filter(i=>i.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},d1t=class{static{S(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let i of e){let n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),i=r?[r]:[];return(this.concatOuterScope||i.length>0)&&this.outerScope?gi(i).concat(this.outerScope.getElements(e)):gi(i)}getAllElements(){let e=gi(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},uSe=class{static{S(this,"MultiMapScope")}constructor(e,t,r){this.elements=new zh,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let i of e){let n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.add(n,i)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||r.length===0)&&this.outerScope?gi(r).concat(this.outerScope.getElements(e)):gi(r)}getAllElements(){let e=gi(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},p1t={getElement(){},getElements(){return Ay},getAllElements(){return Ay}},UA=class{static{S(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},fG=class extends UA{static{S(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},HA=class extends UA{static{S(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(t))return i.get(t);if(r){let n=r();return i.set(t,n),n}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},hSe=class extends HA{static{S(this,"DocumentCache")}constructor(e,t){super(r=>r.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,r=>{this.clear(r.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{for(let n of i)this.clear(n)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{let n=r.concat(i);for(let a of n)this.clear(a)}))}},dG=class extends fG{static{S(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},fSe=class{static{S(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new dG(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),i=ql(e.container).localSymbols;if(i){let a=e.container;do i.has(a)&&t.push(i.getStream(a).filter(s=>this.reflection.isSubtype(s.type,r))),a=a.$container;while(a)}let n=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)n=this.createScope(t[a],n);return n}createScope(e,t,r){return new EF(gi(e),t,r)}createScopeForNodes(e,t,r){let i=gi(e).map(n=>{let a=this.nameProvider.getName(n);if(a)return this.descriptions.createDescription(n,a)}).nonNullable();return new EF(i,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new uSe(this.indexManager.allElements(e)))}};S(pG,"isAstNodeWithComment");S(AF,"isIntermediateReference");dSe=class{static{S(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},i=t?.replacer,n=S((s,o)=>this.replacer(s,o,r),"defaultReplacer"),a=i?(s,o)=>i(s,o,n):n;try{return this.currentDocument=ql(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},i=JSON.parse(e);return this.linkNode(i,i,r),i}replacer(e,t,{refText:r,sourceText:i,textRegions:n,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(e))if(hs(t)){let o=t.ref,l=r?t.$refText:void 0;if(o){let u=ql(o),h="";this.currentDocument&&this.currentDocument!==u&&(s?h=s(u.uri,o):h=u.uri.toString());let f=this.astNodeLocator.getAstNodePath(o);return{$ref:`${h}#${f}`,$refText:l}}else return{$error:t.error?.message??"Could not resolve reference",$refText:l}}else if(gu(t)){let o=r?t.$refText:void 0,l=[];for(let u of t.items){let h=u.ref,f=ql(u.ref),d="";this.currentDocument&&this.currentDocument!==f&&(s?d=s(f.uri,h):d=f.uri.toString());let p=this.astNodeLocator.getAstNodePath(h);l.push(`${d}#${p}`)}return{$refs:l,$refText:o}}else if(Dn(t)){let o;if(n&&(o=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&o?.$textRegion&&(o.$textRegion.documentURI=this.currentDocument?.uri.toString())),i&&!e&&(o??(o={...t}),o.$sourceText=t.$cstNode?.text),a){o??(o={...t});let l=this.commentProvider.getComment(t);l&&(o.$comment=l.replace(/\r/g,""))}return o??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=S(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(n=>!n.startsWith("$")).forEach(n=>{let a=B$(e.$cstNode,n).map(t);a.length!==0&&(i[n]=a)}),e}}linkNode(e,t,r,i,n,a){for(let[o,l]of Object.entries(e))if(Array.isArray(l))for(let u=0;u{await this.handleException(()=>e.call(t,r,i,n),"An error occurred during validation",i,r)}}async handleException(e,t,r,i){try{await e()}catch(n){if(Pg(n))throw n;console.error(`${t}:`,n),n instanceof Error&&n.stack&&console.error(n.stack);let a=n instanceof Error?n.message:String(n);r("error",`${t}: ${a}`,{node:i})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(let r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=gi(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(i=>t.includes(i.category))),r.map(i=>i.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(i,n,a,s)=>{await this.handleException(()=>e.call(r,i,n,a,s),t,n,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},mSe=Object.freeze({validateNode:!0,validateChildren:!0}),ySe=class{static{S(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=Li.CancellationToken.None){let i=e.parseResult,n=[];if(await la(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(i,n,t),t.stopAfterLexingErrors&&n.some(a=>a.data?.code===nl.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(a=>a.data?.code===nl.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(a=>a.data?.code===nl.LinkingError))))return n;try{n.push(...await this.validateAst(i.value,t,r))}catch(a){if(Pg(a))throw a;console.error("An error occurred during validation:",a)}return await la(r),n}processLexingErrors(e,t,r){let i=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let n of i){let a=n.severity??"error",s={severity:_T(a),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:mG(a),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(let i of e.parserErrors){let n;if(isNaN(i.token.startOffset)){if("previousToken"in i){let a=i.previousToken;if(isNaN(a.startOffset)){let s={line:0,character:0};n={start:s,end:s}}else{let s={line:a.endLine-1,character:a.endColumn};n={start:s,end:s}}}}else n=NT(i.token);if(n){let a={severity:_T("error"),range:n,message:i.message,data:lg(nl.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(let i of e.references){let n=i.error;if(n){let a={node:n.info.container,range:i.$refNode?.range,property:n.info.property,index:n.info.index,data:{code:nl.LinkingError,containerType:n.info.container.$type,property:n.info.property,refText:n.info.reference.$refText}};t.push(this.toDiagnostic("error",n.message,a))}}}async validateAst(e,t,r=Li.CancellationToken.None){let i=[],n=S((a,s,o)=>{i.push(this.toDiagnostic(a,s,o))},"acceptor");return await this.validateAstBefore(e,t,n,r),await this.validateAstNodes(e,t,n,r),await this.validateAstAfter(e,t,n,r),i}async validateAstBefore(e,t,r,i=Li.CancellationToken.None){let n=this.validationRegistry.checksBefore;for(let a of n)await la(i),await a(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=Li.CancellationToken.None){if(this.profiler?.isActive("validating")){let n=this.profiler.createTask("validating",this.languageId);n.start();try{let a=Vl(e).iterator();for(let s of a){n.startSubTask(s.$type);let o=this.validateSingleNodeOptions(s,t);if(o.validateNode)try{let l=this.validationRegistry.getChecks(s.$type,t.categories);for(let u of l)await u(s,r,i)}finally{n.stopSubTask(s.$type)}o.validateChildren||a.prune()}}finally{n.stop()}}else{let n=Vl(e).iterator();for(let a of n){await la(i);let s=this.validateSingleNodeOptions(a,t);if(s.validateNode){let o=this.validationRegistry.getChecks(a.$type,t.categories);for(let l of o)await l(a,r,i)}s.validateChildren||n.prune()}}}validateSingleNodeOptions(e,t){return mSe}async validateAstAfter(e,t,r,i=Li.CancellationToken.None){let n=this.validationRegistry.checksAfter;for(let a of n)await la(i),await a(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:gG(r),severity:_T(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};S(gG,"getDiagnosticRange");S(_T,"toDiagnosticSeverity");S(mG,"toDiagnosticData");(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(nl||(nl={}));vSe=class{static{S(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let i=r??ql(e);t??(t=this.nameProvider.getName(e));let n=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${n} has no name.`);let a,s=S(()=>a??(a=Ny(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Ny(e.$cstNode),type:e.$type,documentUri:i.uri,path:n}}},bSe=class{static{S(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Li.CancellationToken.None){let r=[],i=e.parseResult.value;for(let n of Vl(i))await la(t),Ry(n).forEach(a=>{a.reference.error||r.push(...this.createInfoDescriptions(a))});return r}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let r=[];hs(t)&&t.$nodeDescription?r=[t.$nodeDescription]:gu(t)&&(r=t.items.map(o=>o.$nodeDescription).filter(o=>o!==void 0));let i=ql(e.container).uri,n=this.nodeLocator.getAstNodePath(e.container),a=[],s=Ny(t.$refNode);for(let o of r)a.push({sourceUri:i,sourcePath:n,targetUri:o.documentUri,targetPath:o.path,segment:s,local:fs.equals(o.documentUri,i)});return a}},xSe=class{static{S(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((i,n)=>{if(!i||n.length===0)return i;let a=n.indexOf(this.indexSeparator);if(a>0){let s=n.substring(0,a),o=parseInt(n.substring(a+1));return i[s]?.[o]}return i[n]},e)}},YA={};G6(YA,WF($y(),1));TSe=class{static{S(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new $h,this.onConfigurationSectionUpdateEmitter=new YA.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((i,n)=>{this.updateSectionConfiguration(i.section,r[n])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([t,r])=>{this.updateSectionConfiguration(t,r),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:r})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},vE=WF(Vst(),1);(function(e){function t(r){return{dispose:S(async()=>await r(),"dispose")}}S(t,"create"),e.create=t})(hg||(hg={}));wSe=class{static{S(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new zh,this.documentPhaseListeners=new zh,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Br.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=Li.CancellationToken.None){for(let i of e){let n=i.uri.toString();if(i.state===Br.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(i,Br.IndexedReferences);else if(typeof t.validation=="object"){let a=this.findMissingValidationCategories(i,t);a.length>0&&(this.buildState.set(n,{completed:!1,options:{validation:{categories:a}},result:this.buildState.get(n)?.result}),i.state=Br.IndexedReferences)}}else this.buildState.delete(n)}this.currentState=Br.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=Li.CancellationToken.None){this.currentState=Br.Changed;let i=[];for(let o of t){let l=this.langiumDocuments.deleteDocuments(o);for(let u of l)i.push(u.uri),this.cleanUpDeleted(u)}let n=(await Promise.all(e.map(o=>this.findChangedUris(o)))).flat();for(let o of n){let l=this.langiumDocuments.getDocument(o);l===void 0&&(l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),l.state=Br.Changed,this.langiumDocuments.addDocument(l)),this.resetToState(l,Br.Changed)}let a=gi(n).concat(i).map(o=>o.toString()).toSet();this.langiumDocuments.all.filter(o=>!a.has(o.uri.toString())&&this.shouldRelink(o,a)).forEach(o=>this.resetToState(o,Br.ComputedScopes)),await this.emitUpdate(n,i),await la(r);let s=this.sortDocuments(this.langiumDocuments.all.filter(o=>o.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),n=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?i:new Set,a=t===void 0||t.validation===!0?i:typeof t.validation=="object"?t.validation.categories??i:[];return gi(a).filter(s=>!n.has(s)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t=0&&!this.hasTextDocument(e[r]);)r--;tr.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),hg.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Br.Changed:case Br.Parsed:this.indexManager.removeContent(e.uri);case Br.IndexedContent:e.localSymbols=void 0;case Br.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Br.Linked:this.indexManager.removeReferences(e.uri);case Br.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Br.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Br.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Br.Parsed,r,a=>this.langiumDocumentFactory.update(a,r)),await this.runCancelable(e,Br.IndexedContent,r,a=>this.indexManager.updateContent(a,r)),await this.runCancelable(e,Br.ComputedScopes,r,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.localSymbols=await s.collectLocalSymbols(a,r)});let i=e.filter(a=>this.shouldLink(a));await this.runCancelable(i,Br.Linked,r,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,r)),await this.runCancelable(i,Br.IndexedReferences,r,a=>this.indexManager.updateReferences(a,r));let n=e.filter(a=>this.shouldValidate(a)?!0:(this.markAsCompleted(a),!1));await this.runCancelable(n,Br.Validated,r,async a=>{await this.validate(a,r),this.markAsCompleted(a)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let r of e){let i=r.uri.toString(),n=this.buildState.get(i);(!n||n.completed)&&this.buildState.set(i,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,i){for(let a of e)a.statea.state===t);await this.notifyBuildPhase(n,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),hg.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),hg.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;return t&&"path"in t?i=t:r=t,r??(r=Li.CancellationToken.None),i?this.awaitDocumentState(e,i,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let i=this.langiumDocuments.getDocument(t);if(i){if(i.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(pu);if(this.currentState>=e&&e>i.state)return Promise.reject(new vE.ResponseError(vE.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Br[i.state]}, requiring ${Br[e]}, but workspace state is already ${Br[this.currentState]}. Returning undefined.`))}else return Promise.reject(new vE.ResponseError(vE.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((n,a)=>{let s=this.onDocumentPhase(e,l=>{fs.equals(l.uri,t)&&(s.dispose(),o.dispose(),n(l.uri))}),o=r.onCancellationRequested(()=>{s.dispose(),o.dispose(),a(pu)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(pu):new Promise((r,i)=>{let n=this.onBuildPhase(e,()=>{n.dispose(),a.dispose(),r()}),a=t.onCancellationRequested(()=>{n.dispose(),a.dispose(),i(pu)})})}async notifyDocumentPhase(e,t,r){let n=this.documentPhaseListeners.get(t).slice();for(let a of n)try{await la(r),await a(e,r)}catch(s){if(!Pg(s))throw s}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let n=this.buildPhaseListeners.get(t).slice();for(let a of n)await la(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,i=this.getBuildOptions(e),n=typeof i.validation=="object"?{...i.validation}:{};n.categories=this.findMissingValidationCategories(e,i);let a=await r.validateDocument(e,n,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=gi(s.result.validationChecks).concat(n.categories).distinct().toArray():s.result.validationChecks=[...n.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},kSe=class{static{S(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new HA,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=ql(e).uri,i=[];return this.referenceIndex.forEach(n=>{n.forEach(a=>{fs.equals(a.targetUri,r)&&a.targetPath===t&&i.push(a)})}),gi(i)}allElements(e,t){let r=gi(this.symbolIndex.keys());return t&&(r=r.filter(i=>!t||t.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(n=>this.astReflection.isSubtype(n.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Li.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),n=e.uri.toString();this.symbolIndex.set(n,i),this.symbolByTypeIndex.clear(n)}async updateReferences(e,t=Li.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&t.has(i.targetUri.toString())):!1}},CSe=class{static{S(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new $h,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(e,t=Li.CancellationToken.None){let r=await this.performStartup(e);await la(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=S(a=>{t.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)},"collector");await this.loadAdditionalDocuments(e,r);let i=[];await Promise.all(e.map(a=>this.getRootFolder(a)).map(async a=>this.traverseFolder(a,i)));let n=gi(i).distinct(a=>a.toString()).filter(a=>!this.langiumDocuments.hasDocument(a));return await this.loadWorkspaceDocuments(n,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async r=>{let i=await this.langiumDocuments.getOrCreateDocument(r);t(i)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return mo.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async i=>{this.shouldIncludeEntry(i)&&(i.isDirectory?await this.traverseFolder(i.uri,t):i.isFile&&t.push(i.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=fs.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},SSe=class{static{S(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return sF.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return sF.buildUnableToPopLexerModeMessage(e)}},yG={mode:"full"},vG=class{static{S(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let r=$6(t)?Object.values(t):t,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new ds(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=yG){let r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if($6(e))return e;let t=XA(e)?Object.values(e.modes).flat():e,r={};return t.forEach(i=>r[i.name]=i),r}};S(jA,"isTokenTypeArray");S(XA,"isIMultiModeLexerDefinition");S($6,"isTokenTypeDictionary");XT();S(bG,"parseJSDoc");S(xG,"isJSDoc");S(TG,"getLines");Ave=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,g1t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;S(ESe,"tokenize");S(ASe,"buildInlineTokens");m1t=/\S/,y1t=/\s*$/;S(z6,"skipWhitespace");S(_Se,"lastCharacter");S(LSe,"parseJSDocComment");S(RSe,"parseJSDocElement");S(ISe,"appendEmptyLine");S(wG,"parseJSDocText");S(DSe,"parseJSDocInline");S(kG,"parseJSDocTag");S(CG,"parseJSDocLine");S(KA,"normalizeOptions");S(ZE,"normalizeOption");_ve=class{static{S(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let t of this.elements)if(e.length===0)e=t.toString();else{let r=t.toString();e+=LF(e)+r}return e.trim()}toMarkdown(e){let t="";for(let r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{let i=r.toMarkdown(e);t+=LF(t)+i}return t.trim()}},PP=class{static{S(this,"JSDocTagImpl")}constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} -${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=NSe(this.name,t,e??{});if(typeof n=="string")return n}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} \u2014 ${t}`:this.content.inlines.length>1&&(i=`${i} -${t}`),this.inline?`{${i}}`:i}};S(NSe,"renderInlineTag");S(MSe,"renderLinkDefault");_F=class{static{S(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` -`)}return e}toMarkdown(e){let t="";for(let r=0;ri.range.start.line&&(t+=` -`)}return t}},OSe=class{static{S(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};S(LF,"fillNewlines");PSe=class{static{S(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&xG(t))return bG(t).toMarkdown({renderLink:S((i,n)=>this.documentationLinkRenderer(e,i,n),"renderLink"),renderTag:S(i=>this.documentationTagRenderer(e,i),"renderTag")})}documentationLinkRenderer(e,t,r){let i=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){let n=i.nameSegment.range.start.line+1,a=i.nameSegment.range.start.character+1,s=i.documentUri.with({fragment:`L${n},${a}`});return`[${r}](${s.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let i=ql(e).localSymbols;if(!i)return;let n=e;do{let s=i.getStream(n).find(o=>o.name===t);if(s)return s;n=n.$container}while(n)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(i=>i.name===t)}},BSe=class{static{S(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return pG(e)?e.$comment:w$(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},FSe=class{static{S(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},v1t=class{static{S(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let r=await this.acquireParserWorker(t),i=new $h,n,a=t.onCancellationRequested(()=>{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(s=>{let o=this.hydrator.hydrate(s);i.resolve(o)}).catch(s=>{i.reject(s)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let r of this.workerPool)if(r.ready)return r.lock(),r;let t=new $h;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(pu)}),this.queue.push(t),t.promise}},b1t=class{static{S(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new YA.Emitter,this.deferred=new $h,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,t(n=>{let a=n;this.deferred.resolve(a),this.unlock()}),r(n=>{this.deferred.reject(n),this.unlock()})}terminate(){this.deferred.reject(pu),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new $h,this.sendMessage(e),this.deferred.promise}},$Se=class{static{S(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Li.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=WA();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Li.CancellationToken.None){let i=new $h,n={action:t,deferred:i,cancellationToken:r};return e.push(n),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:i})=>{try{let n=await Promise.resolve().then(()=>t(i));r.resolve(n)}catch(n){Pg(n)?r.resolve(void 0):r.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},zSe=class{static{S(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new B6,this.tokenTypeIdMap=new B6,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(t=>({...t,message:t.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,r=new Map;for(let i of Vl(e))t.set(i,{});if(e.$cstNode)for(let i of Dy(e.$cstNode))r.set(i,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[i,n]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(n)){let a=[];r[i]=a;for(let s of n)Dn(s)?a.push(this.dehydrateAstNode(s,t)):hs(s)?a.push(this.dehydrateReference(s,t)):a.push(s)}else Dn(n)?r[i]=this.dehydrateAstNode(n,t):hs(n)?r[i]=this.dehydrateReference(n,t):n!==void 0&&(r[i]=n);return r}dehydrateReference(e,t){let r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){let r=t.cstNodes.get(e);return W6(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Ih(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,t)):yg(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){let t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){let t=new Map,r=new Map;for(let n of Vl(e))t.set(n,{});let i;if(e.$cstNode)for(let n of Dy(e.$cstNode)){let a;"fullText"in n?(a=new Qz(n.fullText),i=a):"content"in n?a=new $A:"tokenType"in n&&(a=this.hydrateCstLeafNode(n)),a&&(r.set(n,a),a.root=i)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(let[i,n]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(n)){let a=[];r[i]=a;for(let s of n)Dn(s)?a.push(this.setParent(this.hydrateAstNode(s,t),r)):hs(s)?a.push(this.hydrateReference(s,r,i,t)):a.push(s)}else Dn(n)?r[i]=this.setParent(this.hydrateAstNode(n,t),r):hs(n)?r[i]=this.hydrateReference(n,r,i,t):n!==void 0&&(r[i]=n);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let i=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Ih(i))for(let n of e.content){let a=this.hydrateCstNode(n,t,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),r=e.offset,i=e.length,n=e.startLine,a=e.startColumn,s=e.endLine,o=e.endColumn,l=e.hidden;return new D6(r,i,{start:{line:n,character:a},end:{line:s,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of Vl(this.grammar))U6(t)&&this.grammarElementIdMap.set(t,e++)}};S(Qi,"createDefaultCoreModule");S(Ji,"createDefaultSharedCoreModule");(function(e){e.merge=(t,r)=>Fy(Fy({},t),r)})(RF||(RF={}));S(jr,"inject");GSe=Symbol("isProxy");S(SG,"eagerLoad");S(EG,"_inject");Lve=Symbol();S(IF,"_resolve");S(Fy,"_merge");DF={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(cg||(cg={}));qSe=class extends qA{static{S(this,"IndentationAwareTokenBuilder")}constructor(e=DF){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...DF,...e},this.indentTokenType=Sy({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Sy({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!jA(r))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:n,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,u,h=[];for(let f of r){for(let[d,p]of s)f.name===d?f.PUSH_MODE=cg.IGNORE_INDENTATION:f.name===p&&(f.POP_MODE=!0);f.name===n?o=f:f.name===i?l=f:f.name===a?u=f:h.push(f)}if(!o||!l||!u)throw new Error("Some indentation/whitespace tokens not found!");return s.length>0?{modes:{[cg.REGULAR]:[o,l,...h,u],[cg.IGNORE_INDENTATION]:[...h,u]},defaultMode:cg.REGULAR}:[o,l,u,...h]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r -`.includes(e[t-1])}matchWhitespace(e,t,r,i){this.whitespaceRegExp.lastIndex=t;let n=this.whitespaceRegExp.exec(e);return{currIndentLevel:n?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:n}}createIndentationTokenInstance(e,t,r,i){let n=this.getLineNumber(t,i);return hw(e,r,i,i+r.length,n,n,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,i){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:n,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,i);return n<=a?null:(this.indentationStack.push(n),s)}dedentMatcher(e,t,r,i){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:n,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,i);if(n>=a)return null;let o=this.indentationStack.lastIndexOf(n);if(o===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${n} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:s?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let l=this.indentationStack.length-o-1,u=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let h=0;h1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},x1t=class extends vG{static{S(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof qSe)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=yG){let r=super.tokenize(e),i=r.report;t?.mode==="full"&&r.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:n,dedentTokenType:a}=this.indentationTokenBuilder,s=n.tokenTypeIdx,o=a.tokenTypeIdx,l=[],u=r.tokens.length-1;for(let h=0;h=0&&l.push(r.tokens[u]),r.tokens=l,r}},AG={};Ud(AG,{AstUtils:()=>KF,BiMap:()=>B6,Cancellation:()=>Li,ContextCache:()=>HA,CstUtils:()=>YF,DONE_RESULT:()=>us,Deferred:()=>$h,Disposable:()=>hg,DisposableCache:()=>UA,DocumentCache:()=>hSe,EMPTY_STREAM:()=>Ay,ErrorWithLocation:()=>Q6,GrammarUtils:()=>E$,MultiMap:()=>zh,OperationCancelled:()=>pu,Reduction:()=>DT,RegExpUtils:()=>_$,SimpleCache:()=>fG,StreamImpl:()=>du,TreeStreamImpl:()=>_y,URI:()=>mo,UriTrie:()=>uG,UriUtils:()=>fs,WorkspaceCache:()=>dG,assertCondition:()=>A$,assertUnreachable:()=>Hd,delayNextTick:()=>VA,interruptAndCheck:()=>la,isOperationCancelled:()=>Pg,loadGrammarFromJson:()=>wo,setInterruptionPeriod:()=>oG,startCancelableOperation:()=>WA,stream:()=>gi});G6(AG,YA);VSe=class{static{S(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},hn={fileSystemProvider:S(()=>new VSe,"fileSystemProvider")},T1t={Grammar:S(()=>{},"Grammar"),LanguageMetaData:S(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},w1t={AstReflection:S(()=>new y$,"AstReflection")};S(WSe,"createMinimalGrammarServices");S(wo,"loadGrammarFromJson");G6(Jve,AG);k1t=class{static{S(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new zh}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new USe(r=>this.records.add(e,this.dumpRecord(e,r)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let r=[];for(let a of t.entries.keys()){let s=t.entries.get(a),o=s.reduce((l,u)=>l+u);r.push({name:`${t.identifier}.${a}`,count:s.length,duration:o})}let i=t.duration-r.map(a=>a.duration).reduce((a,s)=>a+s,0);r.push({name:t.identifier,count:1,duration:i}),r.sort((a,s)=>s.duration-a.duration);function n(a){return Math.round(100*a)/100}return S(n,"Round"),console.table(r.map(a=>({Element:a.name,Count:a.count,"Self %":n(100*a.duration/t.duration),"Time (ms)":n(a.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(r=>r===t[0])).flatMap(t=>t[1])}},USe=class{static{S(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new zh,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(t=>t.id).join(", ")}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);let r=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=r);let i=r-t.content;this.entries.add(e,i)}};(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(NF||(NF={}));(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(MF||(MF={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(OF||(OF={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(PF||(PF={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(BF||(BF={}));(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(FF||(FF={}));(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})($F||($F={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(zF||(zF={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(GF||(GF={}));(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(qF||(qF={}));Car={...NF.Terminals,...MF.Terminals,...OF.Terminals,...PF.Terminals,...BF.Terminals,...FF.Terminals,...$F.Terminals,...GF.Terminals,...zF.Terminals,...qF.Terminals},bE={$type:"Accelerator",name:"name",x:"x",y:"y"},xE={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},Zx={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},BP={$type:"Annotations",x:"x",y:"y"},uu={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};S(HSe,"isArchitecture");TE={$type:"Axis",label:"label",name:"name"},LT={$type:"Branch",name:"name",order:"order"};S(YSe,"isBranch");Rve={$type:"Checkout",branch:"branch"},wE={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},FP={$type:"ClassDefStatement",className:"className",styleText:"styleText"},tg={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};S(jSe,"isCommit");kE={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},N0={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},CE={$type:"Curve",entries:"entries",label:"label",name:"name"},SE={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Ive={$type:"Decorator",strategy:"strategy"},ay={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},su={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},G0={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Id={$type:"EmFrame"},Qx={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Dve={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},$P={$type:"EmModelEntity",name:"name"};S(XSe,"isEmModelEntityType");EE={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},Ah={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};S(ZA,"isEmResetFrame");Rd={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},zP={$type:"Entry",axis:"axis",value:"value"},lu={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},Nve={$type:"Evolution",stages:"stages"},AE={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},GP={$type:"Evolve",component:"component",target:"target"},Fd={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};S(KSe,"isGitGraph");Jx={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},wy={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};S(ZSe,"isInfo");eT={$type:"Item",classSelector:"classSelector",name:"name"},qP={$type:"Junction",id:"id",in:"in"},tT={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},_E={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},M0={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},rg={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};S(QSe,"isMerge");LE={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},VP={$type:"Option",name:"name",value:"value"},ig={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};S(JSe,"isPacket");ng={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};S(eEe,"isPacketBlock");$d={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};S(tEe,"isPie");RT={$type:"PieSection",label:"label",value:"value"};S(rEe,"isPieSection");WP={$type:"Pipeline",components:"components",parent:"parent"},RE={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},Dd={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},UP={$type:"Section",classSelector:"classSelector",name:"name"},sy={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},HP={$type:"Size",height:"height",width:"width"},q0={$type:"Statement"},ag={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};S(iEe,"isTreemap");YP={$type:"TreemapRow",indent:"indent",item:"item"},QE={$type:"TreeNode",indent:"indent",name:"name"},dy={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},oa={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};S(nEe,"isWardley");aEe=class extends XF{constructor(){super(...arguments),this.types={Accelerator:{name:bE.$type,properties:{name:{name:bE.name},x:{name:bE.x},y:{name:bE.y}},superTypes:[]},Anchor:{name:xE.$type,properties:{evolution:{name:xE.evolution},name:{name:xE.name},visibility:{name:xE.visibility}},superTypes:[]},Annotation:{name:Zx.$type,properties:{number:{name:Zx.number},text:{name:Zx.text},x:{name:Zx.x},y:{name:Zx.y}},superTypes:[]},Annotations:{name:BP.$type,properties:{x:{name:BP.x},y:{name:BP.y}},superTypes:[]},Architecture:{name:uu.$type,properties:{accDescr:{name:uu.accDescr},accTitle:{name:uu.accTitle},edges:{name:uu.edges,defaultValue:[]},groups:{name:uu.groups,defaultValue:[]},junctions:{name:uu.junctions,defaultValue:[]},services:{name:uu.services,defaultValue:[]},title:{name:uu.title}},superTypes:[]},Axis:{name:TE.$type,properties:{label:{name:TE.label},name:{name:TE.name}},superTypes:[]},Branch:{name:LT.$type,properties:{name:{name:LT.name},order:{name:LT.order}},superTypes:[q0.$type]},Checkout:{name:Rve.$type,properties:{branch:{name:Rve.branch}},superTypes:[q0.$type]},CherryPicking:{name:wE.$type,properties:{id:{name:wE.id},parent:{name:wE.parent},tags:{name:wE.tags,defaultValue:[]}},superTypes:[q0.$type]},ClassDefStatement:{name:FP.$type,properties:{className:{name:FP.className},styleText:{name:FP.styleText}},superTypes:[]},Commit:{name:tg.$type,properties:{id:{name:tg.id},message:{name:tg.message},tags:{name:tg.tags,defaultValue:[]},type:{name:tg.type}},superTypes:[q0.$type]},Common:{name:kE.$type,properties:{accDescr:{name:kE.accDescr},accTitle:{name:kE.accTitle},title:{name:kE.title}},superTypes:[]},Component:{name:N0.$type,properties:{decorator:{name:N0.decorator},evolution:{name:N0.evolution},inertia:{name:N0.inertia,defaultValue:!1},label:{name:N0.label},name:{name:N0.name},visibility:{name:N0.visibility}},superTypes:[]},Curve:{name:CE.$type,properties:{entries:{name:CE.entries,defaultValue:[]},label:{name:CE.label},name:{name:CE.name}},superTypes:[]},Deaccelerator:{name:SE.$type,properties:{name:{name:SE.name},x:{name:SE.x},y:{name:SE.y}},superTypes:[]},Decorator:{name:Ive.$type,properties:{strategy:{name:Ive.strategy}},superTypes:[]},Direction:{name:ay.$type,properties:{accDescr:{name:ay.accDescr},accTitle:{name:ay.accTitle},dir:{name:ay.dir},statements:{name:ay.statements,defaultValue:[]},title:{name:ay.title}},superTypes:[Fd.$type]},Edge:{name:su.$type,properties:{lhsDir:{name:su.lhsDir},lhsGroup:{name:su.lhsGroup,defaultValue:!1},lhsId:{name:su.lhsId},lhsInto:{name:su.lhsInto,defaultValue:!1},rhsDir:{name:su.rhsDir},rhsGroup:{name:su.rhsGroup,defaultValue:!1},rhsId:{name:su.rhsId},rhsInto:{name:su.rhsInto,defaultValue:!1},title:{name:su.title}},superTypes:[]},EmDataEntity:{name:G0.$type,properties:{dataBlockValue:{name:G0.dataBlockValue},dataType:{name:G0.dataType},name:{name:G0.name}},superTypes:[]},EmFrame:{name:Id.$type,properties:{},superTypes:[]},EmGwt:{name:Qx.$type,properties:{givenStatements:{name:Qx.givenStatements,defaultValue:[]},sourceFrame:{name:Qx.sourceFrame,referenceType:Id.$type},thenStatements:{name:Qx.thenStatements,defaultValue:[]},whenStatements:{name:Qx.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:Dve.$type,properties:{entityIdentifier:{name:Dve.entityIdentifier,referenceType:$P.$type}},superTypes:[]},EmModelEntity:{name:$P.$type,properties:{name:{name:$P.name}},superTypes:[]},EmNoteEntity:{name:EE.$type,properties:{dataBlockValue:{name:EE.dataBlockValue},dataType:{name:EE.dataType},sourceFrame:{name:EE.sourceFrame,referenceType:Id.$type}},superTypes:[]},EmResetFrame:{name:Ah.$type,properties:{dataInlineValue:{name:Ah.dataInlineValue},dataReference:{name:Ah.dataReference,referenceType:G0.$type},dataType:{name:Ah.dataType},entityIdentifier:{name:Ah.entityIdentifier},modelEntityType:{name:Ah.modelEntityType},name:{name:Ah.name},sourceFrames:{name:Ah.sourceFrames,defaultValue:[],referenceType:Id.$type}},superTypes:[Id.$type]},EmTimeFrame:{name:Rd.$type,properties:{dataInlineValue:{name:Rd.dataInlineValue},dataReference:{name:Rd.dataReference,referenceType:G0.$type},dataType:{name:Rd.dataType},entityIdentifier:{name:Rd.entityIdentifier},modelEntityType:{name:Rd.modelEntityType},name:{name:Rd.name},sourceFrames:{name:Rd.sourceFrames,defaultValue:[],referenceType:Id.$type}},superTypes:[Id.$type]},Entry:{name:zP.$type,properties:{axis:{name:zP.axis,referenceType:TE.$type},value:{name:zP.value}},superTypes:[]},EventModel:{name:lu.$type,properties:{accDescr:{name:lu.accDescr},accTitle:{name:lu.accTitle},dataEntities:{name:lu.dataEntities,defaultValue:[]},frames:{name:lu.frames,defaultValue:[]},gwtEntities:{name:lu.gwtEntities,defaultValue:[]},modelEntities:{name:lu.modelEntities,defaultValue:[]},noteEntities:{name:lu.noteEntities,defaultValue:[]},title:{name:lu.title}},superTypes:[]},Evolution:{name:Nve.$type,properties:{stages:{name:Nve.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:AE.$type,properties:{boundary:{name:AE.boundary},name:{name:AE.name},secondName:{name:AE.secondName}},superTypes:[]},Evolve:{name:GP.$type,properties:{component:{name:GP.component},target:{name:GP.target}},superTypes:[]},GitGraph:{name:Fd.$type,properties:{accDescr:{name:Fd.accDescr},accTitle:{name:Fd.accTitle},statements:{name:Fd.statements,defaultValue:[]},title:{name:Fd.title}},superTypes:[]},Group:{name:Jx.$type,properties:{icon:{name:Jx.icon},id:{name:Jx.id},in:{name:Jx.in},title:{name:Jx.title}},superTypes:[]},Info:{name:wy.$type,properties:{accDescr:{name:wy.accDescr},accTitle:{name:wy.accTitle},title:{name:wy.title}},superTypes:[]},Item:{name:eT.$type,properties:{classSelector:{name:eT.classSelector},name:{name:eT.name}},superTypes:[]},Junction:{name:qP.$type,properties:{id:{name:qP.id},in:{name:qP.in}},superTypes:[]},Label:{name:tT.$type,properties:{negX:{name:tT.negX,defaultValue:!1},negY:{name:tT.negY,defaultValue:!1},offsetX:{name:tT.offsetX},offsetY:{name:tT.offsetY}},superTypes:[]},Leaf:{name:_E.$type,properties:{classSelector:{name:_E.classSelector},name:{name:_E.name},value:{name:_E.value}},superTypes:[eT.$type]},Link:{name:M0.$type,properties:{arrow:{name:M0.arrow},from:{name:M0.from},fromPort:{name:M0.fromPort},linkLabel:{name:M0.linkLabel},to:{name:M0.to},toPort:{name:M0.toPort}},superTypes:[]},Merge:{name:rg.$type,properties:{branch:{name:rg.branch},id:{name:rg.id},tags:{name:rg.tags,defaultValue:[]},type:{name:rg.type}},superTypes:[q0.$type]},Note:{name:LE.$type,properties:{evolution:{name:LE.evolution},text:{name:LE.text},visibility:{name:LE.visibility}},superTypes:[]},Option:{name:VP.$type,properties:{name:{name:VP.name},value:{name:VP.value,defaultValue:!1}},superTypes:[]},Packet:{name:ig.$type,properties:{accDescr:{name:ig.accDescr},accTitle:{name:ig.accTitle},blocks:{name:ig.blocks,defaultValue:[]},title:{name:ig.title}},superTypes:[]},PacketBlock:{name:ng.$type,properties:{bits:{name:ng.bits},end:{name:ng.end},label:{name:ng.label},start:{name:ng.start}},superTypes:[]},Pie:{name:$d.$type,properties:{accDescr:{name:$d.accDescr},accTitle:{name:$d.accTitle},sections:{name:$d.sections,defaultValue:[]},showData:{name:$d.showData,defaultValue:!1},title:{name:$d.title}},superTypes:[]},PieSection:{name:RT.$type,properties:{label:{name:RT.label},value:{name:RT.value}},superTypes:[]},Pipeline:{name:WP.$type,properties:{components:{name:WP.components,defaultValue:[]},parent:{name:WP.parent}},superTypes:[]},PipelineComponent:{name:RE.$type,properties:{evolution:{name:RE.evolution},label:{name:RE.label},name:{name:RE.name}},superTypes:[]},Radar:{name:Dd.$type,properties:{accDescr:{name:Dd.accDescr},accTitle:{name:Dd.accTitle},axes:{name:Dd.axes,defaultValue:[]},curves:{name:Dd.curves,defaultValue:[]},options:{name:Dd.options,defaultValue:[]},title:{name:Dd.title}},superTypes:[]},Section:{name:UP.$type,properties:{classSelector:{name:UP.classSelector},name:{name:UP.name}},superTypes:[eT.$type]},Service:{name:sy.$type,properties:{icon:{name:sy.icon},iconText:{name:sy.iconText},id:{name:sy.id},in:{name:sy.in},title:{name:sy.title}},superTypes:[]},Size:{name:HP.$type,properties:{height:{name:HP.height},width:{name:HP.width}},superTypes:[]},Statement:{name:q0.$type,properties:{},superTypes:[]},TreeNode:{name:QE.$type,properties:{indent:{name:QE.indent},name:{name:QE.name}},superTypes:[]},TreeView:{name:dy.$type,properties:{accDescr:{name:dy.accDescr},accTitle:{name:dy.accTitle},nodes:{name:dy.nodes,defaultValue:[]},title:{name:dy.title}},superTypes:[]},Treemap:{name:ag.$type,properties:{accDescr:{name:ag.accDescr},accTitle:{name:ag.accTitle},title:{name:ag.title},TreemapRows:{name:ag.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:YP.$type,properties:{indent:{name:YP.indent},item:{name:YP.item}},superTypes:[]},Wardley:{name:oa.$type,properties:{accDescr:{name:oa.accDescr},accelerators:{name:oa.accelerators,defaultValue:[]},accTitle:{name:oa.accTitle},anchors:{name:oa.anchors,defaultValue:[]},annotation:{name:oa.annotation,defaultValue:[]},annotations:{name:oa.annotations,defaultValue:[]},components:{name:oa.components,defaultValue:[]},deaccelerators:{name:oa.deaccelerators,defaultValue:[]},evolution:{name:oa.evolution},evolves:{name:oa.evolves,defaultValue:[]},links:{name:oa.links,defaultValue:[]},notes:{name:oa.notes,defaultValue:[]},pipelines:{name:oa.pipelines,defaultValue:[]},size:{name:oa.size},title:{name:oa.title}},superTypes:[]}}}static{S(this,"MermaidAstReflection")}},ko=new aEe,C1t=S(()=>Mve??(Mve=wo(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),S1t=S(()=>Ove??(Ove=wo('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),E1t=S(()=>Pve??(Pve=wo(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),A1t=S(()=>Bve??(Bve=wo(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),_1t=S(()=>Fve??(Fve=wo(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),L1t=S(()=>$ve??($ve=wo(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),R1t=S(()=>zve??(zve=wo(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),I1t=S(()=>Gve??(Gve=wo(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),D1t=S(()=>qve??(qve=wo(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),N1t=S(()=>Vve??(Vve=wo(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),M1t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},O1t={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},P1t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},B1t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},F1t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$1t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},z1t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},G1t={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},q1t={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},V1t={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bn={AstReflection:S(()=>new aEe,"AstReflection")},_G={Grammar:S(()=>C1t(),"Grammar"),LanguageMetaData:S(()=>M1t,"LanguageMetaData"),parser:{}},LG={Grammar:S(()=>S1t(),"Grammar"),LanguageMetaData:S(()=>O1t,"LanguageMetaData"),parser:{}},RG={Grammar:S(()=>E1t(),"Grammar"),LanguageMetaData:S(()=>P1t,"LanguageMetaData"),parser:{}},IG={Grammar:S(()=>A1t(),"Grammar"),LanguageMetaData:S(()=>B1t,"LanguageMetaData"),parser:{}},DG={Grammar:S(()=>_1t(),"Grammar"),LanguageMetaData:S(()=>F1t,"LanguageMetaData"),parser:{}},NG={Grammar:S(()=>L1t(),"Grammar"),LanguageMetaData:S(()=>$1t,"LanguageMetaData"),parser:{}},MG={Grammar:S(()=>R1t(),"Grammar"),LanguageMetaData:S(()=>z1t,"LanguageMetaData"),parser:{}},OG={Grammar:S(()=>I1t(),"Grammar"),LanguageMetaData:S(()=>G1t,"LanguageMetaData"),parser:{}},PG={Grammar:S(()=>D1t(),"Grammar"),LanguageMetaData:S(()=>q1t,"LanguageMetaData"),parser:{}},BG={Grammar:S(()=>N1t(),"Grammar"),LanguageMetaData:S(()=>V1t,"LanguageMetaData"),parser:{}},W1t=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,U1t=/accTitle[\t ]*:([^\n\r]*)/,H1t=/title([\t ][^\n\r]*|)/,Y1t={ACC_DESCR:W1t,ACC_TITLE:U1t,TITLE:H1t},ul=class extends sG{static{S(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){let i=Y1t[e.name];if(i===void 0)return;let n=i.exec(t);if(n!==null){if(n[1]!==void 0)return n[1].trim().replace(/[\t ]{2,}/gm," ");if(n[2]!==void 0)return n[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` -`)}}},Xl=class extends ul{static{S(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},Nn=class extends qA{static{S(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let i=super.buildKeywordTokens(e,t,r);return i.forEach(n=>{this.keywords.has(n.name)&&n.PATTERN!==void 0&&(n.PATTERN=new RegExp(n.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},j1t=class extends Nn{static{S(this,"CommonTokenBuilder")}};});function JA(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),MG,QA);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var X1t,QA,FG=q(()=>{fn();X1t=class extends Nn{static{S(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},QA={parser:{TokenBuilder:S(()=>new X1t,"TokenBuilder"),ValueConverter:S(()=>new Xl,"ValueConverter")}};S(JA,"createRadarServices")});function sEe(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let i={Treemap:t.checkSingleRoot.bind(t)};r.register(i,t)}}function t_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),OG,e_);return t.ServiceRegistry.register(r),sEe(r),{shared:t,Treemap:r}}var K1t,Z1t,Q1t,J1t,e_,$G=q(()=>{fn();K1t=class extends Nn{static{S(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},Z1t=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Q1t=class extends ul{static{S(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR")return t.substring(1,t.length-1);if(e.name==="STRING2")return t.substring(1,t.length-1);if(e.name==="INDENTATION")return t.length;if(e.name==="ClassDef"){if(typeof t!="string")return t;let i=Z1t.exec(t);if(i)return{$type:"ClassDefStatement",className:i[1],styleText:i[2]||void 0}}}};S(sEe,"registerValidationChecks");J1t=class{static{S(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let i of e.TreemapRows)i.item&&(r===void 0&&i.indent===void 0?r=0:i.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}):r!==void 0&&r>=parseInt(i.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},e_={parser:{TokenBuilder:S(()=>new K1t,"TokenBuilder"),ValueConverter:S(()=>new Q1t,"ValueConverter")},validation:{TreemapValidator:S(()=>new J1t,"TreemapValidator")}};S(t_,"createTreemapServices")});function i_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),BG,r_);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}var eyt,r_,zG=q(()=>{fn();eyt=class extends ul{static{S(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if(e.name.toUpperCase()==="LINK_LABEL")return t.substring(1).trim()}},r_={parser:{ValueConverter:S(()=>new eyt,"ValueConverter")}};S(i_,"createWardleyServices")});function a_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),RG,n_);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var tyt,n_,GG=q(()=>{fn();tyt=class extends Nn{static{S(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},n_={parser:{TokenBuilder:S(()=>new tyt,"TokenBuilder"),ValueConverter:S(()=>new Xl,"ValueConverter")}};S(a_,"createGitGraphServices")});function o_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),IG,s_);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var ryt,s_,qG=q(()=>{fn();ryt=class extends Nn{static{S(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},s_={parser:{TokenBuilder:S(()=>new ryt,"TokenBuilder"),ValueConverter:S(()=>new Xl,"ValueConverter")}};S(o_,"createInfoServices")});function c_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),DG,l_);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var iyt,l_,VG=q(()=>{fn();iyt=class extends Nn{static{S(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},l_={parser:{TokenBuilder:S(()=>new iyt,"TokenBuilder"),ValueConverter:S(()=>new Xl,"ValueConverter")}};S(c_,"createPacketServices")});function h_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),NG,u_);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var nyt,ayt,u_,WG=q(()=>{fn();nyt=class extends Nn{static{S(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},ayt=class extends ul{static{S(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},u_={parser:{TokenBuilder:S(()=>new nyt,"TokenBuilder"),ValueConverter:S(()=>new ayt,"ValueConverter")}};S(h_,"createPieServices")});function d_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),PG,f_);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}var syt,oyt,f_,UG=q(()=>{fn();syt=class extends ul{static{S(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="STRING2")return t.substring(1,t.length-1)}},oyt=class extends Nn{static{S(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},f_={parser:{TokenBuilder:S(()=>new oyt,"TokenBuilder"),ValueConverter:S(()=>new syt,"ValueConverter")}};S(d_,"createTreeViewServices")});function g_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),_G,p_);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var lyt,cyt,p_,HG=q(()=>{fn();lyt=class extends Nn{static{S(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},cyt=class extends ul{static{S(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let i=t.replace(/^\[|]$/g,"").trim();return(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1),i=i.replace(/\\"/g,'"').replace(/\\'/g,"'")),i.trim()}}},p_={parser:{TokenBuilder:S(()=>new lyt,"TokenBuilder"),ValueConverter:S(()=>new cyt,"ValueConverter")}};S(g_,"createArchitectureServices")});function hEe(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let i={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(i,t)}}function y_(e=hn){let t=jr(Ji(e),bn),r=jr(Qi({shared:t}),LG,m_);return t.ServiceRegistry.register(r),hEe(r),{shared:t,EventModel:r}}var uyt,oEe,lEe,YG,cEe,uEe,hyt,m_,jG=q(()=>{fn();uyt=class extends Nn{static{S(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},oEe=new Set(["cmd","command"]),lEe=new Set(["evt","event"]),YG=new Set(["rmo","readmodel"]),cEe=new Set(["pcr","processor"]),uEe=new Set(["ui"]);S(hEe,"registerValidationChecks");hyt=class{static{S(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(oEe.has(e.modelEntityType)?this.validateSources(e,new Set([...uEe,...cEe]),"command","ui or processor",t):lEe.has(e.modelEntityType)?this.validateSources(e,oEe,"event","command",t):YG.has(e.modelEntityType)?this.validateSources(e,lEe,"read model","event",t):cEe.has(e.modelEntityType)?this.validateSources(e,YG,"processor","read model",t):uEe.has(e.modelEntityType)&&this.validateSources(e,YG,"ui","read model",t))}validateSources(e,t,r,i,n){for(let a of e.sourceFrames){let s=a.ref;s!==void 0&&!t.has(s.modelEntityType)&&n("error",`A ${r} can only receive input from a ${i}, not from '${s.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},m_={parser:{TokenBuilder:S(()=>new uyt,"TokenBuilder"),ValueConverter:S(()=>new Xl,"ValueConverter")},validation:{EventModelingValidator:S(()=>new hyt,"EventModelingValidator")}};S(y_,"createEventModelingServices")});var fEe={};Lr(fEe,{InfoModule:()=>s_,createInfoServices:()=>o_});var dEe=q(()=>{qG();fn()});var pEe={};Lr(pEe,{PacketModule:()=>l_,createPacketServices:()=>c_});var gEe=q(()=>{VG();fn()});var mEe={};Lr(mEe,{PieModule:()=>u_,createPieServices:()=>h_});var yEe=q(()=>{WG();fn()});var vEe={};Lr(vEe,{TreeViewModule:()=>f_,createTreeViewServices:()=>d_});var bEe=q(()=>{UG();fn()});var xEe={};Lr(xEe,{ArchitectureModule:()=>p_,createArchitectureServices:()=>g_});var TEe=q(()=>{HG();fn()});var wEe={};Lr(wEe,{GitGraphModule:()=>n_,createGitGraphServices:()=>a_});var kEe=q(()=>{GG();fn()});var CEe={};Lr(CEe,{EventModelingModule:()=>m_,createEventModelingServices:()=>y_});var SEe=q(()=>{jG();fn()});var EEe={};Lr(EEe,{RadarModule:()=>QA,createRadarServices:()=>JA});var AEe=q(()=>{FG();fn()});var _Ee={};Lr(_Ee,{TreemapModule:()=>e_,createTreemapServices:()=>t_});var LEe=q(()=>{$G();fn()});var REe={};Lr(REe,{WardleyModule:()=>r_,createWardleyServices:()=>i_});var IEe=q(()=>{zG();fn()});async function xn(e,t){let r=fyt[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);hl[e]||await r();let n=hl[e].parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new dyt(n);return n.value}var hl,fyt,dyt,fl=q(()=>{FG();$G();zG();GG();qG();VG();WG();UG();HG();jG();fn();hl={},fyt={info:S(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(dEe(),fEe)),t=e().Info.parser.LangiumParser;hl.info=t},"info"),packet:S(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(gEe(),pEe)),t=e().Packet.parser.LangiumParser;hl.packet=t},"packet"),pie:S(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(yEe(),mEe)),t=e().Pie.parser.LangiumParser;hl.pie=t},"pie"),treeView:S(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(bEe(),vEe)),t=e().TreeView.parser.LangiumParser;hl.treeView=t},"treeView"),architecture:S(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(TEe(),xEe)),t=e().Architecture.parser.LangiumParser;hl.architecture=t},"architecture"),gitGraph:S(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(kEe(),wEe)),t=e().GitGraph.parser.LangiumParser;hl.gitGraph=t},"gitGraph"),eventmodeling:S(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(SEe(),CEe)),t=e().EventModel.parser.LangiumParser;hl.eventmodeling=t},"eventmodeling"),radar:S(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(AEe(),EEe)),t=e().Radar.parser.LangiumParser;hl.radar=t},"radar"),treemap:S(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(LEe(),_Ee)),t=e().Treemap.parser.LangiumParser;hl.treemap=t},"treemap"),wardley:S(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(IEe(),REe)),t=e().Wardley.parser.LangiumParser;hl.wardley=t},"wardley")};S(xn,"parse");dyt=class extends Error{constructor(e){let t=e.lexerErrors.map(i=>{let n=i.line!==void 0&&!isNaN(i.line)?i.line:"?",a=i.column!==void 0&&!isNaN(i.column)?i.column:"?";return`Lexer error on line ${n}, column ${a}: ${i.message}`}).join(` -`),r=e.parserErrors.map(i=>{let n=i.token.startLine!==void 0&&!isNaN(i.token.startLine)?i.token.startLine:"?",a=i.token.startColumn!==void 0&&!isNaN(i.token.startColumn)?i.token.startColumn:"?";return`Parse error on line ${n}, column ${a}: ${i.message}`}).join(` -`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{S(this,"MermaidParseError")}}});var GEe={};Lr(GEe,{diagram:()=>pvt});function x_(){return pD({length:7})}function NEe(e,t){let r=Object.create(null);return e.reduce((i,n)=>{let a=t(n);return r[a]||(r[a]=!0,i.push(n)),i},[])}function XG(e,t,r){let i=e.indexOf(t);i===-1?e.push(r):e.splice(i,1,r)}function ZG(e){let t=e.reduce((n,a)=>n.seq>a.seq?n:a,e[0]),r="";e.forEach(function(n){n===t?r+=" *":r+=" |"});let i=[r,t.id,t.seq];for(let n in Rt.records.branches)Rt.records.branches.get(n)===t.id&&i.push(n);if(ee.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=Rt.records.commits.get(t.parents[0]);XG(e,t,n),t.parents[1]&&e.push(Rt.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let n=Rt.records.commits.get(t.parents[0]);XG(e,t,n)}}e=NEe(e,n=>n.id),ZG(e)}var Ti,pyt,$g,Rt,gyt,myt,yyt,vyt,byt,xyt,Tyt,MEe,wyt,kyt,Cyt,Syt,Eyt,OEe,Ayt,_yt,Lyt,PEe,Ryt,Iyt,Dyt,Nyt,Myt,Oyt,Pyt,Byt,Kd,Zd,wu,Uh,Bg,T_,KG,QG,Fyt,Fg,js,Xs,v_,gw,b_,Hh,Fr,$yt,BEe,FEe,zyt,Gyt,qyt,Vyt,Wyt,Uyt,Hyt,Yyt,jyt,Xyt,Kyt,Zyt,DEe,Qyt,mw,Jyt,evt,tvt,rvt,ivt,nvt,$Ee,zEe,avt,svt,ovt,lvt,cvt,uvt,hvt,fvt,dvt,pvt,qEe=q(()=>{au();fE();$r();Er();er();fl();Ar();Ti={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},pyt=rr.gitGraph,$g=b(()=>Yr({...pyt,...It().gitGraph}),"getConfig"),Rt=new ny(()=>{let e=$g(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});b(x_,"getID");b(NEe,"uniqBy");gyt=b(function(e){Rt.records.direction=e},"setDirection"),myt=b(function(e){ee.debug("options str",e),e=e?.trim(),e=e||"{}";try{Rt.records.options=JSON.parse(e)}catch(t){ee.error("error while parsing gitGraph options",t.message)}},"setOptions"),yyt=b(function(){return Rt.records.options},"getOptions"),vyt=b(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags;ee.info("commit",t,r,i,n),ee.debug("Entering commit:",t,r,i,n);let a=$g();r=ht.sanitizeText(r,a),t=ht.sanitizeText(t,a),n=n?.map(o=>ht.sanitizeText(o,a));let s={id:r||Rt.records.seq+"-"+x_(),message:t,seq:Rt.records.seq++,type:i??Ti.NORMAL,tags:n??[],parents:Rt.records.head==null?[]:[Rt.records.head.id],branch:Rt.records.currBranch};Rt.records.head=s,ee.info("main branch",a.mainBranchName),Rt.records.commits.has(s.id)&&ee.warn(`Commit ID ${s.id} already exists`),Rt.records.commits.set(s.id,s),Rt.records.branches.set(Rt.records.currBranch,s.id),ee.debug("in pushCommit "+s.id)},"commit"),byt=b(function(e){let t=e.name,r=e.order;if(t=ht.sanitizeText(t,$g()),Rt.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);Rt.records.branches.set(t,Rt.records.head!=null?Rt.records.head.id:null),Rt.records.branchConfig.set(t,{name:t,order:r}),MEe(t),ee.debug("in createBranch")},"branch"),xyt=b(e=>{let t=e.branch,r=e.id,i=e.type,n=e.tags,a=$g();t=ht.sanitizeText(t,a),r&&(r=ht.sanitizeText(r,a));let s=Rt.records.branches.get(Rt.records.currBranch),o=Rt.records.branches.get(t),l=s?Rt.records.commits.get(s):void 0,u=o?Rt.records.commits.get(o):void 0;if(l&&u&&l.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(Rt.records.currBranch===t){let d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${Rt.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!Rt.records.branches.has(t)){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if(u===void 0||!u){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(l===u){let d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(r&&Rt.records.commits.has(r)){let d=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${r} ${i} ${n?.join(" ")}`,token:`merge ${t} ${r} ${i} ${n?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${n?.join(" ")}`]},d}let h=o||"",f={id:r||`${Rt.records.seq}-${x_()}`,message:`merged branch ${t} into ${Rt.records.currBranch}`,seq:Rt.records.seq++,parents:Rt.records.head==null?[]:[Rt.records.head.id,h],branch:Rt.records.currBranch,type:Ti.MERGE,customType:i,customId:!!r,tags:n??[]};Rt.records.head=f,Rt.records.commits.set(f.id,f),Rt.records.branches.set(Rt.records.currBranch,f.id),ee.debug(Rt.records.branches),ee.debug("in mergeBranch")},"merge"),Tyt=b(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent;ee.debug("Entering cherryPick:",t,r,i);let a=$g();if(t=ht.sanitizeText(t,a),r=ht.sanitizeText(r,a),i=i?.map(l=>ht.sanitizeText(l,a)),n=ht.sanitizeText(n,a),!t||!Rt.records.commits.has(t)){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},l}let s=Rt.records.commits.get(t);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&!(Array.isArray(s.parents)&&s.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===Ti.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!Rt.records.commits.has(r)){if(o===Rt.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let l=Rt.records.branches.get(Rt.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Rt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let u=Rt.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Rt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let h={id:Rt.records.seq+"-"+x_(),message:`cherry-picked ${s?.message} into ${Rt.records.currBranch}`,seq:Rt.records.seq++,parents:Rt.records.head==null?[]:[Rt.records.head.id,s.id],branch:Rt.records.currBranch,type:Ti.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===Ti.MERGE?`|parent:${n}`:""}`]};Rt.records.head=h,Rt.records.commits.set(h.id,h),Rt.records.branches.set(Rt.records.currBranch,h.id),ee.debug(Rt.records.branches),ee.debug("in cherryPick")}},"cherryPick"),MEe=b(function(e){if(e=ht.sanitizeText(e,$g()),Rt.records.branches.has(e)){Rt.records.currBranch=e;let t=Rt.records.branches.get(Rt.records.currBranch);t===void 0||!t?Rt.records.head=null:Rt.records.head=Rt.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");b(XG,"upsert");b(ZG,"prettyPrintCommitHistory");wyt=b(function(){ee.debug(Rt.records.commits);let e=OEe()[0];ZG([e])},"prettyPrint"),kyt=b(function(){Rt.reset(),fr()},"clear"),Cyt=b(function(){return[...Rt.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),Syt=b(function(){return Rt.records.branches},"getBranches"),Eyt=b(function(){return Rt.records.commits},"getCommits"),OEe=b(function(){let e=[...Rt.records.commits.values()];return e.forEach(function(t){ee.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),Ayt=b(function(){return Rt.records.currBranch},"getCurrentBranch"),_yt=b(function(){return Rt.records.direction},"getDirection"),Lyt=b(function(){return Rt.records.head},"getHead"),PEe={commitType:Ti,getConfig:$g,setDirection:gyt,setOptions:myt,getOptions:yyt,commit:vyt,branch:byt,merge:xyt,cherryPick:Tyt,checkout:MEe,prettyPrint:wyt,clear:kyt,getBranchesAsObjArray:Cyt,getBranches:Syt,getCommits:Eyt,getCommitsArray:OEe,getCurrentBranch:Ayt,getDirection:_yt,getHead:Lyt,setAccTitle:yr,getAccTitle:vr,getAccDescription:xr,setAccDescription:br,setDiagramTitle:kr,getDiagramTitle:Tr},Ryt=b((e,t)=>{Un(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)Iyt(r,t)},"populate"),Iyt=b((e,t)=>{let i={Commit:b(n=>t.commit(Dyt(n)),"Commit"),Branch:b(n=>t.branch(Nyt(n)),"Branch"),Merge:b(n=>t.merge(Myt(n)),"Merge"),Checkout:b(n=>t.checkout(Oyt(n)),"Checkout"),CherryPicking:b(n=>t.cherryPick(Pyt(n)),"CherryPicking")}[e.$type];i?i(e):ee.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Dyt=b(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?Ti[e.type]:Ti.NORMAL,tags:e.tags??void 0}),"parseCommit"),Nyt=b(e=>({name:e.name,order:e.order??0}),"parseBranch"),Myt=b(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?Ti[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Oyt=b(e=>e.branch,"parseCheckout"),Pyt=b(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Byt={parse:b(async e=>{let t=await xn("gitGraph",e);ee.debug(t),Ryt(t,PEe)},"parse")},Kd=10,Zd=40,wu=4,Uh=2,Bg=8,T_=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),KG=12,QG=new Set(["redux-color","redux-dark-color"]),Fyt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Fg=b((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),js=new Map,Xs=new Map,v_=30,gw=new Map,b_=[],Hh=0,Fr="LR",$yt=b(()=>{js.clear(),Xs.clear(),gw.clear(),Hh=0,b_=[],Fr="LR"},"clear"),BEe=b(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(i=>{let n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=i.trim(),t.appendChild(n)}),t},"drawText"),FEe=b(e=>{let t,r,i;return Fr==="BT"?(r=b((n,a)=>n<=a,"comparisonFunc"),i=1/0):(r=b((n,a)=>n>=a,"comparisonFunc"),i=0),e.forEach(n=>{let a=Fr==="TB"||Fr=="BT"?Xs.get(n)?.y:Xs.get(n)?.x;a!==void 0&&r(a,i)&&(t=n,i=a)}),t},"findClosestParent"),zyt=b(e=>{let t="",r=1/0;return e.forEach(i=>{let n=Xs.get(i).y;n<=r&&(t=i,r=n)}),t||void 0},"findClosestParentBT"),Gyt=b((e,t,r)=>{let i=r,n=r,a=[];e.forEach(s=>{let o=t.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(i=Vyt(o),n=Math.max(i,n)):a.push(o),Wyt(o,i)}),i=n,a.forEach(s=>{Uyt(s,i,r)}),e.forEach(s=>{let o=t.get(s);if(o?.parents.length){let l=zyt(o.parents);i=Xs.get(l).y-Zd,i<=n&&(n=i);let u=js.get(o.branch).pos,h=i-Kd;Xs.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),qyt=b(e=>{let t=FEe(e.parents.filter(i=>i!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=Xs.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),Vyt=b(e=>qyt(e)+Zd,"calculateCommitPosition"),Wyt=b((e,t)=>{let r=js.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let i=r.pos,n=t+Kd;return Xs.set(e.id,{x:i,y:n}),{x:i,y:n}},"setCommitPosition"),Uyt=b((e,t,r)=>{let i=js.get(e.branch);if(!i)throw new Error(`Branch not found for commit ${e.id}`);let n=t+r,a=i.pos;Xs.set(e.id,{x:a,y:n})},"setRootPosition"),Hyt=b((e,t,r,i,n,a)=>{let{theme:s}=we(),o=T_.has(s??""),l=QG.has(s??""),u=Fyt.has(s??"");if(a===Ti.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(o?3:0)).attr("y",r.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${t.id} commit-highlight${Fg(n,Bg,l)} ${i}-outer`),e.append("rect").attr("x",r.x-6+(o?2:0)).attr("y",r.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${t.id} commit${Fg(n,Bg,l)} ${i}-inner`);else if(a===Ti.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",o?7:10).attr("class",`commit ${t.id} ${i}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`);else{let h=e.append("circle");if(h.attr("cx",r.x),h.attr("cy",r.y),h.attr("r",o?7:10),h.attr("class",`commit ${t.id} commit${Fg(n,Bg,l)}`),a===Ti.MERGE){let f=e.append("circle");f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",o?5:6),f.attr("class",`commit ${i} ${t.id} commit${Fg(n,Bg,l)}`)}if(a===Ti.REVERSE){let f=e.append("path"),d=o?4:5;f.attr("d",`M ${r.x-d},${r.y-d}L${r.x+d},${r.y+d}M${r.x-d},${r.y+d}L${r.x+d},${r.y-d}`).attr("class",`commit ${i} ${t.id} commit${Fg(n,Bg,l)}`)}}},"drawCommitBullet"),Yyt=b((e,t,r,i,n)=>{if(t.type!==Ti.CHERRY_PICK&&(t.customId&&t.type===Ti.MERGE||t.type!==Ti.MERGE)&&n.showCommitLabel){let a=e.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),o=a.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(t.id),l=o.node()?.getBBox();if(l&&(s.attr("x",r.posWithOffset-l.width/2-Uh).attr("y",r.y+13.5).attr("width",l.width+2*Uh).attr("height",l.height+2*Uh),Fr==="TB"||Fr==="BT"?(s.attr("x",r.x-(l.width+4*wu+5)).attr("y",r.y-12),o.attr("x",r.x-(l.width+4*wu)).attr("y",r.y+l.height-12)):o.attr("x",r.posWithOffset-l.width/2),n.rotateCommitLabel))if(Fr==="TB"||Fr==="BT")o.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),s.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;a.attr("transform","translate("+u+", "+h+") rotate(-45, "+i+", "+r.y+")")}}},"drawCommitLabel"),jyt=b((e,t,r,i)=>{if(t.tags.length>0){let n=0,a=0,s=0,o=[];for(let l of t.tags.reverse()){let u=e.insert("polygon"),h=e.append("circle"),f=e.append("text").attr("y",r.y-16-n).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:n}),n+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",` - ${i-a/2-wu/2},${p+Uh} - ${i-a/2-wu/2},${p-Uh} - ${r.posWithOffset-a/2-wu},${p-d-Uh} - ${r.posWithOffset+a/2+wu},${p-d-Uh} - ${r.posWithOffset+a/2+wu},${p+d+Uh} - ${r.posWithOffset-a/2-wu},${p+d+Uh}`),u.attr("cy",p).attr("cx",i-a/2+wu/2).attr("r",1.5).attr("class","tag-hole"),Fr==="TB"||Fr==="BT"){let g=i+f;h.attr("class","tag-label-bkg").attr("points",` + For further details.`);this.skipValidations=Sr(r,"skipValidations")?r.skipValidations:Tf.skipValidations}};$W.DEFER_DEFINITION_ERRORS_HANDLING=!1;xAe($W,[Evt,Rvt,Mvt,Dvt,Ovt,Nvt,Pvt,Bvt,Fvt,zvt]);Gvt=class extends $W{static{A(this,"EmbeddedActionsParser")}constructor(e,t=Tf){let r=is(t);r.outputCst=!1,super(e,r)}};A(TAe,"arrayMap");wAe=TAe;A(CAe,"listCacheClear");qvt=CAe;A(kAe,"eq");SAe=kAe;A(EAe,"assocIndexOf");oR=EAe,Vvt=Array.prototype,Wvt=Vvt.splice;A(AAe,"listCacheDelete");Uvt=AAe;A(_Ae,"listCacheGet");Hvt=_Ae;A(RAe,"listCacheHas");Yvt=RAe;A(LAe,"listCacheSet");Xvt=LAe;A(Om,"ListCache");Om.prototype.clear=qvt;Om.prototype.delete=Uvt;Om.prototype.get=Hvt;Om.prototype.has=Yvt;Om.prototype.set=Xvt;lR=Om;A(IAe,"stackClear");jvt=IAe;A(MAe,"stackDelete");Kvt=MAe;A(DAe,"stackGet");Zvt=DAe;A(NAe,"stackHas");Qvt=NAe,Jvt=typeof global=="object"&&global&&global.Object===Object&&global,OAe=Jvt,ext=typeof self=="object"&&self&&self.Object===Object&&self,txt=OAe||ext||Function("return this")(),Ef=txt,rxt=Ef.Symbol,eh=rxt,PAe=Object.prototype,nxt=PAe.hasOwnProperty,ixt=PAe.toString,xw=eh?eh.toStringTag:void 0;A(BAe,"getRawTag");axt=BAe,sxt=Object.prototype,oxt=sxt.toString;A($Ae,"objectToString");lxt=$Ae,cxt="[object Null]",uxt="[object Undefined]",Ywe=eh?eh.toStringTag:void 0;A(FAe,"baseGetTag");ax=FAe;A(zAe,"isObject");FW=zAe,hxt="[object AsyncFunction]",fxt="[object Function]",dxt="[object GeneratorFunction]",pxt="[object Proxy]";A(GAe,"isFunction");qAe=GAe,gxt=Ef["__core-js_shared__"],tz=gxt,Xwe=(function(){var e=/[^.]+$/.exec(tz&&tz.keys&&tz.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();A(VAe,"isMasked");mxt=VAe,yxt=Function.prototype,vxt=yxt.toString;A(WAe,"toSource");Pm=WAe,xxt=/[\\^$.*+?()[\]{}|]/g,bxt=/^\[object .+?Constructor\]$/,Txt=Function.prototype,wxt=Object.prototype,Cxt=Txt.toString,kxt=wxt.hasOwnProperty,Sxt=RegExp("^"+Cxt.call(kxt).replace(xxt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");A(UAe,"baseIsNative");Ext=UAe;A(HAe,"getValue");Axt=HAe;A(YAe,"getNative");sx=YAe,_xt=sx(Ef,"Map"),pC=_xt,Rxt=sx(Object,"create"),gC=Rxt;A(XAe,"hashClear");Lxt=XAe;A(jAe,"hashDelete");Ixt=jAe,Mxt="__lodash_hash_undefined__",Dxt=Object.prototype,Nxt=Dxt.hasOwnProperty;A(KAe,"hashGet");Oxt=KAe,Pxt=Object.prototype,Bxt=Pxt.hasOwnProperty;A(ZAe,"hashHas");$xt=ZAe,Fxt="__lodash_hash_undefined__";A(QAe,"hashSet");zxt=QAe;A(Bm,"Hash");Bm.prototype.clear=Lxt;Bm.prototype.delete=Ixt;Bm.prototype.get=Oxt;Bm.prototype.has=$xt;Bm.prototype.set=zxt;jwe=Bm;A(JAe,"mapCacheClear");Gxt=JAe;A(e_e,"isKeyable");qxt=e_e;A(t_e,"getMapData");cR=t_e;A(r_e,"mapCacheDelete");Vxt=r_e;A(n_e,"mapCacheGet");Wxt=n_e;A(i_e,"mapCacheHas");Uxt=i_e;A(a_e,"mapCacheSet");Hxt=a_e;A($m,"MapCache");$m.prototype.clear=Gxt;$m.prototype.delete=Vxt;$m.prototype.get=Wxt;$m.prototype.has=Uxt;$m.prototype.set=Hxt;uR=$m,Yxt=200;A(s_e,"stackSet");Xxt=s_e;A(Fm,"Stack");Fm.prototype.clear=jvt;Fm.prototype.delete=Kvt;Fm.prototype.get=Zvt;Fm.prototype.has=Qvt;Fm.prototype.set=Xxt;b_=Fm,jxt="__lodash_hash_undefined__";A(o_e,"setCacheAdd");Kxt=o_e;A(l_e,"setCacheHas");Zxt=l_e;A(mC,"SetCache");mC.prototype.add=mC.prototype.push=Kxt;mC.prototype.has=Zxt;c_e=mC;A(u_e,"arraySome");Qxt=u_e;A(h_e,"cacheHas");f_e=h_e,Jxt=1,ebt=2;A(d_e,"equalArrays");p_e=d_e,tbt=Ef.Uint8Array,Kwe=tbt;A(g_e,"mapToArray");rbt=g_e;A(m_e,"setToArray");zW=m_e,nbt=1,ibt=2,abt="[object Boolean]",sbt="[object Date]",obt="[object Error]",lbt="[object Map]",cbt="[object Number]",ubt="[object RegExp]",hbt="[object Set]",fbt="[object String]",dbt="[object Symbol]",pbt="[object ArrayBuffer]",gbt="[object DataView]",Zwe=eh?eh.prototype:void 0,rz=Zwe?Zwe.valueOf:void 0;A(y_e,"equalByTag");mbt=y_e;A(v_e,"arrayPush");x_e=v_e,ybt=Array.isArray,Js=ybt;A(b_e,"baseGetAllKeys");vbt=b_e;A(T_e,"arrayFilter");w_e=T_e;A(C_e,"stubArray");xbt=C_e,bbt=Object.prototype,Tbt=bbt.propertyIsEnumerable,Qwe=Object.getOwnPropertySymbols,wbt=Qwe?function(e){return e==null?[]:(e=Object(e),w_e(Qwe(e),function(t){return Tbt.call(e,t)}))}:xbt,Cbt=wbt;A(k_e,"baseTimes");kbt=k_e;A(S_e,"isObjectLike");jv=S_e,Sbt="[object Arguments]";A(E_e,"baseIsArguments");Jwe=E_e,A_e=Object.prototype,Ebt=A_e.hasOwnProperty,Abt=A_e.propertyIsEnumerable,_bt=Jwe((function(){return arguments})())?Jwe:function(e){return jv(e)&&Ebt.call(e,"callee")&&!Abt.call(e,"callee")},hR=_bt;A(__e,"stubFalse");Rbt=__e,R_e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,eCe=R_e&&typeof module=="object"&&module&&!module.nodeType&&module,Lbt=eCe&&eCe.exports===R_e,tCe=Lbt?Ef.Buffer:void 0,Ibt=tCe?tCe.isBuffer:void 0,Mbt=Ibt||Rbt,u6=Mbt,Dbt=9007199254740991,Nbt=/^(?:0|[1-9]\d*)$/;A(L_e,"isIndex");I_e=L_e,Obt=9007199254740991;A(M_e,"isLength");GW=M_e,Pbt="[object Arguments]",Bbt="[object Array]",$bt="[object Boolean]",Fbt="[object Date]",zbt="[object Error]",Gbt="[object Function]",qbt="[object Map]",Vbt="[object Number]",Wbt="[object Object]",Ubt="[object RegExp]",Hbt="[object Set]",Ybt="[object String]",Xbt="[object WeakMap]",jbt="[object ArrayBuffer]",Kbt="[object DataView]",Zbt="[object Float32Array]",Qbt="[object Float64Array]",Jbt="[object Int8Array]",e2t="[object Int16Array]",t2t="[object Int32Array]",r2t="[object Uint8Array]",n2t="[object Uint8ClampedArray]",i2t="[object Uint16Array]",a2t="[object Uint32Array]",ai={};ai[Zbt]=ai[Qbt]=ai[Jbt]=ai[e2t]=ai[t2t]=ai[r2t]=ai[n2t]=ai[i2t]=ai[a2t]=!0;ai[Pbt]=ai[Bbt]=ai[jbt]=ai[$bt]=ai[Kbt]=ai[Fbt]=ai[zbt]=ai[Gbt]=ai[qbt]=ai[Vbt]=ai[Wbt]=ai[Ubt]=ai[Hbt]=ai[Ybt]=ai[Xbt]=!1;A(D_e,"baseIsTypedArray");s2t=D_e;A(N_e,"baseUnary");o2t=N_e,O_e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zw=O_e&&typeof module=="object"&&module&&!module.nodeType&&module,l2t=Zw&&Zw.exports===O_e,nz=l2t&&OAe.process,c2t=(function(){try{var e=Zw&&Zw.require&&Zw.require("util").types;return e||nz&&nz.binding&&nz.binding("util")}catch{}})(),rCe=c2t,nCe=rCe&&rCe.isTypedArray,u2t=nCe?o2t(nCe):s2t,qW=u2t,h2t=Object.prototype,f2t=h2t.hasOwnProperty;A(P_e,"arrayLikeKeys");d2t=P_e,p2t=Object.prototype;A(B_e,"isPrototype");$_e=B_e;A(F_e,"overArg");g2t=F_e,m2t=g2t(Object.keys,Object),y2t=m2t,v2t=Object.prototype,x2t=v2t.hasOwnProperty;A(z_e,"baseKeys");G_e=z_e;A(q_e,"isArrayLike");fR=q_e;A(V_e,"keys");VW=V_e;A(W_e,"getAllKeys");iCe=W_e,b2t=1,T2t=Object.prototype,w2t=T2t.hasOwnProperty;A(U_e,"equalObjects");C2t=U_e,k2t=sx(Ef,"DataView"),zG=k2t,S2t=sx(Ef,"Promise"),GG=S2t,E2t=sx(Ef,"Set"),Fv=E2t,A2t=sx(Ef,"WeakMap"),qG=A2t,aCe="[object Map]",_2t="[object Object]",sCe="[object Promise]",oCe="[object Set]",lCe="[object WeakMap]",cCe="[object DataView]",R2t=Pm(zG),L2t=Pm(pC),I2t=Pm(GG),M2t=Pm(Fv),D2t=Pm(qG),$g=ax;(zG&&$g(new zG(new ArrayBuffer(1)))!=cCe||pC&&$g(new pC)!=aCe||GG&&$g(GG.resolve())!=sCe||Fv&&$g(new Fv)!=oCe||qG&&$g(new qG)!=lCe)&&($g=A(function(e){var t=ax(e),r=t==_2t?e.constructor:void 0,n=r?Pm(r):"";if(n)switch(n){case R2t:return cCe;case L2t:return aCe;case I2t:return sCe;case M2t:return oCe;case D2t:return lCe}return t},"getTag"));VG=$g,N2t=1,uCe="[object Arguments]",hCe="[object Array]",WA="[object Object]",O2t=Object.prototype,fCe=O2t.hasOwnProperty;A(H_e,"baseIsEqualDeep");P2t=H_e;A(WW,"baseIsEqual");Y_e=WW,B2t=1,$2t=2;A(X_e,"baseIsMatch");F2t=X_e;A(j_e,"isStrictComparable");K_e=j_e;A(Z_e,"getMatchData");z2t=Z_e;A(Q_e,"matchesStrictComparable");J_e=Q_e;A(e6e,"baseMatches");G2t=e6e,q2t="[object Symbol]";A(t6e,"isSymbol");dR=t6e,V2t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W2t=/^\w*$/;A(r6e,"isKey");UW=r6e,U2t="Expected a function";A(pR,"memoize");pR.Cache=uR;H2t=pR,Y2t=500;A(n6e,"memoizeCapped");X2t=n6e,j2t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K2t=/\\(\\)?/g,Z2t=X2t(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(j2t,function(r,n,i,a){t.push(i?a.replace(K2t,"$1"):n||r)}),t}),Q2t=Z2t,J2t=1/0,dCe=eh?eh.prototype:void 0,pCe=dCe?dCe.toString:void 0;A(HW,"baseToString");eTt=HW;A(i6e,"toString");tTt=i6e;A(a6e,"castPath");s6e=a6e,rTt=1/0;A(o6e,"toKey");gR=o6e;A(l6e,"baseGet");c6e=l6e;A(u6e,"get");nTt=u6e;A(h6e,"baseHasIn");iTt=h6e;A(f6e,"hasPath");aTt=f6e;A(d6e,"hasIn");sTt=d6e,oTt=1,lTt=2;A(p6e,"baseMatchesProperty");cTt=p6e;A(g6e,"identity");YW=g6e;A(m6e,"baseProperty");uTt=m6e;A(y6e,"basePropertyDeep");hTt=y6e;A(v6e,"property");fTt=v6e;A(x6e,"baseIteratee");mR=x6e;A(b6e,"createBaseFor");dTt=b6e,pTt=dTt(),gTt=pTt;A(T6e,"baseForOwn");mTt=T6e;A(w6e,"createBaseEach");yTt=w6e,vTt=yTt(mTt),yR=vTt;A(C6e,"baseMap");xTt=C6e;A(k6e,"map");df=k6e;A(S6e,"baseFilter");bTt=S6e;A(E6e,"filter");TTt=E6e;A(bm,"buildATNKey");Pp=1,wTt=2,A6e=4,_6e=5,zC=7,CTt=8,kTt=9,STt=10,ETt=11,R6e=12,XW=class{static{A(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},jW=class extends XW{static{A(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},L6e=class extends XW{static{A(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},KW=class extends XW{static{A(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};A(I6e,"createATN");A(M6e,"createRuleStartAndStopATNStates");A(ZW,"atom");A(D6e,"repetition");A(N6e,"repetitionSep");A(O6e,"repetitionMandatory");A(P6e,"repetitionMandatorySep");A(B6e,"alternation");A($6e,"option");A(qp,"block");A(QW,"plus");A(JW,"star");A(F6e,"optional");A(Af,"defineDecisionState");A(zm,"makeAlts");A(z6e,"getProdType");A(G6e,"makeBlock");A(vR,"tokenRef");A(q6e,"ruleRef");A(V6e,"buildRuleHandle");A(Yi,"epsilon");A(Ta,"newState");A(xR,"addTransition");A(W6e,"removeState");h6={},WG=class{static{A(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=eU(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return df(this.configs,e=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};A(eU,"getATNConfigKey");A(U6e,"baseExtremum");ATt=U6e;A(H6e,"baseLt");_Tt=H6e;A(Y6e,"min");RTt=Y6e,gCe=eh?eh.isConcatSpreadable:void 0;A(X6e,"isFlattenable");LTt=X6e;A(tU,"baseFlatten");j6e=tU;A(K6e,"flatMap");ITt=K6e;A(Z6e,"baseFindIndex");MTt=Z6e;A(Q6e,"baseIsNaN");DTt=Q6e;A(J6e,"strictIndexOf");NTt=J6e;A(eRe,"baseIndexOf");OTt=eRe;A(tRe,"arrayIncludes");PTt=tRe;A(rRe,"arrayIncludesWith");BTt=rRe;A(nRe,"noop");$Tt=nRe,FTt=1/0,zTt=Fv&&1/zW(new Fv([,-0]))[1]==FTt?function(e){return new Fv(e)}:$Tt,GTt=zTt,qTt=200;A(iRe,"baseUniq");VTt=iRe;A(aRe,"uniqBy");WTt=aRe;A(sRe,"flatten");UTt=sRe;A(oRe,"arrayEach");HTt=oRe;A(lRe,"castFunction");YTt=lRe;A(cRe,"forEach");iz=cRe,XTt="[object Map]",jTt="[object Set]",KTt=Object.prototype,ZTt=KTt.hasOwnProperty;A(uRe,"isEmpty");QTt=uRe;A(hRe,"arrayReduce");JTt=hRe;A(fRe,"baseReduce");ewt=fRe;A(dRe,"reduce");mCe=dRe;A(pRe,"createDFACache");gRe=class{static{A(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;rconsole.log(r))}initialize(e){this.atn=I6e(e.rules),this.dfas=mRe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,a=this.dfas,s=this.logging,o=bm(r,"Alternation",t),u=this.atn.decisionMap[o].decision,h=df(LG({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>df(f,d=>d[0]));if(UG(h,!1)&&!i){let f=mCe(h,(d,p,g)=>(iz(p,m=>{m&&(d[m.tokenTypeIdx]=g,iz(m.categoryMatches,y=>{d[y]=g}))}),d),{});return n?function(d){var p;let g=this.LA(1),m=f[g.tokenTypeIdx];if(d!==void 0&&m!==void 0){let y=(p=d[m])===null||p===void 0?void 0:p.GATE;if(y!==void 0&&y.call(this)===!1)return}return m}:function(){let d=this.LA(1);return f[d.tokenTypeIdx]}}else return n?function(f){let d=new gRe,p=f===void 0?0:f.length;for(let m=0;mdf(f,d=>d[0]));if(UG(h)&&h[0][0]&&!i){let f=h[0],d=UTt(f);if(d.length===1&&QTt(d[0].categoryMatches)){let g=d[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{let p=mCe(d,(g,m)=>(m!==void 0&&(g[m.tokenTypeIdx]=!0,iz(m.categoryMatches,y=>{g[y]=!0})),g),{});return function(){let g=this.LA(1);return p[g.tokenTypeIdx]===!0}}}return function(){let f=T_.call(this,a,u,yCe,s);return typeof f=="object"?!1:f===0}}};A(UG,"isLL1Sequence");A(mRe,"initATNSimulator");A(T_,"adaptivePredict");A(yRe,"performLookahead");A(vRe,"computeLookaheadTarget");A(xRe,"reportLookaheadAmbiguity");A(bRe,"buildAmbiguityError");A(TRe,"getProductionDslName");A(wRe,"buildAdaptivePredictError");A(CRe,"getExistingTargetState");A(kRe,"computeReachSet");A(SRe,"getReachableTarget");A(ERe,"getUniqueAlt");A(rU,"newDFAState");A(HG,"addDFAEdge");A(nU,"addDFAState");A(ARe,"computeStartState");A(yC,"closure");A(_Re,"getEpsilonTarget");A(RRe,"hasConfigInRuleStopState");A(LRe,"allConfigsInRuleStopStates");A(IRe,"hasConflictTerminatingPrediction");A(MRe,"getConflictingAltSets");A(DRe,"hasConflictingAltSet");A(NRe,"hasStateAssociatedWithOneAlt");bC();ORe=class{static{A(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new aU(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new bR;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new f6(e.startOffset,e.image.length,iC(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){let t=e.container;if(t){let r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){let t=[];for(let i of e){let a=new f6(i.startOffset,i.image.length,iC(i),i.tokenType,!0);a.root=this.rootNode,t.push(a)}let r=this.current,n=!1;if(r.content.length>0){r.content.push(...t);return}for(;r.container;){let i=r.container.content.indexOf(r);if(i>0){r.container.content.splice(i,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type=="string"&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;let r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},iU=class{static{A(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},f6=class extends iU{static{A(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,n,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},bR=class extends iU{static{A(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new rwt(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},rwt=class PRe extends Array{static{A(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,PRe.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...n){return this.addParents(n),super.splice(t,r,...n)}addParents(t){for(let r of t)r.container=this.parent}},aU=class extends bR{static{A(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},d6=Symbol("Datatype");A(w_,"isDataTypeNode");vCe="\u200B",BRe=A(e=>e.endsWith(vCe)?e:e+vCe,"withRuleSuffix"),sU=class{static{A(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new iwt(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new GRe(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},$Re=class extends sU{static{A(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new ORe,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),n;Wv(e)&&(n=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(BRe(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,i),Ks(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let n=0;n0&&(t=this.construct()),t===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return n=>{let i=!this.isRecording()&&e!==void 0;if(i){let a={$type:e};this.stack.push(a),e===d6?a.value="":t!==void 0&&(a.$infixName=t)}return r(n),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let n=0;nr)return t.splice(0,n);return t.splice(0,t.length)}consume(e,t,r){let n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){let i=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(i);let a=this.nodeBuilder.buildLeafNode(n,r),{assignment:s,crossRef:o}=this.getAssignment(r),l=this.current;if(s){let u=mf(r)?n.image:this.converter.convert(n.image,a);this.assign(s.operator,s.feature,u,a,o)}else if(w_(l)){let u=n.image;mf(r)||(u=this.converter.convert(u,a).toString()),l.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,n,i){let a;!this.isRecording()&&!r&&(a=this.nodeBuilder.buildCompositeNode(n));let s;try{s=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(s===void 0&&!r&&(s=this.construct()),s!==void 0&&a&&a.length>0&&this.performSubruleAssignment(s,n,a))}}performSubruleAssignment(e,t,r){let{assignment:n,crossRef:i}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,i);else if(!n){let a=this.current;if(w_(a))a.value+=e.toString();else if(typeof e=="object"&&e){let o=this.assignWithoutOverride(e,a);this.stack.pop(),this.stack.push(o)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);let i={$type:e};this.stack.push(i),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):w_(e)?this.converter.convert(e.value,e.$cstNode):(iV(this.astReflection,e),e)}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let i=0,a=-1;for(let g=0;ga?(a=y.precedence,i=g):y.precedence===a&&(y.rightAssoc||(i=g))}let s=n.slice(0,i),o=n.slice(i+1),l=r.slice(0,i+1),u=r.slice(i+1),h={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d=this.constructInfix(h,t),p=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:d,operator:n[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=Cm(e,gf);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Sm(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,i){let a=this.current,s;switch(i==="single"&&typeof r=="string"?s=this.linker.buildReference(a,t,n,r):i==="multi"&&typeof r=="string"?s=this.linker.buildMultiReference(a,t,n,r):s=r,e){case"=":{a[t]=s;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(let[n,i]of Object.entries(t)){let a=e[n];a===void 0?e[n]=i:Array.isArray(a)&&Array.isArray(i)&&(i.push(...a),e[n]=i)}let r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},FRe=class{static{A(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Dv.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Dv.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Dv.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Dv.buildEarlyExitMessage(e)}},oU=class extends FRe{static{A(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},zRe=class extends sU{static{A(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let r=this.wrapper.DEFINE_RULE(BRe(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,n,i){this.before(n),this.wrapper.wrapSubrule(e,t,i),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},nwt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new oU},GRe=class extends Gvt{static{A(this,"ChevrotainWrapper")}constructor(e,t){let r=t&&"maxLookahead"in t;super(e,{...nwt,lookaheadStrategy:r?new PW({maxLookahead:t.maxLookahead}):new twt({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},iwt=class extends GRe{static{A(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};A(TR,"createParser");A(qRe,"buildRules");A(VRe,"buildInfixRule");A(Bp,"buildElement");A(WRe,"buildAction");A(URe,"buildRuleCall");A(HRe,"buildRuleCallPredicate");A(wc,"buildPredicate");A(YRe,"buildAlternatives");A(XRe,"buildUnorderedGroup");A(jRe,"buildGroup");A(vC,"getGuardCondition");A(lU,"buildCrossReference");A(KRe,"buildKeyword");A(cU,"wrap");A(wR,"getRule");A(ZRe,"getRuleName");A(p6,"getToken");A(uU,"createCompletionParser");A(hU,"createLangiumParser");A(fU,"prepareLangiumParser");CR=class{static{A(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=zn(P6(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return i.push(...n),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Vl).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=EC(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return typeof r=="function"&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=O6(t)?js.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,n)=>(t.lastIndex=n,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(km).flatMap(n=>kf(n).filter(mf)).distinct(n=>n.value).toArray().sort((n,i)=>i.value.length-n.value.length).map(n=>this.buildKeywordToken(n,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let n=this.buildKeywordPattern(e,r),i={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return typeof n=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(Jv(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{let i=n?.PATTERN;return i?.source&&BV("^"+i.source+"$",e.value)&&r.push(n),r},[])}},dU=class{static{A(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(Sm(r)&&(r=qV(r)),yf(r)){let n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return Xu.convertInt(t);case"STRING":return Xu.convertString(t);case"ID":return Xu.convertID(t)}switch(ZV(e)?.toLowerCase()){case"number":return Xu.convertNumber(t);case"boolean":return Xu.convertBoolean(t);case"bigint":return Xu.convertBigint(t);case"date":return Xu.convertDate(t);default:return t}}};(function(e){function t(u){let h="";for(let f=1;f{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},xCe=class YG{static{A(this,"FullTextDocument")}constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(YG.isIncremental(n)){let i=mU(n.range),a=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(s,this._content.length);let o=Math.max(i.start.line,0),l=Math.max(i.end.line,0),u=this._lineOffsets,h=XG(n.text,!1,a);if(l-o===h.length)for(let d=0,p=h.length;dt?i=s:n=s+1}let a=n-1;return t=this.ensureBeforeEOL(t,r[a]),{line:a,character:t-r[a]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let i=t.line+1r&&gU(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(i,a,s,o){return new xCe(i,a,s,o)}A(t,"create"),e.create=t;function r(i,a,s){if(i instanceof xCe)return i.update(a,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}A(r,"update"),e.update=r;function n(i,a){let s=i.getText(),o=m6(a.map(JRe),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=i.offsetAt(h.range.start);if(fl&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=i.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}A(n,"applyEdits"),e.applyEdits=n})(g6||(g6={}));A(m6,"mergeSort");A(XG,"computeLineOffsets");A(gU,"isEOL");A(mU,"getWellformedRange");A(JRe,"getWellformedEdit");(()=>{"use strict";var e={975:O=>{function R(I){if(typeof I!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(I))}A(R,"e");function _(I,M){for(var B,P="",$=0,G=-1,q=0,z=0;z<=I.length;++z){if(z2){var V=P.lastIndexOf("/");if(V!==P.length-1){V===-1?(P="",$=0):$=(P=P.slice(0,V)).length-1-P.lastIndexOf("/"),G=z,q=0;continue}}else if(P.length===2||P.length===1){P="",$=0,G=z,q=0;continue}}M&&(P.length>0?P+="/..":P="..",$=2)}else P.length>0?P+="/"+I.slice(G+1,z):P=I.slice(G+1,z),$=z-G-1;G=z,q=0}else B===46&&q!==-1?++q:q=-1}return P}A(_,"r");var D={resolve:A(function(){for(var I,M="",B=!1,P=arguments.length-1;P>=-1&&!B;P--){var $;P>=0?$=arguments[P]:(I===void 0&&(I=process.cwd()),$=I),R($),$.length!==0&&(M=$+"/"+M,B=$.charCodeAt(0)===47)}return M=_(M,!B),B?M.length>0?"/"+M:"/":M.length>0?M:"."},"resolve"),normalize:A(function(I){if(R(I),I.length===0)return".";var M=I.charCodeAt(0)===47,B=I.charCodeAt(I.length-1)===47;return(I=_(I,!M)).length!==0||M||(I="."),I.length>0&&B&&(I+="/"),M?"/"+I:I},"normalize"),isAbsolute:A(function(I){return R(I),I.length>0&&I.charCodeAt(0)===47},"isAbsolute"),join:A(function(){if(arguments.length===0)return".";for(var I,M=0;M0&&(I===void 0?I=B:I+="/"+B)}return I===void 0?".":D.normalize(I)},"join"),relative:A(function(I,M){if(R(I),R(M),I===M||(I=D.resolve(I))===(M=D.resolve(M)))return"";for(var B=1;Bz){if(M.charCodeAt(G+j)===47)return M.slice(G+j+1);if(j===0)return M.slice(G+j)}else $>z&&(I.charCodeAt(B+j)===47?V=j:j===0&&(V=0));break}var ee=I.charCodeAt(B+j);if(ee!==M.charCodeAt(G+j))break;ee===47&&(V=j)}var ne="";for(j=B+V+1;j<=P;++j)j!==P&&I.charCodeAt(j)!==47||(ne.length===0?ne+="..":ne+="/..");return ne.length>0?ne+M.slice(G+V):(G+=V,M.charCodeAt(G)===47&&++G,M.slice(G))},"relative"),_makeLong:A(function(I){return I},"_makeLong"),dirname:A(function(I){if(R(I),I.length===0)return".";for(var M=I.charCodeAt(0),B=M===47,P=-1,$=!0,G=I.length-1;G>=1;--G)if((M=I.charCodeAt(G))===47){if(!$){P=G;break}}else $=!1;return P===-1?B?"/":".":B&&P===1?"//":I.slice(0,P)},"dirname"),basename:A(function(I,M){if(M!==void 0&&typeof M!="string")throw new TypeError('"ext" argument must be a string');R(I);var B,P=0,$=-1,G=!0;if(M!==void 0&&M.length>0&&M.length<=I.length){if(M.length===I.length&&M===I)return"";var q=M.length-1,z=-1;for(B=I.length-1;B>=0;--B){var V=I.charCodeAt(B);if(V===47){if(!G){P=B+1;break}}else z===-1&&(G=!1,z=B+1),q>=0&&(V===M.charCodeAt(q)?--q==-1&&($=B):(q=-1,$=z))}return P===$?$=z:$===-1&&($=I.length),I.slice(P,$)}for(B=I.length-1;B>=0;--B)if(I.charCodeAt(B)===47){if(!G){P=B+1;break}}else $===-1&&(G=!1,$=B+1);return $===-1?"":I.slice(P,$)},"basename"),extname:A(function(I){R(I);for(var M=-1,B=0,P=-1,$=!0,G=0,q=I.length-1;q>=0;--q){var z=I.charCodeAt(q);if(z!==47)P===-1&&($=!1,P=q+1),z===46?M===-1?M=q:G!==1&&(G=1):M!==-1&&(G=-1);else if(!$){B=q+1;break}}return M===-1||P===-1||G===0||G===1&&M===P-1&&M===B+1?"":I.slice(M,P)},"extname"),format:A(function(I){if(I===null||typeof I!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof I);return(function(M,B){var P=B.dir||B.root,$=B.base||(B.name||"")+(B.ext||"");return P?P===B.root?P+$:P+"/"+$:$})(0,I)},"format"),parse:A(function(I){R(I);var M={root:"",dir:"",base:"",ext:"",name:""};if(I.length===0)return M;var B,P=I.charCodeAt(0),$=P===47;$?(M.root="/",B=1):B=0;for(var G=-1,q=0,z=-1,V=!0,j=I.length-1,ee=0;j>=B;--j)if((P=I.charCodeAt(j))!==47)z===-1&&(V=!1,z=j+1),P===46?G===-1?G=j:ee!==1&&(ee=1):G!==-1&&(ee=-1);else if(!V){q=j+1;break}return G===-1||z===-1||ee===0||ee===1&&G===z-1&&G===q+1?z!==-1&&(M.base=M.name=q===0&&$?I.slice(1,z):I.slice(q,z)):(q===0&&$?(M.name=I.slice(1,G),M.base=I.slice(1,z)):(M.name=I.slice(q,G),M.base=I.slice(q,z)),M.ext=I.slice(G,z)),q>0?M.dir=I.slice(0,q-1):$&&(M.dir="/"),M},"parse"),sep:"/",delimiter:":",win32:null,posix:null};D.posix=D,O.exports=D}},t={};function r(O){var R=t[O];if(R!==void 0)return R.exports;var _=t[O]={exports:{}};return e[O](_,_.exports,r),_.exports}A(r,"r"),r.d=(O,R)=>{for(var _ in R)r.o(R,_)&&!r.o(O,_)&&Object.defineProperty(O,_,{enumerable:!0,get:R[_]})},r.o=(O,R)=>Object.prototype.hasOwnProperty.call(O,R),r.r=O=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:A(()=>d,"URI"),Utils:A(()=>N,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(O,R){if(!O.scheme&&R)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!a.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!s.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}A(l,"a");let u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{A(this,"l")}static isUri(R){return R instanceof d||!!R&&typeof R.authority=="string"&&typeof R.fragment=="string"&&typeof R.path=="string"&&typeof R.query=="string"&&typeof R.scheme=="string"&&typeof R.fsPath=="string"&&typeof R.with=="function"&&typeof R.toString=="function"}scheme;authority;path;query;fragment;constructor(R,_,D,I,M,B=!1){typeof R=="object"?(this.scheme=R.scheme||u,this.authority=R.authority||u,this.path=R.path||u,this.query=R.query||u,this.fragment=R.fragment||u):(this.scheme=(function(P,$){return P||$?P:"file"})(R,B),this.authority=_||u,this.path=(function(P,$){switch(P){case"https":case"http":case"file":$?$[0]!==h&&($=h+$):$=h}return $})(this.scheme,D||u),this.query=I||u,this.fragment=M||u,l(this,B))}get fsPath(){return b(this,!1)}with(R){if(!R)return this;let{scheme:_,authority:D,path:I,query:M,fragment:B}=R;return _===void 0?_=this.scheme:_===null&&(_=u),D===void 0?D=this.authority:D===null&&(D=u),I===void 0?I=this.path:I===null&&(I=u),M===void 0?M=this.query:M===null&&(M=u),B===void 0?B=this.fragment:B===null&&(B=u),_===this.scheme&&D===this.authority&&I===this.path&&M===this.query&&B===this.fragment?this:new g(_,D,I,M,B)}static parse(R,_=!1){let D=f.exec(R);return D?new g(D[2]||u,C(D[4]||u),C(D[5]||u),C(D[7]||u),C(D[9]||u),_):new g(u,u,u,u,u)}static file(R){let _=u;if(i&&(R=R.replace(/\\/g,h)),R[0]===h&&R[1]===h){let D=R.indexOf(h,2);D===-1?(_=R.substring(2),R=h):(_=R.substring(2,D),R=R.substring(D)||h)}return new g("file",_,R,u,u)}static from(R){let _=new g(R.scheme,R.authority,R.path,R.query,R.fragment);return l(_,!0),_}toString(R=!1){return T(this,R)}toJSON(){return this}static revive(R){if(R){if(R instanceof d)return R;{let _=new g(R);return _._formatted=R.external,_._fsPath=R._sep===p?R.fsPath:null,_}}return R}}let p=i?1:void 0;class g extends d{static{A(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(R=!1){return R?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=p),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(O,R,_){let D,I=-1;for(let M=0;M=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||R&&B===47||_&&B===91||_&&B===93||_&&B===58)I!==-1&&(D+=encodeURIComponent(O.substring(I,M)),I=-1),D!==void 0&&(D+=O.charAt(M));else{D===void 0&&(D=O.substr(0,M));let P=m[B];P!==void 0?(I!==-1&&(D+=encodeURIComponent(O.substring(I,M)),I=-1),D+=P):I===-1&&(I=M)}}return I!==-1&&(D+=encodeURIComponent(O.substring(I))),D!==void 0?D:O}A(y,"m");function x(O){let R;for(let _=0;_1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?R?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,i&&(_=_.replace(/\//g,"\\")),_}A(b,"v");function T(O,R){let _=R?x:y,D="",{scheme:I,authority:M,path:B,query:P,fragment:$}=O;if(I&&(D+=I,D+=":"),(M||I==="file")&&(D+=h,D+=h),M){let G=M.indexOf("@");if(G!==-1){let q=M.substr(0,G);M=M.substr(G+1),G=q.lastIndexOf(":"),G===-1?D+=_(q,!1,!1):(D+=_(q.substr(0,G),!1,!1),D+=":",D+=_(q.substr(G+1),!1,!0)),D+="@"}M=M.toLowerCase(),G=M.lastIndexOf(":"),G===-1?D+=_(M,!1,!0):(D+=_(M.substr(0,G),!1,!0),D+=M.substr(G))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){let G=B.charCodeAt(1);G>=65&&G<=90&&(B=`/${String.fromCharCode(G+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){let G=B.charCodeAt(0);G>=65&&G<=90&&(B=`${String.fromCharCode(G+32)}:${B.substr(2)}`)}D+=_(B,!0,!1)}return P&&(D+="?",D+=_(P,!1,!1)),$&&(D+="#",D+=R?$:y($,!1,!1)),D}A(T,"b");function k(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+k(O.substr(3)):O}}A(k,"C");let w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(O){return O.match(w)?O.replace(w,(R=>k(R))):O}A(C,"w");var S=r(975);let E=S.posix||S,L="/";var N;(function(O){O.joinPath=function(R,..._){return R.with({path:E.join(R.path,..._)})},O.resolvePath=function(R,..._){let D=R.path,I=!1;D[0]!==L&&(D=L+D,I=!0);let M=E.resolve(D,..._);return I&&M[0]===L&&!R.authority&&(M=M.substring(1)),R.with({path:M})},O.dirname=function(R){if(R.path.length===0||R.path===L)return R;let _=E.dirname(R.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),R.with({path:_})},O.basename=function(R){return E.basename(R.path)},O.extname=function(R){return E.extname(R.path)}})(N||(N={})),e7e=n})();({URI:ll,Utils:bw}=e7e);(function(e){e.basename=bw.basename,e.dirname=bw.dirname,e.extname=bw.extname,e.joinPath=bw.joinPath,e.resolvePath=bw.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(s,o){return s?.toString()===o?.toString()}A(r,"equals"),e.equals=r;function n(s,o){let l=typeof s=="string"?ll.parse(s).path:s.path,u=typeof o=="string"?ll.parse(o).path:o.path,h=l.split("/").filter(m=>m.length>0),f=u.split("/").filter(m=>m.length>0);if(t){let m=/^[A-Z]:$/;if(h[0]&&m.test(h[0])&&(h[0]=h[0].toLowerCase()),f[0]&&m.test(f[0])&&(f[0]=f[0].toLowerCase()),h[0]!==f[0])return u.substring(1)}let d=0;for(;d({name:n.name,uri:Xs.joinPath(ll.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(Xs.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let n=this.root;for(let i of r){let a=n.children.get(i);if(!a)if(t)a={name:i,children:new Map,parent:n},n.children.set(i,a);else return;n=a}return n}collectValues(e){let t=[];e.element&&t.push(e.element);for(let r of e.children.values())t.push(...this.collectValues(r));return t}};(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(Jr||(Jr={}));t7e=class{static{A(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Jn.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??ll.parse(e.uri),Jn.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Jn.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t=="string"){let n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else if("$model"in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){let n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else{let n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let i;if(r)i={parseResult:e,uri:t,state:Jr.Parsed,references:[],textDocument:r};else{let a=this.createTextDocumentGetter(t,n);i={parseResult:e,uri:t,state:Jr.Parsed,references:[],get textDocument(){return a()}}}return e.value.$document=i,i}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{let a=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:a})}return r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Jr.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n;return()=>n??(n=g6.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},r7e=class{static{A(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new yU,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return zn(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(n=>(this.addDocument(n),n));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,Jr.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=Jr.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let n of r)n.state=Jr.Changed;return this.documentTrie.delete(t),r}},Fg=Symbol("RefResolving"),n7e=class{static{A(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Jn.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let n of kc(e.parseResult.value))await Fa(t),Vv(n).forEach(i=>{let a=`${n.$type}:${i.property}`;r.startSubTask(a);try{this.doLink(i,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(let r of kc(e.parseResult.value))await Fa(t),Vv(r).forEach(n=>this.doLink(n,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Fg;try{let n=this.getCandidate(e);if(Wg(n))r._ref=n;else{r._nodeDescription=n;let i=this.loadAstNode(n);r._ref=i??this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);let i=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${i}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=Fg;try{let n=this.getCandidates(e),i=[];if(Wg(n))r._linkingError=n;else for(let a of n){let s=this.loadAstNode(a);s&&i.push({ref:s,$nodeDescription:a})}r._items=i}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(let t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(n=>`${n.documentUri}#${n.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,t,r,n){let i=this,a={$refNode:r,$refText:n,_ref:void 0,get ref(){if(sa(this._ref))return this._ref;if(tV(this._nodeDescription)){let s=i.loadAstNode(this._nodeDescription);this._ref=s??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=Fg;let s=Pv(e).$document,o=i.getLinkedNode({reference:a,container:e,property:t});if(o.error&&s&&s.state0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(Wg(t))return{error:t};let r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let r=Pv(e.container).$document;r&&r.stateSm(t)&&t.isMulti)}findDeclarations(e){if(e){let t=HV(e),r=e.astNode;if(t&&r){let n=r[t.feature];if(Ys(n)||Qu(n))return N_(n);if(Array.isArray(n)){for(let i of n)if((Ys(i)||Qu(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return N_(i)}}if(r){let n=this.nameProvider.getNameNode(r);if(n&&(n===e||SV(e,n)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(let n of Vv(r))if(Qu(n.reference)&&n.reference.items.some(i=>i.ref===e))return n.reference.items.map(i=>i.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),r=[];for(let n of t){let i=this.nameProvider.getNameNode(n)??n.$cstNode;i&&r.push(i)}return r}findReferences(e,t){let r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(i=>Xs.equals(i.sourceUri,t.documentUri))),r.push(...n),zn(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let n of t){let i=this.nameProvider.getNameNode(n);if(i){let a=Cc(n),s=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:a.uri,sourcePath:s,targetUri:a.uri,targetPath:s,segment:Hv(i),local:!0})}}return r}},Cf=class{static{A(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return nC.sum(zn(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let r=this.map.get(e);if(r){let n=r.indexOf(t);if(n>=0)return r.length===1?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?zn(t):zv}has(e,t){if(t===void 0)return this.map.has(e);{let r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(n=>e(n,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return zn(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return zn(this.map.keys())}values(){return zn(this.map.values()).flat()}entriesGroupedByKey(){return zn(this.map.entries())}},y6=class{static{A(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}},s7e=class{static{A(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Jn.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=wC,n=Jn.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of r(e))await Fa(n),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,r){let n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=Jn.CancellationToken.None){let r=e.parseResult.value,n=new Cf;for(let i of kf(r))await Fa(t),this.addLocalSymbol(i,e,n);return n}addLocalSymbol(e,t,r){let n=e.$container;if(n){let i=this.nameProvider.getName(e);i&&r.add(n,this.descriptions.createDescription(e,i,t))}}},jG=class{static{A(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===t):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(n=>n.name.toLowerCase()===t):this.elements.filter(n=>n.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},awt=class{static{A(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?zn(n).concat(this.outerScope.getElements(e)):zn(n)}getAllElements(){let e=zn(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},o7e=class{static{A(this,"MultiMapScope")}constructor(e,t,r){this.elements=new Cf,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(i,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||r.length===0)&&this.outerScope?zn(r).concat(this.outerScope.getElements(e)):zn(r)}getAllElements(){let e=zn(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},swt={getElement(){},getElements(){return zv},getAllElements(){return zv}},ER=class{static{A(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},xU=class extends ER{static{A(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},AR=class extends ER{static{A(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();let n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){let i=r();return n.set(t,i),i}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},l7e=class extends AR{static{A(this,"DocumentCache")}constructor(e,t){super(r=>r.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,r=>{this.clear(r.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{for(let i of n)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let i=r.concat(n);for(let a of i)this.clear(a)}))}},bU=class extends xU{static{A(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{n.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},c7e=class{static{A(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new bU(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),n=Cc(e.container).localSymbols;if(n){let a=e.container;do n.has(a)&&t.push(n.getStream(a).filter(s=>this.reflection.isSubtype(s.type,r))),a=a.$container;while(a)}let i=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)i=this.createScope(t[a],i);return i}createScope(e,t,r){return new jG(zn(e),t,r)}createScopeForNodes(e,t,r){let n=zn(e).map(i=>{let a=this.nameProvider.getName(i);if(a)return this.descriptions.createDescription(i,a)}).nonNullable();return new jG(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new o7e(this.indexManager.allElements(e)))}};A(TU,"isAstNodeWithComment");A(KG,"isIntermediateReference");u7e=class{static{A(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},n=t?.replacer,i=A((s,o)=>this.replacer(s,o,r),"defaultReplacer"),a=n?(s,o)=>n(s,o,i):i;try{return this.currentDocument=Cc(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:i,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(e))if(Ys(t)){let o=t.ref,l=r?t.$refText:void 0;if(o){let u=Cc(o),h="";this.currentDocument&&this.currentDocument!==u&&(s?h=s(u.uri,o):h=u.uri.toString());let f=this.astNodeLocator.getAstNodePath(o);return{$ref:`${h}#${f}`,$refText:l}}else return{$error:t.error?.message??"Could not resolve reference",$refText:l}}else if(Qu(t)){let o=r?t.$refText:void 0,l=[];for(let u of t.items){let h=u.ref,f=Cc(u.ref),d="";this.currentDocument&&this.currentDocument!==f&&(s?d=s(f.uri,h):d=f.uri.toString());let p=this.astNodeLocator.getAstNodePath(h);l.push(`${d}#${p}`)}return{$refs:l,$refText:o}}else if(sa(t)){let o;if(i&&(o=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&o?.$textRegion&&(o.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(o??(o={...t}),o.$sourceText=t.$cstNode?.text),a){o??(o={...t});let l=this.commentProvider.getComment(t);l&&(o.$comment=l.replace(/\r/g,""))}return o??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=A(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),n=r.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{let a=WV(e.$cstNode,i).map(t);a.length!==0&&(n[i]=a)}),e}}linkNode(e,t,r,n,i,a){for(let[o,l]of Object.entries(e))if(Array.isArray(l))for(let u=0;u{await this.handleException(()=>e.call(t,r,n,i),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(i){if(Gm(i))throw i;console.error(`${t}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);let a=i instanceof Error?i.message:String(i);r("error",`${t}: ${a}`,{node:n})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(let r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=zn(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(n=>t.includes(n.category))),r.map(n=>n.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,i,a,s)=>{await this.handleException(()=>e.call(r,n,i,a,s),t,i,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},d7e=Object.freeze({validateNode:!0,validateChildren:!0}),p7e=class{static{A(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=Jn.CancellationToken.None){let n=e.parseResult,i=[];if(await Fa(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,i,t),t.stopAfterLexingErrors&&i.some(a=>a.data?.code===Fl.LexingError)||(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(a=>a.data?.code===Fl.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(a=>a.data?.code===Fl.LinkingError))))return i;try{i.push(...await this.validateAst(n.value,t,r))}catch(a){if(Gm(a))throw a;console.error("An error occurred during validation:",a)}return await Fa(r),i}processLexingErrors(e,t,r){let n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let i of n){let a=i.severity??"error",s={severity:Qw(a),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:CU(a),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(let n of e.parserErrors){let i;if(isNaN(n.token.startOffset)){if("previousToken"in n){let a=n.previousToken;if(isNaN(a.startOffset)){let s={line:0,character:0};i={start:s,end:s}}else{let s={line:a.endLine-1,character:a.endColumn};i={start:s,end:s}}}}else i=iC(n.token);if(i){let a={severity:Qw("error"),range:i,message:n.message,data:dm(Fl.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(let n of e.references){let i=n.error;if(i){let a={node:i.info.container,range:n.$refNode?.range,property:i.info.property,index:i.info.index,data:{code:Fl.LinkingError,containerType:i.info.container.$type,property:i.info.property,refText:i.info.reference.$refText}};t.push(this.toDiagnostic("error",i.message,a))}}}async validateAst(e,t,r=Jn.CancellationToken.None){let n=[],i=A((a,s,o)=>{n.push(this.toDiagnostic(a,s,o))},"acceptor");return await this.validateAstBefore(e,t,i,r),await this.validateAstNodes(e,t,i,r),await this.validateAstAfter(e,t,i,r),n}async validateAstBefore(e,t,r,n=Jn.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Fa(n),await a(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=Jn.CancellationToken.None){if(this.profiler?.isActive("validating")){let i=this.profiler.createTask("validating",this.languageId);i.start();try{let a=kc(e).iterator();for(let s of a){i.startSubTask(s.$type);let o=this.validateSingleNodeOptions(s,t);if(o.validateNode)try{let l=this.validationRegistry.getChecks(s.$type,t.categories);for(let u of l)await u(s,r,n)}finally{i.stopSubTask(s.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=kc(e).iterator();for(let a of i){await Fa(n);let s=this.validateSingleNodeOptions(a,t);if(s.validateNode){let o=this.validationRegistry.getChecks(a.$type,t.categories);for(let l of o)await l(a,r,n)}s.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return d7e}async validateAstAfter(e,t,r,n=Jn.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Fa(n),await a(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:wU(r),severity:Qw(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};A(wU,"getDiagnosticRange");A(Qw,"toDiagnosticSeverity");A(CU,"toDiagnosticData");(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(Fl||(Fl={}));g7e=class{static{A(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let n=r??Cc(e);t??(t=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let a,s=A(()=>a??(a=Hv(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Hv(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},m7e=class{static{A(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Jn.CancellationToken.None){let r=[],n=e.parseResult.value;for(let i of kc(n))await Fa(t),Vv(i).forEach(a=>{a.reference.error||r.push(...this.createInfoDescriptions(a))});return r}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Ys(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Qu(t)&&(r=t.items.map(o=>o.$nodeDescription).filter(o=>o!==void 0));let n=Cc(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],s=Hv(t.$refNode);for(let o of r)a.push({sourceUri:n,sourcePath:i,targetUri:o.documentUri,targetPath:o.path,segment:s,local:Xs.equals(o.documentUri,n)});return a}},y7e=class{static{A(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((n,i)=>{if(!n||i.length===0)return n;let a=i.indexOf(this.indexSeparator);if(a>0){let s=i.substring(0,a),o=parseInt(i.substring(a+1));return n[s]?.[o]}return n[i]},e)}},_R={};w6(_R,Zq(Zv(),1));v7e=class{static{A(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new wf,this.onConfigurationSectionUpdateEmitter=new _R.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(n=>({section:this.toSectionName(n.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((n,i)=>{this.updateSectionConfiguration(n.section,r[i])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([t,r])=>{this.updateSectionConfiguration(t,r),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:r})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},UA=Zq(Odt(),1);(function(e){function t(r){return{dispose:A(async()=>await r(),"dispose")}}A(t,"create"),e.create=t})(mm||(mm={}));x7e=class{static{A(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Cf,this.documentPhaseListeners=new Cf,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Jr.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=Jn.CancellationToken.None){for(let n of e){let i=n.uri.toString();if(n.state===Jr.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,Jr.IndexedReferences);else if(typeof t.validation=="object"){let a=this.findMissingValidationCategories(n,t);a.length>0&&(this.buildState.set(i,{completed:!1,options:{validation:{categories:a}},result:this.buildState.get(i)?.result}),n.state=Jr.IndexedReferences)}}else this.buildState.delete(i)}this.currentState=Jr.Changed,await this.emitUpdate(e.map(n=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=Jn.CancellationToken.None){this.currentState=Jr.Changed;let n=[];for(let o of t){let l=this.langiumDocuments.deleteDocuments(o);for(let u of l)n.push(u.uri),this.cleanUpDeleted(u)}let i=(await Promise.all(e.map(o=>this.findChangedUris(o)))).flat();for(let o of i){let l=this.langiumDocuments.getDocument(o);l===void 0&&(l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),l.state=Jr.Changed,this.langiumDocuments.addDocument(l)),this.resetToState(l,Jr.Changed)}let a=zn(i).concat(n).map(o=>o.toString()).toSet();this.langiumDocuments.all.filter(o=>!a.has(o.uri.toString())&&this.shouldRelink(o,a)).forEach(o=>this.resetToState(o,Jr.ComputedScopes)),await this.emitUpdate(i,n),await Fa(r);let s=this.sortDocuments(this.langiumDocuments.all.filter(o=>o.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set,a=t===void 0||t.validation===!0?n:typeof t.validation=="object"?t.validation.categories??n:[];return zn(a).filter(s=>!i.has(s)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t=0&&!this.hasTextDocument(e[r]);)r--;tr.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),mm.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Jr.Changed:case Jr.Parsed:this.indexManager.removeContent(e.uri);case Jr.IndexedContent:e.localSymbols=void 0;case Jr.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Jr.Linked:this.indexManager.removeReferences(e.uri);case Jr.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Jr.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Jr.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Jr.Parsed,r,a=>this.langiumDocumentFactory.update(a,r)),await this.runCancelable(e,Jr.IndexedContent,r,a=>this.indexManager.updateContent(a,r)),await this.runCancelable(e,Jr.ComputedScopes,r,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.localSymbols=await s.collectLocalSymbols(a,r)});let n=e.filter(a=>this.shouldLink(a));await this.runCancelable(n,Jr.Linked,r,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,r)),await this.runCancelable(n,Jr.IndexedReferences,r,a=>this.indexManager.updateReferences(a,r));let i=e.filter(a=>this.shouldValidate(a)?!0:(this.markAsCompleted(a),!1));await this.runCancelable(i,Jr.Validated,r,async a=>{await this.validate(a,r),this.markAsCompleted(a)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let r of e){let n=r.uri.toString(),i=this.buildState.get(n);(!i||i.completed)&&this.buildState.set(n,{completed:!1,options:t,result:i?.result})}}async runCancelable(e,t,r,n){for(let a of e)a.statea.state===t);await this.notifyBuildPhase(i,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),mm.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),mm.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=Jn.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let n=this.langiumDocuments.getDocument(t);if(n){if(n.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(Zu);if(this.currentState>=e&&e>n.state)return Promise.reject(new UA.ResponseError(UA.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Jr[n.state]}, requiring ${Jr[e]}, but workspace state is already ${Jr[this.currentState]}. Returning undefined.`))}else return Promise.reject(new UA.ResponseError(UA.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((i,a)=>{let s=this.onDocumentPhase(e,l=>{Xs.equals(l.uri,t)&&(s.dispose(),o.dispose(),i(l.uri))}),o=r.onCancellationRequested(()=>{s.dispose(),o.dispose(),a(Zu)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Zu):new Promise((r,n)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),r()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),n(Zu)})})}async notifyDocumentPhase(e,t,r){let i=this.documentPhaseListeners.get(t).slice();for(let a of i)try{await Fa(r),await a(e,r)}catch(s){if(!Gm(s))throw s}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let i=this.buildPhaseListeners.get(t).slice();for(let a of i)await Fa(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),i=typeof n.validation=="object"?{...n.validation}:{};i.categories=this.findMissingValidationCategories(e,n);let a=await r.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=zn(s.result.validationChecks).concat(i.categories).distinct().toArray():s.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},b7e=class{static{A(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new AR,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=Cc(e).uri,n=[];return this.referenceIndex.forEach(i=>{i.forEach(a=>{Xs.equals(a.targetUri,r)&&a.targetPath===t&&n.push(a)})}),zn(n)}allElements(e,t){let r=zn(this.symbolIndex.keys());return t&&(r=r.filter(n=>!t||t.has(n))),r.map(n=>this.getFileDescriptions(n,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(i=>this.astReflection.isSubtype(i.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Jn.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,n),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Jn.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());return r?r.some(n=>!n.local&&t.has(n.targetUri.toString())):!1}},T7e=class{static{A(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new wf,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(e,t=Jn.CancellationToken.None){let r=await this.performStartup(e);await Fa(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=A(a=>{t.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)},"collector");await this.loadAdditionalDocuments(e,r);let n=[];await Promise.all(e.map(a=>this.getRootFolder(a)).map(async a=>this.traverseFolder(a,n)));let i=zn(n).distinct(a=>a.toString()).filter(a=>!this.langiumDocuments.hasDocument(a));return await this.loadWorkspaceDocuments(i,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async r=>{let n=await this.langiumDocuments.getOrCreateDocument(r);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return ll.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async n=>{this.shouldIncludeEntry(n)&&(n.isDirectory?await this.traverseFolder(n.uri,t):n.isFile&&t.push(n.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=Xs.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},w7e=class{static{A(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return RG.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return RG.buildUnableToPopLexerModeMessage(e)}},kU={mode:"full"},SU=class{static{A(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let r=x6(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new js(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=kU){let r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(x6(e))return e;let t=LR(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};A(RR,"isTokenTypeArray");A(LR,"isIMultiModeLexerDefinition");A(x6,"isTokenTypeDictionary");bC();A(EU,"parseJSDoc");A(AU,"isJSDoc");A(_U,"getLines");bCe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,owt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;A(C7e,"tokenize");A(k7e,"buildInlineTokens");lwt=/\S/,cwt=/\s*$/;A(b6,"skipWhitespace");A(S7e,"lastCharacter");A(E7e,"parseJSDocComment");A(A7e,"parseJSDocElement");A(_7e,"appendEmptyLine");A(RU,"parseJSDocText");A(R7e,"parseJSDocInline");A(LU,"parseJSDocTag");A(IU,"parseJSDocLine");A(IR,"normalizeOptions");A(k_,"normalizeOption");TCe=class{static{A(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let t of this.elements)if(e.length===0)e=t.toString();else{let r=t.toString();e+=QG(e)+r}return e.trim()}toMarkdown(e){let t="";for(let r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{let n=r.toMarkdown(e);t+=QG(t)+n}return t.trim()}},az=class{static{A(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let i=L7e(this.name,t,e??{});if(typeof i=="string")return i}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let n=`${r}@${this.name}${r}`;return this.content.inlines.length===1?n=`${n} \u2014 ${t}`:this.content.inlines.length>1&&(n=`${n} +${t}`),this.inline?`{${n}}`:n}};A(L7e,"renderInlineTag");A(I7e,"renderLinkDefault");ZG=class{static{A(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let t="";for(let r=0;rn.range.start.line&&(t+=` +`)}return t}},M7e=class{static{A(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};A(QG,"fillNewlines");D7e=class{static{A(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&AU(t))return EU(t).toMarkdown({renderLink:A((n,i)=>this.documentationLinkRenderer(e,n,i),"renderLink"),renderTag:A(n=>this.documentationTagRenderer(e,n),"renderTag")})}documentationLinkRenderer(e,t,r){let n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){let i=n.nameSegment.range.start.line+1,a=n.nameSegment.range.start.character+1,s=n.documentUri.with({fragment:`L${i},${a}`});return`[${r}](${s.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=Cc(e).localSymbols;if(!n)return;let i=e;do{let s=n.getStream(i).find(o=>o.name===t);if(s)return s;i=i.$container}while(i)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(n=>n.name===t)}},N7e=class{static{A(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return TU(e)?e.$comment:RV(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},O7e=class{static{A(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},uwt=class{static{A(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new wf,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(s=>{let o=this.hydrator.hydrate(s);n.resolve(o)}).catch(s=>{n.reject(s)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let r of this.workerPool)if(r.ready)return r.lock(),r;let t=new wf;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(Zu)}),this.queue.push(t),t.promise}},hwt=class{static{A(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new _R.Emitter,this.deferred=new wf,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(i=>{let a=i;this.deferred.resolve(a),this.unlock()}),r(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(Zu),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new wf,this.sendMessage(e),this.deferred.promise}},P7e=class{static{A(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Jn.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=SR();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Jn.CancellationToken.None){let n=new wf,i={action:t,deferred:n,cancellationToken:r};return e.push(i),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:n})=>{try{let i=await Promise.resolve().then(()=>t(n));r.resolve(i)}catch(i){Gm(i)?r.resolve(void 0):r.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},B7e=class{static{A(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new y6,this.tokenTypeIdMap=new y6,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(t=>({...t,message:t.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,r=new Map;for(let n of kc(e))t.set(n,{});if(e.$cstNode)for(let n of Uv(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){let a=[];r[n]=a;for(let s of i)sa(s)?a.push(this.dehydrateAstNode(s,t)):Ys(s)?a.push(this.dehydrateReference(s,t)):a.push(s)}else sa(i)?r[n]=this.dehydrateAstNode(i,t):Ys(i)?r[n]=this.dehydrateReference(i,t):i!==void 0&&(r[n]=i);return r}dehydrateReference(e,t){let r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){let r=t.cstNodes.get(e);return S6(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),pf(e)?r.content=e.content.map(n=>this.dehydrateCstNode(n,t)):wm(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){let t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){let t=new Map,r=new Map;for(let i of kc(e))t.set(i,{});let n;if(e.$cstNode)for(let i of Uv(e.$cstNode)){let a;"fullText"in i?(a=new aU(i.fullText),n=a):"content"in i?a=new bR:"tokenType"in i&&(a=this.hydrateCstLeafNode(i)),a&&(r.set(i,a),a.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(let[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){let a=[];r[n]=a;for(let s of i)sa(s)?a.push(this.setParent(this.hydrateAstNode(s,t),r)):Ys(s)?a.push(this.hydrateReference(s,r,n,t)):a.push(s)}else sa(i)?r[n]=this.setParent(this.hydrateAstNode(i,t),r):Ys(i)?r[n]=this.hydrateReference(i,r,n,t):i!==void 0&&(r[n]=i);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let n=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),pf(n))for(let i of e.content){let a=this.hydrateCstNode(i,t,r++);n.content.push(a)}return n}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,i=e.startLine,a=e.startColumn,s=e.endLine,o=e.endColumn,l=e.hidden;return new f6(r,n,{start:{line:i,character:a},end:{line:s,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of kc(this.grammar))E6(t)&&this.grammarElementIdMap.set(t,e++)}};A(gn,"createDefaultCoreModule");A(mn,"createDefaultSharedCoreModule");(function(e){e.merge=(t,r)=>Kv(Kv({},t),r)})(JG||(JG={}));A(Pr,"inject");$7e=Symbol("isProxy");A(MU,"eagerLoad");A(DU,"_inject");wCe=Symbol();A(eq,"_resolve");A(Kv,"_merge");tq={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(pm||(pm={}));F7e=class extends CR{static{A(this,"IndentationAwareTokenBuilder")}constructor(e=tq){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...tq,...e},this.indentTokenType=$v({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=$v({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!RR(r))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,u,h=[];for(let f of r){for(let[d,p]of s)f.name===d?f.PUSH_MODE=pm.IGNORE_INDENTATION:f.name===p&&(f.POP_MODE=!0);f.name===i?o=f:f.name===n?l=f:f.name===a?u=f:h.push(f)}if(!o||!l||!u)throw new Error("Some indentation/whitespace tokens not found!");return s.length>0?{modes:{[pm.REGULAR]:[o,l,...h,u],[pm.IGNORE_INDENTATION]:[...h,u]},defaultMode:pm.REGULAR}:[o,l,u,...h]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r +`.includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;let i=this.whitespaceRegExp.exec(e);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,r,n){let i=this.getLineNumber(t,n);return BC(e,r,n,n+r.length,i,i,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,n);return i<=a?null:(this.indentationStack.push(i),s)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,n);if(i>=a)return null;let o=this.indentationStack.lastIndexOf(i);if(o===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:s?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let l=this.indentationStack.length-o-1,u=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let h=0;h1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},fwt=class extends SU{static{A(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof F7e)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=kU){let r=super.tokenize(e),n=r.report;t?.mode==="full"&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];let{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,s=i.tokenTypeIdx,o=a.tokenTypeIdx,l=[],u=r.tokens.length-1;for(let h=0;h=0&&l.push(r.tokens[u]),r.tokens=l,r}},NU={};$p(NU,{AstUtils:()=>nV,BiMap:()=>y6,Cancellation:()=>Jn,ContextCache:()=>AR,CstUtils:()=>eV,DONE_RESULT:()=>Hs,Deferred:()=>wf,Disposable:()=>mm,DisposableCache:()=>ER,DocumentCache:()=>l7e,EMPTY_STREAM:()=>zv,ErrorWithLocation:()=>D6,GrammarUtils:()=>DV,MultiMap:()=>Cf,OperationCancelled:()=>Zu,Reduction:()=>nC,RegExpUtils:()=>OV,SimpleCache:()=>xU,StreamImpl:()=>Ku,TreeStreamImpl:()=>Gv,URI:()=>ll,UriTrie:()=>yU,UriUtils:()=>Xs,WorkspaceCache:()=>bU,assertCondition:()=>NV,assertUnreachable:()=>Fp,delayNextTick:()=>kR,interruptAndCheck:()=>Fa,isOperationCancelled:()=>Gm,loadGrammarFromJson:()=>za,setInterruptionPeriod:()=>pU,startCancelableOperation:()=>SR,stream:()=>zn});w6(NU,_R);z7e=class{static{A(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},wn={fileSystemProvider:A(()=>new z7e,"fileSystemProvider")},dwt={Grammar:A(()=>{},"Grammar"),LanguageMetaData:A(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},pwt={AstReflection:A(()=>new kV,"AstReflection")};A(G7e,"createMinimalGrammarServices");A(za,"loadGrammarFromJson");w6(ZCe,NU);gwt=class{static{A(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Cf}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new q7e(r=>this.records.add(e,this.dumpRecord(e,r)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let r=[];for(let a of t.entries.keys()){let s=t.entries.get(a),o=s.reduce((l,u)=>l+u);r.push({name:`${t.identifier}.${a}`,count:s.length,duration:o})}let n=t.duration-r.map(a=>a.duration).reduce((a,s)=>a+s,0);r.push({name:t.identifier,count:1,duration:n}),r.sort((a,s)=>s.duration-a.duration);function i(a){return Math.round(100*a)/100}return A(i,"Round"),console.table(r.map(a=>({Element:a.name,Count:a.count,"Self %":i(100*a.duration/t.duration),"Time (ms)":i(a.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(r=>r===t[0])).flatMap(t=>t[1])}},q7e=class{static{A(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Cf,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(t=>t.id).join(", ")}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);let r=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=r);let n=r-t.content;this.entries.add(e,n)}};(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/}})(rq||(rq={}));(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(nq||(nq={}));(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(iq||(iq={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(aq||(aq={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(sq||(sq={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(oq||(oq={}));(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(lq||(lq={}));(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(cq||(cq={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(uq||(uq={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(hq||(hq={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(fq||(fq={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(dq||(dq={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(pq||(pq={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(gq||(gq={}));(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(mq||(mq={}));g0r={...rq.Terminals,...nq.Terminals,...iq.Terminals,...aq.Terminals,...sq.Terminals,...oq.Terminals,...lq.Terminals,...cq.Terminals,...uq.Terminals,...hq.Terminals,...fq.Terminals,...dq.Terminals,...gq.Terminals,...pq.Terminals,...mq.Terminals},yq={$type:"AbnfAlternation",alternatives:"alternatives"},vq={$type:"AbnfConcatenation",elements:"elements"},S_={$type:"AbnfElement",primary:"primary",repeat:"repeat"},xq={$type:"AbnfGroup",element:"element"},bq={$type:"AbnfNumVal",value:"value"},Tq={$type:"AbnfOptionalGroup",element:"element"},zg={$type:"AbnfPrimary"},E_={$type:"AbnfRule",definition:"definition",name:"name"},wq={$type:"AbnfRuleName",name:"name"},Cq={$type:"AbnfStringLiteral",value:"value"},HA={$type:"Accelerator",name:"name",x:"x",y:"y"},sz={$type:"Alignment",direction:"direction",members:"members"},YA={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},Tw={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},oz={$type:"Annotations",x:"x",y:"y"},bc={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};A(V7e,"isArchitecture");XA={$type:"Axis",label:"label",name:"name"},Jw={$type:"Branch",name:"name",order:"order"};A(W7e,"isBranch");CCe={$type:"Checkout",branch:"branch"},jA={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},lz={$type:"ClassDefStatement",className:"className",styleText:"styleText"},rm={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};A(U7e,"isCommit");KA={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Mg={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},ZA={$type:"Curve",entries:"entries",label:"label",name:"name"},Lp={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};A(H7e,"isCynefin");QA={$type:"Deaccelerator",name:"name",x:"x",y:"y"},kCe={$type:"Decorator",strategy:"strategy"},gv={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},eC={$type:"DomainBlock",domain:"domain",items:"items"};A(Y7e,"isDomainBlock");T6={$type:"DomainItem",label:"label"};A(X7e,"isDomainItem");kq={$type:"EbnfChoice",alternatives:"alternatives"},Sq={$type:"EbnfExceptionPostfix",except:"except"},Eq={$type:"EbnfGroup",element:"element"},Aq={$type:"EbnfNonTerminal",name:"name"},_q={$type:"EbnfOneOrMorePostfix",operator:"operator"},Rq={$type:"EbnfOptional",element:"element"},Lq={$type:"EbnfOptionalPostfix",operator:"operator"},Cv={$type:"EbnfPostfix"},wp={$type:"EbnfPrimary"},Iq={$type:"EbnfRepetition",element:"element"},A_={$type:"EbnfRule",definition:"definition",name:"name"},Mq={$type:"EbnfSequence",elements:"elements"},Dq={$type:"EbnfSpecial",text:"text"},__={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},Nq={$type:"EbnfTerminal",value:"value"},Oq={$type:"EbnfZeroOrMorePostfix",operator:"operator"},Vu={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Gg={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Cp={$type:"EmFrame"},ww={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},SCe={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},cz={$type:"EmModelEntity",name:"name"};A(j7e,"isEmModelEntityType");JA={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},uf={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};A(MR,"isEmResetFrame");Tp={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},uz={$type:"Entry",axis:"axis",value:"value"},Uu={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},ECe={$type:"Evolution",stages:"stages"},e_={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},hz={$type:"Evolve",component:"component",target:"target"},Ip={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};A(K7e,"isGitGraph");Cw={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Nv={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};A(Z7e,"isInfo");kw={$type:"Item",classSelector:"classSelector",name:"name"},fz={$type:"Junction",id:"id",in:"in"},Sw={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},t_={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},Dg={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},nm={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};A(Q7e,"isMerge");r_={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},dz={$type:"Option",name:"name",value:"value"},im={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};A(J7e,"isPacket");am={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};A(eLe,"isPacketBlock");Pq={$type:"PegAny",dot:"dot"},Bq={$type:"PegGroup",element:"element"},$q={$type:"PegIdentifier",name:"name"},Fq={$type:"PegLiteral",value:"value"},zq={$type:"PegOrderedChoice",alternatives:"alternatives"},R_={$type:"PegPrefix",operator:"operator",suffix:"suffix"},kv={$type:"PegPrimary"},L_={$type:"PegRule",definition:"definition",name:"name"},Gq={$type:"PegSequence",elements:"elements"},I_={$type:"PegSuffix",operator:"operator",primary:"primary"},Mp={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};A(tLe,"isPie");tC={$type:"PieSection",label:"label",value:"value"};A(rLe,"isPieSection");pz={$type:"Pipeline",components:"components",parent:"parent"},n_={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},kp={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},sm={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};A(nLe,"isRailroad");om={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};A(iLe,"isRailroadAbnf");qq={$type:"RailroadChoiceExpr",alternatives:"alternatives"},lm={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};A(aLe,"isRailroadEbnf");Hu={$type:"RailroadExpression"},Vq={$type:"RailroadNonTerminalExpr",name:"name"},Wq={$type:"RailroadOneOrMoreExpr",element:"element"},Uq={$type:"RailroadOptionalExpr",element:"element"},cm={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};A(sLe,"isRailroadPeg");M_={$type:"RailroadRule",definition:"definition",name:"name"},Hq={$type:"RailroadSequenceExpr",elements:"elements"},Yq={$type:"RailroadSpecialExpr",text:"text"},Xq={$type:"RailroadTerminalExpr",value:"value"},jq={$type:"RailroadZeroOrMoreExpr",element:"element"},gz={$type:"Section",classSelector:"classSelector",name:"name"},mv={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},mz={$type:"Size",height:"height",width:"width"},qg={$type:"Statement"},Ov={$type:"Transition",from:"from",label:"label",to:"to"};A(oLe,"isTransition");um={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};A(lLe,"isTreemap");yz={$type:"TreemapRow",indent:"indent",item:"item"},Vg={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},Sv={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Ba={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};A(cLe,"isWardley");uLe=class extends rV{constructor(){super(...arguments),this.types={AbnfAlternation:{name:yq.$type,properties:{alternatives:{name:yq.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:vq.$type,properties:{elements:{name:vq.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:S_.$type,properties:{primary:{name:S_.primary},repeat:{name:S_.repeat}},superTypes:[]},AbnfGroup:{name:xq.$type,properties:{element:{name:xq.element}},superTypes:[zg.$type]},AbnfNumVal:{name:bq.$type,properties:{value:{name:bq.value}},superTypes:[zg.$type]},AbnfOptionalGroup:{name:Tq.$type,properties:{element:{name:Tq.element}},superTypes:[zg.$type]},AbnfPrimary:{name:zg.$type,properties:{},superTypes:[]},AbnfRule:{name:E_.$type,properties:{definition:{name:E_.definition},name:{name:E_.name}},superTypes:[]},AbnfRuleName:{name:wq.$type,properties:{name:{name:wq.name}},superTypes:[zg.$type]},AbnfStringLiteral:{name:Cq.$type,properties:{value:{name:Cq.value}},superTypes:[zg.$type]},Accelerator:{name:HA.$type,properties:{name:{name:HA.name},x:{name:HA.x},y:{name:HA.y}},superTypes:[]},Alignment:{name:sz.$type,properties:{direction:{name:sz.direction},members:{name:sz.members,defaultValue:[]}},superTypes:[]},Anchor:{name:YA.$type,properties:{evolution:{name:YA.evolution},name:{name:YA.name},visibility:{name:YA.visibility}},superTypes:[]},Annotation:{name:Tw.$type,properties:{number:{name:Tw.number},text:{name:Tw.text},x:{name:Tw.x},y:{name:Tw.y}},superTypes:[]},Annotations:{name:oz.$type,properties:{x:{name:oz.x},y:{name:oz.y}},superTypes:[]},Architecture:{name:bc.$type,properties:{accDescr:{name:bc.accDescr},accTitle:{name:bc.accTitle},alignments:{name:bc.alignments,defaultValue:[]},edges:{name:bc.edges,defaultValue:[]},groups:{name:bc.groups,defaultValue:[]},junctions:{name:bc.junctions,defaultValue:[]},services:{name:bc.services,defaultValue:[]},title:{name:bc.title}},superTypes:[]},Axis:{name:XA.$type,properties:{label:{name:XA.label},name:{name:XA.name}},superTypes:[]},Branch:{name:Jw.$type,properties:{name:{name:Jw.name},order:{name:Jw.order}},superTypes:[qg.$type]},Checkout:{name:CCe.$type,properties:{branch:{name:CCe.branch}},superTypes:[qg.$type]},CherryPicking:{name:jA.$type,properties:{id:{name:jA.id},parent:{name:jA.parent},tags:{name:jA.tags,defaultValue:[]}},superTypes:[qg.$type]},ClassDefStatement:{name:lz.$type,properties:{className:{name:lz.className},styleText:{name:lz.styleText}},superTypes:[]},Commit:{name:rm.$type,properties:{id:{name:rm.id},message:{name:rm.message},tags:{name:rm.tags,defaultValue:[]},type:{name:rm.type}},superTypes:[qg.$type]},Common:{name:KA.$type,properties:{accDescr:{name:KA.accDescr},accTitle:{name:KA.accTitle},title:{name:KA.title}},superTypes:[]},Component:{name:Mg.$type,properties:{decorator:{name:Mg.decorator},evolution:{name:Mg.evolution},inertia:{name:Mg.inertia,defaultValue:!1},label:{name:Mg.label},name:{name:Mg.name},visibility:{name:Mg.visibility}},superTypes:[]},Curve:{name:ZA.$type,properties:{entries:{name:ZA.entries,defaultValue:[]},label:{name:ZA.label},name:{name:ZA.name}},superTypes:[]},Cynefin:{name:Lp.$type,properties:{accDescr:{name:Lp.accDescr},accTitle:{name:Lp.accTitle},domains:{name:Lp.domains,defaultValue:[]},title:{name:Lp.title},transitions:{name:Lp.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:QA.$type,properties:{name:{name:QA.name},x:{name:QA.x},y:{name:QA.y}},superTypes:[]},Decorator:{name:kCe.$type,properties:{strategy:{name:kCe.strategy}},superTypes:[]},Direction:{name:gv.$type,properties:{accDescr:{name:gv.accDescr},accTitle:{name:gv.accTitle},dir:{name:gv.dir},statements:{name:gv.statements,defaultValue:[]},title:{name:gv.title}},superTypes:[Ip.$type]},DomainBlock:{name:eC.$type,properties:{domain:{name:eC.domain},items:{name:eC.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:T6.$type,properties:{label:{name:T6.label}},superTypes:[]},EbnfChoice:{name:kq.$type,properties:{alternatives:{name:kq.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:Sq.$type,properties:{except:{name:Sq.except}},superTypes:[Cv.$type]},EbnfGroup:{name:Eq.$type,properties:{element:{name:Eq.element}},superTypes:[wp.$type]},EbnfNonTerminal:{name:Aq.$type,properties:{name:{name:Aq.name}},superTypes:[wp.$type]},EbnfOneOrMorePostfix:{name:_q.$type,properties:{operator:{name:_q.operator}},superTypes:[Cv.$type]},EbnfOptional:{name:Rq.$type,properties:{element:{name:Rq.element}},superTypes:[wp.$type]},EbnfOptionalPostfix:{name:Lq.$type,properties:{operator:{name:Lq.operator}},superTypes:[Cv.$type]},EbnfPostfix:{name:Cv.$type,properties:{},superTypes:[]},EbnfPrimary:{name:wp.$type,properties:{},superTypes:[]},EbnfRepetition:{name:Iq.$type,properties:{element:{name:Iq.element}},superTypes:[wp.$type]},EbnfRule:{name:A_.$type,properties:{definition:{name:A_.definition},name:{name:A_.name}},superTypes:[]},EbnfSequence:{name:Mq.$type,properties:{elements:{name:Mq.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:Dq.$type,properties:{text:{name:Dq.text}},superTypes:[wp.$type]},EbnfTerm:{name:__.$type,properties:{base:{name:__.base},postfixes:{name:__.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:Nq.$type,properties:{value:{name:Nq.value}},superTypes:[wp.$type]},EbnfZeroOrMorePostfix:{name:Oq.$type,properties:{operator:{name:Oq.operator}},superTypes:[Cv.$type]},Edge:{name:Vu.$type,properties:{lhsDir:{name:Vu.lhsDir},lhsGroup:{name:Vu.lhsGroup,defaultValue:!1},lhsId:{name:Vu.lhsId},lhsInto:{name:Vu.lhsInto,defaultValue:!1},rhsDir:{name:Vu.rhsDir},rhsGroup:{name:Vu.rhsGroup,defaultValue:!1},rhsId:{name:Vu.rhsId},rhsInto:{name:Vu.rhsInto,defaultValue:!1},title:{name:Vu.title}},superTypes:[]},EmDataEntity:{name:Gg.$type,properties:{dataBlockValue:{name:Gg.dataBlockValue},dataType:{name:Gg.dataType},name:{name:Gg.name}},superTypes:[]},EmFrame:{name:Cp.$type,properties:{},superTypes:[]},EmGwt:{name:ww.$type,properties:{givenStatements:{name:ww.givenStatements,defaultValue:[]},sourceFrame:{name:ww.sourceFrame,referenceType:Cp.$type},thenStatements:{name:ww.thenStatements,defaultValue:[]},whenStatements:{name:ww.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:SCe.$type,properties:{entityIdentifier:{name:SCe.entityIdentifier,referenceType:cz.$type}},superTypes:[]},EmModelEntity:{name:cz.$type,properties:{name:{name:cz.name}},superTypes:[]},EmNoteEntity:{name:JA.$type,properties:{dataBlockValue:{name:JA.dataBlockValue},dataType:{name:JA.dataType},sourceFrame:{name:JA.sourceFrame,referenceType:Cp.$type}},superTypes:[]},EmResetFrame:{name:uf.$type,properties:{dataInlineValue:{name:uf.dataInlineValue},dataReference:{name:uf.dataReference,referenceType:Gg.$type},dataType:{name:uf.dataType},entityIdentifier:{name:uf.entityIdentifier},modelEntityType:{name:uf.modelEntityType},name:{name:uf.name},sourceFrames:{name:uf.sourceFrames,defaultValue:[],referenceType:Cp.$type}},superTypes:[Cp.$type]},EmTimeFrame:{name:Tp.$type,properties:{dataInlineValue:{name:Tp.dataInlineValue},dataReference:{name:Tp.dataReference,referenceType:Gg.$type},dataType:{name:Tp.dataType},entityIdentifier:{name:Tp.entityIdentifier},modelEntityType:{name:Tp.modelEntityType},name:{name:Tp.name},sourceFrames:{name:Tp.sourceFrames,defaultValue:[],referenceType:Cp.$type}},superTypes:[Cp.$type]},Entry:{name:uz.$type,properties:{axis:{name:uz.axis,referenceType:XA.$type},value:{name:uz.value}},superTypes:[]},EventModel:{name:Uu.$type,properties:{accDescr:{name:Uu.accDescr},accTitle:{name:Uu.accTitle},dataEntities:{name:Uu.dataEntities,defaultValue:[]},frames:{name:Uu.frames,defaultValue:[]},gwtEntities:{name:Uu.gwtEntities,defaultValue:[]},modelEntities:{name:Uu.modelEntities,defaultValue:[]},noteEntities:{name:Uu.noteEntities,defaultValue:[]},title:{name:Uu.title}},superTypes:[]},Evolution:{name:ECe.$type,properties:{stages:{name:ECe.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:e_.$type,properties:{boundary:{name:e_.boundary},name:{name:e_.name},secondName:{name:e_.secondName}},superTypes:[]},Evolve:{name:hz.$type,properties:{component:{name:hz.component},target:{name:hz.target}},superTypes:[]},GitGraph:{name:Ip.$type,properties:{accDescr:{name:Ip.accDescr},accTitle:{name:Ip.accTitle},statements:{name:Ip.statements,defaultValue:[]},title:{name:Ip.title}},superTypes:[]},Group:{name:Cw.$type,properties:{icon:{name:Cw.icon},id:{name:Cw.id},in:{name:Cw.in},title:{name:Cw.title}},superTypes:[]},Info:{name:Nv.$type,properties:{accDescr:{name:Nv.accDescr},accTitle:{name:Nv.accTitle},title:{name:Nv.title}},superTypes:[]},Item:{name:kw.$type,properties:{classSelector:{name:kw.classSelector},name:{name:kw.name}},superTypes:[]},Junction:{name:fz.$type,properties:{id:{name:fz.id},in:{name:fz.in}},superTypes:[]},Label:{name:Sw.$type,properties:{negX:{name:Sw.negX,defaultValue:!1},negY:{name:Sw.negY,defaultValue:!1},offsetX:{name:Sw.offsetX},offsetY:{name:Sw.offsetY}},superTypes:[]},Leaf:{name:t_.$type,properties:{classSelector:{name:t_.classSelector},name:{name:t_.name},value:{name:t_.value}},superTypes:[kw.$type]},Link:{name:Dg.$type,properties:{arrow:{name:Dg.arrow},from:{name:Dg.from},fromPort:{name:Dg.fromPort},linkLabel:{name:Dg.linkLabel},to:{name:Dg.to},toPort:{name:Dg.toPort}},superTypes:[]},Merge:{name:nm.$type,properties:{branch:{name:nm.branch},id:{name:nm.id},tags:{name:nm.tags,defaultValue:[]},type:{name:nm.type}},superTypes:[qg.$type]},Note:{name:r_.$type,properties:{evolution:{name:r_.evolution},text:{name:r_.text},visibility:{name:r_.visibility}},superTypes:[]},Option:{name:dz.$type,properties:{name:{name:dz.name},value:{name:dz.value,defaultValue:!1}},superTypes:[]},Packet:{name:im.$type,properties:{accDescr:{name:im.accDescr},accTitle:{name:im.accTitle},blocks:{name:im.blocks,defaultValue:[]},title:{name:im.title}},superTypes:[]},PacketBlock:{name:am.$type,properties:{bits:{name:am.bits},end:{name:am.end},label:{name:am.label},start:{name:am.start}},superTypes:[]},PegAny:{name:Pq.$type,properties:{dot:{name:Pq.dot}},superTypes:[kv.$type]},PegGroup:{name:Bq.$type,properties:{element:{name:Bq.element}},superTypes:[kv.$type]},PegIdentifier:{name:$q.$type,properties:{name:{name:$q.name}},superTypes:[kv.$type]},PegLiteral:{name:Fq.$type,properties:{value:{name:Fq.value}},superTypes:[kv.$type]},PegOrderedChoice:{name:zq.$type,properties:{alternatives:{name:zq.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:R_.$type,properties:{operator:{name:R_.operator},suffix:{name:R_.suffix}},superTypes:[]},PegPrimary:{name:kv.$type,properties:{},superTypes:[]},PegRule:{name:L_.$type,properties:{definition:{name:L_.definition},name:{name:L_.name}},superTypes:[]},PegSequence:{name:Gq.$type,properties:{elements:{name:Gq.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:I_.$type,properties:{operator:{name:I_.operator},primary:{name:I_.primary}},superTypes:[]},Pie:{name:Mp.$type,properties:{accDescr:{name:Mp.accDescr},accTitle:{name:Mp.accTitle},sections:{name:Mp.sections,defaultValue:[]},showData:{name:Mp.showData,defaultValue:!1},title:{name:Mp.title}},superTypes:[]},PieSection:{name:tC.$type,properties:{label:{name:tC.label},value:{name:tC.value}},superTypes:[]},Pipeline:{name:pz.$type,properties:{components:{name:pz.components,defaultValue:[]},parent:{name:pz.parent}},superTypes:[]},PipelineComponent:{name:n_.$type,properties:{evolution:{name:n_.evolution},label:{name:n_.label},name:{name:n_.name}},superTypes:[]},Radar:{name:kp.$type,properties:{accDescr:{name:kp.accDescr},accTitle:{name:kp.accTitle},axes:{name:kp.axes,defaultValue:[]},curves:{name:kp.curves,defaultValue:[]},options:{name:kp.options,defaultValue:[]},title:{name:kp.title}},superTypes:[]},Railroad:{name:sm.$type,properties:{accDescr:{name:sm.accDescr},accTitle:{name:sm.accTitle},rules:{name:sm.rules,defaultValue:[]},title:{name:sm.title}},superTypes:[]},RailroadAbnf:{name:om.$type,properties:{accDescr:{name:om.accDescr},accTitle:{name:om.accTitle},rules:{name:om.rules,defaultValue:[]},title:{name:om.title}},superTypes:[]},RailroadChoiceExpr:{name:qq.$type,properties:{alternatives:{name:qq.alternatives,defaultValue:[]}},superTypes:[Hu.$type]},RailroadEbnf:{name:lm.$type,properties:{accDescr:{name:lm.accDescr},accTitle:{name:lm.accTitle},rules:{name:lm.rules,defaultValue:[]},title:{name:lm.title}},superTypes:[]},RailroadExpression:{name:Hu.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:Vq.$type,properties:{name:{name:Vq.name}},superTypes:[Hu.$type]},RailroadOneOrMoreExpr:{name:Wq.$type,properties:{element:{name:Wq.element}},superTypes:[Hu.$type]},RailroadOptionalExpr:{name:Uq.$type,properties:{element:{name:Uq.element}},superTypes:[Hu.$type]},RailroadPeg:{name:cm.$type,properties:{accDescr:{name:cm.accDescr},accTitle:{name:cm.accTitle},rules:{name:cm.rules,defaultValue:[]},title:{name:cm.title}},superTypes:[]},RailroadRule:{name:M_.$type,properties:{definition:{name:M_.definition},name:{name:M_.name}},superTypes:[]},RailroadSequenceExpr:{name:Hq.$type,properties:{elements:{name:Hq.elements,defaultValue:[]}},superTypes:[Hu.$type]},RailroadSpecialExpr:{name:Yq.$type,properties:{text:{name:Yq.text}},superTypes:[Hu.$type]},RailroadTerminalExpr:{name:Xq.$type,properties:{value:{name:Xq.value}},superTypes:[Hu.$type]},RailroadZeroOrMoreExpr:{name:jq.$type,properties:{element:{name:jq.element}},superTypes:[Hu.$type]},Section:{name:gz.$type,properties:{classSelector:{name:gz.classSelector},name:{name:gz.name}},superTypes:[kw.$type]},Service:{name:mv.$type,properties:{icon:{name:mv.icon},iconText:{name:mv.iconText},id:{name:mv.id},in:{name:mv.in},title:{name:mv.title}},superTypes:[]},Size:{name:mz.$type,properties:{height:{name:mz.height},width:{name:mz.width}},superTypes:[]},Statement:{name:qg.$type,properties:{},superTypes:[]},Transition:{name:Ov.$type,properties:{from:{name:Ov.from},label:{name:Ov.label},to:{name:Ov.to}},superTypes:[]},TreeNode:{name:Vg.$type,properties:{classAnnotation:{name:Vg.classAnnotation},descAnnotation:{name:Vg.descAnnotation},iconAnnotation:{name:Vg.iconAnnotation},indent:{name:Vg.indent},name:{name:Vg.name}},superTypes:[]},TreeView:{name:Sv.$type,properties:{accDescr:{name:Sv.accDescr},accTitle:{name:Sv.accTitle},nodes:{name:Sv.nodes,defaultValue:[]},title:{name:Sv.title}},superTypes:[]},Treemap:{name:um.$type,properties:{accDescr:{name:um.accDescr},accTitle:{name:um.accTitle},title:{name:um.title},TreemapRows:{name:um.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:yz.$type,properties:{indent:{name:yz.indent},item:{name:yz.item}},superTypes:[]},Wardley:{name:Ba.$type,properties:{accDescr:{name:Ba.accDescr},accelerators:{name:Ba.accelerators,defaultValue:[]},accTitle:{name:Ba.accTitle},anchors:{name:Ba.anchors,defaultValue:[]},annotation:{name:Ba.annotation,defaultValue:[]},annotations:{name:Ba.annotations,defaultValue:[]},components:{name:Ba.components,defaultValue:[]},deaccelerators:{name:Ba.deaccelerators,defaultValue:[]},evolution:{name:Ba.evolution},evolves:{name:Ba.evolves,defaultValue:[]},links:{name:Ba.links,defaultValue:[]},notes:{name:Ba.notes,defaultValue:[]},pipelines:{name:Ba.pipelines,defaultValue:[]},size:{name:Ba.size},title:{name:Ba.title}},superTypes:[]}}}static{A(this,"MermaidAstReflection")}},Xi=new uLe,mwt=A(()=>ACe??(ACe=za(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[^\\\\[\\\\]\\\\r\\\\n]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),ywt=A(()=>_Ce??(_Ce=za(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"CynefinGrammarGrammar"),vwt=A(()=>RCe??(RCe=za('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),xwt=A(()=>LCe??(LCe=za(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),bwt=A(()=>ICe??(ICe=za(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),Twt=A(()=>MCe??(MCe=za(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),wwt=A(()=>DCe??(DCe=za(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),Cwt=A(()=>NCe??(NCe=za(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),kwt=A(()=>OCe??(OCe=za('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar"),Swt=A(()=>PCe??(PCe=za(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadEbnfGrammarGrammar"),Ewt=A(()=>BCe??(BCe=za(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadGrammarGrammar"),Awt=A(()=>$Ce??($Ce=za(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadPegGrammarGrammar"),_wt=A(()=>FCe??(FCe=za(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),Rwt=A(()=>zCe??(zCe=za(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),Lwt=A(()=>GCe??(GCe=za(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),Iwt={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Mwt={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Dwt={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Nwt={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Owt={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Pwt={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Bwt={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$wt={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Fwt={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zwt={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Gwt={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},qwt={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Vwt={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wwt={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Uwt={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},In={AstReflection:A(()=>new uLe,"AstReflection")},OU={Grammar:A(()=>mwt(),"Grammar"),LanguageMetaData:A(()=>Iwt,"LanguageMetaData"),parser:{}},PU={Grammar:A(()=>ywt(),"Grammar"),LanguageMetaData:A(()=>Mwt,"LanguageMetaData"),parser:{}},BU={Grammar:A(()=>vwt(),"Grammar"),LanguageMetaData:A(()=>Dwt,"LanguageMetaData"),parser:{}},$U={Grammar:A(()=>xwt(),"Grammar"),LanguageMetaData:A(()=>Nwt,"LanguageMetaData"),parser:{}},FU={Grammar:A(()=>bwt(),"Grammar"),LanguageMetaData:A(()=>Owt,"LanguageMetaData"),parser:{}},zU={Grammar:A(()=>Twt(),"Grammar"),LanguageMetaData:A(()=>Pwt,"LanguageMetaData"),parser:{}},GU={Grammar:A(()=>wwt(),"Grammar"),LanguageMetaData:A(()=>Bwt,"LanguageMetaData"),parser:{}},qU={Grammar:A(()=>Cwt(),"Grammar"),LanguageMetaData:A(()=>$wt,"LanguageMetaData"),parser:{}},VU={Grammar:A(()=>kwt(),"Grammar"),LanguageMetaData:A(()=>Fwt,"LanguageMetaData"),parser:{}},WU={Grammar:A(()=>Swt(),"Grammar"),LanguageMetaData:A(()=>zwt,"LanguageMetaData"),parser:{}},UU={Grammar:A(()=>Ewt(),"Grammar"),LanguageMetaData:A(()=>Gwt,"LanguageMetaData"),parser:{}},HU={Grammar:A(()=>Awt(),"Grammar"),LanguageMetaData:A(()=>qwt,"LanguageMetaData"),parser:{}},YU={Grammar:A(()=>_wt(),"Grammar"),LanguageMetaData:A(()=>Vwt,"LanguageMetaData"),parser:{}},XU={Grammar:A(()=>Rwt(),"Grammar"),LanguageMetaData:A(()=>Wwt,"LanguageMetaData"),parser:{}},jU={Grammar:A(()=>Lwt(),"Grammar"),LanguageMetaData:A(()=>Uwt,"LanguageMetaData"),parser:{}},Hwt=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Ywt=/accTitle[\t ]*:([^\n\r]*)/,Xwt=/title([\t ][^\n\r]*|)/,jwt={ACC_DESCR:Hwt,ACC_TITLE:Ywt,TITLE:Xwt},oa=class extends dU{static{A(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return n===void 0&&(n=this.runCustomConverter(e,t,r)),n===void 0?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){let n=jwt[e.name];if(n===void 0)return;let i=n.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},pl=class extends oa{static{A(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},On=class extends CR{static{A(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},Kwt=class extends On{static{A(this,"CommonTokenBuilder")}};});function NR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),qU,DR);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var Zwt,DR,KU=X(()=>{Cn();Zwt=class extends On{static{A(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},DR={parser:{TokenBuilder:A(()=>new Zwt,"TokenBuilder"),ValueConverter:A(()=>new pl,"ValueConverter")}};A(NR,"createRadarServices")});function ox(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),UU,OR);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}var Qwt,hLe,Jwt,OR,ZU=X(()=>{Cn();Qwt=class extends On{static{A(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},hLe=A(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew Qwt,"TokenBuilder"),ValueConverter:A(()=>new Jwt,"ValueConverter")}};A(ox,"createRailroadServices")});function lx(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),WU,PR);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}var eCt,fLe,tCt,PR,QU=X(()=>{Cn();eCt=class extends On{static{A(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},fLe=A(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew eCt,"TokenBuilder"),ValueConverter:A(()=>new tCt,"ValueConverter")}};A(lx,"createRailroadEbnfServices")});function cx(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),VU,BR);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}var rCt,nCt,BR,JU=X(()=>{Cn();rCt=class extends On{static{A(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},nCt=class extends oa{static{A(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){let i=n.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1)}return n}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1)}},BR={parser:{TokenBuilder:A(()=>new rCt,"TokenBuilder"),ValueConverter:A(()=>new nCt,"ValueConverter")}};A(cx,"createRailroadAbnfServices")});function ux(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),HU,$R);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}var iCt,dLe,aCt,$R,eH=X(()=>{Cn();iCt=class extends On{static{A(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},dLe=A(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew iCt,"TokenBuilder"),ValueConverter:A(()=>new aCt,"ValueConverter")}};A(ux,"createRailroadPegServices")});function pLe(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}function zR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),YU,FR);return t.ServiceRegistry.register(r),pLe(r),{shared:t,Treemap:r}}var sCt,oCt,lCt,cCt,FR,tH=X(()=>{Cn();sCt=class extends On{static{A(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},oCt=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,lCt=class extends oa{static{A(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR")return t.substring(1,t.length-1);if(e.name==="STRING2")return t.substring(1,t.length-1);if(e.name==="INDENTATION")return t.length;if(e.name==="ClassDef"){if(typeof t!="string")return t;let n=oCt.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}}};A(pLe,"registerValidationChecks");cCt=class{static{A(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows)n.item&&(r===void 0&&n.indent===void 0?r=0:n.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}):r!==void 0&&r>=parseInt(n.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},FR={parser:{TokenBuilder:A(()=>new sCt,"TokenBuilder"),ValueConverter:A(()=>new lCt,"ValueConverter")},validation:{TreemapValidator:A(()=>new cCt,"TreemapValidator")}};A(zR,"createTreemapServices")});function qR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),jU,GR);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}var uCt,GR,rH=X(()=>{Cn();uCt=class extends oa{static{A(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if(e.name.toUpperCase()==="LINK_LABEL")return t.substring(1).trim()}},GR={parser:{ValueConverter:A(()=>new uCt,"ValueConverter")}};A(qR,"createWardleyServices")});function WR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),PU,VR);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}var hCt,VR,nH=X(()=>{Cn();hCt=class extends On{static{A(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},VR={parser:{TokenBuilder:A(()=>new hCt,"TokenBuilder"),ValueConverter:A(()=>new pl,"ValueConverter")}};A(WR,"createCynefinServices")});function HR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),$U,UR);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var fCt,UR,iH=X(()=>{Cn();fCt=class extends On{static{A(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},UR={parser:{TokenBuilder:A(()=>new fCt,"TokenBuilder"),ValueConverter:A(()=>new pl,"ValueConverter")}};A(HR,"createGitGraphServices")});function XR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),FU,YR);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var dCt,YR,aH=X(()=>{Cn();dCt=class extends On{static{A(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},YR={parser:{TokenBuilder:A(()=>new dCt,"TokenBuilder"),ValueConverter:A(()=>new pl,"ValueConverter")}};A(XR,"createInfoServices")});function KR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),zU,jR);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var pCt,jR,sH=X(()=>{Cn();pCt=class extends On{static{A(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},jR={parser:{TokenBuilder:A(()=>new pCt,"TokenBuilder"),ValueConverter:A(()=>new pl,"ValueConverter")}};A(KR,"createPacketServices")});function QR(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),GU,ZR);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var gCt,mCt,ZR,oH=X(()=>{Cn();gCt=class extends On{static{A(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},mCt=class extends oa{static{A(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},ZR={parser:{TokenBuilder:A(()=>new gCt,"TokenBuilder"),ValueConverter:A(()=>new mCt,"ValueConverter")}};A(QR,"createPieServices")});function e7(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),XU,JR);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}var yCt,vCt,JR,lH=X(()=>{Cn();yCt=class extends oa{static{A(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim()}},vCt=class extends On{static{A(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},JR={parser:{TokenBuilder:A(()=>new vCt,"TokenBuilder"),ValueConverter:A(()=>new yCt,"ValueConverter")}};A(e7,"createTreeViewServices")});function r7(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),OU,t7);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var xCt,bCt,t7,cH=X(()=>{Cn();xCt=class extends On{static{A(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},bCt=class extends oa{static{A(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();return(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'")),n.trim()}}},t7={parser:{TokenBuilder:A(()=>new xCt,"TokenBuilder"),ValueConverter:A(()=>new bCt,"ValueConverter")}};A(r7,"createArchitectureServices")});function xLe(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}function i7(e=wn){let t=Pr(mn(e),In),r=Pr(gn({shared:t}),BU,n7);return t.ServiceRegistry.register(r),xLe(r),{shared:t,EventModel:r}}var TCt,gLe,mLe,uH,yLe,vLe,wCt,n7,hH=X(()=>{Cn();TCt=class extends On{static{A(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},gLe=new Set(["cmd","command"]),mLe=new Set(["evt","event"]),uH=new Set(["rmo","readmodel"]),yLe=new Set(["pcr","processor"]),vLe=new Set(["ui"]);A(xLe,"registerValidationChecks");wCt=class{static{A(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(gLe.has(e.modelEntityType)?this.validateSources(e,new Set([...vLe,...yLe]),"command","ui or processor",t):mLe.has(e.modelEntityType)?this.validateSources(e,gLe,"event","command",t):uH.has(e.modelEntityType)?this.validateSources(e,mLe,"read model","event",t):yLe.has(e.modelEntityType)?this.validateSources(e,uH,"processor","read model",t):vLe.has(e.modelEntityType)&&this.validateSources(e,uH,"ui","read model",t))}validateSources(e,t,r,n,i){for(let a of e.sourceFrames){let s=a.ref;s!==void 0&&!t.has(s.modelEntityType)&&i("error",`A ${r} can only receive input from a ${n}, not from '${s.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},n7={parser:{TokenBuilder:A(()=>new TCt,"TokenBuilder"),ValueConverter:A(()=>new pl,"ValueConverter")},validation:{EventModelingValidator:A(()=>new wCt,"EventModelingValidator")}};A(i7,"createEventModelingServices")});var bLe={};cr(bLe,{InfoModule:()=>YR,createInfoServices:()=>XR});var TLe=X(()=>{aH();Cn()});var wLe={};cr(wLe,{PacketModule:()=>jR,createPacketServices:()=>KR});var CLe=X(()=>{sH();Cn()});var kLe={};cr(kLe,{PieModule:()=>ZR,createPieServices:()=>QR});var SLe=X(()=>{oH();Cn()});var ELe={};cr(ELe,{TreeViewModule:()=>JR,createTreeViewServices:()=>e7});var ALe=X(()=>{lH();Cn()});var _Le={};cr(_Le,{ArchitectureModule:()=>t7,createArchitectureServices:()=>r7});var RLe=X(()=>{cH();Cn()});var LLe={};cr(LLe,{GitGraphModule:()=>UR,createGitGraphServices:()=>HR});var ILe=X(()=>{iH();Cn()});var MLe={};cr(MLe,{EventModelingModule:()=>n7,createEventModelingServices:()=>i7});var DLe=X(()=>{hH();Cn()});var NLe={};cr(NLe,{RadarModule:()=>DR,createRadarServices:()=>NR});var OLe=X(()=>{KU();Cn()});var PLe={};cr(PLe,{RailroadModule:()=>OR,createRailroadServices:()=>ox});var BLe=X(()=>{ZU();Cn()});var $Le={};cr($Le,{RailroadEbnfModule:()=>PR,createRailroadEbnfServices:()=>lx});var FLe=X(()=>{QU();Cn()});var zLe={};cr(zLe,{RailroadAbnfModule:()=>BR,createRailroadAbnfServices:()=>cx});var GLe=X(()=>{JU();Cn()});var qLe={};cr(qLe,{RailroadPegModule:()=>$R,createRailroadPegServices:()=>ux});var VLe=X(()=>{eH();Cn()});var WLe={};cr(WLe,{TreemapModule:()=>FR,createTreemapServices:()=>zR});var ULe=X(()=>{tH();Cn()});var HLe={};cr(HLe,{WardleyModule:()=>GR,createWardleyServices:()=>qR});var YLe=X(()=>{rH();Cn()});var XLe={};cr(XLe,{CynefinModule:()=>VR,createCynefinServices:()=>WR});var jLe=X(()=>{nH();Cn()});async function Ei(e,t){let r=CCt[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);as[e]||await r();let i=as[e].parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new _f(i);return i.value}var as,CCt,_f,ss=X(()=>{KU();ZU();QU();JU();eH();tH();rH();nH();iH();aH();sH();oH();lH();cH();hH();Cn();as={},CCt={info:A(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(TLe(),bLe)),t=e().Info.parser.LangiumParser;as.info=t},"info"),packet:A(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(CLe(),wLe)),t=e().Packet.parser.LangiumParser;as.packet=t},"packet"),pie:A(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(SLe(),kLe)),t=e().Pie.parser.LangiumParser;as.pie=t},"pie"),treeView:A(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(ALe(),ELe)),t=e().TreeView.parser.LangiumParser;as.treeView=t},"treeView"),architecture:A(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(RLe(),_Le)),t=e().Architecture.parser.LangiumParser;as.architecture=t},"architecture"),gitGraph:A(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(ILe(),LLe)),t=e().GitGraph.parser.LangiumParser;as.gitGraph=t},"gitGraph"),eventmodeling:A(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(DLe(),MLe)),t=e().EventModel.parser.LangiumParser;as.eventmodeling=t},"eventmodeling"),radar:A(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(OLe(),NLe)),t=e().Radar.parser.LangiumParser;as.radar=t},"radar"),railroad:A(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(BLe(),PLe)),t=e().Railroad.parser.LangiumParser;as.railroad=t},"railroad"),railroadEbnf:A(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(FLe(),$Le)),t=e().RailroadEbnf.parser.LangiumParser;as.railroadEbnf=t},"railroadEbnf"),railroadAbnf:A(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(GLe(),zLe)),t=e().RailroadAbnf.parser.LangiumParser;as.railroadAbnf=t},"railroadAbnf"),railroadPeg:A(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(VLe(),qLe)),t=e().RailroadPeg.parser.LangiumParser;as.railroadPeg=t},"railroadPeg"),treemap:A(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(ULe(),WLe)),t=e().Treemap.parser.LangiumParser;as.treemap=t},"treemap"),wardley:A(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(YLe(),HLe)),t=e().Wardley.parser.LangiumParser;as.wardley=t},"wardley"),cynefin:A(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(jLe(),XLe)),t=e().Cynefin.parser.LangiumParser;as.cynefin=t},"cynefin")};A(Ei,"parse");_f=class extends Error{constructor(e){let t=e.lexerErrors.map(n=>{let i=n.line!==void 0&&!isNaN(n.line)?n.line:"?",a=n.column!==void 0&&!isNaN(n.column)?n.column:"?";return`Lexer error on line ${i}, column ${a}: ${n.message}`}).join(` +`),r=e.parserErrors.map(n=>{let i=n.token.startLine!==void 0&&!isNaN(n.token.startLine)?n.token.startLine:"?",a=n.token.startColumn!==void 0&&!isNaN(n.token.startColumn)?n.token.startColumn:"?";return`Parse error on line ${i}, column ${a}: ${n.message}`}).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{A(this,"MermaidParseError")}}});var a8e={};cr(a8e,{diagram:()=>kkt});function o7(){return zD({length:7})}function ZLe(e,t){let r=Object.create(null);return e.reduce((n,i)=>{let a=t(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function fH(e,t,r){let n=e.indexOf(t);n===-1?e.push(r):e.splice(n,1,r)}function pH(e){let t=e.reduce((i,a)=>i.seq>a.seq?i:a,e[0]),r="";e.forEach(function(i){i===t?r+=" *":r+=" |"});let n=[r,t.id,t.seq];for(let i in Ft.records.branches)Ft.records.branches.get(i)===t.id&&n.push(i);if(fe.debug(n.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let i=Ft.records.commits.get(t.parents[0]);fH(e,t,i),t.parents[1]&&e.push(Ft.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let i=Ft.records.commits.get(t.parents[0]);fH(e,t,i)}}e=ZLe(e,i=>i.id),pH(e)}var Wn,kCt,Wm,Ft,SCt,ECt,ACt,_Ct,RCt,LCt,ICt,QLe,MCt,DCt,NCt,OCt,PCt,JLe,BCt,$Ct,FCt,e8e,zCt,GCt,qCt,VCt,WCt,UCt,HCt,YCt,Vp,Wp,ah,Rf,qm,l7,dH,gH,XCt,Vm,Oo,Po,a7,GC,s7,Lf,en,jCt,t8e,r8e,KCt,ZCt,QCt,JCt,ekt,tkt,rkt,nkt,ikt,akt,skt,okt,KLe,lkt,qC,ckt,ukt,hkt,fkt,dkt,pkt,n8e,i8e,gkt,mkt,ykt,vkt,xkt,bkt,Tkt,wkt,Ckt,kkt,s8e=X(()=>{FA();Us();Ur();hr();ur();Yt();ss();zr();Wn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},kCt=dr.gitGraph,Wm=v(()=>Qr({...kCt,...It().gitGraph}),"getConfig"),Ft=new pv(()=>{let e=Wm(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});v(o7,"getID");v(ZLe,"uniqBy");SCt=v(function(e){Ft.records.direction=e},"setDirection"),ECt=v(function(e){fe.debug("options str",e),e=e?.trim(),e=e||"{}";try{Ft.records.options=JSON.parse(e)}catch(t){fe.error("error while parsing gitGraph options",t.message)}},"setOptions"),ACt=v(function(){return Ft.records.options},"getOptions"),_Ct=v(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags;fe.info("commit",t,r,n,i),fe.debug("Entering commit:",t,r,n,i);let a=Wm();r=vt.sanitizeText(r,a),t=vt.sanitizeText(t,a),i=i?.map(o=>vt.sanitizeText(o,a));let s={id:r||Ft.records.seq+"-"+o7(),message:t,seq:Ft.records.seq++,type:n??Wn.NORMAL,tags:i??[],parents:Ft.records.head==null?[]:[Ft.records.head.id],branch:Ft.records.currBranch};Ft.records.head=s,fe.info("main branch",a.mainBranchName),Ft.records.commits.has(s.id)&&fe.warn(`Commit ID ${s.id} already exists`),Ft.records.commits.set(s.id,s),Ft.records.branches.set(Ft.records.currBranch,s.id),fe.debug("in pushCommit "+s.id)},"commit"),RCt=v(function(e){let t=e.name,r=e.order;if(t=vt.sanitizeText(t,Wm()),Ft.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);Ft.records.branches.set(t,Ft.records.head!=null?Ft.records.head.id:null),Ft.records.branchConfig.set(t,{name:t,order:r}),QLe(t),fe.debug("in createBranch")},"branch"),LCt=v(e=>{let t=e.branch,r=e.id,n=e.type,i=e.tags,a=Wm();t=vt.sanitizeText(t,a),r&&(r=vt.sanitizeText(r,a));let s=Ft.records.branches.get(Ft.records.currBranch),o=Ft.records.branches.get(t),l=s?Ft.records.commits.get(s):void 0,u=o?Ft.records.commits.get(o):void 0;if(l&&u&&l.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(Ft.records.currBranch===t){let d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${Ft.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!Ft.records.branches.has(t)){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if(u===void 0||!u){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(l===u){let d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(r&&Ft.records.commits.has(r)){let d=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${r} ${n} ${i?.join(" ")}`,token:`merge ${t} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},d}let h=o||"",f={id:r||`${Ft.records.seq}-${o7()}`,message:`merged branch ${t} into ${Ft.records.currBranch}`,seq:Ft.records.seq++,parents:Ft.records.head==null?[]:[Ft.records.head.id,h],branch:Ft.records.currBranch,type:Wn.MERGE,customType:n,customId:!!r,tags:i??[]};Ft.records.head=f,Ft.records.commits.set(f.id,f),Ft.records.branches.set(Ft.records.currBranch,f.id),fe.debug(Ft.records.branches),fe.debug("in mergeBranch")},"merge"),ICt=v(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent;fe.debug("Entering cherryPick:",t,r,n);let a=Wm();if(t=vt.sanitizeText(t,a),r=vt.sanitizeText(r,a),n=n?.map(l=>vt.sanitizeText(l,a)),i=vt.sanitizeText(i,a),!t||!Ft.records.commits.has(t)){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},l}let s=Ft.records.commits.get(t);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===Wn.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!Ft.records.commits.has(r)){if(o===Ft.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let l=Ft.records.branches.get(Ft.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Ft.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let u=Ft.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Ft.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let h={id:Ft.records.seq+"-"+o7(),message:`cherry-picked ${s?.message} into ${Ft.records.currBranch}`,seq:Ft.records.seq++,parents:Ft.records.head==null?[]:[Ft.records.head.id,s.id],branch:Ft.records.currBranch,type:Wn.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===Wn.MERGE?`|parent:${i}`:""}`]};Ft.records.head=h,Ft.records.commits.set(h.id,h),Ft.records.branches.set(Ft.records.currBranch,h.id),fe.debug(Ft.records.branches),fe.debug("in cherryPick")}},"cherryPick"),QLe=v(function(e){if(e=vt.sanitizeText(e,Wm()),Ft.records.branches.has(e)){Ft.records.currBranch=e;let t=Ft.records.branches.get(Ft.records.currBranch);t===void 0||!t?Ft.records.head=null:Ft.records.head=Ft.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");v(fH,"upsert");v(pH,"prettyPrintCommitHistory");MCt=v(function(){fe.debug(Ft.records.commits);let e=JLe()[0];pH([e])},"prettyPrint"),DCt=v(function(){Ft.reset(),pr()},"clear"),NCt=v(function(){return[...Ft.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),OCt=v(function(){return Ft.records.branches},"getBranches"),PCt=v(function(){return Ft.records.commits},"getCommits"),JLe=v(function(){let e=[...Ft.records.commits.values()];return e.forEach(function(t){fe.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),BCt=v(function(){return Ft.records.currBranch},"getCurrentBranch"),$Ct=v(function(){return Ft.records.direction},"getDirection"),FCt=v(function(){return Ft.records.head},"getHead"),e8e={commitType:Wn,getConfig:Wm,setDirection:SCt,setOptions:ECt,getOptions:ACt,commit:_Ct,branch:RCt,merge:LCt,cherryPick:ICt,checkout:QLe,prettyPrint:MCt,clear:DCt,getBranchesAsObjArray:NCt,getBranches:OCt,getCommits:PCt,getCommitsArray:JLe,getCurrentBranch:BCt,getDirection:$Ct,getHead:FCt,setAccTitle:Ar,getAccTitle:Lr,getAccDescription:Mr,setAccDescription:Ir,setDiagramTitle:$r,getDiagramTitle:Dr},zCt=v((e,t)=>{Fn(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)GCt(r,t)},"populate"),GCt=v((e,t)=>{let n={Commit:v(i=>t.commit(qCt(i)),"Commit"),Branch:v(i=>t.branch(VCt(i)),"Branch"),Merge:v(i=>t.merge(WCt(i)),"Merge"),Checkout:v(i=>t.checkout(UCt(i)),"Checkout"),CherryPicking:v(i=>t.cherryPick(HCt(i)),"CherryPicking")}[e.$type];n?n(e):fe.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),qCt=v(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?Wn[e.type]:Wn.NORMAL,tags:e.tags??void 0}),"parseCommit"),VCt=v(e=>({name:e.name,order:e.order??0}),"parseBranch"),WCt=v(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?Wn[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),UCt=v(e=>e.branch,"parseCheckout"),HCt=v(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),YCt={parse:v(async e=>{let t=await Ei("gitGraph",e);fe.debug(t),zCt(t,e8e)},"parse")},Vp=10,Wp=40,ah=4,Rf=2,qm=8,l7=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),dH=12,gH=new Set(["redux-color","redux-dark-color"]),XCt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Vm=v((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),Oo=new Map,Po=new Map,a7=30,GC=new Map,s7=[],Lf=0,en="LR",jCt=v(()=>{Oo.clear(),Po.clear(),GC.clear(),Lf=0,s7=[],en="LR"},"clear"),t8e=v(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),t.appendChild(i)}),t},"drawText"),r8e=v(e=>{let t,r,n;return en==="BT"?(r=v((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=v((i,a)=>i>=a,"comparisonFunc"),n=0),e.forEach(i=>{let a=en==="TB"||en=="BT"?Po.get(i)?.y:Po.get(i)?.x;a!==void 0&&r(a,n)&&(t=i,n=a)}),t},"findClosestParent"),KCt=v(e=>{let t="",r=1/0;return e.forEach(n=>{let i=Po.get(n).y;i<=r&&(t=n,r=i)}),t||void 0},"findClosestParentBT"),ZCt=v((e,t,r)=>{let n=r,i=r,a=[];e.forEach(s=>{let o=t.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=JCt(o),i=Math.max(n,i)):a.push(o),ekt(o,n)}),n=i,a.forEach(s=>{tkt(s,n,r)}),e.forEach(s=>{let o=t.get(s);if(o?.parents.length){let l=KCt(o.parents);n=Po.get(l).y-Wp,n<=i&&(i=n);let u=Oo.get(o.branch).pos,h=n-Vp;Po.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),QCt=v(e=>{let t=r8e(e.parents.filter(n=>n!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=Po.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),JCt=v(e=>QCt(e)+Wp,"calculateCommitPosition"),ekt=v((e,t)=>{let r=Oo.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let n=r.pos,i=t+Vp;return Po.set(e.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),tkt=v((e,t,r)=>{let n=Oo.get(e.branch);if(!n)throw new Error(`Branch not found for commit ${e.id}`);let i=t+r,a=n.pos;Po.set(e.id,{x:a,y:i})},"setRootPosition"),rkt=v((e,t,r,n,i,a)=>{let{theme:s}=ze(),o=l7.has(s??""),l=gH.has(s??""),u=XCt.has(s??"");if(a===Wn.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(o?3:0)).attr("y",r.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${t.id} commit-highlight${Vm(i,qm,l)} ${n}-outer`),e.append("rect").attr("x",r.x-6+(o?2:0)).attr("y",r.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${t.id} commit${Vm(i,qm,l)} ${n}-inner`);else if(a===Wn.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",o?7:10).attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`);else{let h=e.append("circle");if(h.attr("cx",r.x),h.attr("cy",r.y),h.attr("r",o?7:10),h.attr("class",`commit ${t.id} commit${Vm(i,qm,l)}`),a===Wn.MERGE){let f=e.append("circle");f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${t.id} commit${Vm(i,qm,l)}`)}if(a===Wn.REVERSE){let f=e.append("path"),d=o?4:5;f.attr("d",`M ${r.x-d},${r.y-d}L${r.x+d},${r.y+d}M${r.x-d},${r.y+d}L${r.x+d},${r.y-d}`).attr("class",`commit ${n} ${t.id} commit${Vm(i,qm,l)}`)}}},"drawCommitBullet"),nkt=v((e,t,r,n,i)=>{if(t.type!==Wn.CHERRY_PICK&&(t.customId&&t.type===Wn.MERGE||t.type!==Wn.MERGE)&&i.showCommitLabel){let a=e.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),o=a.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id),l=o.node()?.getBBox();if(l&&(s.attr("x",r.posWithOffset-l.width/2-Rf).attr("y",r.y+13.5).attr("width",l.width+2*Rf).attr("height",l.height+2*Rf),en==="TB"||en==="BT"?(s.attr("x",r.x-(l.width+4*ah+5)).attr("y",r.y-12),o.attr("x",r.x-(l.width+4*ah)).attr("y",r.y+l.height-12)):o.attr("x",r.posWithOffset-l.width/2),i.rotateCommitLabel))if(en==="TB"||en==="BT")o.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),s.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;a.attr("transform","translate("+u+", "+h+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),ikt=v((e,t,r,n)=>{if(t.tags.length>0){let i=0,a=0,s=0,o=[];for(let l of t.tags.reverse()){let u=e.insert("polygon"),h=e.append("circle"),f=e.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:i}),i+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",` + ${n-a/2-ah/2},${p+Rf} + ${n-a/2-ah/2},${p-Rf} + ${r.posWithOffset-a/2-ah},${p-d-Rf} + ${r.posWithOffset+a/2+ah},${p-d-Rf} + ${r.posWithOffset+a/2+ah},${p+d+Rf} + ${r.posWithOffset-a/2-ah},${p+d+Rf}`),u.attr("cy",p).attr("cx",n-a/2+ah/2).attr("r",1.5).attr("class","tag-hole"),en==="TB"||en==="BT"){let g=n+f;h.attr("class","tag-label-bkg").attr("points",` ${r.x},${g+2} ${r.x},${g-2} - ${r.x+Kd},${g-d-2} - ${r.x+Kd+a+4},${g-d-2} - ${r.x+Kd+a+4},${g+d+2} - ${r.x+Kd},${g+d+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+i+")"),u.attr("cx",r.x+wu/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+i+")"),l.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+i+")")}}}},"drawCommitTags"),Xyt=b(e=>{switch(e.customType??e.type){case Ti.NORMAL:return"commit-normal";case Ti.REVERSE:return"commit-reverse";case Ti.HIGHLIGHT:return"commit-highlight";case Ti.MERGE:return"commit-merge";case Ti.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Kyt=b((e,t,r,i)=>{let n={x:0,y:0};if(e.parents.length>0){let a=FEe(e.parents);if(a){let s=i.get(a)??n;return t==="TB"?s.y+Zd:t==="BT"?(i.get(e.id)??n).y-Zd:s.x+Zd}}else return t==="TB"?v_:t==="BT"?(i.get(e.id)??n).y-Zd:0;return 0},"calculatePosition"),Zyt=b((e,t,r)=>{let i=Fr==="BT"&&r?t:t+Kd,n=js.get(e.branch)?.pos,a=Fr==="TB"||Fr==="BT"?js.get(e.branch)?.pos:i;if(a===void 0||n===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let s=T_.has(we().theme??""),o=Fr==="TB"||Fr==="BT"?i:n+(s?KG/2+1:-2);return{x:a,y:o,posWithOffset:i}},"getCommitPosition"),DEe=b((e,t,r,i)=>{let n=e.append("g").attr("class","commit-bullets"),a=e.append("g").attr("class","commit-labels"),s=Fr==="TB"||Fr==="BT"?v_:0,o=[...t.keys()],l=i.parallelCommits??!1,u=b((f,d)=>{let p=t.get(f)?.seq,g=t.get(d)?.seq;return p!==void 0&&g!==void 0?p-g:0},"sortKeys"),h=o.sort(u);Fr==="BT"&&(l&&Gyt(h,t,s),h=h.reverse()),h.forEach(f=>{let d=t.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(s=Kyt(d,Fr,s,Xs));let p=Zyt(d,s,l);if(r){let g=Xyt(d),m=d.customType??d.type,y=js.get(d.branch)?.index??0;Hyt(n,d,p,g,y,m),Yyt(a,d,p,s,i),jyt(a,d,p,s)}Fr==="TB"||Fr==="BT"?Xs.set(d.id,{x:p.x,y:p.posWithOffset}):Xs.set(d.id,{x:p.posWithOffset,y:p.y}),s=Fr==="BT"&&l?s+Zd:s+Zd+Kd,s>Hh&&(Hh=s)})},"drawCommits"),Qyt=b((e,t,r,i,n)=>{let s=(Fr==="TB"||Fr==="BT"?r.xu.branch===s,"isOnBranchToGetCurve"),l=b(u=>u.seq>e.seq&&u.seql(u)&&o(u))},"shouldRerouteArrow"),mw=b((e,t,r=0)=>{let i=e+Math.abs(e-t)/2;if(r>5)return i;if(b_.every(s=>Math.abs(s-i)>=10))return b_.push(i),i;let a=Math.abs(e-t);return mw(e,t-a/5,r+1)},"findLane"),Jyt=b((e,t,r,i)=>{let{theme:n}=we(),a=QG.has(n??""),s=Xs.get(t.id),o=Xs.get(r.id);if(s===void 0||o===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let l=Qyt(t,r,s,o,i),u="",h="",f=0,d=0,p=js.get(r.branch)?.index;r.type===Ti.MERGE&&t.id!==r.parents[0]&&(p=js.get(t.branch)?.index);let g;if(l){u="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",f=10,d=10;let m=s.yo.x&&(u="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",f=20,d=20,r.type===Ti.MERGE&&t.id!==r.parents[0]?g=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${h} ${s.x-d} ${o.y} L ${o.x} ${o.y}`:g=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${u} ${o.x} ${s.y+d} L ${o.x} ${o.y}`),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} ${o.y}`)):Fr==="BT"?(s.xo.x&&(u="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",f=20,d=20,r.type===Ti.MERGE&&t.id!==r.parents[0]?g=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${u} ${s.x-d} ${o.y} L ${o.x} ${o.y}`:g=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${h} ${o.x} ${s.y-d} L ${o.x} ${o.y}`),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} ${o.y}`)):(s.yo.y&&(r.type===Ti.MERGE&&t.id!==r.parents[0]?g=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${u} ${o.x} ${s.y-d} L ${o.x} ${o.y}`:g=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${h} ${s.x+d} ${o.y} L ${o.x} ${o.y}`),s.y===o.y&&(g=`M ${s.x} ${s.y} L ${o.x} ${o.y}`));if(g===void 0)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+Fg(p,Bg,a))},"drawArrow"),evt=b((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(i=>{let n=t.get(i);n.parents&&n.parents.length>0&&n.parents.forEach(a=>{Jyt(r,t.get(a),n,t)})})},"drawArrows"),tvt=b((e,t,r,i)=>{let{look:n,theme:a,themeVariables:s}=we(),{dropShadow:o,THEME_COLOR_LIMIT:l}=s,u=T_.has(a??""),h=QG.has(a??""),f=e.append("g");t.forEach((d,p)=>{let g=Fg(p,u?l:Bg,h),m=js.get(d.name)?.pos;if(m===void 0)throw new Error(`Position not found for branch ${d.name}`);let y=Fr==="TB"||Fr==="BT"?m:u?m+KG/2+1:m-2,v=f.append("line");v.attr("x1",0),v.attr("y1",y),v.attr("x2",Hh),v.attr("y2",y),v.attr("class","branch branch"+g),Fr==="TB"?(v.attr("y1",v_),v.attr("x1",m),v.attr("y2",Hh),v.attr("x2",m)):Fr==="BT"&&(v.attr("y1",Hh),v.attr("x1",m),v.attr("y2",v_),v.attr("x2",m)),b_.push(y);let x=d.name,T=BEe(x),C=f.insert("rect"),k=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+g);k.node().appendChild(T);let E=T.getBBox(),A=u?0:4,N=u?16:0,P=u?KG:0;n==="neo"&&C.attr("data-look","neo"),C.attr("class","branchLabelBkg label"+g).attr("style",n==="neo"?`filter:${u?`url(#${i}-drop-shadow)`:o}`:"").attr("rx",A).attr("ry",A).attr("x",-E.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-E.height/2+10).attr("width",E.width+18+N).attr("height",E.height+4+P),k.attr("transform","translate("+(-E.width-14-(r.rotateCommitLabel===!0?30:0)+N/2)+", "+(y-E.height/2-2)+")"),Fr==="TB"?(C.attr("x",m-E.width/2-10).attr("y",0),k.attr("transform","translate("+(m-E.width/2-5)+", 0)"),u&&(C.attr("transform",`translate(${-N/2-3}, ${-P-10})`),k.attr("transform","translate("+(m-E.width/2-5)+", "+(-P*2+7)+")"))):Fr==="BT"?(C.attr("x",m-E.width/2-10).attr("y",Hh),k.attr("transform","translate("+(m-E.width/2-5)+", "+Hh+")"),u&&(C.attr("transform",`translate(${-N/2-3}, ${P+10})`),k.attr("transform","translate("+(m-E.width/2-5)+", "+(Hh+P*2+4)+")"))):C.attr("transform","translate(-19, "+(y-12-P/2)+")")})},"drawBranches"),rvt=b(function(e,t,r,i,n){return js.set(e,{pos:t,index:r}),t+=50+(n?40:0)+(Fr==="TB"||Fr==="BT"?i.width/2:0),t},"setBranchPosition"),ivt=b(function(e,t,r,i){$yt(),ee.debug("in gitgraph renderer",e+` -`,"id:",t,r);let n=i.db;if(!n.getConfig){ee.error("getConfig method is not available on db");return}let a=n.getConfig(),s=a.rotateCommitLabel??!1;gw=n.getCommits();let o=n.getBranchesAsObjArray();Fr=n.getDirection();let l=Qe(`[id="${t}"]`),{look:u,theme:h,themeVariables:f}=we(),{useGradient:d,gradientStart:p,gradientStop:g,filterColor:m}=f;if(d){let v=l.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");v.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),v.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}u==="neo"&&T_.has(h??"")&&l.append("defs").append("filter").attr("id",t+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",m);let y=0;o.forEach((v,x)=>{let T=BEe(v.name),C=l.append("g"),w=C.insert("g").attr("class","branchLabel"),k=w.insert("g").attr("class","label branch-label");k.node()?.appendChild(T);let E=T.getBBox();y=rvt(v.name,y,x,E,s),k.remove(),w.remove(),C.remove()}),DEe(l,gw,!1,a),a.showBranches&&tvt(l,o,a,t),evt(l,gw),DEe(l,gw,!0,a),jt.insertTitle(l,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),Qv(void 0,l,a.diagramPadding,a.useMaxWidth)},"draw"),nvt={draw:ivt},$Ee=8,zEe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),avt=new Set(["redux-color","redux-dark-color"]),svt=new Set(["neo","neo-dark"]),ovt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),lvt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),cvt=b(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let i=0;i{let t=It(),{theme:r,themeVariables:i}=t,{borderColorArray:n}=i,a=zEe.has(r);if(svt.has(r)){let s="";for(let o=0;o{switch(e.customType??e.type){case Wn.NORMAL:return"commit-normal";case Wn.REVERSE:return"commit-reverse";case Wn.HIGHLIGHT:return"commit-highlight";case Wn.MERGE:return"commit-merge";case Wn.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),skt=v((e,t,r,n)=>{let i={x:0,y:0};if(e.parents.length>0){let a=r8e(e.parents);if(a){let s=n.get(a)??i;return t==="TB"?s.y+Wp:t==="BT"?(n.get(e.id)??i).y-Wp:s.x+Wp}}else return t==="TB"?a7:t==="BT"?(n.get(e.id)??i).y-Wp:0;return 0},"calculatePosition"),okt=v((e,t,r)=>{let n=en==="BT"&&r?t:t+Vp,i=Oo.get(e.branch)?.pos,a=en==="TB"||en==="BT"?Oo.get(e.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let s=l7.has(ze().theme??""),o=en==="TB"||en==="BT"?n:i+(s?dH/2+1:-2);return{x:a,y:o,posWithOffset:n}},"getCommitPosition"),KLe=v((e,t,r,n)=>{let i=e.append("g").attr("class","commit-bullets"),a=e.append("g").attr("class","commit-labels"),s=en==="TB"||en==="BT"?a7:0,o=[...t.keys()],l=n.parallelCommits??!1,u=v((f,d)=>{let p=t.get(f)?.seq,g=t.get(d)?.seq;return p!==void 0&&g!==void 0?p-g:0},"sortKeys"),h=o.sort(u);en==="BT"&&(l&&ZCt(h,t,s),h=h.reverse()),h.forEach(f=>{let d=t.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(s=skt(d,en,s,Po));let p=okt(d,s,l);if(r){let g=akt(d),m=d.customType??d.type,y=Oo.get(d.branch)?.index??0;rkt(i,d,p,g,y,m),nkt(a,d,p,s,n),ikt(a,d,p,s)}en==="TB"||en==="BT"?Po.set(d.id,{x:p.x,y:p.posWithOffset}):Po.set(d.id,{x:p.posWithOffset,y:p.y}),s=en==="BT"&&l?s+Wp:s+Wp+Vp,s>Lf&&(Lf=s)})},"drawCommits"),lkt=v((e,t,r,n,i)=>{let s=(en==="TB"||en==="BT"?r.xu.branch===s,"isOnBranchToGetCurve"),l=v(u=>u.seq>e.seq&&u.seql(u)&&o(u))},"shouldRerouteArrow"),qC=v((e,t,r=0)=>{let n=e+Math.abs(e-t)/2;if(r>5)return n;if(s7.every(s=>Math.abs(s-n)>=10))return s7.push(n),n;let a=Math.abs(e-t);return qC(e,t-a/5,r+1)},"findLane"),ckt=v((e,t,r,n)=>{let{theme:i}=ze(),a=gH.has(i??""),s=Po.get(t.id),o=Po.get(r.id);if(s===void 0||o===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let l=lkt(t,r,s,o,n),u="",h="",f=0,d=0,p=Oo.get(r.branch)?.index;r.type===Wn.MERGE&&t.id!==r.parents[0]&&(p=Oo.get(t.branch)?.index);let g;if(l){u="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",f=10,d=10;let m=s.yo.x&&(u="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",f=20,d=20,r.type===Wn.MERGE&&t.id!==r.parents[0]?g=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${h} ${s.x-d} ${o.y} L ${o.x} ${o.y}`:g=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${u} ${o.x} ${s.y+d} L ${o.x} ${o.y}`),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} ${o.y}`)):en==="BT"?(s.xo.x&&(u="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",f=20,d=20,r.type===Wn.MERGE&&t.id!==r.parents[0]?g=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${u} ${s.x-d} ${o.y} L ${o.x} ${o.y}`:g=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${h} ${o.x} ${s.y-d} L ${o.x} ${o.y}`),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} ${o.y}`)):(s.yo.y&&(r.type===Wn.MERGE&&t.id!==r.parents[0]?g=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${u} ${o.x} ${s.y-d} L ${o.x} ${o.y}`:g=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${h} ${s.x+d} ${o.y} L ${o.x} ${o.y}`),s.y===o.y&&(g=`M ${s.x} ${s.y} L ${o.x} ${o.y}`));if(g===void 0)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+Vm(p,qm,a))},"drawArrow"),ukt=v((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(n=>{let i=t.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{ckt(r,t.get(a),i,t)})})},"drawArrows"),hkt=v((e,t,r,n)=>{let{look:i,theme:a,themeVariables:s}=ze(),{dropShadow:o,THEME_COLOR_LIMIT:l}=s,u=l7.has(a??""),h=gH.has(a??""),f=e.append("g");t.forEach((d,p)=>{let g=Vm(p,u?l:qm,h),m=Oo.get(d.name)?.pos;if(m===void 0)throw new Error(`Position not found for branch ${d.name}`);let y=en==="TB"||en==="BT"?m:u?m+dH/2+1:m-2,x=f.append("line");x.attr("x1",0),x.attr("y1",y),x.attr("x2",Lf),x.attr("y2",y),x.attr("class","branch branch"+g),en==="TB"?(x.attr("y1",a7),x.attr("x1",m),x.attr("y2",Lf),x.attr("x2",m)):en==="BT"&&(x.attr("y1",Lf),x.attr("x1",m),x.attr("y2",a7),x.attr("x2",m)),s7.push(y);let b=d.name,T=t8e(b),k=f.insert("rect"),C=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+g);C.node().appendChild(T);let S=T.getBBox(),E=u?0:4,L=u?16:0,N=u?dH:0;i==="neo"&&k.attr("data-look","neo"),k.attr("class","branchLabelBkg label"+g).attr("style",i==="neo"?`filter:${u?`url(#${n}-drop-shadow)`:o}`:"").attr("rx",E).attr("ry",E).attr("x",-S.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-S.height/2+10).attr("width",S.width+18+L).attr("height",S.height+4+N),C.attr("transform","translate("+(-S.width-14-(r.rotateCommitLabel===!0?30:0)+L/2)+", "+(y-S.height/2-2)+")"),en==="TB"?(k.attr("x",m-S.width/2-10).attr("y",0),C.attr("transform","translate("+(m-S.width/2-5)+", 0)"),u&&(k.attr("transform",`translate(${-L/2-3}, ${-N-10})`),C.attr("transform","translate("+(m-S.width/2-5)+", "+(-N*2+7)+")"))):en==="BT"?(k.attr("x",m-S.width/2-10).attr("y",Lf),C.attr("transform","translate("+(m-S.width/2-5)+", "+Lf+")"),u&&(k.attr("transform",`translate(${-L/2-3}, ${N+10})`),C.attr("transform","translate("+(m-S.width/2-5)+", "+(Lf+N*2+4)+")"))):k.attr("transform","translate(-19, "+(y-12-N/2)+")")})},"drawBranches"),fkt=v(function(e,t,r,n,i){return Oo.set(e,{pos:t,index:r}),t+=50+(i?40:0)+(en==="TB"||en==="BT"?n.width/2:0),t},"setBranchPosition"),dkt=v(function(e,t,r,n){jCt(),fe.debug("in gitgraph renderer",e+` +`,"id:",t,r);let i=n.db;if(!i.getConfig){fe.error("getConfig method is not available on db");return}let a=i.getConfig(),s=a.rotateCommitLabel??!1;GC=i.getCommits();let o=i.getBranchesAsObjArray();en=i.getDirection();let l=ct(`[id="${t}"]`),{look:u,theme:h,themeVariables:f}=ze(),{useGradient:d,gradientStart:p,gradientStop:g,filterColor:m}=f;if(d){let x=l.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");x.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),x.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}u==="neo"&&l7.has(h??"")&&l.append("defs").append("filter").attr("id",t+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",m);let y=0;o.forEach((x,b)=>{let T=t8e(x.name),k=l.append("g"),w=k.insert("g").attr("class","branchLabel"),C=w.insert("g").attr("class","label branch-label");C.node()?.appendChild(T);let S=T.getBBox();y=fkt(x.name,y,b,S,s),C.remove(),w.remove(),k.remove()}),KLe(l,GC,!1,a),a.showBranches&&hkt(l,o,a,t),ukt(l,GC),KLe(l,GC,!0,a),ar.insertTitle(l,"gitTitleText",a.titleTopMargin??0,i.getDiagramTitle()),wb(void 0,l,a.diagramPadding,a.useMaxWidth)},"draw"),pkt={draw:dkt},n8e=8,i8e=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),gkt=new Set(["redux-color","redux-dark-color"]),mkt=new Set(["neo","neo-dark"]),ykt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),vkt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),xkt=v(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let n=0;n{let t=It(),{theme:r,themeVariables:n}=t,{borderColorArray:i}=n,a=i8e.has(r);if(mkt.has(r)){let s="";for(let o=0;o`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%$Ee;return` + `;return s}},"genColor"),Tkt=v(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%n8e;return` .branch-label${t} { fill: ${e["gitBranchLabel"+r]}; } .commit${t} { stroke: ${e["git"+r]}; fill: ${e["git"+r]}; } .commit-highlight${t} { stroke: ${e["gitInv"+r]}; fill: ${e["gitInv"+r]}; } .label${t} { fill: ${e["git"+r]}; } .arrow${t} { stroke: ${e["git"+r]}; } `}).join(` -`)}`,"normalTheme"),fvt=b(e=>{let t=It(),{theme:r}=t,i=lvt.has(r);return` +`)}`,"normalTheme"),wkt=v(e=>{let t=It(),{theme:r}=t,n=vkt.has(r);return` .commit-id, .commit-msg, .branch-label { @@ -1365,38 +1430,38 @@ ${t}`),this.inline?`{${i}}`:i}};S(NSe,"renderInlineTag");S(MSe,"renderLinkDefaul font-family: var(--mermaid-font-family); } - ${i?uvt(e):hvt(e)} + ${n?bkt(e):Tkt(e)} .branch { stroke-width: ${e.strokeWidth}; stroke: ${e.commitLineColor??e.lineColor}; - stroke-dasharray: ${i?"4 2":"2"}; + stroke-dasharray: ${n?"4 2":"2"}; } - .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${i?e.nodeBorder:e.commitLabelColor}; ${i?`font-weight:${e.noteFontWeight};`:""}} - .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${i?"transparent":e.commitLabelBackground}; opacity: ${i?"":.5}; } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?"transparent":e.commitLabelBackground}; opacity: ${n?"":.5}; } .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} - .tag-label-bkg { fill: ${i?e.mainBkg:e.tagLabelBackground}; stroke: ${i?e.nodeBorder:e.tagLabelBorder}; ${i?`filter:${e.dropShadow}`:""} } + .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:""} } .tag-hole { fill: ${e.textColor}; } .commit-merge { - stroke: ${i?e.mainBkg:e.primaryColor}; - fill: ${i?e.mainBkg:e.primaryColor}; + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; } .commit-reverse { - stroke: ${i?e.mainBkg:e.primaryColor}; - fill: ${i?e.mainBkg:e.primaryColor}; - stroke-width: ${i?e.strokeWidth:3}; + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + stroke-width: ${n?e.strokeWidth:3}; } .commit-highlight-outer { } .commit-highlight-inner { - stroke: ${i?e.mainBkg:e.primaryColor}; - fill: ${i?e.mainBkg:e.primaryColor}; + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; } .arrow { /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ - stroke-width: ${zEe.has(r)?e.strokeWidth:8}; + stroke-width: ${i8e.has(r)?e.strokeWidth:8}; stroke-linecap: round; fill: none } @@ -1405,12 +1470,12 @@ ${t}`),this.inline?`{${i}}`:i}};S(NSe,"renderInlineTag");S(MSe,"renderLinkDefaul font-size: 18px; fill: ${e.textColor}; } -`},"getStyles"),dvt=fvt,pvt={parser:Byt,db:PEe,renderer:nvt,styles:dvt}});var VEe=eo((JG,eq)=>{(function(e,t){typeof JG=="object"&&typeof eq<"u"?eq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(JG,(function(){"use strict";var e="day";return function(t,r,i){var n=function(o){return o.add(4-o.isoWeekday(),e)},a=r.prototype;a.isoWeekYear=function(){return n(this).year()},a.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),e);var l,u,h,f,d=n(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?i.utc:i)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,e));return d.diff(p,"week")+1},a.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=a.startOf;a.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}}))});var WEe=eo((tq,rq)=>{(function(e,t){typeof tq=="object"&&typeof rq<"u"?rq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(tq,(function(){"use strict";var e={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"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(m){this[g]=+m}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(m){if(!m||m==="Z")return 0;var y=m.match(/([+-]|\d\d)/g),v=60*y[1]+(+y[2]||0);return v===0?0:y[0]==="+"?-v:v})(g)}],h=function(g){var m=s[g];return m&&(m.indexOf?m:m.s.concat(m.f))},f=function(g,m){var y,v=s.meridiem;if(v){for(var x=1;x<=24;x+=1)if(g.indexOf(v(x,0,m))>-1){y=x>12;break}}else y=g===(m?"pm":"PM");return y},d={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[i,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[i,l("day")],Do:[a,function(g){var m=s.ordinal,y=g.match(/\d+/);if(this.day=y[0],m)for(var v=1;v<=31;v+=1)m(v).replace(/\[|\]/g,"")===g&&(this.day=v)}],w:[n,l("week")],ww:[i,l("week")],M:[n,l("month")],MM:[i,l("month")],MMM:[a,function(g){var m=h("months"),y=(h("monthsShort")||m.map((function(v){return v.slice(0,3)}))).indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(g){var m=h("months").indexOf(g)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,l("year")],YY:[i,function(g){this.year=o(g)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(g){var m,y;m=g,y=s&&s.formats;for(var v=(g=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,N,P){var O=P&&P.toUpperCase();return N||y[P]||e[P]||y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(L,_,R){return _||R.slice(1)}))}))).match(t),x=v.length,T=0;T-1)return new Date((I==="X"?1e3:1)*D);var F=p(I)(D),z=F.year,$=F.month,G=F.day,U=F.hours,j=F.minutes,H=F.seconds,Q=F.milliseconds,Y=F.zone,se=F.week,J=new Date,re=G||(z||$?1:J.getDate()),ie=z||J.getFullYear(),te=0;z&&!$||(te=$>0?$-1:J.getMonth());var xe,fe=U||0,Se=j||0,Me=H||0,ke=Q||0;return Y?new Date(Date.UTC(ie,te,re,fe,Se,Me,ke+60*Y.offset*1e3)):B?new Date(Date.UTC(ie,te,re,fe,Se,Me,ke)):(xe=new Date(ie,te,re,fe,Se,Me,ke),se&&(xe=M(xe).week(se).toDate()),xe)}catch{return new Date("")}})(C,E,w,y),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),P&&C!=this.format(E)&&(this.$d=new Date("")),s={}}else if(E instanceof Array)for(var L=E.length,_=1;_<=L;_+=1){k[1]=E[_-1];var R=y.apply(this,k);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}_===L&&(this.$d=new Date(""))}else x.call(this,T)}}}))});var UEe=eo((iq,nq)=>{(function(e,t){typeof iq=="object"&&typeof nq<"u"?nq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})(iq,(function(){"use strict";return function(e,t){var r=t.prototype,i=r.format;r.format=function(n){var a=this,s=this.$locale();if(!this.isValid())return i.bind(this)(n);var o=this.$utils(),l=(n||"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){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return o.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}}));return i.bind(this)(l)}}}))});var HEe=eo((aq,sq)=>{(function(e,t){typeof aq=="object"&&typeof sq<"u"?sq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=t()})(aq,(function(){"use strict";var e,t,r=1e3,i=6e4,n=36e5,a=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,o=31536e6,l=2628e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:o,months:l,days:a,hours:n,minutes:i,seconds:r,milliseconds:1,weeks:6048e5},f=function(C){return C instanceof x},d=function(C,w,k){return new x(C,k,w.$l)},p=function(C){return t.p(C)+"s"},g=function(C){return C<0},m=function(C){return g(C)?Math.ceil(C):Math.floor(C)},y=function(C){return Math.abs(C)},v=function(C,w){return C?g(C)?{negative:!0,format:""+y(C)+w}:{negative:!1,format:""+C+w}:{negative:!1,format:""}},x=(function(){function C(k,E,A){var N=this;if(this.$d={},this.$l=A,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return d(k*h[p(E)],this);if(typeof k=="number")return this.$ms=k,this.parseFromMilliseconds(),this;if(typeof k=="object")return Object.keys(k).forEach((function(L){N.$d[p(L)]=k[L]})),this.calMilliseconds(),this;if(typeof k=="string"){var P=k.match(u);if(P){var O=P.slice(2).map((function(L){return L!=null?Number(L):0}));return this.$d.years=O[0],this.$d.months=O[1],this.$d.weeks=O[2],this.$d.days=O[3],this.$d.hours=O[4],this.$d.minutes=O[5],this.$d.seconds=O[6],this.calMilliseconds(),this}}return this}var w=C.prototype;return w.calMilliseconds=function(){var k=this;this.$ms=Object.keys(this.$d).reduce((function(E,A){return E+(k.$d[A]||0)*h[A]}),0)},w.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=m(k/o),k%=o,this.$d.months=m(k/l),k%=l,this.$d.days=m(k/a),k%=a,this.$d.hours=m(k/n),k%=n,this.$d.minutes=m(k/i),k%=i,this.$d.seconds=m(k/r),k%=r,this.$d.milliseconds=k},w.toISOString=function(){var k=v(this.$d.years,"Y"),E=v(this.$d.months,"M"),A=+this.$d.days||0;this.$d.weeks&&(A+=7*this.$d.weeks);var N=v(A,"D"),P=v(this.$d.hours,"H"),O=v(this.$d.minutes,"M"),L=this.$d.seconds||0;this.$d.milliseconds&&(L+=this.$d.milliseconds/1e3,L=Math.round(1e3*L)/1e3);var _=v(L,"S"),R=k.negative||E.negative||N.negative||P.negative||O.negative||_.negative,D=P.format||O.format||_.format?"T":"",I=(R?"-":"")+"P"+k.format+E.format+N.format+D+P.format+O.format+_.format;return I==="P"||I==="-P"?"P0D":I},w.toJSON=function(){return this.toISOString()},w.format=function(k){var E=k||"YYYY-MM-DDTHH:mm:ss",A={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return E.replace(s,(function(N,P){return P||String(A[N])}))},w.as=function(k){return this.$ms/h[p(k)]},w.get=function(k){var E=this.$ms,A=p(k);return A==="milliseconds"?E%=1e3:E=A==="weeks"?m(E/h[A]):this.$d[A],E||0},w.add=function(k,E,A){var N;return N=E?k*h[p(E)]:f(k)?k.$ms:d(k,this).$ms,d(this.$ms+N*(A?-1:1),this)},w.subtract=function(k,E){return this.add(k,E,!0)},w.locale=function(k){var E=this.clone();return E.$l=k,E},w.clone=function(){return d(this.$ms,this)},w.humanize=function(k){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!k)},w.valueOf=function(){return this.asMilliseconds()},w.milliseconds=function(){return this.get("milliseconds")},w.asMilliseconds=function(){return this.as("milliseconds")},w.seconds=function(){return this.get("seconds")},w.asSeconds=function(){return this.as("seconds")},w.minutes=function(){return this.get("minutes")},w.asMinutes=function(){return this.as("minutes")},w.hours=function(){return this.get("hours")},w.asHours=function(){return this.as("hours")},w.days=function(){return this.get("days")},w.asDays=function(){return this.as("days")},w.weeks=function(){return this.get("weeks")},w.asWeeks=function(){return this.as("weeks")},w.months=function(){return this.get("months")},w.asMonths=function(){return this.as("months")},w.years=function(){return this.get("years")},w.asYears=function(){return this.as("years")},C})(),T=function(C,w,k){return C.add(w.years()*k,"y").add(w.months()*k,"M").add(w.days()*k,"d").add(w.hours()*k,"h").add(w.minutes()*k,"m").add(w.seconds()*k,"s").add(w.milliseconds()*k,"ms")};return function(C,w,k){e=k,t=k().$utils(),k.duration=function(N,P){var O=k.locale();return d(N,{$l:O},P)},k.isDuration=f;var E=w.prototype.add,A=w.prototype.subtract;w.prototype.add=function(N,P){return f(N)?T(this,N,1):E.bind(this)(N,P)},w.prototype.subtract=function(N,P){return f(N)?T(this,N,-1):A.bind(this)(N,P)}}}))});var c6e={};Lr(c6e,{diagram:()=>a2t});function Tq(e,t,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){let a="^\\s*"+n+"\\s*$",s=new RegExp(a);e[0].match(s)&&(t[n]=!0,e.shift(1),i=!0)})}var KEe,Co,ZEe,QEe,JEe,Ky,l6e,lq,gvt,YEe,ku,fq,dq,pq,yw,vw,gq,mq,C_,Qy,yq,e6e,vq,Xy,bw,bq,xq,S_,cq,mvt,yvt,vvt,bvt,xvt,Tvt,wvt,kvt,Cvt,Svt,Evt,Avt,_vt,Lvt,Rvt,Ivt,Dvt,Nvt,Mvt,Ovt,Pvt,Bvt,Fvt,$vt,t6e,zvt,Gvt,qvt,r6e,Vvt,uq,i6e,n6e,w_,Zy,Wvt,Uvt,hq,k_,Xn,a6e,Hvt,zg,Yvt,jEe,jvt,s6e,Xvt,o6e,Kvt,Zvt,Qvt,Jvt,XEe,e2t,Yh,oq,t2t,r2t,i2t,n2t,a2t,u6e=q(()=>{$r();Er();er();KEe=ks(Vm(),1),Co=ks(Vk(),1),ZEe=ks(VEe(),1),QEe=ks(WEe(),1),JEe=ks(UEe(),1),Ky=ks(Vk(),1),l6e=ks(HEe(),1);Ar();lq=(function(){var e=b(function(_,R,D,I){for(D=D||{},I=_.length;I--;D[_[I]]=R);return D},"o"),t=[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],r=[1,26],i=[1,27],n=[1,28],a=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],g=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],T=[1,19],C=[1,20],w=[1,21],k=[1,22],E=[1,23],A=[1,25],N=[1,35],P={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:b(function(R,D,I,B,M,F,z){var $=F.length-1;switch(M){case 1:return F[$-1];case 2:this.$=[];break;case 3:F[$-1].push(F[$]),this.$=F[$-1];break;case 4:case 5:this.$=F[$];break;case 6:case 7:this.$=[];break;case 8:B.setWeekday("monday");break;case 9:B.setWeekday("tuesday");break;case 10:B.setWeekday("wednesday");break;case 11:B.setWeekday("thursday");break;case 12:B.setWeekday("friday");break;case 13:B.setWeekday("saturday");break;case 14:B.setWeekday("sunday");break;case 15:B.setWeekend("friday");break;case 16:B.setWeekend("saturday");break;case 17:B.setDateFormat(F[$].substr(11)),this.$=F[$].substr(11);break;case 18:B.enableInclusiveEndDates(),this.$=F[$].substr(18);break;case 19:B.TopAxis(),this.$=F[$].substr(8);break;case 20:B.setAxisFormat(F[$].substr(11)),this.$=F[$].substr(11);break;case 21:B.setTickInterval(F[$].substr(13)),this.$=F[$].substr(13);break;case 22:B.setExcludes(F[$].substr(9)),this.$=F[$].substr(9);break;case 23:B.setIncludes(F[$].substr(9)),this.$=F[$].substr(9);break;case 24:B.setTodayMarker(F[$].substr(12)),this.$=F[$].substr(12);break;case 27:B.setDiagramTitle(F[$].substr(6)),this.$=F[$].substr(6);break;case 28:this.$=F[$].trim(),B.setAccTitle(this.$);break;case 29:case 30:this.$=F[$].trim(),B.setAccDescription(this.$);break;case 31:B.addSection(F[$].substr(8)),this.$=F[$].substr(8);break;case 33:B.addTask(F[$-1],F[$]),this.$="task";break;case 34:this.$=F[$-1],B.setClickEvent(F[$-1],F[$],null);break;case 35:this.$=F[$-2],B.setClickEvent(F[$-2],F[$-1],F[$]);break;case 36:this.$=F[$-2],B.setClickEvent(F[$-2],F[$-1],null),B.setLink(F[$-2],F[$]);break;case 37:this.$=F[$-3],B.setClickEvent(F[$-3],F[$-2],F[$-1]),B.setLink(F[$-3],F[$]);break;case 38:this.$=F[$-2],B.setClickEvent(F[$-2],F[$],null),B.setLink(F[$-2],F[$-1]);break;case 39:this.$=F[$-3],B.setClickEvent(F[$-3],F[$-1],F[$]),B.setLink(F[$-3],F[$-2]);break;case 40:this.$=F[$-1],B.setLink(F[$-1],F[$]);break;case 41:case 47:this.$=F[$-1]+" "+F[$];break;case 42:case 43:case 45:this.$=F[$-2]+" "+F[$-1]+" "+F[$];break;case 44:case 46:this.$=F[$-3]+" "+F[$-2]+" "+F[$-1]+" "+F[$];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:i,14:n,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:y,28:v,29:x,30:T,31:C,33:w,35:k,36:E,37:24,38:A,40:N},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:i,14:n,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:y,28:v,29:x,30:T,31:C,33:w,35:k,36:E,37:24,38:A,40:N},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:b(function(R,D){if(D.recoverable)this.trace(R);else{var I=new Error(R);throw I.hash=D,I}},"parseError"),parse:b(function(R){var D=this,I=[0],B=[],M=[null],F=[],z=this.table,$="",G=0,U=0,j=0,H=2,Q=1,Y=F.slice.call(arguments,1),se=Object.create(this.lexer),J={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(J.yy[re]=this.yy[re]);se.setInput(R,J.yy),J.yy.lexer=se,J.yy.parser=this,typeof se.yylloc>"u"&&(se.yylloc={});var ie=se.yylloc;F.push(ie);var te=se.options&&se.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xe(qe){I.length=I.length-2*qe,M.length=M.length-qe,F.length=F.length-qe}b(xe,"popStack");function fe(){var qe;return qe=B.pop()||se.lex()||Q,typeof qe!="number"&&(qe instanceof Array&&(B=qe,qe=B.pop()),qe=D.symbols_[qe]||qe),qe}b(fe,"lex");for(var Se,Me,ke,Ce,Ie,Pe,pe={},Je,Te,Be,He;;){if(ke=I[I.length-1],this.defaultActions[ke]?Ce=this.defaultActions[ke]:((Se===null||typeof Se>"u")&&(Se=fe()),Ce=z[ke]&&z[ke][Se]),typeof Ce>"u"||!Ce.length||!Ce[0]){var nt="";He=[];for(Je in z[ke])this.terminals_[Je]&&Je>H&&He.push("'"+this.terminals_[Je]+"'");se.showPosition?nt="Parse error on line "+(G+1)+`: -`+se.showPosition()+` -Expecting `+He.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(Se==Q?"end of input":"'"+(this.terminals_[Se]||Se)+"'"),this.parseError(nt,{text:se.match,token:this.terminals_[Se]||Se,line:se.yylineno,loc:ie,expected:He})}if(Ce[0]instanceof Array&&Ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ke+", token: "+Se);switch(Ce[0]){case 1:I.push(Se),M.push(se.yytext),F.push(se.yylloc),I.push(Ce[1]),Se=null,Me?(Se=Me,Me=null):(U=se.yyleng,$=se.yytext,G=se.yylineno,ie=se.yylloc,j>0&&j--);break;case 2:if(Te=this.productions_[Ce[1]][1],pe.$=M[M.length-Te],pe._$={first_line:F[F.length-(Te||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(Te||1)].first_column,last_column:F[F.length-1].last_column},te&&(pe._$.range=[F[F.length-(Te||1)].range[0],F[F.length-1].range[1]]),Pe=this.performAction.apply(pe,[$,U,G,J.yy,Ce[1],M,F].concat(Y)),typeof Pe<"u")return Pe;Te&&(I=I.slice(0,-1*Te*2),M=M.slice(0,-1*Te),F=F.slice(0,-1*Te)),I.push(this.productions_[Ce[1]][0]),M.push(pe.$),F.push(pe._$),Be=z[I[I.length-2]][I[I.length-1]],I.push(Be);break;case 3:return!0}}return!0},"parse")},O=(function(){var _={EOF:1,parseError:b(function(D,I){if(this.yy.parser)this.yy.parser.parseError(D,I);else throw new Error(D)},"parseError"),setInput:b(function(R,D){return this.yy=D||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var D=R.match(/(?:\r\n?|\n).*/g);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),R},"input"),unput:b(function(R){var D=R.length,I=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var B=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1&&(this.yylineno-=I.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===B.length?this.yylloc.first_column:0)+B[B.length-I.length].length-I[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(R){this.unput(this.match.slice(R))},"less"),pastInput:b(function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var R=this.pastInput(),D=new Array(R.length+1).join("-");return R+this.upcomingInput()+` -`+D+"^"},"showPosition"),test_match:b(function(R,D){var I,B,M;if(this.options.backtrack_lexer&&(M={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(M.yylloc.range=this.yylloc.range.slice(0))),B=R[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,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(R[0].length),this.matched+=R[0],I=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),I)return I;if(this._backtrack){for(var F in M)this[F]=M[F];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,D,I,B;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),F=0;FD[0].length)){if(D=I,B=F,this.options.backtrack_lexer){if(R=this.test_match(I,M[F]),R!==!1)return R;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(R=this.test_match(D,M[B]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var D=this.next();return D||this.lex()},"lex"),begin:b(function(D){this.conditionStack.push(D)},"begin"),popState:b(function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},"topState"),pushState:b(function(D){this.begin(D)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(D,I,B,M){var F=M;switch(B){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),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],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}}};return _})();P.lexer=O;function L(){this.yy={}}return b(L,"Parser"),L.prototype=P,P.Parser=L,new L})();lq.parser=lq;gvt=lq;Co.default.extend(ZEe.default);Co.default.extend(QEe.default);Co.default.extend(JEe.default);YEe={friday:5,saturday:6},ku="",fq="",dq=void 0,pq="",yw=[],vw=[],gq=new Map,mq=[],C_=[],Qy="",yq="",e6e=["active","done","crit","milestone","vert"],vq=[],Xy="",bw=!1,bq=!1,xq="sunday",S_="saturday",cq=0,mvt=b(function(){mq=[],C_=[],Qy="",vq=[],w_=0,hq=void 0,k_=void 0,Xn=[],ku="",fq="",yq="",dq=void 0,pq="",yw=[],vw=[],bw=!1,bq=!1,cq=0,gq=new Map,Xy="",fr(),xq="sunday",S_="saturday"},"clear"),yvt=b(function(e){Xy=e},"setDiagramId"),vvt=b(function(e){fq=e},"setAxisFormat"),bvt=b(function(){return fq},"getAxisFormat"),xvt=b(function(e){dq=e},"setTickInterval"),Tvt=b(function(){return dq},"getTickInterval"),wvt=b(function(e){pq=e},"setTodayMarker"),kvt=b(function(){return pq},"getTodayMarker"),Cvt=b(function(e){ku=e},"setDateFormat"),Svt=b(function(){bw=!0},"enableInclusiveEndDates"),Evt=b(function(){return bw},"endDatesAreInclusive"),Avt=b(function(){bq=!0},"enableTopAxis"),_vt=b(function(){return bq},"topAxisEnabled"),Lvt=b(function(e){yq=e},"setDisplayMode"),Rvt=b(function(){return yq},"getDisplayMode"),Ivt=b(function(){return ku},"getDateFormat"),Dvt=b(function(e){yw=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),Nvt=b(function(){return yw},"getIncludes"),Mvt=b(function(e){vw=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),Ovt=b(function(){return vw},"getExcludes"),Pvt=b(function(){return gq},"getLinks"),Bvt=b(function(e){Qy=e,mq.push(e)},"addSection"),Fvt=b(function(){return mq},"getSections"),$vt=b(function(){let e=jEe(),t=10,r=0;for(;!e&&ro))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,"d")}return[t,s]},"fixTaskDates"),uq=b(function(e,t,r){if(r=r.trim(),b(o=>{let l=o.trim();return l==="x"||l==="X"},"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));let a=/^after\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let o=null;for(let u of a.groups.ids.split(" ")){let h=zg(u);h!==void 0&&(!o||h.endTime>o.endTime)&&(o=h)}if(o)return o.endTime;let l=new Date;return l.setHours(0,0,0,0),l}let s=(0,Co.default)(r,t.trim(),!0);if(s.isValid())return s.toDate();{ee.debug("Invalid date:"+r),ee.debug("With date format:"+t.trim());let o=new Date(r);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+r);return o}},"getStartDate"),i6e=b(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),n6e=b(function(e,t,r,i=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let h=null;for(let d of a.groups.ids.split(" ")){let p=zg(d);p!==void 0&&(!h||p.startTime{window.open(r,"_self")}),gq.set(i,r))}),s6e(e,"clickable")},"setLink"),s6e=b(function(e,t){e.split(",").forEach(function(r){let i=zg(r);i!==void 0&&i.classes.push(t)})},"setClass"),Xvt=b(function(e,t,r){if(we().securityLevel!=="loose"||t===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{jt.runFunc(t,...i)})},"setClickFun"),o6e=b(function(e,t){vq.push(function(){let r=Xy?`${Xy}-${e}`:e,i=document.querySelector(`[id="${r}"]`);i!==null&&i.addEventListener("click",function(){t()})},function(){let r=Xy?`${Xy}-${e}`:e,i=document.querySelector(`[id="${r}-text"]`);i!==null&&i.addEventListener("click",function(){t()})})},"pushFun"),Kvt=b(function(e,t,r){e.split(",").forEach(function(i){Xvt(i,t,r)}),s6e(e,"clickable")},"setClickEvent"),Zvt=b(function(e){vq.forEach(function(t){t(e)})},"bindFunctions"),Qvt={getConfig:b(()=>we().gantt,"getConfig"),clear:mvt,setDateFormat:Cvt,getDateFormat:Ivt,enableInclusiveEndDates:Svt,endDatesAreInclusive:Evt,enableTopAxis:Avt,topAxisEnabled:_vt,setAxisFormat:vvt,getAxisFormat:bvt,setTickInterval:xvt,getTickInterval:Tvt,setTodayMarker:wvt,getTodayMarker:kvt,setAccTitle:yr,getAccTitle:vr,setDiagramTitle:kr,getDiagramTitle:Tr,setDiagramId:yvt,setDisplayMode:Lvt,getDisplayMode:Rvt,setAccDescription:br,getAccDescription:xr,addSection:Bvt,getSections:Fvt,getTasks:$vt,addTask:Hvt,findTaskById:zg,addTaskOrg:Yvt,setIncludes:Dvt,getIncludes:Nvt,setExcludes:Mvt,getExcludes:Ovt,setClickEvent:Kvt,setLink:jvt,getLinks:Pvt,bindFunctions:Zvt,parseDuration:i6e,isInvalidDate:t6e,setWeekday:zvt,getWeekday:Gvt,setWeekend:qvt};b(Tq,"getTaskTags");Ky.default.extend(l6e.default);Jvt=b(function(){ee.debug("Something is calling, setConf, remove the call")},"setConf"),XEe={monday:Cf,tuesday:J4,wednesday:eC,thursday:Lc,friday:tC,saturday:rC,sunday:Cl},e2t=b((e,t)=>{let r=[...e].map(()=>-1/0),i=[...e].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),n=0;for(let a of i)for(let s=0;s=r[s]){r[s]=a.endTime,a.order=s+t,s>n&&(n=s);break}return n},"getMaxIntersections"),oq=1e4,t2t=b(function(e,t,r,i){let n=we().gantt;i.db.setDiagramId(t);let a=we().securityLevel,s;a==="sandbox"&&(s=Qe("#i"+t));let o=a==="sandbox"?Qe(s.nodes()[0].contentDocument.body):Qe("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(t);Yh=u.parentElement.offsetWidth,Yh===void 0&&(Yh=1200),n.useWidth!==void 0&&(Yh=n.useWidth);let h=i.db.getTasks(),f=[];for(let N of h)f.push(N.type);f=A(f);let d={},p=2*n.topPadding;if(i.db.getDisplayMode()==="compact"||n.displayMode==="compact"){let N={};for(let O of h)N[O.section]===void 0?N[O.section]=[O]:N[O.section].push(O);let P=0;for(let O of Object.keys(N)){let L=e2t(N[O],P)+1;P+=L,p+=L*(n.barHeight+n.barGap),d[O]=L}}else{p+=h.length*(n.barHeight+n.barGap);for(let N of f)d[N]=h.filter(P=>P.type===N).length}u.setAttribute("viewBox","0 0 "+Yh+" "+p);let g=o.select(`[id="${t}"]`),m=aC().domain([f4(h,function(N){return N.startTime}),h4(h,function(N){return N.endTime})]).rangeRound([0,Yh-n.leftPadding-n.rightPadding]);function y(N,P){let O=N.startTime,L=P.startTime,_=0;return O>L?_=1:O$.vert===G.vert?0:$.vert?1:-1);let B=[...new Set(N.map($=>$.order))].map($=>N.find(G=>G.order===$));g.append("g").selectAll("rect").data(B).enter().append("rect").attr("x",0).attr("y",function($,G){return G=$.order,G*P+O-2}).attr("width",function(){return D-n.rightPadding/2}).attr("height",P).attr("class",function($){for(let[G,U]of f.entries())if($.type===U)return"section section"+G%n.numberSectionStyles;return"section section0"}).enter();let M=g.append("g").selectAll("rect").data(N).enter(),F=i.db.getLinks();if(M.append("rect").attr("id",function($){return t+"-"+$.id}).attr("rx",3).attr("ry",3).attr("x",function($){return $.milestone?m($.startTime)+L+.5*(m($.endTime)-m($.startTime))-.5*_:m($.startTime)+L}).attr("y",function($,G){return G=$.order,$.vert?n.gridLineStartPadding:G*P+O}).attr("width",function($){return $.milestone?_:$.vert?.08*_:m($.renderEndTime||$.endTime)-m($.startTime)}).attr("height",function($){return $.vert?h.length*(n.barHeight+n.barGap)+n.barHeight*2:_}).attr("transform-origin",function($,G){return G=$.order,(m($.startTime)+L+.5*(m($.endTime)-m($.startTime))).toString()+"px "+(G*P+O+.5*_).toString()+"px"}).attr("class",function($){let G="task",U="";$.classes.length>0&&(U=$.classes.join(" "));let j=0;for(let[Q,Y]of f.entries())$.type===Y&&(j=Q%n.numberSectionStyles);let H="";return $.active?$.crit?H+=" activeCrit":H=" active":$.done?$.crit?H=" doneCrit":H=" done":$.crit&&(H+=" crit"),H.length===0&&(H=" task"),$.milestone&&(H=" milestone "+H),$.vert&&(H=" vert "+H),H+=j,H+=" "+U,G+H}),M.append("text").attr("id",function($){return t+"-"+$.id+"-text"}).text(function($){return $.task}).attr("font-size",n.fontSize).attr("x",function($){let G=m($.startTime),U=m($.renderEndTime||$.endTime);if($.milestone&&(G+=.5*(m($.endTime)-m($.startTime))-.5*_,U=G+_),$.vert)return m($.startTime)+L;let j=this.getBBox().width;return j>U-G?U+j+1.5*n.leftPadding>D?G+L-5:U+L+5:(U-G)/2+G+L}).attr("y",function($,G){return $.vert?n.gridLineStartPadding+h.length*(n.barHeight+n.barGap)+60:(G=$.order,G*P+n.barHeight/2+(n.fontSize/2-2)+O)}).attr("text-height",_).attr("class",function($){let G=m($.startTime),U=m($.endTime);$.milestone&&(U=G+_);let j=this.getBBox().width,H="";$.classes.length>0&&(H=$.classes.join(" "));let Q=0;for(let[se,J]of f.entries())$.type===J&&(Q=se%n.numberSectionStyles);let Y="";return $.active&&($.crit?Y="activeCritText"+Q:Y="activeText"+Q),$.done?$.crit?Y=Y+" doneCritText"+Q:Y=Y+" doneText"+Q:$.crit&&(Y=Y+" critText"+Q),$.milestone&&(Y+=" milestoneText"),$.vert&&(Y+=" vertText"),j>U-G?U+j+1.5*n.leftPadding>D?H+" taskTextOutsideLeft taskTextOutside"+Q+" "+Y:H+" taskTextOutsideRight taskTextOutside"+Q+" "+Y+" width-"+j:H+" taskText taskText"+Q+" "+Y+" width-"+j}),we().securityLevel==="sandbox"){let $;$=Qe("#i"+t);let G=$.nodes()[0].contentDocument;M.filter(function(U){return F.has(U.id)}).each(function(U){var j=G.querySelector("#"+CSS.escape(t+"-"+U.id)),H=G.querySelector("#"+CSS.escape(t+"-"+U.id+"-text"));let Q=j.parentNode;var Y=G.createElement("a");Y.setAttribute("xlink:href",F.get(U.id)),Y.setAttribute("target","_top"),Q.appendChild(Y),Y.appendChild(j),Y.appendChild(H)})}}b(x,"drawRects");function T(N,P,O,L,_,R,D,I){if(D.length===0&&I.length===0)return;let B,M;for(let{startTime:j,endTime:H}of R)(B===void 0||jM)&&(M=H);if(!B||!M)return;if((0,Ky.default)(M).diff((0,Ky.default)(B),"year")>5){ee.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let F=i.db.getDateFormat(),z=[],$=null,G=(0,Ky.default)(B);for(;G.valueOf()<=M;)i.db.isInvalidDate(G,F,D,I)?$?$.end=G:$={start:G,end:G}:$&&(z.push($),$=null),G=G.add(1,"d");g.append("g").selectAll("rect").data(z).enter().append("rect").attr("id",j=>t+"-exclude-"+j.start.format("YYYY-MM-DD")).attr("x",j=>m(j.start.startOf("day"))+O).attr("y",n.gridLineStartPadding).attr("width",j=>m(j.end.endOf("day"))-m(j.start.startOf("day"))).attr("height",_-P-n.gridLineStartPadding).attr("transform-origin",function(j,H){return(m(j.start)+O+.5*(m(j.end)-m(j.start))).toString()+"px "+(H*N+.5*_).toString()+"px"}).attr("class","exclude-range")}b(T,"drawExcludeDays");function C(N,P,O,L){if(O<=0||N>P)return 1/0;let _=P-N,R=Ky.default.duration({[L??"day"]:O}).asMilliseconds();return R<=0?1/0:Math.ceil(_/R)}b(C,"getEstimatedTickCount");function w(N,P,O,L){let _=i.db.getDateFormat(),R=i.db.getAxisFormat(),D;R?D=R:_==="D"?D="%d":D=n.axisFormat??"%Y-%m-%d";let I=PL(m).tickSize(-L+P+n.gridLineStartPadding).tickFormat(zp(D)),M=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(M!==null){let F=parseInt(M[1],10);if(isNaN(F)||F<=0)ee.warn(`Invalid tick interval value: "${M[1]}". Skipping custom tick interval.`);else{let z=M[2],$=i.db.getWeekday()||n.weekday,G=m.domain(),U=G[0],j=G[1],H=C(U,j,F,z);if(H>oq)ee.warn(`The tick interval "${F}${z}" would generate ${H} ticks, which exceeds the maximum allowed (${oq}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(z){case"millisecond":I.ticks(Ac.every(F));break;case"second":I.ticks(ao.every(F));break;case"minute":I.ticks(Ku.every(F));break;case"hour":I.ticks(Zu.every(F));break;case"day":I.ticks(Mo.every(F));break;case"week":I.ticks(XEe[$].every(F));break;case"month":I.ticks(Qu.every(F));break}}}if(g.append("g").attr("class","grid").attr("transform","translate("+N+", "+(L-50)+")").call(I).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let F=OL(m).tickSize(-L+P+n.gridLineStartPadding).tickFormat(zp(D));if(M!==null){let z=parseInt(M[1],10);if(isNaN(z)||z<=0)ee.warn(`Invalid tick interval value: "${M[1]}". Skipping custom tick interval.`);else{let $=M[2],G=i.db.getWeekday()||n.weekday,U=m.domain(),j=U[0],H=U[1];if(C(j,H,z,$)<=oq)switch($){case"millisecond":F.ticks(Ac.every(z));break;case"second":F.ticks(ao.every(z));break;case"minute":F.ticks(Ku.every(z));break;case"hour":F.ticks(Zu.every(z));break;case"day":F.ticks(Mo.every(z));break;case"week":F.ticks(XEe[G].every(z));break;case"month":F.ticks(Qu.every(z));break}}}g.append("g").attr("class","grid").attr("transform","translate("+N+", "+P+")").call(F).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}b(w,"makeGrid");function k(N,P){let O=0,L=Object.keys(d).map(_=>[_,d[_]]);g.append("g").selectAll("text").data(L).enter().append(function(_){let R=_[0].split(ht.lineBreakRegex),D=-(R.length-1)/2,I=l.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("dy",D+"em");for(let[B,M]of R.entries()){let F=l.createElementNS("http://www.w3.org/2000/svg","tspan");F.setAttribute("alignment-baseline","central"),F.setAttribute("x","10"),B>0&&F.setAttribute("dy","1em"),F.textContent=M,I.appendChild(F)}return I}).attr("x",10).attr("y",function(_,R){if(R>0)for(let D=0;D` +`},"getStyles"),Ckt=wkt,kkt={parser:YCt,db:e8e,renderer:pkt,styles:Ckt}});var o8e=Rs((mH,yH)=>{(function(e,t){typeof mH=="object"&&typeof yH<"u"?yH.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(mH,(function(){"use strict";var e="day";return function(t,r,n){var i=function(o){return o.add(4-o.isoWeekday(),e)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),e);var l,u,h,f,d=i(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?n.utc:n)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,e));return d.diff(p,"week")+1},a.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=a.startOf;a.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}}))});var l8e=Rs((vH,xH)=>{(function(e,t){typeof vH=="object"&&typeof xH<"u"?xH.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(vH,(function(){"use strict";var e={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"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(m){this[g]=+m}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(m){if(!m||m==="Z")return 0;var y=m.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x})(g)}],h=function(g){var m=s[g];return m&&(m.indexOf?m:m.s.concat(m.f))},f=function(g,m){var y,x=s.meridiem;if(x){for(var b=1;b<=24;b+=1)if(g.indexOf(x(b,0,m))>-1){y=b>12;break}}else y=g===(m?"pm":"PM");return y},d={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(g){var m=s.ordinal,y=g.match(/\d+/);if(this.day=y[0],m)for(var x=1;x<=31;x+=1)m(x).replace(/\[|\]/g,"")===g&&(this.day=x)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(g){var m=h("months"),y=(h("monthsShort")||m.map((function(x){return x.slice(0,3)}))).indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(g){var m=h("months").indexOf(g)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(g){this.year=o(g)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(g){var m,y;m=g,y=s&&s.formats;for(var x=(g=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(E,L,N){var O=N&&N.toUpperCase();return L||y[N]||e[N]||y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(R,_,D){return _||D.slice(1)}))}))).match(t),b=x.length,T=0;T-1)return new Date((M==="X"?1e3:1)*I);var $=p(M)(I),G=$.year,q=$.month,z=$.day,V=$.hours,j=$.minutes,ee=$.seconds,ne=$.milliseconds,Q=$.zone,pe=$.week,te=new Date,de=z||(G||q?1:te.getDate()),ce=G||te.getFullYear(),ue=0;G&&!q||(ue=q>0?q-1:te.getMonth());var Re,ve=V||0,Ge=j||0,He=ee||0,Ue=ne||0;return Q?new Date(Date.UTC(ce,ue,de,ve,Ge,He,Ue+60*Q.offset*1e3)):B?new Date(Date.UTC(ce,ue,de,ve,Ge,He,Ue)):(Re=new Date(ce,ue,de,ve,Ge,He,Ue),pe&&(Re=P(Re).week(pe).toDate()),Re)}catch{return new Date("")}})(k,S,w,y),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),N&&k!=this.format(S)&&(this.$d=new Date("")),s={}}else if(S instanceof Array)for(var R=S.length,_=1;_<=R;_+=1){C[1]=S[_-1];var D=y.apply(this,C);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}_===R&&(this.$d=new Date(""))}else b.call(this,T)}}}))});var c8e=Rs((bH,TH)=>{(function(e,t){typeof bH=="object"&&typeof TH<"u"?TH.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})(bH,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var o=this.$utils(),l=(i||"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){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return o.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}}));return n.bind(this)(l)}}}))});var u8e=Rs((wH,CH)=>{(function(e,t){typeof wH=="object"&&typeof CH<"u"?CH.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=t()})(wH,(function(){"use strict";var e,t,r=1e3,n=6e4,i=36e5,a=864e5,s=31536e6,o=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,h={years:s,months:o,days:a,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},f=function(k){return k instanceof b},d=function(k,w,C){return new b(k,C,w.$l)},p=function(k){return t.p(k)+"s"},g=function(k){return k<0},m=function(k){return g(k)?Math.ceil(k):Math.floor(k)},y=function(k){return Math.abs(k)},x=function(k,w){return k?g(k)?{negative:!0,format:""+y(k)+w}:{negative:!1,format:""+k+w}:{negative:!1,format:""}},b=(function(){function k(C,S,E){var L=this;if(this.$d={},this.$l=E,C===void 0&&(this.$ms=0,this.parseFromMilliseconds()),S)return d(C*h[p(S)],this);if(typeof C=="number")return this.$ms=C,this.parseFromMilliseconds(),this;if(typeof C=="object")return Object.keys(C).forEach((function(R){L.$d[p(R)]=C[R]})),this.calMilliseconds(),this;if(typeof C=="string"){var N=C.match(l);if(N){var O=N.slice(2).map((function(R){return R!=null?Number(R):0}));return this.$d.years=O[0],this.$d.months=O[1],this.$d.weeks=O[2],this.$d.days=O[3],this.$d.hours=O[4],this.$d.minutes=O[5],this.$d.seconds=O[6],this.calMilliseconds(),this}}return this}var w=k.prototype;return w.calMilliseconds=function(){var C=this;this.$ms=Object.keys(this.$d).reduce((function(S,E){return S+(C.$d[E]||0)*h[E]}),0)},w.parseFromMilliseconds=function(){var C=this.$ms;this.$d.years=m(C/s),C%=s,this.$d.months=m(C/o),C%=o,this.$d.days=m(C/a),C%=a,this.$d.hours=m(C/i),C%=i,this.$d.minutes=m(C/n),C%=n,this.$d.seconds=m(C/r),C%=r,this.$d.milliseconds=C},w.toISOString=function(){var C=x(this.$d.years,"Y"),S=x(this.$d.months,"M"),E=+this.$d.days||0;this.$d.weeks&&(E+=7*this.$d.weeks);var L=x(E,"D"),N=x(this.$d.hours,"H"),O=x(this.$d.minutes,"M"),R=this.$d.seconds||0;this.$d.milliseconds&&(R+=this.$d.milliseconds/1e3,R=Math.round(1e3*R)/1e3);var _=x(R,"S"),D=C.negative||S.negative||L.negative||N.negative||O.negative||_.negative,I=N.format||O.format||_.format?"T":"",M=(D?"-":"")+"P"+C.format+S.format+L.format+I+N.format+O.format+_.format;return M==="P"||M==="-P"?"P0D":M},w.toJSON=function(){return this.toISOString()},w.format=function(C){var S=C||"YYYY-MM-DDTHH:mm:ss",E={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return S.replace(u,(function(L,N){return N||String(E[L])}))},w.as=function(C){return this.$ms/h[p(C)]},w.get=function(C){var S=this.$ms,E=p(C);return E==="milliseconds"?S%=1e3:S=E==="weeks"?m(S/h[E]):this.$d[E],S||0},w.add=function(C,S,E){var L;return L=S?C*h[p(S)]:f(C)?C.$ms:d(C,this).$ms,d(this.$ms+L*(E?-1:1),this)},w.subtract=function(C,S){return this.add(C,S,!0)},w.locale=function(C){var S=this.clone();return S.$l=C,S},w.clone=function(){return d(this.$ms,this)},w.humanize=function(C){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!C)},w.valueOf=function(){return this.asMilliseconds()},w.milliseconds=function(){return this.get("milliseconds")},w.asMilliseconds=function(){return this.as("milliseconds")},w.seconds=function(){return this.get("seconds")},w.asSeconds=function(){return this.as("seconds")},w.minutes=function(){return this.get("minutes")},w.asMinutes=function(){return this.as("minutes")},w.hours=function(){return this.get("hours")},w.asHours=function(){return this.as("hours")},w.days=function(){return this.get("days")},w.asDays=function(){return this.as("days")},w.weeks=function(){return this.get("weeks")},w.asWeeks=function(){return this.as("weeks")},w.months=function(){return this.get("months")},w.asMonths=function(){return this.as("months")},w.years=function(){return this.get("years")},w.asYears=function(){return this.as("years")},k})(),T=function(k,w,C){return k.add(w.years()*C,"y").add(w.months()*C,"M").add(w.days()*C,"d").add(w.hours()*C,"h").add(w.minutes()*C,"m").add(w.seconds()*C,"s").add(w.milliseconds()*C,"ms")};return function(k,w,C){e=C,t=C().$utils(),C.duration=function(L,N){var O=C.locale();return d(L,{$l:O},N)},C.isDuration=f;var S=w.prototype.add,E=w.prototype.subtract;w.prototype.add=function(L,N){return f(L)?T(this,L,1):S.bind(this)(L,N)},w.prototype.subtract=function(L,N){return f(L)?T(this,L,-1):E.bind(this)(L,N)}}}))});var _8e={};cr(_8e,{diagram:()=>gSt});function $H(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",s=new RegExp(a);e[0].match(s)&&(t[i]=!0,e.shift(1),n=!0)})}var p8e,gl,g8e,m8e,y8e,fx,A8e,SH,Skt,h8e,sh,RH,LH,IH,px,gx,MH,DH,h7,mx,NH,v8e,OH,hx,VC,PH,BH,f7,EH,Ekt,Akt,_kt,Rkt,Lkt,Ikt,Mkt,Dkt,Nkt,Okt,Pkt,Bkt,$kt,Fkt,zkt,Gkt,x8e,qkt,Vkt,Wkt,Ukt,Hkt,Ykt,Xkt,jkt,b8e,Kkt,Zkt,Qkt,T8e,Jkt,AH,w8e,C8e,c7,dx,eSt,tSt,_H,u7,wa,k8e,rSt,Um,nSt,f8e,iSt,S8e,aSt,E8e,sSt,oSt,lSt,cSt,d8e,uSt,If,kH,hSt,fSt,dSt,pSt,gSt,R8e=X(()=>{Ur();hr();ur();Yt();p8e=Ls(y2(),1),gl=Ls(gS(),1),g8e=Ls(o8e(),1),m8e=Ls(l8e(),1),y8e=Ls(c8e(),1),fx=Ls(gS(),1),A8e=Ls(u8e(),1);zr();SH=(function(){var e=v(function(_,D,I,M){for(I=I||{},M=_.length;M--;I[_[M]]=D);return I},"o"),t=[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],r=[1,26],n=[1,27],i=[1,28],a=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],g=[1,12],m=[1,13],y=[1,14],x=[1,15],b=[1,16],T=[1,19],k=[1,20],w=[1,21],C=[1,22],S=[1,23],E=[1,25],L=[1,35],N={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:v(function(D,I,M,B,P,$,G){var q=$.length-1;switch(P){case 1:return $[q-1];case 2:this.$=[];break;case 3:$[q-1].push($[q]),this.$=$[q-1];break;case 4:case 5:this.$=$[q];break;case 6:case 7:this.$=[];break;case 8:B.setWeekday("monday");break;case 9:B.setWeekday("tuesday");break;case 10:B.setWeekday("wednesday");break;case 11:B.setWeekday("thursday");break;case 12:B.setWeekday("friday");break;case 13:B.setWeekday("saturday");break;case 14:B.setWeekday("sunday");break;case 15:B.setWeekend("friday");break;case 16:B.setWeekend("saturday");break;case 17:B.setDateFormat($[q].substr(11)),this.$=$[q].substr(11);break;case 18:B.enableInclusiveEndDates(),this.$=$[q].substr(18);break;case 19:B.TopAxis(),this.$=$[q].substr(8);break;case 20:B.setAxisFormat($[q].substr(11)),this.$=$[q].substr(11);break;case 21:B.setTickInterval($[q].substr(13)),this.$=$[q].substr(13);break;case 22:B.setExcludes($[q].substr(9)),this.$=$[q].substr(9);break;case 23:B.setIncludes($[q].substr(9)),this.$=$[q].substr(9);break;case 24:B.setTodayMarker($[q].substr(12)),this.$=$[q].substr(12);break;case 27:B.setDiagramTitle($[q].substr(6)),this.$=$[q].substr(6);break;case 28:this.$=$[q].trim(),B.setAccTitle(this.$);break;case 29:case 30:this.$=$[q].trim(),B.setAccDescription(this.$);break;case 31:B.addSection($[q].substr(8)),this.$=$[q].substr(8);break;case 33:B.addTask($[q-1],$[q]),this.$="task";break;case 34:this.$=$[q-1],B.setClickEvent($[q-1],$[q],null);break;case 35:this.$=$[q-2],B.setClickEvent($[q-2],$[q-1],$[q]);break;case 36:this.$=$[q-2],B.setClickEvent($[q-2],$[q-1],null),B.setLink($[q-2],$[q]);break;case 37:this.$=$[q-3],B.setClickEvent($[q-3],$[q-2],$[q-1]),B.setLink($[q-3],$[q]);break;case 38:this.$=$[q-2],B.setClickEvent($[q-2],$[q],null),B.setLink($[q-2],$[q-1]);break;case 39:this.$=$[q-3],B.setClickEvent($[q-3],$[q-1],$[q]),B.setLink($[q-3],$[q-2]);break;case 40:this.$=$[q-1],B.setLink($[q-1],$[q]);break;case 41:case 47:this.$=$[q-1]+" "+$[q];break;case 42:case 43:case 45:this.$=$[q-2]+" "+$[q-1]+" "+$[q];break;case 44:case 46:this.$=$[q-3]+" "+$[q-2]+" "+$[q-1]+" "+$[q];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:y,28:x,29:b,30:T,31:k,33:w,35:C,36:S,37:24,38:E,40:L},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:y,28:x,29:b,30:T,31:k,33:w,35:C,36:S,37:24,38:E,40:L},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:v(function(D,I){if(I.recoverable)this.trace(D);else{var M=new Error(D);throw M.hash=I,M}},"parseError"),parse:v(function(D){var I=this,M=[0],B=[],P=[null],$=[],G=this.table,q="",z=0,V=0,j=0,ee=2,ne=1,Q=$.slice.call(arguments,1),pe=Object.create(this.lexer),te={yy:{}};for(var de in this.yy)Object.prototype.hasOwnProperty.call(this.yy,de)&&(te.yy[de]=this.yy[de]);pe.setInput(D,te.yy),te.yy.lexer=pe,te.yy.parser=this,typeof pe.yylloc>"u"&&(pe.yylloc={});var ce=pe.yylloc;$.push(ce);var ue=pe.options&&pe.options.ranges;typeof te.yy.parseError=="function"?this.parseError=te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(se){M.length=M.length-2*se,P.length=P.length-se,$.length=$.length-se}v(Re,"popStack");function ve(){var se;return se=B.pop()||pe.lex()||ne,typeof se!="number"&&(se instanceof Array&&(B=se,se=B.pop()),se=I.symbols_[se]||se),se}v(ve,"lex");for(var Ge,He,Ue,me,De,Ie,Me={},re,le,oe,he;;){if(Ue=M[M.length-1],this.defaultActions[Ue]?me=this.defaultActions[Ue]:((Ge===null||typeof Ge>"u")&&(Ge=ve()),me=G[Ue]&&G[Ue][Ge]),typeof me>"u"||!me.length||!me[0]){var xe="";he=[];for(re in G[Ue])this.terminals_[re]&&re>ee&&he.push("'"+this.terminals_[re]+"'");pe.showPosition?xe="Parse error on line "+(z+1)+`: +`+pe.showPosition()+` +Expecting `+he.join(", ")+", got '"+(this.terminals_[Ge]||Ge)+"'":xe="Parse error on line "+(z+1)+": Unexpected "+(Ge==ne?"end of input":"'"+(this.terminals_[Ge]||Ge)+"'"),this.parseError(xe,{text:pe.match,token:this.terminals_[Ge]||Ge,line:pe.yylineno,loc:ce,expected:he})}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ue+", token: "+Ge);switch(me[0]){case 1:M.push(Ge),P.push(pe.yytext),$.push(pe.yylloc),M.push(me[1]),Ge=null,He?(Ge=He,He=null):(V=pe.yyleng,q=pe.yytext,z=pe.yylineno,ce=pe.yylloc,j>0&&j--);break;case 2:if(le=this.productions_[me[1]][1],Me.$=P[P.length-le],Me._$={first_line:$[$.length-(le||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(le||1)].first_column,last_column:$[$.length-1].last_column},ue&&(Me._$.range=[$[$.length-(le||1)].range[0],$[$.length-1].range[1]]),Ie=this.performAction.apply(Me,[q,V,z,te.yy,me[1],P,$].concat(Q)),typeof Ie<"u")return Ie;le&&(M=M.slice(0,-1*le*2),P=P.slice(0,-1*le),$=$.slice(0,-1*le)),M.push(this.productions_[me[1]][0]),P.push(Me.$),$.push(Me._$),oe=G[M[M.length-2]][M[M.length-1]],M.push(oe);break;case 3:return!0}}return!0},"parse")},O=(function(){var _={EOF:1,parseError:v(function(I,M){if(this.yy.parser)this.yy.parser.parseError(I,M);else throw new Error(I)},"parseError"),setInput:v(function(D,I){return this.yy=I||this.yy||{},this._input=D,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var D=this._input[0];this.yytext+=D,this.yyleng++,this.offset++,this.match+=D,this.matched+=D;var I=D.match(/(?:\r\n?|\n).*/g);return I?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),D},"input"),unput:v(function(D){var I=D.length,M=D.split(/(?:\r\n?|\n)/g);this._input=D+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var B=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var P=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===B.length?this.yylloc.first_column:0)+B[B.length-M.length].length-M[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[P[0],P[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(D){this.unput(this.match.slice(D))},"less"),pastInput:v(function(){var D=this.matched.substr(0,this.matched.length-this.match.length);return(D.length>20?"...":"")+D.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var D=this.match;return D.length<20&&(D+=this._input.substr(0,20-D.length)),(D.substr(0,20)+(D.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var D=this.pastInput(),I=new Array(D.length+1).join("-");return D+this.upcomingInput()+` +`+I+"^"},"showPosition"),test_match:v(function(D,I){var M,B,P;if(this.options.backtrack_lexer&&(P={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(P.yylloc.range=this.yylloc.range.slice(0))),B=D[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+D[0].length},this.yytext+=D[0],this.match+=D[0],this.matches=D,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(D[0].length),this.matched+=D[0],M=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var $ in P)this[$]=P[$];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var D,I,M,B;this._more||(this.yytext="",this.match="");for(var P=this._currentRules(),$=0;$I[0].length)){if(I=M,B=$,this.options.backtrack_lexer){if(D=this.test_match(M,P[$]),D!==!1)return D;if(this._backtrack){I=!1;continue}else return!1}else if(!this.options.flex)break}return I?(D=this.test_match(I,P[B]),D!==!1?D:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var I=this.next();return I||this.lex()},"lex"),begin:v(function(I){this.conditionStack.push(I)},"begin"),popState:v(function(){var I=this.conditionStack.length-1;return I>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(I){return I=this.conditionStack.length-1-Math.abs(I||0),I>=0?this.conditionStack[I]:"INITIAL"},"topState"),pushState:v(function(I){this.begin(I)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(I,M,B,P){var $=P;switch(B){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),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],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}}};return _})();N.lexer=O;function R(){this.yy={}}return v(R,"Parser"),R.prototype=N,N.Parser=R,new R})();SH.parser=SH;Skt=SH;gl.default.extend(g8e.default);gl.default.extend(m8e.default);gl.default.extend(y8e.default);h8e={friday:5,saturday:6},sh="",RH="",LH=void 0,IH="",px=[],gx=[],MH=new Map,DH=[],h7=[],mx="",NH="",v8e=["active","done","crit","milestone","vert"],OH=[],hx="",VC=!1,PH=!1,BH="sunday",f7="saturday",EH=0,Ekt=v(function(){DH=[],h7=[],mx="",OH=[],c7=0,_H=void 0,u7=void 0,wa=[],sh="",RH="",NH="",LH=void 0,IH="",px=[],gx=[],VC=!1,PH=!1,EH=0,MH=new Map,hx="",pr(),BH="sunday",f7="saturday"},"clear"),Akt=v(function(e){hx=e},"setDiagramId"),_kt=v(function(e){RH=e},"setAxisFormat"),Rkt=v(function(){return RH},"getAxisFormat"),Lkt=v(function(e){LH=e},"setTickInterval"),Ikt=v(function(){return LH},"getTickInterval"),Mkt=v(function(e){IH=e},"setTodayMarker"),Dkt=v(function(){return IH},"getTodayMarker"),Nkt=v(function(e){sh=e},"setDateFormat"),Okt=v(function(){VC=!0},"enableInclusiveEndDates"),Pkt=v(function(){return VC},"endDatesAreInclusive"),Bkt=v(function(){PH=!0},"enableTopAxis"),$kt=v(function(){return PH},"topAxisEnabled"),Fkt=v(function(e){NH=e},"setDisplayMode"),zkt=v(function(){return NH},"getDisplayMode"),Gkt=v(function(){return sh},"getDateFormat"),x8e=v((e,t)=>{let r=t.toLowerCase().split(/[\s,]+/).filter(n=>n!=="");return[...new Set([...e,...r])]},"mergeTokens"),qkt=v(function(e){px=x8e(px,e)},"setIncludes"),Vkt=v(function(){return px},"getIncludes"),Wkt=v(function(e){gx=x8e(gx,e)},"setExcludes"),Ukt=v(function(){return gx},"getExcludes"),Hkt=v(function(){return MH},"getLinks"),Ykt=v(function(e){mx=e,DH.push(e)},"addSection"),Xkt=v(function(){return DH},"getSections"),jkt=v(function(){let e=f8e(),t=10,r=0;for(;!e&&ro))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,"d")}return[t,s]},"fixTaskDates"),AH=v(function(e,t,r){if(r=r.trim(),v(o=>{let l=o.trim();return l==="x"||l==="X"},"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));let a=/^after\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let o=null;for(let u of a.groups.ids.split(" ")){let h=Um(u);h!==void 0&&(!o||h.endTime>o.endTime)&&(o=h)}if(o)return o.endTime;let l=new Date;return l.setHours(0,0,0,0),l}let s=(0,gl.default)(r,t.trim(),!0);if(s.isValid())return s.toDate();{fe.debug("Invalid date:"+r),fe.debug("With date format:"+t.trim());let o=new Date(r);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+r);return o}},"getStartDate"),w8e=v(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),C8e=v(function(e,t,r,n=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let h=null;for(let d of a.groups.ids.split(" ")){let p=Um(d);p!==void 0&&(!h||p.startTime{window.open(r,"_self")}),MH.set(n,r))}),S8e(e,"clickable")},"setLink"),S8e=v(function(e,t){e.split(",").forEach(function(r){let n=Um(r);n!==void 0&&n.classes.push(t)})},"setClass"),aSt=v(function(e,t,r){if(ze().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{ar.runFunc(t,...n)})},"setClickFun"),E8e=v(function(e,t){OH.push(function(){let r=hx?`${hx}-${e}`:e,n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){let r=hx?`${hx}-${e}`:e,n=document.querySelector(`[id="${r}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),sSt=v(function(e,t,r){e.split(",").forEach(function(n){aSt(n,t,r)}),S8e(e,"clickable")},"setClickEvent"),oSt=v(function(e){OH.forEach(function(t){t(e)})},"bindFunctions"),lSt={getConfig:v(()=>ze().gantt,"getConfig"),clear:Ekt,setDateFormat:Nkt,getDateFormat:Gkt,enableInclusiveEndDates:Okt,endDatesAreInclusive:Pkt,enableTopAxis:Bkt,topAxisEnabled:$kt,setAxisFormat:_kt,getAxisFormat:Rkt,setTickInterval:Lkt,getTickInterval:Ikt,setTodayMarker:Mkt,getTodayMarker:Dkt,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,setDiagramId:Akt,setDisplayMode:Fkt,getDisplayMode:zkt,setAccDescription:Ir,getAccDescription:Mr,addSection:Ykt,getSections:Xkt,getTasks:jkt,addTask:rSt,findTaskById:Um,addTaskOrg:nSt,setIncludes:qkt,getIncludes:Vkt,setExcludes:Wkt,getExcludes:Ukt,setClickEvent:sSt,setLink:iSt,getLinks:Hkt,bindFunctions:oSt,parseDuration:w8e,isInvalidDate:b8e,setWeekday:Kkt,getWeekday:Zkt,setWeekend:Qkt};v($H,"getTaskTags");fx.default.extend(A8e.default);cSt=v(function(){fe.debug("Something is calling, setConf, remove the call")},"setConf"),d8e={monday:ud,tuesday:k4,wednesday:S4,thursday:lu,friday:E4,saturday:A4,sunday:nc},uSt=v((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s=r[s]){r[s]=a.endTime,a.order=s+t,s>i&&(i=s);break}return i},"getMaxIntersections"),kH=1e4,hSt=v(function(e,t,r,n){let i=ze().gantt;n.db.setDiagramId(t);let a=ze().securityLevel,s;a==="sandbox"&&(s=ct("#i"+t));let o=a==="sandbox"?ct(s.nodes()[0].contentDocument.body):ct("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(t);If=u.parentElement.offsetWidth,If===void 0&&(If=1200),i.useWidth!==void 0&&(If=i.useWidth);let h=n.db.getTasks(),f=h.filter(N=>!N.vert),d=[];for(let N of f)d.push(N.type);d=L(d);let p={},g=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let N={};for(let R of f)N[R.section]===void 0?N[R.section]=[R]:N[R.section].push(R);let O=0;for(let R of Object.keys(N)){let _=uSt(N[R],O)+1;O+=_,g+=_*(i.barHeight+i.barGap),p[R]=_}}else{g+=f.length*(i.barHeight+i.barGap);for(let N of d)p[N]=f.filter(O=>O.type===N).length}u.setAttribute("viewBox","0 0 "+If+" "+g);let m=o.select(`[id="${t}"]`),y=L4().domain([BS(h,function(N){return N.startTime}),PS(h,function(N){return N.endTime})]).rangeRound([0,If-i.leftPadding-i.rightPadding]);function x(N,O){let R=N.startTime,_=O.startTime,D=0;return R>_?D=1:R<_&&(D=-1),D}v(x,"taskCompare"),h.sort(x),b(h,If,g),Vr(m,g,If,i.useMaxWidth),m.append("text").text(n.db.getDiagramTitle()).attr("x",If/2).attr("y",i.titleTopMargin).attr("class","titleText");function b(N,O,R){let _=i.barHeight,D=_+i.barGap,I=i.topPadding,M=i.leftPadding,B=rc().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(iM);k(D,I,M,O,R,N,n.db.getExcludes(),n.db.getIncludes()),C(M,I,O,R),T(N,D,I,M,_,B,O,R),S(D,I,M,_,B),E(M,I,O,R)}v(b,"makeGantt");function T(N,O,R,_,D,I,M){N.sort((V,j)=>V.vert===j.vert?0:V.vert?1:-1);let B=N.filter(V=>!V.vert),$=[...new Set(B.map(V=>V.order))].map(V=>B.find(j=>j.order===V));m.append("g").selectAll("rect").data($).enter().append("rect").attr("x",0).attr("y",function(V,j){return j=V.order,j*O+R-2}).attr("width",function(){return M-i.rightPadding/2}).attr("height",O).attr("class",function(V){for(let[j,ee]of d.entries())if(V.type===ee)return"section section"+j%i.numberSectionStyles;return"section section0"}).enter();let G=m.append("g").selectAll("rect").data(N).enter(),q=n.db.getLinks();if(G.append("rect").attr("id",function(V){return t+"-"+V.id}).attr("rx",3).attr("ry",3).attr("x",function(V){return V.milestone?y(V.startTime)+_+.5*(y(V.endTime)-y(V.startTime))-.5*D:y(V.startTime)+_}).attr("y",function(V,j){return j=V.order,V.vert?i.gridLineStartPadding:j*O+R}).attr("width",function(V){return V.milestone?D:V.vert?.08*D:y(V.renderEndTime||V.endTime)-y(V.startTime)}).attr("height",function(V){return V.vert?B.length*(i.barHeight+i.barGap)+i.barHeight*2:D}).attr("transform-origin",function(V,j){return j=V.order,(y(V.startTime)+_+.5*(y(V.endTime)-y(V.startTime))).toString()+"px "+(j*O+R+.5*D).toString()+"px"}).attr("class",function(V){let j="task",ee="";V.classes.length>0&&(ee=V.classes.join(" "));let ne=0;for(let[pe,te]of d.entries())V.type===te&&(ne=pe%i.numberSectionStyles);let Q="";return V.active?V.crit?Q+=" activeCrit":Q=" active":V.done?V.crit?Q=" doneCrit":Q=" done":V.crit&&(Q+=" crit"),Q.length===0&&(Q=" task"),V.milestone&&(Q=" milestone "+Q),V.vert&&(Q=" vert "+Q),Q+=ne,Q+=" "+ee,j+Q}),G.append("text").attr("id",function(V){return t+"-"+V.id+"-text"}).text(function(V){return V.task}).attr("font-size",i.fontSize).attr("x",function(V){let j=y(V.startTime),ee=y(V.renderEndTime||V.endTime);if(V.milestone&&(j+=.5*(y(V.endTime)-y(V.startTime))-.5*D,ee=j+D),V.vert)return y(V.startTime)+_;let ne=this.getBBox().width;return ne>ee-j?ee+ne+1.5*i.leftPadding>M?j+_-5:ee+_+5:(ee-j)/2+j+_}).attr("y",function(V,j){return V.vert?i.gridLineStartPadding+B.length*(i.barHeight+i.barGap)+60:(j=V.order,j*O+i.barHeight/2+(i.fontSize/2-2)+R)}).attr("text-height",D).attr("class",function(V){let j=y(V.startTime),ee=y(V.endTime);V.milestone&&(ee=j+D);let ne=this.getBBox().width,Q="";V.classes.length>0&&(Q=V.classes.join(" "));let pe=0;for(let[de,ce]of d.entries())V.type===ce&&(pe=de%i.numberSectionStyles);let te="";return V.active&&(V.crit?te="activeCritText"+pe:te="activeText"+pe),V.done?V.crit?te=te+" doneCritText"+pe:te=te+" doneText"+pe:V.crit&&(te=te+" critText"+pe),V.milestone&&(te+=" milestoneText"),V.vert&&(te+=" vertText"),ne>ee-j?ee+ne+1.5*i.leftPadding>M?Q+" taskTextOutsideLeft taskTextOutside"+pe+" "+te:Q+" taskTextOutsideRight taskTextOutside"+pe+" "+te+" width-"+ne:Q+" taskText taskText"+pe+" "+te+" width-"+ne}),ze().securityLevel==="sandbox"){let V;V=ct("#i"+t);let j=V.nodes()[0].contentDocument;G.filter(function(ee){return q.has(ee.id)}).each(function(ee){var ne=j.querySelector("#"+CSS.escape(t+"-"+ee.id)),Q=j.querySelector("#"+CSS.escape(t+"-"+ee.id+"-text"));let pe=ne.parentNode;var te=j.createElement("a");te.setAttribute("xlink:href",q.get(ee.id)),te.setAttribute("target","_top"),pe.appendChild(te),te.appendChild(ne),te.appendChild(Q)})}}v(T,"drawRects");function k(N,O,R,_,D,I,M,B){if(M.length===0&&B.length===0)return;let P,$;for(let{startTime:ee,endTime:ne}of I)(P===void 0||ee$)&&($=ne);if(!P||!$)return;if((0,fx.default)($).diff((0,fx.default)(P),"year")>5){fe.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let G=n.db.getDateFormat(),q=[],z=null,V=(0,fx.default)(P);for(;V.valueOf()<=$;)n.db.isInvalidDate(V,G,M,B)?z?z.end=V:z={start:V,end:V}:z&&(q.push(z),z=null),V=V.add(1,"d");m.append("g").selectAll("rect").data(q).enter().append("rect").attr("id",ee=>t+"-exclude-"+ee.start.format("YYYY-MM-DD")).attr("x",ee=>y(ee.start.startOf("day"))+R).attr("y",i.gridLineStartPadding).attr("width",ee=>y(ee.end.endOf("day"))-y(ee.start.startOf("day"))).attr("height",D-O-i.gridLineStartPadding).attr("transform-origin",function(ee,ne){return(y(ee.start)+R+.5*(y(ee.end)-y(ee.start))).toString()+"px "+(ne*N+.5*D).toString()+"px"}).attr("class","exclude-range")}v(k,"drawExcludeDays");function w(N,O,R,_){if(R<=0||N>O)return 1/0;let D=O-N,I=fx.default.duration({[_??"day"]:R}).asMilliseconds();return I<=0?1/0:Math.ceil(D/I)}v(w,"getEstimatedTickCount");function C(N,O,R,_){let D=n.db.getDateFormat(),I=n.db.getAxisFormat(),M;I?M=I:D==="D"?M="%d":M=i.axisFormat??"%Y-%m-%d";let B=CI(y).tickSize(-_+O+i.gridLineStartPadding).tickFormat(B0(M)),$=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if($!==null){let G=parseInt($[1],10);if(isNaN(G)||G<=0)fe.warn(`Invalid tick interval value: "${$[1]}". Skipping custom tick interval.`);else{let q=$[2],z=n.db.getWeekday()||i.weekday,V=y.domain(),j=V[0],ee=V[1],ne=w(j,ee,G,q);if(ne>kH)fe.warn(`The tick interval "${G}${q}" would generate ${ne} ticks, which exceeds the maximum allowed (${kH}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(q){case"millisecond":B.ticks(su.every(G));break;case"second":B.ticks(Xo.every(G));break;case"minute":B.ticks(Dh.every(G));break;case"hour":B.ticks(Nh.every(G));break;case"day":B.ticks(Tl.every(G));break;case"week":B.ticks(d8e[z].every(G));break;case"month":B.ticks(Oh.every(G));break}}}if(m.append("g").attr("class","grid").attr("transform","translate("+N+", "+(_-50)+")").call(B).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let G=wI(y).tickSize(-_+O+i.gridLineStartPadding).tickFormat(B0(M));if($!==null){let q=parseInt($[1],10);if(isNaN(q)||q<=0)fe.warn(`Invalid tick interval value: "${$[1]}". Skipping custom tick interval.`);else{let z=$[2],V=n.db.getWeekday()||i.weekday,j=y.domain(),ee=j[0],ne=j[1];if(w(ee,ne,q,z)<=kH)switch(z){case"millisecond":G.ticks(su.every(q));break;case"second":G.ticks(Xo.every(q));break;case"minute":G.ticks(Dh.every(q));break;case"hour":G.ticks(Nh.every(q));break;case"day":G.ticks(Tl.every(q));break;case"week":G.ticks(d8e[V].every(q));break;case"month":G.ticks(Oh.every(q));break}}}m.append("g").attr("class","grid").attr("transform","translate("+N+", "+O+")").call(G).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}v(C,"makeGrid");function S(N,O){let R=0,_=Object.keys(p).map(D=>[D,p[D]]);m.append("g").selectAll("text").data(_).enter().append(function(D){let I=D[0].split(vt.lineBreakRegex),M=-(I.length-1)/2,B=l.createElementNS("http://www.w3.org/2000/svg","text");B.setAttribute("dy",M+"em");for(let[P,$]of I.entries()){let G=l.createElementNS("http://www.w3.org/2000/svg","tspan");G.setAttribute("alignment-baseline","central"),G.setAttribute("x","10"),P>0&&G.setAttribute("dy","1em"),G.textContent=$,B.appendChild(G)}return B}).attr("x",10).attr("y",function(D,I){if(I>0)for(let M=0;M` .mermaid-main-font { font-family: ${e.fontFamily}; } @@ -1696,13 +1761,22 @@ Expecting `+He.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":nt="Parse erro fill: ${e.titleColor||e.textColor}; font-family: ${e.fontFamily}; } -`,"getStyles"),n2t=i2t,a2t={parser:gvt,db:Qvt,renderer:r2t,styles:n2t}});var h6e={};Lr(h6e,{diagram:()=>f2t});var s2t,o2t,l2t,c2t,u2t,h2t,f2t,f6e=q(()=>{Ja();Er();er();fl();s2t={parse:b(async e=>{let t=await xn("info",e);ee.debug(t)},"parse")},o2t={version:"11.15.0"},l2t=b(()=>o2t.version,"getVersion"),c2t={getVersion:l2t},u2t=b((e,t,r)=>{ee.debug(`rendering info diagram -`+e);let i=yi(t);Mr(i,100,400,!0),i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),h2t={draw:u2t},f2t={parser:s2t,db:c2t,renderer:h2t}});var g6e={};Lr(g6e,{diagram:()=>A2t});var d6e,wq,E_,kq,d2t,p2t,g2t,m2t,y2t,v2t,b2t,p6e,x2t,T2t,w2t,k2t,C2t,S2t,E2t,A2t,m6e=q(()=>{Ja();au();$r();Er();er();fl();Ar();d6e=rr.pie,wq={sections:new Map,showData:!1,config:d6e},E_=wq.sections,kq=wq.showData,d2t=structuredClone(d6e),p2t=b(()=>structuredClone(d2t),"getConfig"),g2t=b(()=>{E_=new Map,kq=wq.showData,fr()},"clear"),m2t=b(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);E_.has(e)||(E_.set(e,t),ee.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),y2t=b(()=>E_,"getSections"),v2t=b(e=>{kq=e},"setShowData"),b2t=b(()=>kq,"getShowData"),p6e={getConfig:p2t,clear:g2t,setDiagramTitle:kr,getDiagramTitle:Tr,setAccTitle:yr,getAccTitle:vr,setAccDescription:br,getAccDescription:xr,addSection:m2t,getSections:y2t,setShowData:v2t,getShowData:b2t},x2t=b((e,t)=>{Un(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),T2t={parse:b(async e=>{let t=await xn("pie",e);ee.debug(t),x2t(t,p6e)},"parse")},w2t=b(e=>` +`,"getStyles"),pSt=dSt,gSt={parser:Skt,db:lSt,renderer:fSt,styles:pSt}});var L8e={};cr(L8e,{diagram:()=>wSt});var mSt,ySt,vSt,xSt,bSt,TSt,wSt,I8e=X(()=>{qi();hr();ur();Yt();ss();mSt={parse:v(async e=>{let t=await Ei("info",e);fe.debug(t)},"parse")},ySt={version:"11.17.2"},vSt=v(()=>ySt.version,"getVersion"),xSt={getVersion:vSt},bSt=v((e,t,r)=>{fe.debug(`rendering info diagram +`+e);let n=xn(t);Vr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),TSt={draw:bSt},wSt={parser:mSt,db:xSt,renderer:TSt}});var N8e={};cr(N8e,{diagram:()=>BSt});var M8e,FH,d7,zH,CSt,kSt,SSt,ESt,ASt,_St,RSt,D8e,LSt,ISt,MSt,DSt,NSt,OSt,PSt,BSt,O8e=X(()=>{Us();qi();Ur();hr();ur();Yt();ss();zr();M8e=dr.pie,FH={sections:new Map,showData:!1,config:M8e},d7=FH.sections,zH=FH.showData,CSt=structuredClone(M8e),kSt=v(()=>structuredClone(CSt),"getConfig"),SSt=v(()=>{d7=new Map,zH=FH.showData,pr()},"clear"),ESt=v(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);d7.has(e)||(d7.set(e,t),fe.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),ASt=v(()=>d7,"getSections"),_St=v(e=>{zH=e},"setShowData"),RSt=v(()=>zH,"getShowData"),D8e={getConfig:kSt,clear:SSt,setDiagramTitle:$r,getDiagramTitle:Dr,setAccTitle:Ar,getAccTitle:Lr,setAccDescription:Ir,getAccDescription:Mr,addSection:ESt,getSections:ASt,setShowData:_St,getShowData:RSt},LSt=v((e,t)=>{Fn(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),ISt={parse:v(async e=>{let t=await Ei("pie",e);fe.debug(t),LSt(t,D8e)},"parse")},MSt=v(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; stroke-width : ${e.pieStrokeWidth}; opacity : ${e.pieOpacity}; } + .pieCircle.highlighted{ + scale: 1.05; + opacity: 1; + } + .pieCircle.highlightedOnHover:hover{ + transition-duration: 250ms; + scale: 1.05; + opacity: 1; + } .pieOuterCircle{ stroke: ${e.pieOuterStrokeColor}; stroke-width: ${e.pieOuterStrokeWidth}; @@ -1725,37 +1799,37 @@ Expecting `+He.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":nt="Parse erro font-family: ${e.fontFamily}; font-size: ${e.pieLegendTextSize}; } -`,"getStyles"),k2t=w2t,C2t=b(e=>{let t=[...e.values()].reduce((n,a)=>n+a,0),r=[...e.entries()].map(([n,a])=>({label:n,value:a})).filter(n=>n.value/t*100>=1);return pI().value(n=>n.value).sort(null)(r)},"createPieArcs"),S2t=b((e,t,r,i)=>{ee.debug(`rendering pie chart -`+e);let n=i.db,a=we(),s=Yr(n.getConfig(),a.pie),o=40,l=18,u=4,h=450,f=h,d=yi(t),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:g}=a,[m]=Ls(g.pieOuterStrokeWidth);m??=2;let y=s.textPosition,v=Math.min(f,h)/2-o,x=Rc().innerRadius(0).outerRadius(v),T=Rc().innerRadius(v*y).outerRadius(v*y);p.append("circle").attr("cx",0).attr("cy",0).attr("r",v+m/2).attr("class","pieOuterCircle");let C=n.getSections(),w=C2t(C),k=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],E=0;C.forEach($=>{E+=$});let A=w.filter($=>($.data.value/E*100).toFixed(0)!=="0"),N=no(k).domain([...C.keys()]);p.selectAll("mySlices").data(A).enter().append("path").attr("d",x).attr("fill",$=>N($.data.label)).attr("class","pieCircle"),p.selectAll("mySlices").data(A).enter().append("text").text($=>($.data.value/E*100).toFixed(0)+"%").attr("transform",$=>"translate("+T.centroid($)+")").style("text-anchor","middle").attr("class","slice");let P=p.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText"),O=[...C.entries()].map(([$,G])=>({label:$,value:G})),L=p.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",($,G)=>{let U=l+u,j=U*O.length/2,H=12*l,Q=G*U-j;return"translate("+H+","+Q+")"});L.append("rect").attr("width",l).attr("height",l).style("fill",$=>N($.label)).style("stroke",$=>N($.label)),L.append("text").attr("x",l+u).attr("y",l-u).text($=>n.getShowData()?`${$.label} [${$.value}]`:$.label);let _=Math.max(...L.selectAll("text").nodes().map($=>$?.getBoundingClientRect().width??0)),R=f+o+l+u+_,D=P.node()?.getBoundingClientRect().width??0,I=f/2-D/2,B=f/2+D/2,M=Math.min(0,I),z=Math.max(R,B)-M;d.attr("viewBox",`${M} 0 ${z} ${h}`),Mr(d,h,z,s.useMaxWidth)},"draw"),E2t={draw:S2t},A2t={parser:T2t,db:p6e,renderer:E2t,styles:k2t}});var D6e={};Lr(D6e,{diagram:()=>O2t});function Sq(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function y6e(e){return!/^\d+$/.test(e)}function v6e(e){return!/^\d+px$/.test(e)}function Cu(e){return mr(e.trim(),R2t)}function b6e(e){_a.setData({quadrant1Text:Cu(e.text)})}function x6e(e){_a.setData({quadrant2Text:Cu(e.text)})}function T6e(e){_a.setData({quadrant3Text:Cu(e.text)})}function w6e(e){_a.setData({quadrant4Text:Cu(e.text)})}function k6e(e){_a.setData({xAxisLeftText:Cu(e.text)})}function C6e(e){_a.setData({xAxisRightText:Cu(e.text)})}function S6e(e){_a.setData({yAxisTopText:Cu(e.text)})}function E6e(e){_a.setData({yAxisBottomText:Cu(e.text)})}function __(e){let t={};for(let r of e){let[i,n]=r.trim().split(/\s*:\s*/);if(i==="radius"){if(y6e(n))throw new A_(i,n,"number");t.radius=parseInt(n)}else if(i==="color"){if(Sq(n))throw new A_(i,n,"hex code");t.color=n}else if(i==="stroke-color"){if(Sq(n))throw new A_(i,n,"hex code");t.strokeColor=n}else if(i==="stroke-width"){if(v6e(n))throw new A_(i,n,"number of pixels (eg. 10px)");t.strokeWidth=n}else throw new Error(`style named ${i} is not supported.`)}return t}function A6e(e,t,r,i,n){let a=__(n);_a.addPoints([{x:r,y:i,text:Cu(e.text),className:t,...a}])}function _6e(e,t){_a.addClass(e,__(t))}function L6e(e){_a.setConfig({chartWidth:e})}function R6e(e){_a.setConfig({chartHeight:e})}function I6e(){let e=we(),{themeVariables:t,quadrantChart:r}=e;return r&&_a.setConfig(r),_a.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),_a.setData({titleText:Tr()}),_a.build()}var Cq,_2t,bs,L2t,A_,R2t,_a,I2t,D2t,N2t,M2t,O2t,N6e=q(()=>{Er();er();Ar();Ar();Cq=(function(){var e=b(function(X,he,Z,Ve){for(Z=Z||{},Ve=X.length;Ve--;Z[X[Ve]]=he);return Z},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],a=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],g=[1,43],m=[1,41],y=[1,45],v=[1,14],x=[1,23],T=[1,18],C=[1,19],w=[1,20],k=[1,21],E=[1,22],A=[1,24],N=[1,25],P=[1,26],O=[1,27],L=[1,28],_=[1,29],R=[1,32],D=[1,33],I=[1,34],B=[1,39],M=[1,40],F=[1,42],z=[1,44],$=[1,63],G=[1,62],U=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],j=[1,66],H=[1,67],Q=[1,68],Y=[1,69],se=[1,70],J=[1,71],re=[1,72],ie=[1,73],te=[1,74],xe=[1,75],fe=[1,76],Se=[1,77],Me=[4,5,6,7,8,9,10,11,12,13,14,15,18],ke=[1,91],Ce=[1,92],Ie=[1,93],Pe=[1,100],pe=[1,94],Je=[1,97],Te=[1,95],Be=[1,96],He=[1,98],nt=[1,99],qe=[1,103],Ue=[10,55,56,57],ge=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ce={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:b(function(he,Z,Ve,ve,Oe,Ae,Fe){var Re=Ae.length-1;switch(Oe){case 23:this.$=Ae[Re];break;case 24:this.$=Ae[Re-1]+""+Ae[Re];break;case 26:this.$=Ae[Re-1]+Ae[Re];break;case 27:this.$=[Ae[Re].trim()];break;case 28:Ae[Re-2].push(Ae[Re].trim()),this.$=Ae[Re-2];break;case 29:this.$=Ae[Re-4],ve.addClass(Ae[Re-2],Ae[Re]);break;case 37:this.$=[];break;case 42:this.$=Ae[Re].trim(),ve.setDiagramTitle(this.$);break;case 43:this.$=Ae[Re].trim(),ve.setAccTitle(this.$);break;case 44:case 45:this.$=Ae[Re].trim(),ve.setAccDescription(this.$);break;case 46:ve.addSection(Ae[Re].substr(8)),this.$=Ae[Re].substr(8);break;case 47:ve.addPoint(Ae[Re-3],"",Ae[Re-1],Ae[Re],[]);break;case 48:ve.addPoint(Ae[Re-4],Ae[Re-3],Ae[Re-1],Ae[Re],[]);break;case 49:ve.addPoint(Ae[Re-4],"",Ae[Re-2],Ae[Re-1],Ae[Re]);break;case 50:ve.addPoint(Ae[Re-5],Ae[Re-4],Ae[Re-2],Ae[Re-1],Ae[Re]);break;case 51:ve.setXAxisLeftText(Ae[Re-2]),ve.setXAxisRightText(Ae[Re]);break;case 52:Ae[Re-1].text+=" \u27F6 ",ve.setXAxisLeftText(Ae[Re-1]);break;case 53:ve.setXAxisLeftText(Ae[Re]);break;case 54:ve.setYAxisBottomText(Ae[Re-2]),ve.setYAxisTopText(Ae[Re]);break;case 55:Ae[Re-1].text+=" \u27F6 ",ve.setYAxisBottomText(Ae[Re-1]);break;case 56:ve.setYAxisBottomText(Ae[Re]);break;case 57:ve.setQuadrant1Text(Ae[Re]);break;case 58:ve.setQuadrant2Text(Ae[Re]);break;case 59:ve.setQuadrant3Text(Ae[Re]);break;case 60:ve.setQuadrant4Text(Ae[Re]);break;case 64:this.$={text:Ae[Re],type:"text"};break;case 65:this.$={text:Ae[Re-1].text+""+Ae[Re],type:Ae[Re-1].type};break;case 66:this.$={text:Ae[Re],type:"text"};break;case 67:this.$={text:Ae[Re],type:"markdown"};break;case 68:this.$=Ae[Re];break;case 69:this.$=Ae[Re-1]+""+Ae[Re];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:i,56:n,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:n,57:a},{18:t,26:9,27:2,28:r,55:i,56:n,57:a},e(s,[2,33],{29:10}),e(o,[2,61]),e(o,[2,62]),e(o,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:g,14:m,15:y,18:v,25:x,35:T,37:C,39:w,41:k,42:E,48:A,50:N,51:P,52:O,53:L,54:_,60:R,61:D,63:I,64:B,65:M,66:F,67:z}),e(s,[2,34]),{27:46,55:i,56:n,57:a},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:h,5:f,10:d,12:p,13:g,14:m,15:y,18:v,25:x,35:T,37:C,39:w,41:k,42:E,48:A,50:N,51:P,52:O,53:L,54:_,60:R,61:D,63:I,64:B,65:M,66:F,67:z}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:52,58:31,60:R,61:D,63:I,64:B,65:M,66:F,67:z},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:53,58:31,60:R,61:D,63:I,64:B,65:M,66:F,67:z},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:54,58:31,60:R,61:D,63:I,64:B,65:M,66:F,67:z},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:55,58:31,60:R,61:D,63:I,64:B,65:M,66:F,67:z},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:56,58:31,60:R,61:D,63:I,64:B,65:M,66:F,67:z},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:57,58:31,60:R,61:D,63:I,64:B,65:M,66:F,67:z},{4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,44:[1,58],47:[1,59],58:61,59:60,63:I,64:B,65:M,66:F,67:z},e(U,[2,64]),e(U,[2,66]),e(U,[2,67]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(U,[2,79]),e(U,[2,80]),e(U,[2,81]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:j,5:H,6:Q,7:Y,8:se,9:J,10:re,11:ie,12:te,13:xe,14:fe,15:Se,21:64},e(l,[2,53],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,49:[1,78],63:I,64:B,65:M,66:F,67:z}),e(l,[2,56],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,49:[1,79],63:I,64:B,65:M,66:F,67:z}),e(l,[2,57],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,63:I,64:B,65:M,66:F,67:z}),e(l,[2,58],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,63:I,64:B,65:M,66:F,67:z}),e(l,[2,59],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,63:I,64:B,65:M,66:F,67:z}),e(l,[2,60],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,63:I,64:B,65:M,66:F,67:z}),{45:[1,80]},{44:[1,81]},e(U,[2,65]),e(U,[2,82]),e(U,[2,83]),e(U,[2,84]),{3:83,4:j,5:H,6:Q,7:Y,8:se,9:J,10:re,11:ie,12:te,13:xe,14:fe,15:Se,18:[1,82]},e(Me,[2,23]),e(Me,[2,1]),e(Me,[2,2]),e(Me,[2,3]),e(Me,[2,4]),e(Me,[2,5]),e(Me,[2,6]),e(Me,[2,7]),e(Me,[2,8]),e(Me,[2,9]),e(Me,[2,10]),e(Me,[2,11]),e(Me,[2,12]),e(l,[2,52],{58:31,43:84,4:h,5:f,10:d,12:p,13:g,14:m,15:y,60:R,61:D,63:I,64:B,65:M,66:F,67:z}),e(l,[2,55],{58:31,43:85,4:h,5:f,10:d,12:p,13:g,14:m,15:y,60:R,61:D,63:I,64:B,65:M,66:F,67:z}),{46:[1,86]},{45:[1,87]},{4:ke,5:Ce,6:Ie,8:Pe,11:pe,13:Je,16:90,17:Te,18:Be,19:He,20:nt,22:89,23:88},e(Me,[2,24]),e(l,[2,51],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,63:I,64:B,65:M,66:F,67:z}),e(l,[2,54],{59:60,58:61,4:h,5:f,8:$,10:d,12:p,13:g,14:m,15:y,18:G,63:I,64:B,65:M,66:F,67:z}),e(l,[2,47],{22:89,16:90,23:101,4:ke,5:Ce,6:Ie,8:Pe,11:pe,13:Je,17:Te,18:Be,19:He,20:nt}),{46:[1,102]},e(l,[2,29],{10:qe}),e(Ue,[2,27],{16:104,4:ke,5:Ce,6:Ie,8:Pe,11:pe,13:Je,17:Te,18:Be,19:He,20:nt}),e(ge,[2,25]),e(ge,[2,13]),e(ge,[2,14]),e(ge,[2,15]),e(ge,[2,16]),e(ge,[2,17]),e(ge,[2,18]),e(ge,[2,19]),e(ge,[2,20]),e(ge,[2,21]),e(ge,[2,22]),e(l,[2,49],{10:qe}),e(l,[2,48],{22:89,16:90,23:105,4:ke,5:Ce,6:Ie,8:Pe,11:pe,13:Je,17:Te,18:Be,19:He,20:nt}),{4:ke,5:Ce,6:Ie,8:Pe,11:pe,13:Je,16:90,17:Te,18:Be,19:He,20:nt,22:106},e(ge,[2,26]),e(l,[2,50],{10:qe}),e(Ue,[2,28],{16:104,4:ke,5:Ce,6:Ie,8:Pe,11:pe,13:Je,17:Te,18:Be,19:He,20:nt})],defaultActions:{8:[2,30],9:[2,31]},parseError:b(function(he,Z){if(Z.recoverable)this.trace(he);else{var Ve=new Error(he);throw Ve.hash=Z,Ve}},"parseError"),parse:b(function(he){var Z=this,Ve=[0],ve=[],Oe=[null],Ae=[],Fe=this.table,Re="",We=0,De=0,Ye=0,ue=2,Tt=1,be=Ae.slice.call(arguments,1),it=Object.create(this.lexer),ft={yy:{}};for(var Dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Dt)&&(ft.yy[Dt]=this.yy[Dt]);it.setInput(he,ft.yy),ft.yy.lexer=it,ft.yy.parser=this,typeof it.yylloc>"u"&&(it.yylloc={});var mt=it.yylloc;Ae.push(mt);var vt=it.options&&it.options.ranges;typeof ft.yy.parseError=="function"?this.parseError=ft.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(Vt){Ve.length=Ve.length-2*Vt,Oe.length=Oe.length-Vt,Ae.length=Ae.length-Vt}b(ut,"popStack");function oe(){var Vt;return Vt=ve.pop()||it.lex()||Tt,typeof Vt!="number"&&(Vt instanceof Array&&(ve=Vt,Vt=ve.pop()),Vt=Z.symbols_[Vt]||Vt),Vt}b(oe,"lex");for(var ot,ct,et,me,Ze,rt,at={},_t,At,Mt,ur;;){if(et=Ve[Ve.length-1],this.defaultActions[et]?me=this.defaultActions[et]:((ot===null||typeof ot>"u")&&(ot=oe()),me=Fe[et]&&Fe[et][ot]),typeof me>"u"||!me.length||!me[0]){var Yt="";ur=[];for(_t in Fe[et])this.terminals_[_t]&&_t>ue&&ur.push("'"+this.terminals_[_t]+"'");it.showPosition?Yt="Parse error on line "+(We+1)+`: -`+it.showPosition()+` -Expecting `+ur.join(", ")+", got '"+(this.terminals_[ot]||ot)+"'":Yt="Parse error on line "+(We+1)+": Unexpected "+(ot==Tt?"end of input":"'"+(this.terminals_[ot]||ot)+"'"),this.parseError(Yt,{text:it.match,token:this.terminals_[ot]||ot,line:it.yylineno,loc:mt,expected:ur})}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+et+", token: "+ot);switch(me[0]){case 1:Ve.push(ot),Oe.push(it.yytext),Ae.push(it.yylloc),Ve.push(me[1]),ot=null,ct?(ot=ct,ct=null):(De=it.yyleng,Re=it.yytext,We=it.yylineno,mt=it.yylloc,Ye>0&&Ye--);break;case 2:if(At=this.productions_[me[1]][1],at.$=Oe[Oe.length-At],at._$={first_line:Ae[Ae.length-(At||1)].first_line,last_line:Ae[Ae.length-1].last_line,first_column:Ae[Ae.length-(At||1)].first_column,last_column:Ae[Ae.length-1].last_column},vt&&(at._$.range=[Ae[Ae.length-(At||1)].range[0],Ae[Ae.length-1].range[1]]),rt=this.performAction.apply(at,[Re,De,We,ft.yy,me[1],Oe,Ae].concat(be)),typeof rt<"u")return rt;At&&(Ve=Ve.slice(0,-1*At*2),Oe=Oe.slice(0,-1*At),Ae=Ae.slice(0,-1*At)),Ve.push(this.productions_[me[1]][0]),Oe.push(at.$),Ae.push(at._$),Mt=Fe[Ve[Ve.length-2]][Ve[Ve.length-1]],Ve.push(Mt);break;case 3:return!0}}return!0},"parse")},V=(function(){var X={EOF:1,parseError:b(function(Z,Ve){if(this.yy.parser)this.yy.parser.parseError(Z,Ve);else throw new Error(Z)},"parseError"),setInput:b(function(he,Z){return this.yy=Z||this.yy||{},this._input=he,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var he=this._input[0];this.yytext+=he,this.yyleng++,this.offset++,this.match+=he,this.matched+=he;var Z=he.match(/(?:\r\n?|\n).*/g);return Z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),he},"input"),unput:b(function(he){var Z=he.length,Ve=he.split(/(?:\r\n?|\n)/g);this._input=he+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Z),this.offset-=Z;var ve=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ve.length-1&&(this.yylineno-=Ve.length-1);var Oe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ve?(Ve.length===ve.length?this.yylloc.first_column:0)+ve[ve.length-Ve.length].length-Ve[0].length:this.yylloc.first_column-Z},this.options.ranges&&(this.yylloc.range=[Oe[0],Oe[0]+this.yyleng-Z]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(he){this.unput(this.match.slice(he))},"less"),pastInput:b(function(){var he=this.matched.substr(0,this.matched.length-this.match.length);return(he.length>20?"...":"")+he.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var he=this.match;return he.length<20&&(he+=this._input.substr(0,20-he.length)),(he.substr(0,20)+(he.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var he=this.pastInput(),Z=new Array(he.length+1).join("-");return he+this.upcomingInput()+` -`+Z+"^"},"showPosition"),test_match:b(function(he,Z){var Ve,ve,Oe;if(this.options.backtrack_lexer&&(Oe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Oe.yylloc.range=this.yylloc.range.slice(0))),ve=he[0].match(/(?:\r\n?|\n).*/g),ve&&(this.yylineno+=ve.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ve?ve[ve.length-1].length-ve[ve.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+he[0].length},this.yytext+=he[0],this.match+=he[0],this.matches=he,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(he[0].length),this.matched+=he[0],Ve=this.performAction.call(this,this.yy,this,Z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ve)return Ve;if(this._backtrack){for(var Ae in Oe)this[Ae]=Oe[Ae];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var he,Z,Ve,ve;this._more||(this.yytext="",this.match="");for(var Oe=this._currentRules(),Ae=0;AeZ[0].length)){if(Z=Ve,ve=Ae,this.options.backtrack_lexer){if(he=this.test_match(Ve,Oe[Ae]),he!==!1)return he;if(this._backtrack){Z=!1;continue}else return!1}else if(!this.options.flex)break}return Z?(he=this.test_match(Z,Oe[ve]),he!==!1?he:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var Z=this.next();return Z||this.lex()},"lex"),begin:b(function(Z){this.conditionStack.push(Z)},"begin"),popState:b(function(){var Z=this.conditionStack.length-1;return Z>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(Z){return Z=this.conditionStack.length-1-Math.abs(Z||0),Z>=0?this.conditionStack[Z]:"INITIAL"},"topState"),pushState:b(function(Z){this.begin(Z)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(Z,Ve,ve,Oe){var Ae=Oe;switch(ve){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return X})();ce.lexer=V;function le(){this.yy={}}return b(le,"Parser"),le.prototype=ce,ce.Parser=le,new le})();Cq.parser=Cq;_2t=Cq,bs=yl(),L2t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{b(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:rr.quadrantChart?.chartWidth||500,chartWidth:rr.quadrantChart?.chartHeight||500,titlePadding:rr.quadrantChart?.titlePadding||10,titleFontSize:rr.quadrantChart?.titleFontSize||20,quadrantPadding:rr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:rr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:rr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:rr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:rr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:rr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:rr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:rr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:rr.quadrantChart?.pointLabelFontSize||12,pointRadius:rr.quadrantChart?.pointRadius||5,xAxisPosition:rr.quadrantChart?.xAxisPosition||"top",yAxisPosition:rr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:rr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:rr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:bs.quadrant1Fill,quadrant2Fill:bs.quadrant2Fill,quadrant3Fill:bs.quadrant3Fill,quadrant4Fill:bs.quadrant4Fill,quadrant1TextFill:bs.quadrant1TextFill,quadrant2TextFill:bs.quadrant2TextFill,quadrant3TextFill:bs.quadrant3TextFill,quadrant4TextFill:bs.quadrant4TextFill,quadrantPointFill:bs.quadrantPointFill,quadrantPointTextFill:bs.quadrantPointTextFill,quadrantXAxisTextFill:bs.quadrantXAxisTextFill,quadrantYAxisTextFill:bs.quadrantYAxisTextFill,quadrantTitleFill:bs.quadrantTitleFill,quadrantInternalBorderStrokeFill:bs.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:bs.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,ee.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){ee.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){ee.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,i){let n=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e==="top"&&t?n:0,bottom:e==="bottom"&&t?n:0},s=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,o={left:this.config.yAxisPosition==="left"&&r?s:0,right:this.config.yAxisPosition==="right"&&r?s:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:i?l:0},h=this.config.quadrantPadding+o.left,f=this.config.quadrantPadding+a.top+u.top,d=this.config.chartWidth-this.config.quadrantPadding*2-o.left-o.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top,g=d/2,m=p/2;return{xAxisSpace:a,yAxisSpace:o,titleSpace:u,quadrantSpace:{quadrantLeft:h,quadrantTop:f,quadrantWidth:d,quadrantHalfWidth:g,quadrantHeight:p,quadrantHalfHeight:m}}}getAxisLabels(e,t,r,i){let{quadrantSpace:n,titleSpace:a}=i,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:h,quadrantWidth:f}=n,d=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&t&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?u/2:0),y:e==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(d?u/2:0),y:e==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a}=t,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+n,y:a,width:n,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:a,width:n,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:a+r,width:n,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+n,y:a+r,width:n,height:r,fill:this.themeConfig.quadrant4Fill}];for(let o of s)o.text.x=o.x+o.width/2,this.data.points.length===0?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=t,s=kl().domain([0,1]).range([i,a+i]),o=kl().domain([0,1]).range([r+n,n]);return this.data.points.map(u=>{let h=this.classes.get(u.className);return h&&(u={...h,...u}),{x:s(u.x),y:o(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:s(u.x),y:o(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=e,{quadrantHalfHeight:i,quadrantHeight:n,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:o,x2:a+l+t,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+t,x2:a+l,y2:o+n-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:o+n,x2:a+l+t,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+t,x2:a,y2:o+n-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+t,x2:a+s,y2:o+n-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:o+i,x2:a+l-t,y2:o+i}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(i,e,t,r);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(i,e,t,n),borderLines:this.getBorders(n),title:this.getTitle(r)}}},A_=class extends Error{static{b(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};b(Sq,"validateHexCode");b(y6e,"validateNumber");b(v6e,"validateSizeInPixels");R2t=we();b(Cu,"textSanitizer");_a=new L2t;b(b6e,"setQuadrant1Text");b(x6e,"setQuadrant2Text");b(T6e,"setQuadrant3Text");b(w6e,"setQuadrant4Text");b(k6e,"setXAxisLeftText");b(C6e,"setXAxisRightText");b(S6e,"setYAxisTopText");b(E6e,"setYAxisBottomText");b(__,"parseStyles");b(A6e,"addPoint");b(_6e,"addClass");b(L6e,"setWidth");b(R6e,"setHeight");b(I6e,"getQuadrantData");I2t=b(function(){_a.clear(),fr()},"clear"),D2t={setWidth:L6e,setHeight:R6e,setQuadrant1Text:b6e,setQuadrant2Text:x6e,setQuadrant3Text:T6e,setQuadrant4Text:w6e,setXAxisLeftText:k6e,setXAxisRightText:C6e,setYAxisTopText:S6e,setYAxisBottomText:E6e,parseStyles:__,addPoint:A6e,addClass:_6e,getQuadrantData:I6e,clear:I2t,setAccTitle:yr,getAccTitle:vr,setDiagramTitle:kr,getDiagramTitle:Tr,getAccDescription:xr,setAccDescription:br},N2t=b((e,t,r,i)=>{function n(A){return A==="top"?"hanging":"middle"}b(n,"getDominantBaseLine");function a(A){return A==="left"?"start":"middle"}b(a,"getTextAnchor");function s(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`}b(s,"getTransformation");let o=we();ee.debug(`Rendering quadrant chart -`+e);let l=o.securityLevel,u;l==="sandbox"&&(u=Qe("#i"+t));let f=(l==="sandbox"?Qe(u.nodes()[0].contentDocument.body):Qe("body")).select(`[id="${t}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,g=o.quadrantChart?.chartHeight??500;Mr(f,g,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+g),i.db.setHeight(g),i.db.setWidth(p);let m=i.db.getQuadrantData(),y=d.append("g").attr("class","quadrants"),v=d.append("g").attr("class","border"),x=d.append("g").attr("class","data-points"),T=d.append("g").attr("class","labels"),C=d.append("g").attr("class","title");m.title&&C.append("text").attr("x",0).attr("y",0).attr("fill",m.title.fill).attr("font-size",m.title.fontSize).attr("dominant-baseline",n(m.title.horizontalPos)).attr("text-anchor",a(m.title.verticalPos)).attr("transform",s(m.title)).text(m.title.text),m.borderLines&&v.selectAll("line").data(m.borderLines).enter().append("line").attr("x1",A=>A.x1).attr("y1",A=>A.y1).attr("x2",A=>A.x2).attr("y2",A=>A.y2).style("stroke",A=>A.strokeFill).style("stroke-width",A=>A.strokeWidth);let w=y.selectAll("g.quadrant").data(m.quadrants).enter().append("g").attr("class","quadrant");w.append("rect").attr("x",A=>A.x).attr("y",A=>A.y).attr("width",A=>A.width).attr("height",A=>A.height).attr("fill",A=>A.fill),w.append("text").attr("x",0).attr("y",0).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>n(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>s(A.text)).text(A=>A.text.text),T.selectAll("g.label").data(m.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(A=>A.text).attr("fill",A=>A.fill).attr("font-size",A=>A.fontSize).attr("dominant-baseline",A=>n(A.horizontalPos)).attr("text-anchor",A=>a(A.verticalPos)).attr("transform",A=>s(A));let E=x.selectAll("g.data-point").data(m.points).enter().append("g").attr("class","data-point");E.append("circle").attr("cx",A=>A.x).attr("cy",A=>A.y).attr("r",A=>A.radius).attr("fill",A=>A.fill).attr("stroke",A=>A.strokeColor).attr("stroke-width",A=>A.strokeWidth),E.append("text").attr("x",0).attr("y",0).text(A=>A.text.text).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>n(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>s(A.text))},"draw"),M2t={draw:N2t},O2t={parser:_2t,db:D2t,renderer:M2t,styles:b(()=>"","styles")}});var eAe={};Lr(eAe,{diagram:()=>X2t});function Aq(e){return e.type==="bar"}function Rq(e){return e.type==="band"}function Jy(e){return e.type==="linear"}function _q(e,t,r,i){let n=new P6e(i);return Rq(e)?new B2t(t,r,e.categories,e.title,n):new F2t(t,r,[e.min,e.max],e.title,n)}function F6e(e,t,r,i){let n=new P6e(i);return new $2t(n,e,t,r)}function $6e(e,t,r){return new q2t(e,t,r)}function Dq(){let e=yl(),t=It();return Yr(e.xyChart,t.themeVariables.xyChart)}function Nq(){let e=It();return Yr(rr.xyChart,e.xyChart)}function Mq(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function R_(e){let t=It();return mr(e.trim(),t)}function G6e(e){z6e=e}function q6e(e){e==="horizontal"?Tw.chartOrientation="horizontal":Tw.chartOrientation="vertical"}function V6e(e){di.xAxis.title=R_(e.text)}function Oq(e,t){di.xAxis={type:"linear",title:di.xAxis.title,min:e,max:t},L_=!0}function W6e(e){di.xAxis={type:"band",title:di.xAxis.title,categories:e.map(t=>R_(t.text))},L_=!0}function U6e(e){di.yAxis.title=R_(e.text)}function H6e(e,t){di.yAxis={type:"linear",title:di.yAxis.title,min:e,max:t},Iq=!0}function Y6e(e){let t=Math.min(...e),r=Math.max(...e),i=Jy(di.yAxis)?di.yAxis.min:1/0,n=Jy(di.yAxis)?di.yAxis.max:-1/0;di.yAxis={type:"linear",title:di.yAxis.title,min:Math.min(i,t),max:Math.max(n,r)}}function Pq(e){let t=[];if(e.length===0)return t;if(!L_){let r=Jy(di.xAxis)?di.xAxis.min:1/0,i=Jy(di.xAxis)?di.xAxis.max:-1/0;Oq(Math.min(r,1),Math.max(i,e.length))}if(Iq||Y6e(e),Rq(di.xAxis)&&(t=di.xAxis.categories.map((r,i)=>[r,e[i]])),Jy(di.xAxis)){let r=di.xAxis.min,i=di.xAxis.max,n=(i-r)/(e.length-1),a=[];for(let s=r;s<=i;s+=n)a.push(`${s}`);t=a.map((s,o)=>[s,e[o]])}return t}function Bq(e){return Lq[e===0?0:e%Lq.length]}function j6e(e,t){let r=Pq(t);di.plots.push({type:"line",strokeFill:Bq(xw),strokeWidth:2,data:r}),xw++}function X6e(e,t){let r=Pq(t);di.plots.push({type:"bar",fill:Bq(xw),data:r}),xw++}function K6e(){if(di.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return di.title=Tr(),W2t.build(Tw,di,ww,z6e)}function Z6e(){return ww}function Q6e(){return Tw}function J6e(){return di}var Eq,P2t,P6e,M6e,O6e,B6e,B2t,F2t,$2t,z2t,G2t,q2t,V2t,W2t,xw,z6e,Tw,ww,di,Lq,L_,Iq,U2t,H2t,Y2t,j2t,X2t,tAe=q(()=>{Ja();ya();$r();Er();er();Ar();Ar();Ar();Eq=(function(){var e=b(function(D,I,B,M){for(B=B||{},M=D.length;M--;B[D[M]]=I);return B},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],n=[1,5],a=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],T=[1,37],C=[1,43],w=[1,42],k=[1,47],E=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],N=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],O=[1,64],L={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:b(function(I,B,M,F,z,$,G){var U=$.length-1;switch(z){case 5:F.setOrientation($[U]);break;case 9:F.setDiagramTitle($[U].text.trim());break;case 12:F.setLineData({text:"",type:"text"},$[U]);break;case 13:F.setLineData($[U-1],$[U]);break;case 14:F.setBarData({text:"",type:"text"},$[U]);break;case 15:F.setBarData($[U-1],$[U]);break;case 16:this.$=$[U].trim(),F.setAccTitle(this.$);break;case 17:case 18:this.$=$[U].trim(),F.setAccDescription(this.$);break;case 19:this.$=$[U-1];break;case 20:this.$=[Number($[U-2]),...$[U]];break;case 21:this.$=[Number($[U])];break;case 22:F.setXAxisTitle($[U]);break;case 23:F.setXAxisTitle($[U-1]);break;case 24:F.setXAxisTitle({type:"text",text:""});break;case 25:F.setXAxisBand($[U]);break;case 26:F.setXAxisRangeData(Number($[U-2]),Number($[U]));break;case 27:this.$=$[U-1];break;case 28:this.$=[$[U-2],...$[U]];break;case 29:this.$=[$[U]];break;case 30:F.setYAxisTitle($[U]);break;case 31:F.setYAxisTitle($[U-1]);break;case 32:F.setYAxisTitle({type:"text",text:""});break;case 33:F.setYAxisRangeData(Number($[U-2]),Number($[U]));break;case 37:this.$={text:$[U],type:"text"};break;case 38:this.$={text:$[U],type:"text"};break;case 39:this.$={text:$[U],type:"markdown"};break;case 40:this.$=$[U];break;case 41:this.$=$[U-1]+""+$[U];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:i,34:n,35:a,36:s}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:i,34:n,35:a,36:s}),e(t,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:n,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(o,[2,34]),e(o,[2,35]),e(o,[2,36]),{1:[2,1]},e(t,r,{4:2,7:4,3:21,5:i,34:n,35:a,36:s}),{1:[2,3]},e(o,[2,5]),e(t,[2,7],{4:22,34:n,35:a,36:s}),{11:23,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},{11:39,13:38,24:C,27:w,29:40,30:41,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},{11:45,15:44,27:k,33:46,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},{11:49,17:48,24:E,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},{11:52,17:51,24:E,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(N,[2,37],{40:55,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T}),e(N,[2,38]),e(N,[2,39]),e(P,[2,40]),e(P,[2,42]),e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),e(P,[2,46]),e(P,[2,47]),e(P,[2,48]),e(P,[2,49]),e(P,[2,50]),e(P,[2,51]),e(A,[2,10]),e(A,[2,22],{30:41,29:56,24:C,27:w}),e(A,[2,24]),e(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},e(A,[2,11]),e(A,[2,30],{33:60,27:k}),e(A,[2,32]),{31:[1,61]},e(A,[2,12]),{17:62,24:E},{25:63,27:O},e(A,[2,14]),{17:65,24:E},e(A,[2,16]),e(A,[2,17]),e(P,[2,41]),e(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(A,[2,31]),{27:[1,69]},e(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(A,[2,15]),e(A,[2,26]),e(A,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:y,48:v,49:x,50:T},e(A,[2,33]),e(A,[2,19]),{25:73,27:O},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:b(function(I,B){if(B.recoverable)this.trace(I);else{var M=new Error(I);throw M.hash=B,M}},"parseError"),parse:b(function(I){var B=this,M=[0],F=[],z=[null],$=[],G=this.table,U="",j=0,H=0,Q=0,Y=2,se=1,J=$.slice.call(arguments,1),re=Object.create(this.lexer),ie={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(ie.yy[te]=this.yy[te]);re.setInput(I,ie.yy),ie.yy.lexer=re,ie.yy.parser=this,typeof re.yylloc>"u"&&(re.yylloc={});var xe=re.yylloc;$.push(xe);var fe=re.options&&re.options.ranges;typeof ie.yy.parseError=="function"?this.parseError=ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(ge){M.length=M.length-2*ge,z.length=z.length-ge,$.length=$.length-ge}b(Se,"popStack");function Me(){var ge;return ge=F.pop()||re.lex()||se,typeof ge!="number"&&(ge instanceof Array&&(F=ge,ge=F.pop()),ge=B.symbols_[ge]||ge),ge}b(Me,"lex");for(var ke,Ce,Ie,Pe,pe,Je,Te={},Be,He,nt,qe;;){if(Ie=M[M.length-1],this.defaultActions[Ie]?Pe=this.defaultActions[Ie]:((ke===null||typeof ke>"u")&&(ke=Me()),Pe=G[Ie]&&G[Ie][ke]),typeof Pe>"u"||!Pe.length||!Pe[0]){var Ue="";qe=[];for(Be in G[Ie])this.terminals_[Be]&&Be>Y&&qe.push("'"+this.terminals_[Be]+"'");re.showPosition?Ue="Parse error on line "+(j+1)+`: -`+re.showPosition()+` -Expecting `+qe.join(", ")+", got '"+(this.terminals_[ke]||ke)+"'":Ue="Parse error on line "+(j+1)+": Unexpected "+(ke==se?"end of input":"'"+(this.terminals_[ke]||ke)+"'"),this.parseError(Ue,{text:re.match,token:this.terminals_[ke]||ke,line:re.yylineno,loc:xe,expected:qe})}if(Pe[0]instanceof Array&&Pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ie+", token: "+ke);switch(Pe[0]){case 1:M.push(ke),z.push(re.yytext),$.push(re.yylloc),M.push(Pe[1]),ke=null,Ce?(ke=Ce,Ce=null):(H=re.yyleng,U=re.yytext,j=re.yylineno,xe=re.yylloc,Q>0&&Q--);break;case 2:if(He=this.productions_[Pe[1]][1],Te.$=z[z.length-He],Te._$={first_line:$[$.length-(He||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(He||1)].first_column,last_column:$[$.length-1].last_column},fe&&(Te._$.range=[$[$.length-(He||1)].range[0],$[$.length-1].range[1]]),Je=this.performAction.apply(Te,[U,H,j,ie.yy,Pe[1],z,$].concat(J)),typeof Je<"u")return Je;He&&(M=M.slice(0,-1*He*2),z=z.slice(0,-1*He),$=$.slice(0,-1*He)),M.push(this.productions_[Pe[1]][0]),z.push(Te.$),$.push(Te._$),nt=G[M[M.length-2]][M[M.length-1]],M.push(nt);break;case 3:return!0}}return!0},"parse")},_=(function(){var D={EOF:1,parseError:b(function(B,M){if(this.yy.parser)this.yy.parser.parseError(B,M);else throw new Error(B)},"parseError"),setInput:b(function(I,B){return this.yy=B||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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var B=I.match(/(?:\r\n?|\n).*/g);return B?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:b(function(I){var B=I.length,M=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-B),this.offset-=B;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===F.length?this.yylloc.first_column:0)+F[F.length-M.length].length-M[0].length:this.yylloc.first_column-B},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-B]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(I){this.unput(this.match.slice(I))},"less"),pastInput:b(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var I=this.pastInput(),B=new Array(I.length+1).join("-");return I+this.upcomingInput()+` -`+B+"^"},"showPosition"),test_match:b(function(I,B){var M,F,z;if(this.options.backtrack_lexer&&(z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(z.yylloc.range=this.yylloc.range.slice(0))),F=I[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},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],M=this.performAction.call(this,this.yy,this,B,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var $ in z)this[$]=z[$];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,B,M,F;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),$=0;$B[0].length)){if(B=M,F=$,this.options.backtrack_lexer){if(I=this.test_match(M,z[$]),I!==!1)return I;if(this._backtrack){B=!1;continue}else return!1}else if(!this.options.flex)break}return B?(I=this.test_match(B,z[F]),I!==!1?I:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var B=this.next();return B||this.lex()},"lex"),begin:b(function(B){this.conditionStack.push(B)},"begin"),popState:b(function(){var B=this.conditionStack.length-1;return B>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(B){return B=this.conditionStack.length-1-Math.abs(B||0),B>=0?this.conditionStack[B]:"INITIAL"},"topState"),pushState:b(function(B){this.begin(B)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(B,M,F,z){var $=z;switch(F){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 31;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 27;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return D})();L.lexer=_;function R(){this.yy={}}return b(R,"Parser"),R.prototype=L,L.Parser=R,new R})();Eq.parser=Eq;P2t=Eq;b(Aq,"isBarPlot");b(Rq,"isBandAxisData");b(Jy,"isLinearAxisData");P6e=class{constructor(e){this.parentGroup=e}static{b(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((n,a)=>Math.max(a.length,n),0)*t,height:t};let r={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(let n of e){let a=GD(i,1,n),s=a?a.width:n.length*t,o=a?a.height:t;r.width=Math.max(r.width,s),r.height=Math.max(r.height,o)}return i.remove(),r}},M6e=.7,O6e=.2,B6e=class{constructor(e,t,r,i){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,this.axisThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{b(this,"BaseAxis")}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){M6e*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(M6e*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),i=O6e*e.width;this.outerPadding=Math.min(r.width/2,i);let n=r.height+this.axisConfig.labelPadding*2;this.labelTextHeight=r.height,n<=t&&(t-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,i<=t&&(t-=i,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),i=O6e*e.height;this.outerPadding=Math.min(r.height/2,i);let n=r.width+this.axisConfig.labelPadding*2;n<=t&&(t-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,i<=t&&(t-=i,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${t},${this.getScaleValue(r)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(r)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${t} L ${this.getScaleValue(r)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(r)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},B2t=class extends B6e{static{b(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=Im().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=Im().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),ee.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},F2t=class extends B6e{static{b(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=kl().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=kl().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};b(_q,"getAxis");$2t=class{constructor(e,t,r,i){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{b(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(t.width,e.width),i=t.height+2*this.chartConfig.titlePadding;return t.width<=r&&t.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};b(F6e,"getChartTitleComponent");z2t=class{constructor(e,t,r,i,n){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{b(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map(r=>[this.xAxis.getScaleValue(r[0]),this.yAxis.getScaleValue(r[1])]),t;return this.orientation==="horizontal"?t=Ic().y(r=>r[0]).x(r=>r[1])(e):t=Ic().x(r=>r[0]).y(r=>r[1])(e),t?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},G2t=class{constructor(e,t,r,i,n,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=i,this.orientation=n,this.plotIndex=a}static{b(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=r/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(n=>({x:this.boundingRect.x,y:n[0]-i,height:r,width:n[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(n=>({x:n[0]-i,y:n[1],width:r,height:this.boundingRect.y+this.boundingRect.height-n[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},q2t=class{constructor(e,t,r){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{b(this,"BasePlot")}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[t,r]of this.chartData.plots.entries())switch(r.type){case"line":{let i=new z2t(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...i.getDrawableElement())}break;case"bar":{let i=new G2t(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...i.getDrawableElement())}break}return e}};b($6e,"getPlotComponent");V2t=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:F6e(e,t,r,i),plot:$6e(e,t,r),xAxis:_q(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:_q(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{b(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r=0,i=0,n=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:n,height:a});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),i=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),r=s.width,e-=s.width,e>0&&(n+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.xAxis.setRange([r,r+n]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:i+a}),this.componentStore.yAxis.setRange([i,i+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(o=>Aq(o))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r=0,i=0,n=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=o.width,i=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=o.height,n=r+o.height,e>0&&(a+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:i,y:n}),this.componentStore.yAxis.setRange([i,i+a]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:r}),this.componentStore.xAxis.setRange([n,n+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(l=>Aq(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},W2t=class{static{b(this,"XYChartBuilder")}static build(e,t,r,i){return new V2t(e,t,r,i).getDrawableElement()}},xw=0,Tw=Nq(),ww=Dq(),di=Mq(),Lq=ww.plotColorPalette.split(",").map(e=>e.trim()),L_=!1,Iq=!1;b(Dq,"getChartDefaultThemeConfig");b(Nq,"getChartDefaultConfig");b(Mq,"getChartDefaultData");b(R_,"textSanitizer");b(G6e,"setTmpSVGG");b(q6e,"setOrientation");b(V6e,"setXAxisTitle");b(Oq,"setXAxisRangeData");b(W6e,"setXAxisBand");b(U6e,"setYAxisTitle");b(H6e,"setYAxisRangeData");b(Y6e,"setYAxisRangeFromPlotData");b(Pq,"transformDataWithoutCategory");b(Bq,"getPlotColorFromPalette");b(j6e,"setLineData");b(X6e,"setBarData");b(K6e,"getDrawableElem");b(Z6e,"getChartThemeConfig");b(Q6e,"getChartConfig");b(J6e,"getXYChartData");U2t=b(function(){fr(),xw=0,Tw=Nq(),di=Mq(),ww=Dq(),Lq=ww.plotColorPalette.split(",").map(e=>e.trim()),L_=!1,Iq=!1},"clear"),H2t={getDrawableElem:K6e,clear:U2t,setAccTitle:yr,getAccTitle:vr,setDiagramTitle:kr,getDiagramTitle:Tr,getAccDescription:xr,setAccDescription:br,setOrientation:q6e,setXAxisTitle:V6e,setXAxisRangeData:Oq,setXAxisBand:W6e,setYAxisTitle:U6e,setYAxisRangeData:H6e,setLineData:j6e,setBarData:X6e,setTmpSVGG:G6e,getChartThemeConfig:Z6e,getChartConfig:Q6e,getXYChartData:J6e},Y2t=b((e,t,r,i)=>{let n=i.db,a=n.getChartThemeConfig(),s=n.getChartConfig(),o=n.getXYChartData().plots[0].data.map(T=>T[1]);function l(T){return T==="top"?"text-before-edge":"middle"}b(l,"getDominantBaseLine");function u(T){return T==="left"?"start":T==="right"?"end":"middle"}b(u,"getTextAnchor");function h(T){return`translate(${T.x}, ${T.y}) rotate(${T.rotation||0})`}b(h,"getTextTransformation"),ee.debug(`Rendering xychart chart -`+e);let f=yi(t),d=f.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");Mr(f,s.height,s.width,!0),f.attr("viewBox",`0 0 ${s.width} ${s.height}`),p.attr("fill",a.backgroundColor),n.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let g=n.getDrawableElem(),m={};function y(T){let C=d,w="";for(let[k]of T.entries()){let E=d;k>0&&m[w]&&(E=m[w]),w+=T[k],C=m[w],C||(C=m[w]=E.append("g").attr("class",T[k]))}return C}b(y,"getGroup");for(let T of g){if(T.data.length===0)continue;let C=y(T.groupTexts);switch(T.type){case"rect":if(C.selectAll("rect").data(T.data).enter().append("rect").attr("x",w=>w.x).attr("y",w=>w.y).attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",w=>w.fill).attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth),s.showDataLabel){let w=s.showDataLabelOutsideBar;if(s.chartOrientation==="horizontal"){let k=function(_,R){let{data:D,label:I}=_;return R*I.length*E<=D.width-A};var v=k;b(k,"fitsHorizontally");let E=.7,A=10,N=T.data.map((_,R)=>({data:_,label:o[R].toString()})).filter(_=>_.data.width>0&&_.data.height>0),P=N.map(_=>{let{data:R}=_,D=R.height*.7;for(;!k(_,D)&&D>0;)D-=1;return D}),O=Math.floor(Math.min(...P)),L=b(_=>w?_.data.x+_.data.width+A:_.data.x+_.data.width-A,"determineLabelXPosition");C.selectAll("text").data(N).enter().append("text").attr("x",L).attr("y",_=>_.data.y+_.data.height/2).attr("text-anchor",w?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",`${O}px`).text(_=>_.label)}else{let k=function(L,_,R){let{data:D,label:I}=L,M=_*I.length*.7,F=D.x+D.width/2,z=F-M/2,$=F+M/2,G=z>=D.x&&$<=D.x+D.width,U=D.y+R+_<=D.y+D.height;return G&&U};var x=k;b(k,"fitsInBar");let E=10,A=T.data.map((L,_)=>({data:L,label:o[_].toString()})).filter(L=>L.data.width>0&&L.data.height>0),N=A.map(L=>{let{data:_,label:R}=L,D=_.width/(R.length*.7);for(;!k(L,D,E)&&D>0;)D-=1;return D}),P=Math.floor(Math.min(...N)),O=b(L=>w?L.data.y-E:L.data.y+E,"determineLabelYPosition");C.selectAll("text").data(A).enter().append("text").attr("x",L=>L.data.x+L.data.width/2).attr("y",O).attr("text-anchor","middle").attr("dominant-baseline",w?"auto":"hanging").attr("fill",a.dataLabelColor).attr("font-size",`${P}px`).text(L=>L.label)}}break;case"text":C.selectAll("text").data(T.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",w=>w.fill).attr("font-size",w=>w.fontSize).attr("dominant-baseline",w=>l(w.verticalPos)).attr("text-anchor",w=>u(w.horizontalPos)).attr("transform",w=>h(w)).text(w=>w.text);break;case"path":C.selectAll("path").data(T.data).enter().append("path").attr("d",w=>w.path).attr("fill",w=>w.fill?w.fill:"none").attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth);break}}},"draw"),j2t={draw:Y2t},X2t={parser:P2t,db:H2t,renderer:j2t}});var iAe={};Lr(iAe,{diagram:()=>rbt});var Fq,K2t,Z2t,Q2t,J2t,ebt,rAe,tbt,rbt,nAe=q(()=>{Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();Fq=(function(){var e=b(function(ge,ce,V,le){for(V=V||{},le=ge.length;le--;V[ge[le]]=ce);return V},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],l=[1,26],u=[1,27],h=[1,28],f=[1,29],d=[1,33],p=[1,34],g=[1,35],m=[1,36],y=[1,37],v=[1,38],x=[1,24],T=[1,31],C=[1,32],w=[1,30],k=[1,39],E=[1,40],A=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],P=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],L=[27,29],_=[1,70],R=[1,71],D=[1,72],I=[1,73],B=[1,74],M=[1,75],F=[1,76],z=[1,83],$=[1,80],G=[1,84],U=[1,85],j=[1,86],H=[1,87],Q=[1,88],Y=[1,89],se=[1,90],J=[1,91],re=[1,92],ie=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[63,64],xe=[1,101],fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Se=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Me=[1,110],ke=[1,106],Ce=[1,107],Ie=[1,108],Pe=[1,109],pe=[1,111],Je=[1,116],Te=[1,117],Be=[1,114],He=[1,115],nt={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:b(function(ce,V,le,X,he,Z,Ve){var ve=Z.length-1;switch(he){case 4:this.$=Z[ve].trim(),X.setAccTitle(this.$);break;case 5:case 6:this.$=Z[ve].trim(),X.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:X.setDirection("TB");break;case 18:X.setDirection("BT");break;case 19:X.setDirection("RL");break;case 20:X.setDirection("LR");break;case 21:X.addRequirement(Z[ve-3],Z[ve-4]);break;case 22:X.addRequirement(Z[ve-5],Z[ve-6]),X.setClass([Z[ve-5]],Z[ve-3]);break;case 23:X.setNewReqId(Z[ve-2]);break;case 24:X.setNewReqText(Z[ve-2]);break;case 25:X.setNewReqRisk(Z[ve-2]);break;case 26:X.setNewReqVerifyMethod(Z[ve-2]);break;case 29:this.$=X.RequirementType.REQUIREMENT;break;case 30:this.$=X.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=X.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=X.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=X.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=X.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=X.RiskLevel.LOW_RISK;break;case 36:this.$=X.RiskLevel.MED_RISK;break;case 37:this.$=X.RiskLevel.HIGH_RISK;break;case 38:this.$=X.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=X.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=X.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=X.VerifyType.VERIFY_TEST;break;case 42:X.addElement(Z[ve-3]);break;case 43:X.addElement(Z[ve-5]),X.setClass([Z[ve-5]],Z[ve-3]);break;case 44:X.setNewElementType(Z[ve-2]);break;case 45:X.setNewElementDocRef(Z[ve-2]);break;case 48:X.addRelationship(Z[ve-2],Z[ve],Z[ve-4]);break;case 49:X.addRelationship(Z[ve-2],Z[ve-4],Z[ve]);break;case 50:this.$=X.Relationships.CONTAINS;break;case 51:this.$=X.Relationships.COPIES;break;case 52:this.$=X.Relationships.DERIVES;break;case 53:this.$=X.Relationships.SATISFIES;break;case 54:this.$=X.Relationships.VERIFIES;break;case 55:this.$=X.Relationships.REFINES;break;case 56:this.$=X.Relationships.TRACES;break;case 57:this.$=Z[ve-2],X.defineClass(Z[ve-1],Z[ve]);break;case 58:X.setClass(Z[ve-1],Z[ve]);break;case 59:X.setClass([Z[ve-2]],Z[ve]);break;case 60:case 62:this.$=[Z[ve]];break;case 61:case 63:this.$=Z[ve-2].concat([Z[ve]]);break;case 64:this.$=Z[ve-2],X.setCssStyle(Z[ve-1],Z[ve]);break;case 65:this.$=[Z[ve]];break;case 66:Z[ve-2].push(Z[ve]),this.$=Z[ve-2];break;case 68:this.$=Z[ve-1]+Z[ve];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:n},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:43,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:44,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:45,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:46,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:47,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:48,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:49,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{4:17,5:s,7:50,8:o,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:v,54:x,72:T,74:C,77:w,89:k,90:E},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(A,[2,17]),e(A,[2,18]),e(A,[2,19]),e(A,[2,20]),{30:60,33:62,75:N,89:k,90:E},{30:63,33:62,75:N,89:k,90:E},{30:64,33:62,75:N,89:k,90:E},e(P,[2,29]),e(P,[2,30]),e(P,[2,31]),e(P,[2,32]),e(P,[2,33]),e(P,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(L,[2,79]),e(L,[2,80]),{27:[1,67],29:[1,68]},e(L,[2,85]),e(L,[2,86]),{62:69,65:_,66:R,67:D,68:I,69:B,70:M,71:F},{62:77,65:_,66:R,67:D,68:I,69:B,70:M,71:F},{30:78,33:62,75:N,89:k,90:E},{73:79,75:z,76:$,78:81,79:82,80:G,81:U,82:j,83:H,84:Q,85:Y,86:se,87:J,88:re},e(ie,[2,60]),e(ie,[2,62]),{73:93,75:z,76:$,78:81,79:82,80:G,81:U,82:j,83:H,84:Q,85:Y,86:se,87:J,88:re},{30:94,33:62,75:N,76:$,89:k,90:E},{5:[1,95]},{30:96,33:62,75:N,89:k,90:E},{5:[1,97]},{30:98,33:62,75:N,89:k,90:E},{63:[1,99]},e(te,[2,50]),e(te,[2,51]),e(te,[2,52]),e(te,[2,53]),e(te,[2,54]),e(te,[2,55]),e(te,[2,56]),{64:[1,100]},e(A,[2,59],{76:$}),e(A,[2,64],{76:xe}),{33:103,75:[1,102],89:k,90:E},e(fe,[2,65],{79:104,75:z,80:G,81:U,82:j,83:H,84:Q,85:Y,86:se,87:J,88:re}),e(Se,[2,67]),e(Se,[2,69]),e(Se,[2,70]),e(Se,[2,71]),e(Se,[2,72]),e(Se,[2,73]),e(Se,[2,74]),e(Se,[2,75]),e(Se,[2,76]),e(Se,[2,77]),e(Se,[2,78]),e(A,[2,57],{76:xe}),e(A,[2,58],{76:$}),{5:Me,28:105,31:ke,34:Ce,36:Ie,38:Pe,40:pe},{27:[1,112],76:$},{5:Je,40:Te,56:113,57:Be,59:He},{27:[1,118],76:$},{33:119,89:k,90:E},{33:120,89:k,90:E},{75:z,78:121,79:82,80:G,81:U,82:j,83:H,84:Q,85:Y,86:se,87:J,88:re},e(ie,[2,61]),e(ie,[2,63]),e(Se,[2,68]),e(A,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Me,28:126,31:ke,34:Ce,36:Ie,38:Pe,40:pe},e(A,[2,28]),{5:[1,127]},e(A,[2,42]),{32:[1,128]},{32:[1,129]},{5:Je,40:Te,56:130,57:Be,59:He},e(A,[2,47]),{5:[1,131]},e(A,[2,48]),e(A,[2,49]),e(fe,[2,66],{79:104,75:z,80:G,81:U,82:j,83:H,84:Q,85:Y,86:se,87:J,88:re}),{33:132,89:k,90:E},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(A,[2,27]),{5:Me,28:145,31:ke,34:Ce,36:Ie,38:Pe,40:pe},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(A,[2,46]),{5:Je,40:Te,56:152,57:Be,59:He},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(A,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(A,[2,43]),{5:Me,28:159,31:ke,34:Ce,36:Ie,38:Pe,40:pe},{5:Me,28:160,31:ke,34:Ce,36:Ie,38:Pe,40:pe},{5:Me,28:161,31:ke,34:Ce,36:Ie,38:Pe,40:pe},{5:Me,28:162,31:ke,34:Ce,36:Ie,38:Pe,40:pe},{5:Je,40:Te,56:163,57:Be,59:He},{5:Je,40:Te,56:164,57:Be,59:He},e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),e(A,[2,26]),e(A,[2,44]),e(A,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:b(function(ce,V){if(V.recoverable)this.trace(ce);else{var le=new Error(ce);throw le.hash=V,le}},"parseError"),parse:b(function(ce){var V=this,le=[0],X=[],he=[null],Z=[],Ve=this.table,ve="",Oe=0,Ae=0,Fe=0,Re=2,We=1,De=Z.slice.call(arguments,1),Ye=Object.create(this.lexer),ue={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(ue.yy[Tt]=this.yy[Tt]);Ye.setInput(ce,ue.yy),ue.yy.lexer=Ye,ue.yy.parser=this,typeof Ye.yylloc>"u"&&(Ye.yylloc={});var be=Ye.yylloc;Z.push(be);var it=Ye.options&&Ye.options.ranges;typeof ue.yy.parseError=="function"?this.parseError=ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(At){le.length=le.length-2*At,he.length=he.length-At,Z.length=Z.length-At}b(ft,"popStack");function Dt(){var At;return At=X.pop()||Ye.lex()||We,typeof At!="number"&&(At instanceof Array&&(X=At,At=X.pop()),At=V.symbols_[At]||At),At}b(Dt,"lex");for(var mt,vt,ut,oe,ot,ct,et={},me,Ze,rt,at;;){if(ut=le[le.length-1],this.defaultActions[ut]?oe=this.defaultActions[ut]:((mt===null||typeof mt>"u")&&(mt=Dt()),oe=Ve[ut]&&Ve[ut][mt]),typeof oe>"u"||!oe.length||!oe[0]){var _t="";at=[];for(me in Ve[ut])this.terminals_[me]&&me>Re&&at.push("'"+this.terminals_[me]+"'");Ye.showPosition?_t="Parse error on line "+(Oe+1)+`: -`+Ye.showPosition()+` -Expecting `+at.join(", ")+", got '"+(this.terminals_[mt]||mt)+"'":_t="Parse error on line "+(Oe+1)+": Unexpected "+(mt==We?"end of input":"'"+(this.terminals_[mt]||mt)+"'"),this.parseError(_t,{text:Ye.match,token:this.terminals_[mt]||mt,line:Ye.yylineno,loc:be,expected:at})}if(oe[0]instanceof Array&&oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ut+", token: "+mt);switch(oe[0]){case 1:le.push(mt),he.push(Ye.yytext),Z.push(Ye.yylloc),le.push(oe[1]),mt=null,vt?(mt=vt,vt=null):(Ae=Ye.yyleng,ve=Ye.yytext,Oe=Ye.yylineno,be=Ye.yylloc,Fe>0&&Fe--);break;case 2:if(Ze=this.productions_[oe[1]][1],et.$=he[he.length-Ze],et._$={first_line:Z[Z.length-(Ze||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(Ze||1)].first_column,last_column:Z[Z.length-1].last_column},it&&(et._$.range=[Z[Z.length-(Ze||1)].range[0],Z[Z.length-1].range[1]]),ct=this.performAction.apply(et,[ve,Ae,Oe,ue.yy,oe[1],he,Z].concat(De)),typeof ct<"u")return ct;Ze&&(le=le.slice(0,-1*Ze*2),he=he.slice(0,-1*Ze),Z=Z.slice(0,-1*Ze)),le.push(this.productions_[oe[1]][0]),he.push(et.$),Z.push(et._$),rt=Ve[le[le.length-2]][le[le.length-1]],le.push(rt);break;case 3:return!0}}return!0},"parse")},qe=(function(){var ge={EOF:1,parseError:b(function(V,le){if(this.yy.parser)this.yy.parser.parseError(V,le);else throw new Error(V)},"parseError"),setInput:b(function(ce,V){return this.yy=V||this.yy||{},this._input=ce,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var ce=this._input[0];this.yytext+=ce,this.yyleng++,this.offset++,this.match+=ce,this.matched+=ce;var V=ce.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ce},"input"),unput:b(function(ce){var V=ce.length,le=ce.split(/(?:\r\n?|\n)/g);this._input=ce+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var X=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),le.length-1&&(this.yylineno-=le.length-1);var he=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:le?(le.length===X.length?this.yylloc.first_column:0)+X[X.length-le.length].length-le[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[he[0],he[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(ce){this.unput(this.match.slice(ce))},"less"),pastInput:b(function(){var ce=this.matched.substr(0,this.matched.length-this.match.length);return(ce.length>20?"...":"")+ce.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var ce=this.match;return ce.length<20&&(ce+=this._input.substr(0,20-ce.length)),(ce.substr(0,20)+(ce.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var ce=this.pastInput(),V=new Array(ce.length+1).join("-");return ce+this.upcomingInput()+` -`+V+"^"},"showPosition"),test_match:b(function(ce,V){var le,X,he;if(this.options.backtrack_lexer&&(he={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(he.yylloc.range=this.yylloc.range.slice(0))),X=ce[0].match(/(?:\r\n?|\n).*/g),X&&(this.yylineno+=X.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:X?X[X.length-1].length-X[X.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ce[0].length},this.yytext+=ce[0],this.match+=ce[0],this.matches=ce,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(ce[0].length),this.matched+=ce[0],le=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),le)return le;if(this._backtrack){for(var Z in he)this[Z]=he[Z];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ce,V,le,X;this._more||(this.yytext="",this.match="");for(var he=this._currentRules(),Z=0;ZV[0].length)){if(V=le,X=Z,this.options.backtrack_lexer){if(ce=this.test_match(le,he[Z]),ce!==!1)return ce;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(ce=this.test_match(V,he[X]),ce!==!1?ce:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var V=this.next();return V||this.lex()},"lex"),begin:b(function(V){this.conditionStack.push(V)},"begin"),popState:b(function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},"topState"),pushState:b(function(V){this.begin(V)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(V,le,X,he){var Z=he;switch(X){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return le.yytext=le.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?: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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return ge})();nt.lexer=qe;function Ue(){this.yy={}}return b(Ue,"Parser"),Ue.prototype=nt,nt.Parser=Ue,new Ue})();Fq.parser=Fq;K2t=Fq,Z2t=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=yr,this.getAccTitle=vr,this.setAccDescription=br,this.getAccDescription=xr,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,this.getConfig=b(()=>we().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{b(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),ee.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,r){this.relations.push({type:e,src:t,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,fr()}setCssStyle(e,t){for(let r of e){let i=this.requirements.get(r)??this.elements.get(r);if(!t||!i)return;for(let n of t)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(e,t){for(let r of e){let i=this.requirements.get(r)??this.elements.get(r);if(i)for(let n of t){i.classes.push(n);let a=this.classes.get(n)?.styles;a&&i.cssStyles.push(...a)}}}defineClass(e,t){for(let r of e){let i=this.classes.get(r);i===void 0&&(i={id:r,styles:[],textStyles:[]},this.classes.set(r,i)),t&&t.forEach(function(n){if(/color/.exec(n)){let a=n.replace("fill","bgFill");i.textStyles.push(a)}i.styles.push(n)}),this.requirements.forEach(n=>{n.classes.includes(r)&&n.cssStyles.push(...t.flatMap(a=>a.split(",")))}),this.elements.forEach(n=>{n.classes.includes(r)&&n.cssStyles.push(...t.flatMap(a=>a.split(",")))})}}getClasses(){return this.classes}getData(){let e=we(),t=[],r=[];for(let i of this.requirements.values()){let n=i;n.id=i.name,n.cssStyles=i.cssStyles,n.cssClasses=i.classes.join(" "),n.shape="requirementBox",n.look=e.look,n.colorIndex=t.length,t.push(n)}for(let i of this.elements.values()){let n=i;n.shape="requirementBox",n.look=e.look,n.id=i.name,n.cssStyles=i.cssStyles,n.cssClasses=i.classes.join(" "),n.colorIndex=t.length,t.push(n)}for(let i of this.relations){let n=0,a=i.type===this.Relationships.CONTAINS,s={id:`${i.src}-${i.dst}-${n}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",a?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:a?"normal":"dashed",arrowTypeStart:a?"requirement_contains":"",arrowTypeEnd:a?"":"requirement_arrow",look:e.look,labelType:"markdown"};r.push(s),n++}return{nodes:t,edges:r,other:{},config:e,direction:this.getDirection()}}},Q2t=b(e=>{let t=It(),{themeVariables:r,look:i}=t,{bkgColorArray:n,borderColorArray:a}=r;if(!a?.length)return"";let s="";for(let o=0;o{let t=[...e.values()].reduce((i,a)=>i+a,0),r=[...e.entries()].map(([i,a])=>({label:i,value:a})).filter(i=>i.value/t*100>=1);return tD().value(i=>i.value).sort(null)(r)},"createPieArcs"),OSt=v((e,t,r,n)=>{fe.debug(`rendering pie chart +`+e);let i=n.db,a=ze(),s=Qr(i.getConfig(),a.pie),o=40,l=18,u=4,h=450,f=h,d=xn(t),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:g}=a,[m]=fo(g.pieOuterStrokeWidth);m??=2;let y=s.legendPosition,x=s.textPosition,b=s.donutHole>0&&s.donutHole<=.9?s.donutHole:0,T=Math.min(f,h)/2-o,k=cu().innerRadius(b*T).outerRadius(T),w=cu().innerRadius(T*x).outerRadius(T*x),C=p.append("g");C.append("circle").attr("cx",0).attr("cy",0).attr("r",T+m/2).attr("class","pieOuterCircle");let S=i.getSections(),E=NSt(S),L=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],N=0;S.forEach(Q=>{N+=Q});let O=E.filter(Q=>(Q.data.value/N*100).toFixed(0)!=="0"),R=Yo(L).domain([...S.keys()]);C.selectAll("mySlices").data(O).enter().append("path").attr("d",k).attr("fill",Q=>R(Q.data.label)).attr("class",Q=>{let pe="pieCircle";return s.highlightSlice==="hover"?pe+=" highlightedOnHover":s.highlightSlice===Q.data.label&&(pe+=" highlighted"),pe}),C.selectAll("mySlices").data(O).enter().append("text").text(Q=>(Q.data.value/N*100).toFixed(0)+"%").attr("transform",Q=>"translate("+w.centroid(Q)+")").style("text-anchor","middle").attr("class","slice");let _=p.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText"),D=[...S.entries()].map(([Q,pe])=>({label:Q,value:pe})),I=p.selectAll(".legend").data(D).enter().append("g").attr("class","legend");I.append("rect").attr("width",l).attr("height",l).style("fill",Q=>R(Q.label)).style("stroke",Q=>R(Q.label)),I.append("text").attr("x",l+u).attr("y",l-u).text(Q=>i.getShowData()?`${Q.label} [${Q.value}]`:Q.label);let M=Math.max(...I.selectAll("text").nodes().map(Q=>Q?.getBoundingClientRect().width??0)),B=h,P=f+o,$=l+u,G=D.length*$;switch(y){case"center":I.attr("transform",(Q,pe)=>{let te=$*D.length/2,de=-M/2-(l+u),ce=pe*$-te;return"translate("+de+","+ce+")"});break;case"top":B+=G,I.attr("transform",(Q,pe)=>{let te=T,de=-M/2-(l+u),ce=pe*$-te;return`translate(${de}, ${ce})`}),C.attr("transform",()=>`translate(0, ${G+$})`);break;case"bottom":B+=G,I.attr("transform",(Q,pe)=>{let te=-T-$,de=-M/2-(l+u),ce=pe*$-te;return"translate("+de+","+ce+")"});break;case"left":P+=l+u+M,I.attr("transform",(Q,pe)=>{let te=$*D.length/2,de=-T-(l+u),ce=pe*$-te;return"translate("+de+","+ce+")"}),C.attr("transform",()=>`translate(${M+l+u}, 0)`);break;default:P+=l+u+M,I.attr("transform",(Q,pe)=>{let te=$*D.length/2,de=12*l,ce=pe*$-te;return"translate("+de+","+ce+")"});break}let q=_.node()?.getBoundingClientRect().width??0,z=f/2-q/2,V=f/2+q/2,j=Math.min(0,z),ne=Math.max(P,V)-j;d.attr("viewBox",`${j} 0 ${ne} ${B}`),Vr(d,B,ne,s.useMaxWidth)},"draw"),PSt={draw:OSt},BSt={parser:ISt,db:D8e,renderer:PSt,styles:DSt}});var Z8e={};cr(Z8e,{diagram:()=>WSt});function qH(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function P8e(e){return!/^\d+$/.test(e)}function B8e(e){return!/^\d+px$/.test(e)}function oh(e){return Cr(e.trim(),ze())}function $8e(e){os.setData({quadrant1Text:oh(e.text)})}function F8e(e){os.setData({quadrant2Text:oh(e.text)})}function z8e(e){os.setData({quadrant3Text:oh(e.text)})}function G8e(e){os.setData({quadrant4Text:oh(e.text)})}function q8e(e){os.setData({xAxisLeftText:oh(e.text)})}function V8e(e){os.setData({xAxisRightText:oh(e.text)})}function W8e(e){os.setData({yAxisTopText:oh(e.text)})}function U8e(e){os.setData({yAxisBottomText:oh(e.text)})}function g7(e){let t={};for(let r of e){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(P8e(i))throw new p7(n,i,"number");t.radius=parseInt(i)}else if(n==="color"){if(qH(i))throw new p7(n,i,"hex code");t.color=i}else if(n==="stroke-color"){if(qH(i))throw new p7(n,i,"hex code");t.strokeColor=i}else if(n==="stroke-width"){if(B8e(i))throw new p7(n,i,"number of pixels (eg. 10px)");t.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return t}function H8e(e,t,r,n,i){let a=g7(i);os.addPoints([{x:r,y:n,text:oh(e.text),className:t,...a}])}function Y8e(e,t){os.addClass(e,g7(t))}function X8e(e){os.setConfig({chartWidth:e})}function j8e(e){os.setConfig({chartHeight:e})}function K8e(){let e=ze(),{themeVariables:t,quadrantChart:r}=e;return r&&os.setConfig(r),os.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),os.setData({titleText:Dr()}),os.build()}var GH,$St,to,FSt,p7,os,zSt,GSt,qSt,VSt,WSt,Q8e=X(()=>{hr();ur();Yt();zr();zr();GH=(function(){var e=v(function(K,Y,Z,Ce){for(Z=Z||{},Ce=K.length;Ce--;Z[K[Ce]]=Y);return Z},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],g=[1,43],m=[1,41],y=[1,45],x=[1,14],b=[1,23],T=[1,18],k=[1,19],w=[1,20],C=[1,21],S=[1,22],E=[1,24],L=[1,25],N=[1,26],O=[1,27],R=[1,28],_=[1,29],D=[1,32],I=[1,33],M=[1,34],B=[1,39],P=[1,40],$=[1,42],G=[1,44],q=[1,63],z=[1,62],V=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],j=[1,66],ee=[1,67],ne=[1,68],Q=[1,69],pe=[1,70],te=[1,71],de=[1,72],ce=[1,73],ue=[1,74],Re=[1,75],ve=[1,76],Ge=[1,77],He=[4,5,6,7,8,9,10,11,12,13,14,15,18],Ue=[1,91],me=[1,92],De=[1,93],Ie=[1,100],Me=[1,94],re=[1,97],le=[1,95],oe=[1,96],he=[1,98],xe=[1,99],se=[1,103],F=[10,55,56,57],H=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],W={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:v(function(Y,Z,Ce,we,ke,Se,Ne){var Ae=Se.length-1;switch(ke){case 23:this.$=Se[Ae];break;case 24:this.$=Se[Ae-1]+""+Se[Ae];break;case 26:this.$=Se[Ae-1]+Se[Ae];break;case 27:this.$=[Se[Ae].trim()];break;case 28:Se[Ae-2].push(Se[Ae].trim()),this.$=Se[Ae-2];break;case 29:this.$=Se[Ae-4],we.addClass(Se[Ae-2],Se[Ae]);break;case 37:this.$=[];break;case 42:this.$=Se[Ae].trim(),we.setDiagramTitle(this.$);break;case 43:this.$=Se[Ae].trim(),we.setAccTitle(this.$);break;case 44:case 45:this.$=Se[Ae].trim(),we.setAccDescription(this.$);break;case 46:we.addSection(Se[Ae].substr(8)),this.$=Se[Ae].substr(8);break;case 47:we.addPoint(Se[Ae-3],"",Se[Ae-1],Se[Ae],[]);break;case 48:we.addPoint(Se[Ae-4],Se[Ae-3],Se[Ae-1],Se[Ae],[]);break;case 49:we.addPoint(Se[Ae-4],"",Se[Ae-2],Se[Ae-1],Se[Ae]);break;case 50:we.addPoint(Se[Ae-5],Se[Ae-4],Se[Ae-2],Se[Ae-1],Se[Ae]);break;case 51:we.setXAxisLeftText(Se[Ae-2]),we.setXAxisRightText(Se[Ae]);break;case 52:Se[Ae-1].text+=" \u27F6 ",we.setXAxisLeftText(Se[Ae-1]);break;case 53:we.setXAxisLeftText(Se[Ae]);break;case 54:we.setYAxisBottomText(Se[Ae-2]),we.setYAxisTopText(Se[Ae]);break;case 55:Se[Ae-1].text+=" \u27F6 ",we.setYAxisBottomText(Se[Ae-1]);break;case 56:we.setYAxisBottomText(Se[Ae]);break;case 57:we.setQuadrant1Text(Se[Ae]);break;case 58:we.setQuadrant2Text(Se[Ae]);break;case 59:we.setQuadrant3Text(Se[Ae]);break;case 60:we.setQuadrant4Text(Se[Ae]);break;case 64:this.$={text:Se[Ae],type:"text"};break;case 65:this.$={text:Se[Ae-1].text+""+Se[Ae],type:Se[Ae-1].type};break;case 66:this.$={text:Se[Ae],type:"text"};break;case 67:this.$={text:Se[Ae],type:"markdown"};break;case 68:this.$=Se[Ae];break;case 69:this.$=Se[Ae-1]+""+Se[Ae];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:n,56:i,57:a},{18:t,26:9,27:2,28:r,55:n,56:i,57:a},e(s,[2,33],{29:10}),e(o,[2,61]),e(o,[2,62]),e(o,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:g,14:m,15:y,18:x,25:b,35:T,37:k,39:w,41:C,42:S,48:E,50:L,51:N,52:O,53:R,54:_,60:D,61:I,63:M,64:B,65:P,66:$,67:G}),e(s,[2,34]),{27:46,55:n,56:i,57:a},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:h,5:f,10:d,12:p,13:g,14:m,15:y,18:x,25:b,35:T,37:k,39:w,41:C,42:S,48:E,50:L,51:N,52:O,53:R,54:_,60:D,61:I,63:M,64:B,65:P,66:$,67:G}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:52,58:31,60:D,61:I,63:M,64:B,65:P,66:$,67:G},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:53,58:31,60:D,61:I,63:M,64:B,65:P,66:$,67:G},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:54,58:31,60:D,61:I,63:M,64:B,65:P,66:$,67:G},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:55,58:31,60:D,61:I,63:M,64:B,65:P,66:$,67:G},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:56,58:31,60:D,61:I,63:M,64:B,65:P,66:$,67:G},{4:h,5:f,10:d,12:p,13:g,14:m,15:y,43:57,58:31,60:D,61:I,63:M,64:B,65:P,66:$,67:G},{4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,44:[1,58],47:[1,59],58:61,59:60,63:M,64:B,65:P,66:$,67:G},e(V,[2,64]),e(V,[2,66]),e(V,[2,67]),e(V,[2,70]),e(V,[2,71]),e(V,[2,72]),e(V,[2,73]),e(V,[2,74]),e(V,[2,75]),e(V,[2,76]),e(V,[2,77]),e(V,[2,78]),e(V,[2,79]),e(V,[2,80]),e(V,[2,81]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:j,5:ee,6:ne,7:Q,8:pe,9:te,10:de,11:ce,12:ue,13:Re,14:ve,15:Ge,21:64},e(l,[2,53],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,49:[1,78],63:M,64:B,65:P,66:$,67:G}),e(l,[2,56],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,49:[1,79],63:M,64:B,65:P,66:$,67:G}),e(l,[2,57],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,63:M,64:B,65:P,66:$,67:G}),e(l,[2,58],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,63:M,64:B,65:P,66:$,67:G}),e(l,[2,59],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,63:M,64:B,65:P,66:$,67:G}),e(l,[2,60],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,63:M,64:B,65:P,66:$,67:G}),{45:[1,80]},{44:[1,81]},e(V,[2,65]),e(V,[2,82]),e(V,[2,83]),e(V,[2,84]),{3:83,4:j,5:ee,6:ne,7:Q,8:pe,9:te,10:de,11:ce,12:ue,13:Re,14:ve,15:Ge,18:[1,82]},e(He,[2,23]),e(He,[2,1]),e(He,[2,2]),e(He,[2,3]),e(He,[2,4]),e(He,[2,5]),e(He,[2,6]),e(He,[2,7]),e(He,[2,8]),e(He,[2,9]),e(He,[2,10]),e(He,[2,11]),e(He,[2,12]),e(l,[2,52],{58:31,43:84,4:h,5:f,10:d,12:p,13:g,14:m,15:y,60:D,61:I,63:M,64:B,65:P,66:$,67:G}),e(l,[2,55],{58:31,43:85,4:h,5:f,10:d,12:p,13:g,14:m,15:y,60:D,61:I,63:M,64:B,65:P,66:$,67:G}),{46:[1,86]},{45:[1,87]},{4:Ue,5:me,6:De,8:Ie,11:Me,13:re,16:90,17:le,18:oe,19:he,20:xe,22:89,23:88},e(He,[2,24]),e(l,[2,51],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,63:M,64:B,65:P,66:$,67:G}),e(l,[2,54],{59:60,58:61,4:h,5:f,8:q,10:d,12:p,13:g,14:m,15:y,18:z,63:M,64:B,65:P,66:$,67:G}),e(l,[2,47],{22:89,16:90,23:101,4:Ue,5:me,6:De,8:Ie,11:Me,13:re,17:le,18:oe,19:he,20:xe}),{46:[1,102]},e(l,[2,29],{10:se}),e(F,[2,27],{16:104,4:Ue,5:me,6:De,8:Ie,11:Me,13:re,17:le,18:oe,19:he,20:xe}),e(H,[2,25]),e(H,[2,13]),e(H,[2,14]),e(H,[2,15]),e(H,[2,16]),e(H,[2,17]),e(H,[2,18]),e(H,[2,19]),e(H,[2,20]),e(H,[2,21]),e(H,[2,22]),e(l,[2,49],{10:se}),e(l,[2,48],{22:89,16:90,23:105,4:Ue,5:me,6:De,8:Ie,11:Me,13:re,17:le,18:oe,19:he,20:xe}),{4:Ue,5:me,6:De,8:Ie,11:Me,13:re,16:90,17:le,18:oe,19:he,20:xe,22:106},e(H,[2,26]),e(l,[2,50],{10:se}),e(F,[2,28],{16:104,4:Ue,5:me,6:De,8:Ie,11:Me,13:re,17:le,18:oe,19:he,20:xe})],defaultActions:{8:[2,30],9:[2,31]},parseError:v(function(Y,Z){if(Z.recoverable)this.trace(Y);else{var Ce=new Error(Y);throw Ce.hash=Z,Ce}},"parseError"),parse:v(function(Y){var Z=this,Ce=[0],we=[],ke=[null],Se=[],Ne=this.table,Ae="",Fe=0,Pe=0,We=0,be=2,lt=1,$e=Se.slice.call(arguments,1),at=Object.create(this.lexer),bt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(bt.yy[Et]=this.yy[Et]);at.setInput(Y,bt.yy),bt.yy.lexer=at,bt.yy.parser=this,typeof at.yylloc>"u"&&(at.yylloc={});var pt=at.yylloc;Se.push(pt);var Ct=at.options&&at.options.ranges;typeof bt.yy.parseError=="function"?this.parseError=bt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ht(Ot){Ce.length=Ce.length-2*Ot,ke.length=ke.length-Ot,Se.length=Se.length-Ot}v(ht,"popStack");function Te(){var Ot;return Ot=we.pop()||at.lex()||lt,typeof Ot!="number"&&(Ot instanceof Array&&(we=Ot,Ot=we.pop()),Ot=Z.symbols_[Ot]||Ot),Ot}v(Te,"lex");for(var ot,gt,Qe,_e,Ze,nt,ft={},jt,yt,Ht,Er;;){if(Qe=Ce[Ce.length-1],this.defaultActions[Qe]?_e=this.defaultActions[Qe]:((ot===null||typeof ot>"u")&&(ot=Te()),_e=Ne[Qe]&&Ne[Qe][ot]),typeof _e>"u"||!_e.length||!_e[0]){var rr="";Er=[];for(jt in Ne[Qe])this.terminals_[jt]&&jt>be&&Er.push("'"+this.terminals_[jt]+"'");at.showPosition?rr="Parse error on line "+(Fe+1)+`: +`+at.showPosition()+` +Expecting `+Er.join(", ")+", got '"+(this.terminals_[ot]||ot)+"'":rr="Parse error on line "+(Fe+1)+": Unexpected "+(ot==lt?"end of input":"'"+(this.terminals_[ot]||ot)+"'"),this.parseError(rr,{text:at.match,token:this.terminals_[ot]||ot,line:at.yylineno,loc:pt,expected:Er})}if(_e[0]instanceof Array&&_e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Qe+", token: "+ot);switch(_e[0]){case 1:Ce.push(ot),ke.push(at.yytext),Se.push(at.yylloc),Ce.push(_e[1]),ot=null,gt?(ot=gt,gt=null):(Pe=at.yyleng,Ae=at.yytext,Fe=at.yylineno,pt=at.yylloc,We>0&&We--);break;case 2:if(yt=this.productions_[_e[1]][1],ft.$=ke[ke.length-yt],ft._$={first_line:Se[Se.length-(yt||1)].first_line,last_line:Se[Se.length-1].last_line,first_column:Se[Se.length-(yt||1)].first_column,last_column:Se[Se.length-1].last_column},Ct&&(ft._$.range=[Se[Se.length-(yt||1)].range[0],Se[Se.length-1].range[1]]),nt=this.performAction.apply(ft,[Ae,Pe,Fe,bt.yy,_e[1],ke,Se].concat($e)),typeof nt<"u")return nt;yt&&(Ce=Ce.slice(0,-1*yt*2),ke=ke.slice(0,-1*yt),Se=Se.slice(0,-1*yt)),Ce.push(this.productions_[_e[1]][0]),ke.push(ft.$),Se.push(ft._$),Ht=Ne[Ce[Ce.length-2]][Ce[Ce.length-1]],Ce.push(Ht);break;case 3:return!0}}return!0},"parse")},U=(function(){var K={EOF:1,parseError:v(function(Z,Ce){if(this.yy.parser)this.yy.parser.parseError(Z,Ce);else throw new Error(Z)},"parseError"),setInput:v(function(Y,Z){return this.yy=Z||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var Z=Y.match(/(?:\r\n?|\n).*/g);return Z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},"input"),unput:v(function(Y){var Z=Y.length,Ce=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Z),this.offset-=Z;var we=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ce.length-1&&(this.yylineno-=Ce.length-1);var ke=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ce?(Ce.length===we.length?this.yylloc.first_column:0)+we[we.length-Ce.length].length-Ce[0].length:this.yylloc.first_column-Z},this.options.ranges&&(this.yylloc.range=[ke[0],ke[0]+this.yyleng-Z]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(Y){this.unput(this.match.slice(Y))},"less"),pastInput:v(function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var Y=this.pastInput(),Z=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+` +`+Z+"^"},"showPosition"),test_match:v(function(Y,Z){var Ce,we,ke;if(this.options.backtrack_lexer&&(ke={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ke.yylloc.range=this.yylloc.range.slice(0))),we=Y[0].match(/(?:\r\n?|\n).*/g),we&&(this.yylineno+=we.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:we?we[we.length-1].length-we[we.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],Ce=this.performAction.call(this,this.yy,this,Z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ce)return Ce;if(this._backtrack){for(var Se in ke)this[Se]=ke[Se];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,Z,Ce,we;this._more||(this.yytext="",this.match="");for(var ke=this._currentRules(),Se=0;SeZ[0].length)){if(Z=Ce,we=Se,this.options.backtrack_lexer){if(Y=this.test_match(Ce,ke[Se]),Y!==!1)return Y;if(this._backtrack){Z=!1;continue}else return!1}else if(!this.options.flex)break}return Z?(Y=this.test_match(Z,ke[we]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var Z=this.next();return Z||this.lex()},"lex"),begin:v(function(Z){this.conditionStack.push(Z)},"begin"),popState:v(function(){var Z=this.conditionStack.length-1;return Z>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(Z){return Z=this.conditionStack.length-1-Math.abs(Z||0),Z>=0?this.conditionStack[Z]:"INITIAL"},"topState"),pushState:v(function(Z){this.begin(Z)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(Z,Ce,we,ke){var Se=ke;switch(we){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return K})();W.lexer=U;function ae(){this.yy={}}return v(ae,"Parser"),ae.prototype=W,W.Parser=ae,new ae})();GH.parser=GH;$St=GH,to=ds(),FSt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{v(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:dr.quadrantChart?.chartWidth||500,chartWidth:dr.quadrantChart?.chartHeight||500,titlePadding:dr.quadrantChart?.titlePadding||10,titleFontSize:dr.quadrantChart?.titleFontSize||20,quadrantPadding:dr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:dr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:dr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:dr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:dr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:dr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:dr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:dr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:dr.quadrantChart?.pointLabelFontSize||12,pointRadius:dr.quadrantChart?.pointRadius||5,xAxisPosition:dr.quadrantChart?.xAxisPosition||"top",yAxisPosition:dr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:dr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:dr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:to.quadrant1Fill,quadrant2Fill:to.quadrant2Fill,quadrant3Fill:to.quadrant3Fill,quadrant4Fill:to.quadrant4Fill,quadrant1TextFill:to.quadrant1TextFill,quadrant2TextFill:to.quadrant2TextFill,quadrant3TextFill:to.quadrant3TextFill,quadrant4TextFill:to.quadrant4TextFill,quadrantPointFill:to.quadrantPointFill,quadrantPointTextFill:to.quadrantPointTextFill,quadrantXAxisTextFill:to.quadrantXAxisTextFill,quadrantYAxisTextFill:to.quadrantYAxisTextFill,quadrantTitleFill:to.quadrantTitleFill,quadrantInternalBorderStrokeFill:to.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:to.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,fe.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){fe.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){fe.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,n){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e==="top"&&t?i:0,bottom:e==="bottom"&&t?i:0},s=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,o={left:this.config.yAxisPosition==="left"&&r?s:0,right:this.config.yAxisPosition==="right"&&r?s:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:n?l:0},h=this.config.quadrantPadding+o.left,f=this.config.quadrantPadding+a.top+u.top,d=this.config.chartWidth-this.config.quadrantPadding*2-o.left-o.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top,g=d/2,m=p/2;return{xAxisSpace:a,yAxisSpace:o,titleSpace:u,quadrantSpace:{quadrantLeft:h,quadrantTop:f,quadrantWidth:d,quadrantHalfWidth:g,quadrantHeight:p,quadrantHalfHeight:m}}}getAxisLabels(e,t,r,n){let{quadrantSpace:i,titleSpace:a}=n,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:h,quadrantWidth:f}=i,d=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&t&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?u/2:0),y:e==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(d?u/2:0),y:e==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a}=t,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a,width:i,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a,width:i,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant4Fill}];for(let o of s)o.text.x=o.x+o.width/2,this.data.points.length===0?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=t,s=rc().domain([0,1]).range([n,a+n]),o=rc().domain([0,1]).range([r+i,i]);return this.data.points.map(u=>{let h=this.classes.get(u.className);return h&&(u={...h,...u}),{x:s(u.x),y:o(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:s(u.x),y:o(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:o,x2:a+l+t,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+t,x2:a+l,y2:o+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:o+i,x2:a+l+t,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+t,x2:a,y2:o+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+t,x2:a+s,y2:o+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:o+n,x2:a+l-t,y2:o+n}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,e,t,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}},p7=class extends Error{static{v(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};v(qH,"validateHexCode");v(P8e,"validateNumber");v(B8e,"validateSizeInPixels");v(oh,"textSanitizer");os=new FSt;v($8e,"setQuadrant1Text");v(F8e,"setQuadrant2Text");v(z8e,"setQuadrant3Text");v(G8e,"setQuadrant4Text");v(q8e,"setXAxisLeftText");v(V8e,"setXAxisRightText");v(W8e,"setYAxisTopText");v(U8e,"setYAxisBottomText");v(g7,"parseStyles");v(H8e,"addPoint");v(Y8e,"addClass");v(X8e,"setWidth");v(j8e,"setHeight");v(K8e,"getQuadrantData");zSt=v(function(){os.clear(),pr()},"clear"),GSt={setWidth:X8e,setHeight:j8e,setQuadrant1Text:$8e,setQuadrant2Text:F8e,setQuadrant3Text:z8e,setQuadrant4Text:G8e,setXAxisLeftText:q8e,setXAxisRightText:V8e,setYAxisTopText:W8e,setYAxisBottomText:U8e,parseStyles:g7,addPoint:H8e,addClass:Y8e,getQuadrantData:K8e,clear:zSt,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,getAccDescription:Mr,setAccDescription:Ir},qSt=v((e,t,r,n)=>{function i(E){return E==="top"?"hanging":"middle"}v(i,"getDominantBaseLine");function a(E){return E==="left"?"start":"middle"}v(a,"getTextAnchor");function s(E){return`translate(${E.x}, ${E.y}) rotate(${E.rotation||0})`}v(s,"getTransformation");let o=ze();fe.debug(`Rendering quadrant chart +`+e);let l=o.securityLevel,u;l==="sandbox"&&(u=ct("#i"+t));let f=(l==="sandbox"?ct(u.nodes()[0].contentDocument.body):ct("body")).select(`[id="${t}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,g=o.quadrantChart?.chartHeight??500;Vr(f,g,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+g),n.db.setHeight(g),n.db.setWidth(p);let m=n.db.getQuadrantData(),y=d.append("g").attr("class","quadrants"),x=d.append("g").attr("class","border"),b=d.append("g").attr("class","data-points"),T=d.append("g").attr("class","labels"),k=d.append("g").attr("class","title");m.title&&k.append("text").attr("x",0).attr("y",0).attr("fill",m.title.fill).attr("font-size",m.title.fontSize).attr("dominant-baseline",i(m.title.horizontalPos)).attr("text-anchor",a(m.title.verticalPos)).attr("transform",s(m.title)).text(m.title.text),m.borderLines&&x.selectAll("line").data(m.borderLines).enter().append("line").attr("x1",E=>E.x1).attr("y1",E=>E.y1).attr("x2",E=>E.x2).attr("y2",E=>E.y2).style("stroke",E=>E.strokeFill).style("stroke-width",E=>E.strokeWidth);let w=y.selectAll("g.quadrant").data(m.quadrants).enter().append("g").attr("class","quadrant");w.append("rect").attr("x",E=>E.x).attr("y",E=>E.y).attr("width",E=>E.width).attr("height",E=>E.height).attr("fill",E=>E.fill),w.append("text").attr("x",0).attr("y",0).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>i(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>s(E.text)).text(E=>E.text.text),T.selectAll("g.label").data(m.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(E=>E.text).attr("fill",E=>E.fill).attr("font-size",E=>E.fontSize).attr("dominant-baseline",E=>i(E.horizontalPos)).attr("text-anchor",E=>a(E.verticalPos)).attr("transform",E=>s(E));let S=b.selectAll("g.data-point").data(m.points).enter().append("g").attr("class","data-point");S.append("circle").attr("cx",E=>E.x).attr("cy",E=>E.y).attr("r",E=>E.radius).attr("fill",E=>E.fill).attr("stroke",E=>E.strokeColor).attr("stroke-width",E=>E.strokeWidth),S.append("text").attr("x",0).attr("y",0).text(E=>E.text.text).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>i(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>s(E.text))},"draw"),VSt={draw:qSt},WSt={parser:$St,db:GSt,renderer:VSt,styles:v(()=>"","styles")}});var xIe={};cr(xIe,{diagram:()=>l4t});function m7(e){return e.type==="bar"}function y7(e){return e.type==="band"}function yx(e){return e.type==="linear"}function WH(e,t,r,n){let i=new YH(n);return y7(e)?new HSt(t,r,e.categories,e.title,i):new YSt(t,r,[e.min,e.max],e.title,i)}function rIe(e,t,r,n){let i=new YH(n);return new XSt(i,e,t,r)}function UH(e){return{fontSize:e,markerSize:e*jSt,markerSpacing:e*ZSt,itemSpacing:e*KSt}}function nIe(e,t,r,n){let i=new YH(n);return new QSt(i,e,t,r)}function iIe(e,t,r){return new t4t(e,t,r)}function jH(){let e=ds(),t=It();return Qr(e.xyChart,t.themeVariables.xyChart)}function KH(){let e=It();return Qr(dr.xyChart,e.xyChart)}function ZH(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Hm(e){let t=It();return Cr(e.trim(),t)}function sIe(e){aIe=e}function oIe(e){e==="horizontal"?UC.chartOrientation="horizontal":UC.chartOrientation="vertical"}function lIe(e){yn.xAxis.title=Hm(e.text)}function QH(e,t){yn.xAxis={type:"linear",title:yn.xAxis.title,min:e,max:t},v7=!0}function cIe(e){yn.xAxis={type:"band",title:yn.xAxis.title,categories:e.map(t=>Hm(t.text))},v7=!0}function uIe(e){yn.yAxis.title=Hm(e.text)}function hIe(e,t){yn.yAxis={type:"linear",title:yn.yAxis.title,min:e,max:t},XH=!0}function fIe(e){let t=Math.min(...e),r=Math.max(...e),n=yx(yn.yAxis)?yn.yAxis.min:1/0,i=yx(yn.yAxis)?yn.yAxis.max:-1/0;yn.yAxis={type:"linear",title:yn.yAxis.title,min:Math.min(n,t),max:Math.max(i,r)}}function JH(e){let t=[];if(e.length===0)return t;if(!v7){let r=yx(yn.xAxis)?yn.xAxis.min:1/0,n=yx(yn.xAxis)?yn.xAxis.max:-1/0;QH(Math.min(r,1),Math.max(n,e.length))}if(y7(yn.xAxis)&&e.length>yn.xAxis.categories.length&&(e=e.slice(0,yn.xAxis.categories.length)),XH||fIe(e),y7(yn.xAxis)&&(t=yn.xAxis.categories.map((r,n)=>[r,e[n]])),yx(yn.xAxis)){let r=yn.xAxis.min,n=yn.xAxis.max;if(e.length===1)t=[[`${r}`,e[0]]];else{let i=(n-r)/(e.length-1);t=e.map((a,s)=>[`${r+s*i}`,a])}}return t}function eY(e){return HH[e===0?0:e%HH.length]}function dIe(e,t){let r=t.map(s=>s.value),n=t.map(s=>s.label?Hm(s.label):""),i=JH(r),a=n.some(s=>s!=="");yn.plots.push({type:"line",title:Hm(e.text),strokeFill:eY(WC),strokeWidth:2,data:i,...a?{pointLabels:n}:{}}),WC++}function pIe(e,t){let r=t.map(i=>i.value),n=JH(r);yn.plots.push({type:"bar",title:Hm(e.text),fill:eY(WC),data:n}),WC++}function gIe(){if(yn.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return yn.title=Dr(),n4t.build(UC,yn,HC,aIe)}function mIe(){return HC}function yIe(){return UC}function vIe(){return yn}var VH,USt,YH,J8e,eIe,tIe,HSt,YSt,XSt,jSt,KSt,ZSt,QSt,JSt,e4t,t4t,r4t,n4t,WC,aIe,UC,HC,yn,HH,v7,XH,i4t,a4t,s4t,o4t,l4t,bIe=X(()=>{qi();Wi();Vi();Ur();hr();ur();Yt();zr();zr();zr();VH=(function(){var e=v(function(M,B,P,$){for(P=P||{},$=M.length;$--;P[M[$]]=B);return P},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,32],m=[1,33],y=[1,34],x=[1,35],b=[1,36],T=[1,37],k=[1,43],w=[1,42],C=[1,47],S=[1,50],E=[1,10,12,14,16,18,19,21,23,36,37,38],L=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],N=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],R=[26,28],_={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:v(function(B,P,$,G,q,z,V){var j=z.length-1;switch(q){case 5:G.setOrientation(z[j]);break;case 9:G.setDiagramTitle(z[j].text.trim());break;case 12:G.setLineData({text:"",type:"text"},z[j]);break;case 13:G.setLineData(z[j-1],z[j]);break;case 14:G.setBarData({text:"",type:"text"},z[j]);break;case 15:G.setBarData(z[j-1],z[j]);break;case 16:this.$=z[j].trim(),G.setAccTitle(this.$);break;case 17:case 18:this.$=z[j].trim(),G.setAccDescription(this.$);break;case 19:this.$=z[j-1];break;case 20:case 30:this.$=[z[j-2],...z[j]];break;case 21:case 31:this.$=[z[j]];break;case 22:this.$={value:Number(z[j-1]),label:z[j]};break;case 23:this.$={value:Number(z[j]),label:""};break;case 24:G.setXAxisTitle(z[j]);break;case 25:G.setXAxisTitle(z[j-1]);break;case 26:G.setXAxisTitle({type:"text",text:""});break;case 27:G.setXAxisBand(z[j]);break;case 28:G.setXAxisRangeData(Number(z[j-2]),Number(z[j]));break;case 29:this.$=z[j-1];break;case 32:G.setYAxisTitle(z[j]);break;case 33:G.setYAxisTitle(z[j-1]);break;case 34:G.setYAxisTitle({type:"text",text:""});break;case 35:G.setYAxisRangeData(Number(z[j-2]),Number(z[j]));break;case 39:this.$={text:z[j],type:"text"};break;case 40:this.$={text:z[j],type:"text"};break;case 41:this.$={text:z[j],type:"markdown"};break;case 42:this.$=z[j];break;case 43:this.$=z[j-1]+""+z[j];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:n,36:i,37:a,38:s}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:n,36:i,37:a,38:s}),e(t,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:i,37:a,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{1:[2,1]},e(t,r,{4:2,7:4,3:21,5:n,36:i,37:a,38:s}),{1:[2,3]},e(o,[2,5]),e(t,[2,7],{4:22,36:i,37:a,38:s}),{11:23,30:l,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},{11:39,13:38,24:k,29:w,30:l,31:40,32:41,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},{11:49,17:48,24:S,30:l,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},{11:52,17:51,24:S,30:l,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},{20:[1,53]},{22:[1,54]},e(E,[2,18]),{1:[2,2]},e(E,[2,8]),e(E,[2,9]),e(L,[2,39],{41:55,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T}),e(L,[2,40]),e(L,[2,41]),e(N,[2,42]),e(N,[2,44]),e(N,[2,45]),e(N,[2,46]),e(N,[2,47]),e(N,[2,48]),e(N,[2,49]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(E,[2,10]),e(E,[2,24],{32:41,31:56,24:k,29:w}),e(E,[2,26]),e(E,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},e(E,[2,11]),e(E,[2,32],{35:60,29:C}),e(E,[2,34]),{33:[1,61]},e(E,[2,12]),{17:62,24:S},{25:63,27:64,29:O},e(E,[2,14]),{17:66,24:S},e(E,[2,16]),e(E,[2,17]),e(N,[2,43]),e(E,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(E,[2,33]),{29:[1,70]},e(E,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(R,[2,23],{30:[1,73]}),e(E,[2,15]),e(E,[2,28]),e(E,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:h,43:f,44:d,45:p,46:g,47:m,48:y,49:x,50:b,51:T},e(E,[2,35]),e(E,[2,19]),{25:75,27:64,29:O},e(R,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:v(function(B,P){if(P.recoverable)this.trace(B);else{var $=new Error(B);throw $.hash=P,$}},"parseError"),parse:v(function(B){var P=this,$=[0],G=[],q=[null],z=[],V=this.table,j="",ee=0,ne=0,Q=0,pe=2,te=1,de=z.slice.call(arguments,1),ce=Object.create(this.lexer),ue={yy:{}};for(var Re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Re)&&(ue.yy[Re]=this.yy[Re]);ce.setInput(B,ue.yy),ue.yy.lexer=ce,ue.yy.parser=this,typeof ce.yylloc>"u"&&(ce.yylloc={});var ve=ce.yylloc;z.push(ve);var Ge=ce.options&&ce.options.ranges;typeof ue.yy.parseError=="function"?this.parseError=ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function He(W){$.length=$.length-2*W,q.length=q.length-W,z.length=z.length-W}v(He,"popStack");function Ue(){var W;return W=G.pop()||ce.lex()||te,typeof W!="number"&&(W instanceof Array&&(G=W,W=G.pop()),W=P.symbols_[W]||W),W}v(Ue,"lex");for(var me,De,Ie,Me,re,le,oe={},he,xe,se,F;;){if(Ie=$[$.length-1],this.defaultActions[Ie]?Me=this.defaultActions[Ie]:((me===null||typeof me>"u")&&(me=Ue()),Me=V[Ie]&&V[Ie][me]),typeof Me>"u"||!Me.length||!Me[0]){var H="";F=[];for(he in V[Ie])this.terminals_[he]&&he>pe&&F.push("'"+this.terminals_[he]+"'");ce.showPosition?H="Parse error on line "+(ee+1)+`: +`+ce.showPosition()+` +Expecting `+F.join(", ")+", got '"+(this.terminals_[me]||me)+"'":H="Parse error on line "+(ee+1)+": Unexpected "+(me==te?"end of input":"'"+(this.terminals_[me]||me)+"'"),this.parseError(H,{text:ce.match,token:this.terminals_[me]||me,line:ce.yylineno,loc:ve,expected:F})}if(Me[0]instanceof Array&&Me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ie+", token: "+me);switch(Me[0]){case 1:$.push(me),q.push(ce.yytext),z.push(ce.yylloc),$.push(Me[1]),me=null,De?(me=De,De=null):(ne=ce.yyleng,j=ce.yytext,ee=ce.yylineno,ve=ce.yylloc,Q>0&&Q--);break;case 2:if(xe=this.productions_[Me[1]][1],oe.$=q[q.length-xe],oe._$={first_line:z[z.length-(xe||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(xe||1)].first_column,last_column:z[z.length-1].last_column},Ge&&(oe._$.range=[z[z.length-(xe||1)].range[0],z[z.length-1].range[1]]),le=this.performAction.apply(oe,[j,ne,ee,ue.yy,Me[1],q,z].concat(de)),typeof le<"u")return le;xe&&($=$.slice(0,-1*xe*2),q=q.slice(0,-1*xe),z=z.slice(0,-1*xe)),$.push(this.productions_[Me[1]][0]),q.push(oe.$),z.push(oe._$),se=V[$[$.length-2]][$[$.length-1]],$.push(se);break;case 3:return!0}}return!0},"parse")},D=(function(){var M={EOF:1,parseError:v(function(P,$){if(this.yy.parser)this.yy.parser.parseError(P,$);else throw new Error(P)},"parseError"),setInput:v(function(B,P){return this.yy=P||this.yy||{},this._input=B,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var P=B.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},"input"),unput:v(function(B){var P=B.length,$=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var G=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var q=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$?($.length===G.length?this.yylloc.first_column:0)+G[G.length-$.length].length-$[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(B){this.unput(this.match.slice(B))},"less"),pastInput:v(function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var B=this.pastInput(),P=new Array(B.length+1).join("-");return B+this.upcomingInput()+` +`+P+"^"},"showPosition"),test_match:v(function(B,P){var $,G,q;if(this.options.backtrack_lexer&&(q={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(q.yylloc.range=this.yylloc.range.slice(0))),G=B[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,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(B[0].length),this.matched+=B[0],$=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var z in q)this[z]=q[z];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,P,$,G;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),z=0;zP[0].length)){if(P=$,G=z,this.options.backtrack_lexer){if(B=this.test_match($,q[z]),B!==!1)return B;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(B=this.test_match(P,q[G]),B!==!1?B:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var P=this.next();return P||this.lex()},"lex"),begin:v(function(P){this.conditionStack.push(P)},"begin"),popState:v(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:v(function(P){this.begin(P)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(P,$,G,q){var z=q;switch(G){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return M})();_.lexer=D;function I(){this.yy={}}return v(I,"Parser"),I.prototype=_,_.Parser=I,new I})();VH.parser=VH;USt=VH;v(m7,"isBarPlot");v(y7,"isBandAxisData");v(yx,"isLinearAxisData");YH=class{constructor(e){this.parentGroup=e}static{v(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((i,a)=>Math.max(a.length,i),0)*t,height:t};let r={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(let i of e){let a=lN(n,1,i),s=a?a.width:i.length*t,o=a?a.height:t;r.width=Math.max(r.width,s),r.height=Math.max(r.height,o)}return n.remove(),r}},J8e=.7,eIe=.2,tIe=class{constructor(e,t,r,n){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{v(this,"BaseAxis")}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){J8e*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(J8e*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=eIe*e.width;this.outerPadding=Math.min(r.width/2,n);let i=r.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*r.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*r.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=r.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=eIe*e.height;this.outerPadding=Math.min(r.height/2,n);let i=r.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${t},${this.getScaleValue(r)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(r)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${t} L ${this.getScaleValue(r)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(r)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},HSt=class extends tIe{static{v(this,"BandAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.categories=r,this.scale=Dy().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=Dy().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),fe.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},YSt=class extends tIe{static{v(this,"LinearAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.domain=r,this.scale=rc().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=rc().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};v(WH,"getAxis");XSt=class{constructor(e,t,r,n){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{v(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(t.width,e.width),n=t.height+2*this.chartConfig.titlePadding;return t.width<=r&&t.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};v(rIe,"getChartTitleComponent");jSt=.75,KSt=.5,ZSt=.35;v(UH,"getLegendLayout");QSt=class{constructor(e,t,r,n){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{v(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(l=>l.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:t,markerSize:r,markerSpacing:n,itemSpacing:i}=UH(this.chartConfig.legendFontSize),a=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(l=>l.title),t),s=this.chartConfig.legendPadding*2+r+n+a.width,o=this.chartConfig.legendPadding*2+this.visiblePlots.length*t+(this.visiblePlots.length-1)*i;return s<=e.width&&o<=e.height?(this.boundingRect.width=s,this.boundingRect.height=o):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:t,markerSpacing:r,itemSpacing:n}=UH(this.chartConfig.legendFontSize),i=e+n,a=this.boundingRect.x+this.chartConfig.legendPadding,s=this.boundingRect.y+this.chartConfig.legendPadding,o=[],l=[];for(let[u,h]of this.visiblePlots.entries())if(m7(h))o.push({x:a,y:s+u*i,width:t,height:t,fill:h.fill,strokeFill:h.fill,strokeWidth:0});else{let f=s+u*i+t/2;l.push({path:`M ${a},${f} L ${a+t},${f}`,strokeFill:h.strokeFill,strokeWidth:h.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:o},{groupTexts:["legend","markers"],type:"path",data:l},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((u,h)=>({text:u.title,x:a+t+r,y:s+h*i+t/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};v(nIe,"getChartLegendComponent");JSt=class{constructor(e,t,r,n,i){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{v(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),t;if(this.orientation==="horizontal"?t=dd().y(n=>n[0]).x(n=>n[1])(e):t=dd().x(n=>n[0]).y(n=>n[1])(e),!t)return[];let r=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let a=[];for(let[s,[o,l]]of e.entries()){let u=this.plotData.pointLabels[s];u&&(this.orientation==="horizontal"?a.push({x:l+10,y:o,text:u,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):a.push({x:o,y:l-10,text:u,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}a.length>0&&r.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return r}},e4t=class{constructor(e,t,r,n,i,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{v(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=r/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:this.boundingRect.x,y:i[0]-n,height:r,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:i[0]-n,y:i[1],width:r,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},t4t=class{constructor(e,t,r){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{v(this,"BasePlot")}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[t,r]of this.chartData.plots.entries())switch(r.type){case"line":{let n=new JSt(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...n.getDrawableElement())}break;case"bar":{let n=new e4t(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...n.getDrawableElement())}break}return e}};v(iIe,"getPlotComponent");r4t=class{constructor(e,t,r,n){this.chartConfig=e,this.chartData=t,this.componentStore={title:rIe(e,t,r,n),plot:iIe(e,t,r),legend:nIe(e,t,r,n),xAxis:WH(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:WH(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{v(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r=0,n=0,i={width:0,height:0},a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),r=o.width,e-=o.width,i=this.componentStore.legend.calculateSpace({width:e,height:s}),e-=i.width,e>0&&(a+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.legend.setBoundingBoxXY({x:r+a,y:n+Math.max((s-i.height)/2,0)}),this.componentStore.xAxis.setRange([r,r+a]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+s}),this.componentStore.yAxis.setRange([n,n+s]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(l=>m7(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r=0,n=0,i=0,a={width:0,height:0},s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:s,height:o});e-=l.width,t-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=l.height,t-=l.height,this.componentStore.xAxis.setAxisPosition("left"),l=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=l.width,n=l.width,this.componentStore.yAxis.setAxisPosition("top"),l=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=l.height,i=r+l.height,a=this.componentStore.legend.calculateSpace({width:e,height:o}),e-=a.width,e>0&&(s+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:s,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.legend.setBoundingBoxXY({x:n+s,y:i+Math.max((o-a.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+s]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>m7(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},n4t=class{static{v(this,"XYChartBuilder")}static build(e,t,r,n){return new r4t(e,t,r,n).getDrawableElement()}},WC=0,UC=KH(),HC=jH(),yn=ZH(),HH=HC.plotColorPalette.split(",").map(e=>e.trim()),v7=!1,XH=!1;v(jH,"getChartDefaultThemeConfig");v(KH,"getChartDefaultConfig");v(ZH,"getChartDefaultData");v(Hm,"textSanitizer");v(sIe,"setTmpSVGG");v(oIe,"setOrientation");v(lIe,"setXAxisTitle");v(QH,"setXAxisRangeData");v(cIe,"setXAxisBand");v(uIe,"setYAxisTitle");v(hIe,"setYAxisRangeData");v(fIe,"setYAxisRangeFromPlotData");v(JH,"transformDataWithoutCategory");v(eY,"getPlotColorFromPalette");v(dIe,"setLineData");v(pIe,"setBarData");v(gIe,"getDrawableElem");v(mIe,"getChartThemeConfig");v(yIe,"getChartConfig");v(vIe,"getXYChartData");i4t=v(function(){pr(),WC=0,UC=KH(),yn=ZH(),HC=jH(),HH=HC.plotColorPalette.split(",").map(e=>e.trim()),v7=!1,XH=!1},"clear"),a4t={getDrawableElem:gIe,clear:i4t,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,getAccDescription:Mr,setAccDescription:Ir,setOrientation:oIe,setXAxisTitle:lIe,setXAxisRangeData:QH,setXAxisBand:cIe,setYAxisTitle:uIe,setYAxisRangeData:hIe,setLineData:dIe,setBarData:pIe,setTmpSVGG:sIe,getChartThemeConfig:mIe,getChartConfig:yIe,getXYChartData:vIe},s4t=v((e,t,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.getXYChartData().plots[0].data.map(T=>T[1]);function l(T){return T==="top"?"text-before-edge":"middle"}v(l,"getDominantBaseLine");function u(T){return T==="left"?"start":T==="right"?"end":"middle"}v(u,"getTextAnchor");function h(T){return`translate(${T.x}, ${T.y}) rotate(${T.rotation||0})`}v(h,"getTextTransformation"),fe.debug(`Rendering xychart chart +`+e);let f=xn(t),d=f.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");Vr(f,s.height,s.width,!0),f.attr("viewBox",`0 0 ${s.width} ${s.height}`),p.attr("fill",a.backgroundColor),i.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let g=i.getDrawableElem(),m={};function y(T){let k=d,w="";for(let[C]of T.entries()){let S=d;C>0&&m[w]&&(S=m[w]),w+=T[C],k=m[w],k||(k=m[w]=S.append("g").attr("class",T[C]))}return k}v(y,"getGroup");for(let T of g){if(T.data.length===0)continue;let k=y(T.groupTexts);switch(T.type){case"rect":if(k.selectAll("rect").data(T.data).enter().append("rect").attr("x",w=>w.x).attr("y",w=>w.y).attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",w=>w.fill).attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth),s.showDataLabel){let w=s.showDataLabelOutsideBar;if(s.chartOrientation==="horizontal"){let C=function(_,D){let{data:I,label:M}=_;return D*M.length*S<=I.width-E};var x=C;v(C,"fitsHorizontally");let S=.7,E=10,L=T.data.map((_,D)=>({data:_,label:o[D].toString()})).filter(_=>_.data.width>0&&_.data.height>0),N=L.map(_=>{let{data:D}=_,I=D.height*.7;for(;!C(_,I)&&I>0;)I-=1;return I}),O=Math.floor(Math.min(...N)),R=v(_=>w?_.data.x+_.data.width+E:_.data.x+_.data.width-E,"determineLabelXPosition");k.selectAll("text").data(L).enter().append("text").attr("x",R).attr("y",_=>_.data.y+_.data.height/2).attr("text-anchor",w?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",`${O}px`).text(_=>_.label)}else{let C=function(R,_,D){let{data:I,label:M}=R,P=_*M.length*.7,$=I.x+I.width/2,G=$-P/2,q=$+P/2,z=G>=I.x&&q<=I.x+I.width,V=I.y+D+_<=I.y+I.height;return z&&V};var b=C;v(C,"fitsInBar");let S=10,E=T.data.map((R,_)=>({data:R,label:o[_].toString()})).filter(R=>R.data.width>0&&R.data.height>0),L=E.map(R=>{let{data:_,label:D}=R,I=_.width/(D.length*.7);for(;!C(R,I,S)&&I>0;)I-=1;return I}),N=Math.floor(Math.min(...L)),O=v(R=>w?R.data.y-S:R.data.y+S,"determineLabelYPosition");k.selectAll("text").data(E).enter().append("text").attr("x",R=>R.data.x+R.data.width/2).attr("y",O).attr("text-anchor","middle").attr("dominant-baseline",w?"auto":"hanging").attr("fill",a.dataLabelColor).attr("font-size",`${N}px`).text(R=>R.label)}}break;case"text":k.selectAll("text").data(T.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",w=>w.fill).attr("font-size",w=>w.fontSize).attr("dominant-baseline",w=>l(w.verticalPos)).attr("text-anchor",w=>u(w.horizontalPos)).attr("transform",w=>h(w)).text(w=>w.text);break;case"path":k.selectAll("path").data(T.data).enter().append("path").attr("d",w=>w.path).attr("fill",w=>w.fill?w.fill:"none").attr("stroke",w=>w.strokeFill).attr("stroke-width",w=>w.strokeWidth);break}}},"draw"),o4t={draw:s4t},l4t={parser:USt,db:a4t,renderer:o4t}});var wIe={};cr(wIe,{diagram:()=>g4t});var tY,c4t,u4t,h4t,f4t,d4t,TIe,p4t,g4t,CIe=X(()=>{sl();_o();ko();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();tY=(function(){var e=v(function(H,W,U,ae){for(U=U||{},ae=H.length;ae--;U[H[ae]]=W);return U},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],l=[1,26],u=[1,27],h=[1,28],f=[1,29],d=[1,33],p=[1,34],g=[1,35],m=[1,36],y=[1,37],x=[1,38],b=[1,24],T=[1,31],k=[1,32],w=[1,30],C=[1,39],S=[1,40],E=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],L=[1,61],N=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],R=[27,29],_=[1,70],D=[1,71],I=[1,72],M=[1,73],B=[1,74],P=[1,75],$=[1,76],G=[1,83],q=[1,80],z=[1,84],V=[1,85],j=[1,86],ee=[1,87],ne=[1,88],Q=[1,89],pe=[1,90],te=[1,91],de=[1,92],ce=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ue=[63,64],Re=[1,101],ve=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Ge=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],He=[1,110],Ue=[1,106],me=[1,107],De=[1,108],Ie=[1,109],Me=[1,111],re=[1,116],le=[1,117],oe=[1,114],he=[1,115],xe={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:v(function(W,U,ae,K,Y,Z,Ce){var we=Z.length-1;switch(Y){case 4:this.$=Z[we].trim(),K.setAccTitle(this.$);break;case 5:case 6:this.$=Z[we].trim(),K.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:K.setDirection("TB");break;case 18:K.setDirection("BT");break;case 19:K.setDirection("RL");break;case 20:K.setDirection("LR");break;case 21:K.addRequirement(Z[we-3],Z[we-4]);break;case 22:K.addRequirement(Z[we-5],Z[we-6]),K.setClass([Z[we-5]],Z[we-3]);break;case 23:K.setNewReqId(Z[we-2]);break;case 24:K.setNewReqText(Z[we-2]);break;case 25:K.setNewReqRisk(Z[we-2]);break;case 26:K.setNewReqVerifyMethod(Z[we-2]);break;case 29:this.$=K.RequirementType.REQUIREMENT;break;case 30:this.$=K.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=K.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=K.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=K.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=K.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=K.RiskLevel.LOW_RISK;break;case 36:this.$=K.RiskLevel.MED_RISK;break;case 37:this.$=K.RiskLevel.HIGH_RISK;break;case 38:this.$=K.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=K.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=K.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=K.VerifyType.VERIFY_TEST;break;case 42:K.addElement(Z[we-3]);break;case 43:K.addElement(Z[we-5]),K.setClass([Z[we-5]],Z[we-3]);break;case 44:K.setNewElementType(Z[we-2]);break;case 45:K.setNewElementDocRef(Z[we-2]);break;case 48:K.addRelationship(Z[we-2],Z[we],Z[we-4]);break;case 49:K.addRelationship(Z[we-2],Z[we-4],Z[we]);break;case 50:this.$=K.Relationships.CONTAINS;break;case 51:this.$=K.Relationships.COPIES;break;case 52:this.$=K.Relationships.DERIVES;break;case 53:this.$=K.Relationships.SATISFIES;break;case 54:this.$=K.Relationships.VERIFIES;break;case 55:this.$=K.Relationships.REFINES;break;case 56:this.$=K.Relationships.TRACES;break;case 57:this.$=Z[we-2],K.defineClass(Z[we-1],Z[we]);break;case 58:K.setClass(Z[we-1],Z[we]);break;case 59:K.setClass([Z[we-2]],Z[we]);break;case 60:case 62:this.$=[Z[we]];break;case 61:case 63:this.$=Z[we-2].concat([Z[we]]);break;case 64:this.$=Z[we-2],K.setCssStyle(Z[we-1],Z[we]);break;case 65:this.$=[Z[we]];break;case 66:Z[we-2].push(Z[we]),this.$=Z[we-2];break;case 68:this.$=Z[we-1]+Z[we];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:43,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:44,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:45,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:46,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:47,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:48,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:49,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{4:17,5:s,7:50,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:g,44:m,45:y,46:x,54:b,72:T,74:k,77:w,89:C,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(E,[2,17]),e(E,[2,18]),e(E,[2,19]),e(E,[2,20]),{30:60,33:62,75:L,89:C,90:S},{30:63,33:62,75:L,89:C,90:S},{30:64,33:62,75:L,89:C,90:S},e(N,[2,29]),e(N,[2,30]),e(N,[2,31]),e(N,[2,32]),e(N,[2,33]),e(N,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(R,[2,79]),e(R,[2,80]),{27:[1,67],29:[1,68]},e(R,[2,85]),e(R,[2,86]),{62:69,65:_,66:D,67:I,68:M,69:B,70:P,71:$},{62:77,65:_,66:D,67:I,68:M,69:B,70:P,71:$},{30:78,33:62,75:L,89:C,90:S},{73:79,75:G,76:q,78:81,79:82,80:z,81:V,82:j,83:ee,84:ne,85:Q,86:pe,87:te,88:de},e(ce,[2,60]),e(ce,[2,62]),{73:93,75:G,76:q,78:81,79:82,80:z,81:V,82:j,83:ee,84:ne,85:Q,86:pe,87:te,88:de},{30:94,33:62,75:L,76:q,89:C,90:S},{5:[1,95]},{30:96,33:62,75:L,89:C,90:S},{5:[1,97]},{30:98,33:62,75:L,89:C,90:S},{63:[1,99]},e(ue,[2,50]),e(ue,[2,51]),e(ue,[2,52]),e(ue,[2,53]),e(ue,[2,54]),e(ue,[2,55]),e(ue,[2,56]),{64:[1,100]},e(E,[2,59],{76:q}),e(E,[2,64],{76:Re}),{33:103,75:[1,102],89:C,90:S},e(ve,[2,65],{79:104,75:G,80:z,81:V,82:j,83:ee,84:ne,85:Q,86:pe,87:te,88:de}),e(Ge,[2,67]),e(Ge,[2,69]),e(Ge,[2,70]),e(Ge,[2,71]),e(Ge,[2,72]),e(Ge,[2,73]),e(Ge,[2,74]),e(Ge,[2,75]),e(Ge,[2,76]),e(Ge,[2,77]),e(Ge,[2,78]),e(E,[2,57],{76:Re}),e(E,[2,58],{76:q}),{5:He,28:105,31:Ue,34:me,36:De,38:Ie,40:Me},{27:[1,112],76:q},{5:re,40:le,56:113,57:oe,59:he},{27:[1,118],76:q},{33:119,89:C,90:S},{33:120,89:C,90:S},{75:G,78:121,79:82,80:z,81:V,82:j,83:ee,84:ne,85:Q,86:pe,87:te,88:de},e(ce,[2,61]),e(ce,[2,63]),e(Ge,[2,68]),e(E,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:He,28:126,31:Ue,34:me,36:De,38:Ie,40:Me},e(E,[2,28]),{5:[1,127]},e(E,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:le,56:130,57:oe,59:he},e(E,[2,47]),{5:[1,131]},e(E,[2,48]),e(E,[2,49]),e(ve,[2,66],{79:104,75:G,80:z,81:V,82:j,83:ee,84:ne,85:Q,86:pe,87:te,88:de}),{33:132,89:C,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(E,[2,27]),{5:He,28:145,31:Ue,34:me,36:De,38:Ie,40:Me},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(E,[2,46]),{5:re,40:le,56:152,57:oe,59:he},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(E,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(E,[2,43]),{5:He,28:159,31:Ue,34:me,36:De,38:Ie,40:Me},{5:He,28:160,31:Ue,34:me,36:De,38:Ie,40:Me},{5:He,28:161,31:Ue,34:me,36:De,38:Ie,40:Me},{5:He,28:162,31:Ue,34:me,36:De,38:Ie,40:Me},{5:re,40:le,56:163,57:oe,59:he},{5:re,40:le,56:164,57:oe,59:he},e(E,[2,23]),e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,44]),e(E,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:v(function(W,U){if(U.recoverable)this.trace(W);else{var ae=new Error(W);throw ae.hash=U,ae}},"parseError"),parse:v(function(W){var U=this,ae=[0],K=[],Y=[null],Z=[],Ce=this.table,we="",ke=0,Se=0,Ne=0,Ae=2,Fe=1,Pe=Z.slice.call(arguments,1),We=Object.create(this.lexer),be={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(be.yy[lt]=this.yy[lt]);We.setInput(W,be.yy),be.yy.lexer=We,be.yy.parser=this,typeof We.yylloc>"u"&&(We.yylloc={});var $e=We.yylloc;Z.push($e);var at=We.options&&We.options.ranges;typeof be.yy.parseError=="function"?this.parseError=be.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function bt(yt){ae.length=ae.length-2*yt,Y.length=Y.length-yt,Z.length=Z.length-yt}v(bt,"popStack");function Et(){var yt;return yt=K.pop()||We.lex()||Fe,typeof yt!="number"&&(yt instanceof Array&&(K=yt,yt=K.pop()),yt=U.symbols_[yt]||yt),yt}v(Et,"lex");for(var pt,Ct,ht,Te,ot,gt,Qe={},_e,Ze,nt,ft;;){if(ht=ae[ae.length-1],this.defaultActions[ht]?Te=this.defaultActions[ht]:((pt===null||typeof pt>"u")&&(pt=Et()),Te=Ce[ht]&&Ce[ht][pt]),typeof Te>"u"||!Te.length||!Te[0]){var jt="";ft=[];for(_e in Ce[ht])this.terminals_[_e]&&_e>Ae&&ft.push("'"+this.terminals_[_e]+"'");We.showPosition?jt="Parse error on line "+(ke+1)+`: +`+We.showPosition()+` +Expecting `+ft.join(", ")+", got '"+(this.terminals_[pt]||pt)+"'":jt="Parse error on line "+(ke+1)+": Unexpected "+(pt==Fe?"end of input":"'"+(this.terminals_[pt]||pt)+"'"),this.parseError(jt,{text:We.match,token:this.terminals_[pt]||pt,line:We.yylineno,loc:$e,expected:ft})}if(Te[0]instanceof Array&&Te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+pt);switch(Te[0]){case 1:ae.push(pt),Y.push(We.yytext),Z.push(We.yylloc),ae.push(Te[1]),pt=null,Ct?(pt=Ct,Ct=null):(Se=We.yyleng,we=We.yytext,ke=We.yylineno,$e=We.yylloc,Ne>0&&Ne--);break;case 2:if(Ze=this.productions_[Te[1]][1],Qe.$=Y[Y.length-Ze],Qe._$={first_line:Z[Z.length-(Ze||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(Ze||1)].first_column,last_column:Z[Z.length-1].last_column},at&&(Qe._$.range=[Z[Z.length-(Ze||1)].range[0],Z[Z.length-1].range[1]]),gt=this.performAction.apply(Qe,[we,Se,ke,be.yy,Te[1],Y,Z].concat(Pe)),typeof gt<"u")return gt;Ze&&(ae=ae.slice(0,-1*Ze*2),Y=Y.slice(0,-1*Ze),Z=Z.slice(0,-1*Ze)),ae.push(this.productions_[Te[1]][0]),Y.push(Qe.$),Z.push(Qe._$),nt=Ce[ae[ae.length-2]][ae[ae.length-1]],ae.push(nt);break;case 3:return!0}}return!0},"parse")},se=(function(){var H={EOF:1,parseError:v(function(U,ae){if(this.yy.parser)this.yy.parser.parseError(U,ae);else throw new Error(U)},"parseError"),setInput:v(function(W,U){return this.yy=U||this.yy||{},this._input=W,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var W=this._input[0];this.yytext+=W,this.yyleng++,this.offset++,this.match+=W,this.matched+=W;var U=W.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),W},"input"),unput:v(function(W){var U=W.length,ae=W.split(/(?:\r\n?|\n)/g);this._input=W+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ae.length-1&&(this.yylineno-=ae.length-1);var Y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ae?(ae.length===K.length?this.yylloc.first_column:0)+K[K.length-ae.length].length-ae[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[Y[0],Y[0]+this.yyleng-U]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(W){this.unput(this.match.slice(W))},"less"),pastInput:v(function(){var W=this.matched.substr(0,this.matched.length-this.match.length);return(W.length>20?"...":"")+W.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var W=this.match;return W.length<20&&(W+=this._input.substr(0,20-W.length)),(W.substr(0,20)+(W.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var W=this.pastInput(),U=new Array(W.length+1).join("-");return W+this.upcomingInput()+` +`+U+"^"},"showPosition"),test_match:v(function(W,U){var ae,K,Y;if(this.options.backtrack_lexer&&(Y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Y.yylloc.range=this.yylloc.range.slice(0))),K=W[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+W[0].length},this.yytext+=W[0],this.match+=W[0],this.matches=W,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(W[0].length),this.matched+=W[0],ae=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ae)return ae;if(this._backtrack){for(var Z in Y)this[Z]=Y[Z];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var W,U,ae,K;this._more||(this.yytext="",this.match="");for(var Y=this._currentRules(),Z=0;ZU[0].length)){if(U=ae,K=Z,this.options.backtrack_lexer){if(W=this.test_match(ae,Y[Z]),W!==!1)return W;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(W=this.test_match(U,Y[K]),W!==!1?W:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var U=this.next();return U||this.lex()},"lex"),begin:v(function(U){this.conditionStack.push(U)},"begin"),popState:v(function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},"topState"),pushState:v(function(U){this.begin(U)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(U,ae,K,Y){var Z=Y;switch(K){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return ae.yytext=ae.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?: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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return H})();xe.lexer=se;function F(){this.yy={}}return v(F,"Parser"),F.prototype=xe,xe.Parser=F,new F})();tY.parser=tY;c4t=tY,u4t=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Ar,this.getAccTitle=Lr,this.setAccDescription=Ir,this.getAccDescription=Mr,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,this.getConfig=v(()=>ze().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{v(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),fe.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,r){this.relations.push({type:e,src:t,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,pr()}setCssStyle(e,t){for(let r of e){let n=this.requirements.get(r)??this.elements.get(r);if(!t||!n)return;for(let i of t)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(e,t){for(let r of e){let n=this.requirements.get(r)??this.elements.get(r);if(n)for(let i of t){n.classes.push(i);let a=this.classes.get(i)?.styles;a&&n.cssStyles.push(...a)}}}defineClass(e,t){for(let r of e){let n=this.classes.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.classes.set(r,n)),t&&t.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)}),this.requirements.forEach(i=>{i.classes.includes(r)&&i.cssStyles.push(...t.flatMap(a=>a.split(",")))}),this.elements.forEach(i=>{i.classes.includes(r)&&i.cssStyles.push(...t.flatMap(a=>a.split(",")))})}}getClasses(){return this.classes}getData(){let e=ze(),t=[],r=[];for(let i of this.requirements.values()){let a=i;a.id=i.name,a.cssStyles=i.cssStyles,a.cssClasses=i.classes.join(" "),a.shape="requirementBox",a.look=e.look,a.colorIndex=t.length,t.push(a)}for(let i of this.elements.values()){let a=i;a.shape="requirementBox",a.look=e.look,a.id=i.name,a.cssStyles=i.cssStyles,a.cssClasses=i.classes.join(" "),a.colorIndex=t.length,t.push(a)}let n=0;for(let i of this.relations){let a=i.type===this.Relationships.CONTAINS,s={id:`${i.src}-${i.dst}-${n++}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",a?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:a?"normal":"dashed",arrowTypeStart:a?"requirement_contains":"",arrowTypeEnd:a?"":"requirement_arrow",look:e.look,labelType:"markdown"};r.push(s)}return{nodes:t,edges:r,other:{},config:e,direction:this.getDirection()}}},h4t=v(e=>{let t=It(),{themeVariables:r,look:n}=t,{bkgColorArray:i,borderColorArray:a}=r;if(!a?.length)return"";let s="";for(let o=0;o{let t=It(),{look:r,themeVariables:i}=t,{requirementEdgeLabelBackground:n}=i;return` - ${Q2t(e)} + `;return s},"genColor"),f4t=v(e=>{let t=It(),{look:r,themeVariables:n}=t,{requirementEdgeLabelBackground:i}=n;return` + ${h4t(e)} marker { fill: ${e.relationColor}; stroke: ${e.relationColor}; @@ -1818,19 +1892,19 @@ Expecting `+at.join(", ")+", got '"+(this.terminals_[mt]||mt)+"'":_t="Parse erro color: ${e.nodeTextColor||e.textColor}; } .labelBkg { - background-color: ${n??e.edgeLabelBackground}; + background-color: ${i??e.edgeLabelBackground}; } -`},"getStyles"),ebt=J2t,rAe={};gf(rAe,{draw:()=>tbt});tbt=b(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing requirement diagram (unified)",t);let{securityLevel:n,state:a,layout:s,look:o}=we(),l=i.db.getData(),u=rl(t,n);l.type=i.type,l.layoutAlgorithm=tu(s),l.nodeSpacing=a?.nodeSpacing??50,l.rankSpacing=a?.rankSpacing??50,l.markers=o==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],l.diagramId=t,await Ko(l,u);let h=8;jt.insertTitle(u,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(u,h,"requirementDiagram",a?.useMaxWidth??!0)},"draw"),rbt={parser:K2t,get db(){return new Z2t},renderer:rAe,styles:ebt}});var vAe={};Lr(vAe,{diagram:()=>Zbt});async function hAe(e,t){pt.bumpVerticalPos(10);let{startx:r,stopx:i,message:n}=t,a=ht.splitBreaks(n).length,s=zi(n),o=s?await gm(n,we()):jt.calculateTextDimensions(n,Vg(Ge));if(!s){let f=o.height/a;t.height+=f,pt.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===i){l=pt.getVerticalPos()+u,Ge.rightAngles||(u+=Ge.boxMargin,l=pt.getVerticalPos()+u),u+=30;let f=ht.getMax(h/2,Ge.width/2);pt.insert(r-f,pt.getVerticalPos()-10+u,i+f,pt.getVerticalPos()+30+u)}else u+=Ge.boxMargin,l=pt.getVerticalPos()+u,pt.insert(r,l-10,i,l);return pt.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,pt.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}function Kl(e,t,r,i,n){pt.bumpVerticalPos(r);let a=i;if(t.id&&t.message&&e[t.id]){let s=e[t.id].width,o=Vg(Ge);t.message=jt.wrapLabel(`[${t.message}]`,s-2*Ge.wrapPadding,o),t.width=s,t.wrap=!0;let l=jt.calculateTextDimensions(t.message,o),u=ht.getMax(l.height,Ge.labelBoxHeight);a=i+u,ee.debug(`${u} - ${t.message}`)}n(t),pt.bumpVerticalPos(a)}function pAe(e,t,r,i,n,a,s){function o(h,f){h.x{let s=Vg(Ge),o=a.actorKeys.reduce((f,d)=>f+=e.get(d).width+(e.get(d).margin||0),0),l=Ge.boxMargin*8;o+=l,o-=2*Ge.boxTextMargin,a.wrap&&(a.name=jt.wrapLabel(a.name,o-2*Ge.wrapPadding,s));let u=jt.calculateTextDimensions(a.name,s);n=ht.getMax(u.height,n);let h=ht.getMax(o,u.width+2*Ge.wrapPadding);if(a.margin=Ge.boxTextMargin,oa.textMaxHeight=n),ht.getMax(i,Ge.height)}var Vq,zq,ibt,nbt,abt,sbt,I_,obt,lbt,cbt,Gg,Qd,Jd,N_,qg,jh,kw,ubt,M_,D_,tv,oAe,zr,lAe,hbt,fbt,dbt,pbt,gbt,mbt,ybt,vbt,bbt,xbt,Tbt,wbt,kbt,cAe,Cbt,Sbt,Ebt,Abt,_bt,Lbt,Rbt,Ibt,uAe,Dbt,Xh,Nbt,Mbt,Obt,Pbt,Bbt,Ii,Ge,pt,Fbt,aAe,Vg,ev,Gq,$bt,zbt,qq,fAe,dAe,O_,sAe,Gbt,qbt,Vbt,Wbt,Ubt,$q,Hbt,yAe,Ybt,jbt,Xbt,Kbt,Zbt,bAe=q(()=>{Z2();Ed();fE();$r();Er();er();Ar();Vq=ks(Vm(),1),zq=(function(){var e=b(function(Ae,Fe,Re,We){for(Re=Re||{},We=Ae.length;We--;Re[Ae[We]]=Fe);return Re},"o"),t=[1,2],r=[1,3],i=[1,4],n=[2,4],a=[1,9],s=[1,11],o=[1,12],l=[1,14],u=[1,15],h=[1,17],f=[1,18],d=[1,19],p=[1,25],g=[1,26],m=[1,27],y=[1,28],v=[1,29],x=[1,30],T=[1,31],C=[1,32],w=[1,33],k=[1,34],E=[1,35],A=[1,36],N=[1,37],P=[1,38],O=[1,39],L=[1,40],_=[1,42],R=[1,43],D=[1,44],I=[1,45],B=[1,46],M=[1,47],F=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],z=[1,74],$=[1,80],G=[1,81],U=[1,82],j=[1,83],H=[1,84],Q=[1,85],Y=[1,86],se=[1,87],J=[1,88],re=[1,89],ie=[1,90],te=[1,91],xe=[1,92],fe=[1,93],Se=[1,94],Me=[1,95],ke=[1,96],Ce=[1,97],Ie=[1,98],Pe=[1,99],pe=[1,100],Je=[1,101],Te=[1,102],Be=[1,103],He=[1,104],nt=[1,105],qe=[2,78],Ue=[4,5,17,51,53,54],ge=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],V=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],le=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],X=[5,52],he=[70,71,72,73],Z=[1,151],Ve={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:b(function(Fe,Re,We,De,Ye,ue,Tt){var be=ue.length-1;switch(Ye){case 3:return De.apply(ue[be]),ue[be];break;case 4:case 10:this.$=[];break;case 5:case 11:ue[be-1].push(ue[be]),this.$=ue[be-1];break;case 6:case 7:case 12:case 13:this.$=ue[be];break;case 8:case 9:case 14:this.$=[];break;case 16:ue[be].type="createParticipant",this.$=ue[be];break;case 17:ue[be-1].unshift({type:"boxStart",boxData:De.parseBoxData(ue[be-2])}),ue[be-1].push({type:"boxEnd",boxText:ue[be-2]}),this.$=ue[be-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(ue[be-2]),sequenceIndexStep:Number(ue[be-1]),sequenceVisible:!0,signalType:De.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(ue[be-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:De.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:De.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:De.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:De.LINETYPE.ACTIVE_START,actor:ue[be-1].actor};break;case 24:this.$={type:"activeEnd",signalType:De.LINETYPE.ACTIVE_END,actor:ue[be-1].actor};break;case 30:De.setDiagramTitle(ue[be].substring(6)),this.$=ue[be].substring(6);break;case 31:De.setDiagramTitle(ue[be].substring(7)),this.$=ue[be].substring(7);break;case 32:this.$=ue[be].trim(),De.setAccTitle(this.$);break;case 33:case 34:this.$=ue[be].trim(),De.setAccDescription(this.$);break;case 35:ue[be-1].unshift({type:"loopStart",loopText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.LOOP_START}),ue[be-1].push({type:"loopEnd",loopText:ue[be-2],signalType:De.LINETYPE.LOOP_END}),this.$=ue[be-1];break;case 36:ue[be-1].unshift({type:"rectStart",color:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.RECT_START}),ue[be-1].push({type:"rectEnd",color:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.RECT_END}),this.$=ue[be-1];break;case 37:ue[be-1].unshift({type:"optStart",optText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.OPT_START}),ue[be-1].push({type:"optEnd",optText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.OPT_END}),this.$=ue[be-1];break;case 38:ue[be-1].unshift({type:"altStart",altText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.ALT_START}),ue[be-1].push({type:"altEnd",signalType:De.LINETYPE.ALT_END}),this.$=ue[be-1];break;case 39:ue[be-1].unshift({type:"parStart",parText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.PAR_START}),ue[be-1].push({type:"parEnd",signalType:De.LINETYPE.PAR_END}),this.$=ue[be-1];break;case 40:ue[be-1].unshift({type:"parStart",parText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.PAR_OVER_START}),ue[be-1].push({type:"parEnd",signalType:De.LINETYPE.PAR_END}),this.$=ue[be-1];break;case 41:ue[be-1].unshift({type:"criticalStart",criticalText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.CRITICAL_START}),ue[be-1].push({type:"criticalEnd",signalType:De.LINETYPE.CRITICAL_END}),this.$=ue[be-1];break;case 42:ue[be-1].unshift({type:"breakStart",breakText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.BREAK_START}),ue[be-1].push({type:"breakEnd",optText:De.parseMessage(ue[be-2]),signalType:De.LINETYPE.BREAK_END}),this.$=ue[be-1];break;case 44:this.$=ue[be-3].concat([{type:"option",optionText:De.parseMessage(ue[be-1]),signalType:De.LINETYPE.CRITICAL_OPTION},ue[be]]);break;case 46:this.$=ue[be-3].concat([{type:"and",parText:De.parseMessage(ue[be-1]),signalType:De.LINETYPE.PAR_AND},ue[be]]);break;case 48:this.$=ue[be-3].concat([{type:"else",altText:De.parseMessage(ue[be-1]),signalType:De.LINETYPE.ALT_ELSE},ue[be]]);break;case 49:ue[be-3].draw="participant",ue[be-3].type="addParticipant",ue[be-3].description=De.parseMessage(ue[be-1]),this.$=ue[be-3];break;case 50:ue[be-1].draw="participant",ue[be-1].type="addParticipant",this.$=ue[be-1];break;case 51:ue[be-3].draw="actor",ue[be-3].type="addParticipant",ue[be-3].description=De.parseMessage(ue[be-1]),this.$=ue[be-3];break;case 52:case 57:ue[be-1].draw="actor",ue[be-1].type="addParticipant",this.$=ue[be-1];break;case 53:ue[be-1].type="destroyParticipant",this.$=ue[be-1];break;case 54:ue[be-3].draw="participant",ue[be-3].type="addParticipant",ue[be-3].description=De.parseMessage(ue[be-1]),this.$=ue[be-3];break;case 55:ue[be-1].draw="participant",ue[be-1].type="addParticipant",this.$=ue[be-1];break;case 56:ue[be-3].draw="actor",ue[be-3].type="addParticipant",ue[be-3].description=De.parseMessage(ue[be-1]),this.$=ue[be-3];break;case 58:this.$=[ue[be-1],{type:"addNote",placement:ue[be-2],actor:ue[be-1].actor,text:ue[be]}];break;case 59:ue[be-2]=[].concat(ue[be-1],ue[be-1]).slice(0,2),ue[be-2][0]=ue[be-2][0].actor,ue[be-2][1]=ue[be-2][1].actor,this.$=[ue[be-1],{type:"addNote",placement:De.PLACEMENT.OVER,actor:ue[be-2].slice(0,2),text:ue[be]}];break;case 60:this.$=[ue[be-1],{type:"addLinks",actor:ue[be-1].actor,text:ue[be]}];break;case 61:this.$=[ue[be-1],{type:"addALink",actor:ue[be-1].actor,text:ue[be]}];break;case 62:this.$=[ue[be-1],{type:"addProperties",actor:ue[be-1].actor,text:ue[be]}];break;case 63:this.$=[ue[be-1],{type:"addDetails",actor:ue[be-1].actor,text:ue[be]}];break;case 66:this.$=[ue[be-2],ue[be]];break;case 67:this.$=ue[be];break;case 68:this.$=De.PLACEMENT.LEFTOF;break;case 69:this.$=De.PLACEMENT.RIGHTOF;break;case 70:this.$=[ue[be-4],ue[be-1],{type:"addMessage",from:ue[be-4].actor,to:ue[be-1].actor,signalType:ue[be-3],msg:ue[be],activate:!0},{type:"activeStart",signalType:De.LINETYPE.ACTIVE_START,actor:ue[be-1].actor}];break;case 71:this.$=[ue[be-4],ue[be-1],{type:"addMessage",from:ue[be-4].actor,to:ue[be-1].actor,signalType:ue[be-3],msg:ue[be]},{type:"activeEnd",signalType:De.LINETYPE.ACTIVE_END,actor:ue[be-4].actor}];break;case 72:this.$=[ue[be-4],ue[be-1],{type:"addMessage",from:ue[be-4].actor,to:ue[be-1].actor,signalType:ue[be-3],msg:ue[be],activate:!0,centralConnection:De.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:De.LINETYPE.CENTRAL_CONNECTION,actor:ue[be-1].actor}];break;case 73:this.$=[ue[be-4],ue[be-1],{type:"addMessage",from:ue[be-4].actor,to:ue[be-1].actor,signalType:ue[be-2],msg:ue[be],activate:!1,centralConnection:De.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:De.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:ue[be-4].actor}];break;case 74:this.$=[ue[be-5],ue[be-1],{type:"addMessage",from:ue[be-5].actor,to:ue[be-1].actor,signalType:ue[be-3],msg:ue[be],activate:!0,centralConnection:De.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:De.LINETYPE.CENTRAL_CONNECTION,actor:ue[be-1].actor},{type:"centralConnectionReverse",signalType:De.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:ue[be-5].actor}];break;case 75:this.$=[ue[be-3],ue[be-1],{type:"addMessage",from:ue[be-3].actor,to:ue[be-1].actor,signalType:ue[be-2],msg:ue[be]}];break;case 76:this.$={type:"addParticipant",actor:ue[be-1],config:ue[be]};break;case 77:this.$=ue[be-1].trim();break;case 78:this.$={type:"addParticipant",actor:ue[be]};break;case 79:this.$=De.LINETYPE.SOLID_OPEN;break;case 80:this.$=De.LINETYPE.DOTTED_OPEN;break;case 81:this.$=De.LINETYPE.SOLID;break;case 82:this.$=De.LINETYPE.SOLID_TOP;break;case 83:this.$=De.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=De.LINETYPE.STICK_TOP;break;case 85:this.$=De.LINETYPE.STICK_BOTTOM;break;case 86:this.$=De.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=De.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=De.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=De.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=De.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=De.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=De.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=De.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=De.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=De.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=De.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=De.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=De.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=De.LINETYPE.DOTTED;break;case 100:this.$=De.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=De.LINETYPE.SOLID_CROSS;break;case 102:this.$=De.LINETYPE.DOTTED_CROSS;break;case 103:this.$=De.LINETYPE.SOLID_POINT;break;case 104:this.$=De.LINETYPE.DOTTED_POINT;break;case 105:this.$=De.parseMessage(ue[be].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},e(F,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},e(F,[2,7]),e(F,[2,8]),e(F,[2,9]),e(F,[2,15]),{13:49,51:P,53:O,54:L},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:M},{23:56,73:M},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(F,[2,30]),e(F,[2,31]),{33:[1,62]},{35:[1,63]},e(F,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:z},{23:75,55:76,73:z},{23:77,73:M},{69:78,72:[1,79],78:$,79:G,80:U,81:j,82:H,83:Q,84:Y,85:se,86:J,87:re,88:ie,89:te,90:xe,91:fe,92:Se,93:Me,94:ke,95:Ce,96:Ie,97:Pe,98:pe,99:Je,100:Te,101:Be,102:He,103:nt},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:M},{23:111,73:M},{23:112,73:M},{23:113,73:M},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],qe),e(F,[2,6]),e(F,[2,16]),e(Ue,[2,10],{11:114}),e(F,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(F,[2,22]),{5:[1,118]},{5:[1,119]},e(F,[2,25]),e(F,[2,26]),e(F,[2,27]),e(F,[2,28]),e(F,[2,29]),e(F,[2,32]),e(F,[2,33]),e(ge,n,{7:120}),e(ge,n,{7:121}),e(ge,n,{7:122}),e(ce,n,{41:123,7:124}),e(V,n,{43:125,7:126}),e(V,n,{7:126,43:127}),e(le,n,{46:128,7:129}),e(ge,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(X,qe,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:M},{69:146,78:$,79:G,80:U,81:j,82:H,83:Q,84:Y,85:se,86:J,87:re,88:ie,89:te,90:xe,91:fe,92:Se,93:Me,94:ke,95:Ce,96:Ie,97:Pe,98:pe,99:Je,100:Te,101:Be,102:He,103:nt},e(he,[2,79]),e(he,[2,80]),e(he,[2,81]),e(he,[2,82]),e(he,[2,83]),e(he,[2,84]),e(he,[2,85]),e(he,[2,86]),e(he,[2,87]),e(he,[2,88]),e(he,[2,89]),e(he,[2,90]),e(he,[2,91]),e(he,[2,92]),e(he,[2,93]),e(he,[2,94]),e(he,[2,95]),e(he,[2,96]),e(he,[2,97]),e(he,[2,98]),e(he,[2,99]),e(he,[2,100]),e(he,[2,101]),e(he,[2,102]),e(he,[2,103]),e(he,[2,104]),{23:147,73:M},{23:149,60:148,73:M},{73:[2,68]},{73:[2,69]},{58:150,104:Z},{58:152,104:Z},{58:153,104:Z},{58:154,104:Z},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:P,53:O,54:L},{5:[1,160]},e(F,[2,20]),e(F,[2,21]),e(F,[2,23]),e(F,[2,24]),{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,161],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,162],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,163],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{17:[1,164]},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[2,47],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,50:[1,165],51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{17:[1,166]},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[2,45],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,49:[1,167],51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{17:[1,168]},{17:[1,169]},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[2,43],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,48:[1,170],51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,171],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:v,37:x,38:T,39:C,40:w,42:k,44:E,45:A,47:N,51:P,53:O,54:L,56:_,61:R,62:D,63:I,64:B,73:M},{16:[1,172]},e(F,[2,50]),{16:[1,173]},e(F,[2,55]),e(X,[2,76]),{76:[1,174]},{16:[1,175]},e(F,[2,52]),{16:[1,176]},e(F,[2,57]),e(F,[2,53]),{23:177,73:M},{23:178,73:M},{23:179,73:M},{58:180,104:Z},{23:181,72:[1,182],73:M},{58:183,104:Z},{58:184,104:Z},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(F,[2,17]),e(Ue,[2,11]),{13:186,51:P,53:O,54:L},e(Ue,[2,13]),e(Ue,[2,14]),e(F,[2,19]),e(F,[2,35]),e(F,[2,36]),e(F,[2,37]),e(F,[2,38]),{16:[1,187]},e(F,[2,39]),{16:[1,188]},e(F,[2,40]),e(F,[2,41]),{16:[1,189]},e(F,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:Z},{58:196,104:Z},{58:197,104:Z},{5:[2,75]},{58:198,104:Z},{23:199,73:M},{5:[2,58]},{5:[2,59]},{23:200,73:M},e(Ue,[2,12]),e(ce,n,{7:124,41:201}),e(V,n,{7:126,43:202}),e(le,n,{7:129,46:203}),e(F,[2,49]),e(F,[2,54]),e(X,[2,77]),e(F,[2,51]),e(F,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:Z},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:b(function(Fe,Re){if(Re.recoverable)this.trace(Fe);else{var We=new Error(Fe);throw We.hash=Re,We}},"parseError"),parse:b(function(Fe){var Re=this,We=[0],De=[],Ye=[null],ue=[],Tt=this.table,be="",it=0,ft=0,Dt=0,mt=2,vt=1,ut=ue.slice.call(arguments,1),oe=Object.create(this.lexer),ot={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(ot.yy[ct]=this.yy[ct]);oe.setInput(Fe,ot.yy),ot.yy.lexer=oe,ot.yy.parser=this,typeof oe.yylloc>"u"&&(oe.yylloc={});var et=oe.yylloc;ue.push(et);var me=oe.options&&oe.options.ranges;typeof ot.yy.parseError=="function"?this.parseError=ot.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ze(bt){We.length=We.length-2*bt,Ye.length=Ye.length-bt,ue.length=ue.length-bt}b(Ze,"popStack");function rt(){var bt;return bt=De.pop()||oe.lex()||vt,typeof bt!="number"&&(bt instanceof Array&&(De=bt,bt=De.pop()),bt=Re.symbols_[bt]||bt),bt}b(rt,"lex");for(var at,_t,At,Mt,ur,Yt,Vt={},Jt,cr,Ct,Ee;;){if(At=We[We.length-1],this.defaultActions[At]?Mt=this.defaultActions[At]:((at===null||typeof at>"u")&&(at=rt()),Mt=Tt[At]&&Tt[At][at]),typeof Mt>"u"||!Mt.length||!Mt[0]){var lt="";Ee=[];for(Jt in Tt[At])this.terminals_[Jt]&&Jt>mt&&Ee.push("'"+this.terminals_[Jt]+"'");oe.showPosition?lt="Parse error on line "+(it+1)+`: -`+oe.showPosition()+` -Expecting `+Ee.join(", ")+", got '"+(this.terminals_[at]||at)+"'":lt="Parse error on line "+(it+1)+": Unexpected "+(at==vt?"end of input":"'"+(this.terminals_[at]||at)+"'"),this.parseError(lt,{text:oe.match,token:this.terminals_[at]||at,line:oe.yylineno,loc:et,expected:Ee})}if(Mt[0]instanceof Array&&Mt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+at);switch(Mt[0]){case 1:We.push(at),Ye.push(oe.yytext),ue.push(oe.yylloc),We.push(Mt[1]),at=null,_t?(at=_t,_t=null):(ft=oe.yyleng,be=oe.yytext,it=oe.yylineno,et=oe.yylloc,Dt>0&&Dt--);break;case 2:if(cr=this.productions_[Mt[1]][1],Vt.$=Ye[Ye.length-cr],Vt._$={first_line:ue[ue.length-(cr||1)].first_line,last_line:ue[ue.length-1].last_line,first_column:ue[ue.length-(cr||1)].first_column,last_column:ue[ue.length-1].last_column},me&&(Vt._$.range=[ue[ue.length-(cr||1)].range[0],ue[ue.length-1].range[1]]),Yt=this.performAction.apply(Vt,[be,ft,it,ot.yy,Mt[1],Ye,ue].concat(ut)),typeof Yt<"u")return Yt;cr&&(We=We.slice(0,-1*cr*2),Ye=Ye.slice(0,-1*cr),ue=ue.slice(0,-1*cr)),We.push(this.productions_[Mt[1]][0]),Ye.push(Vt.$),ue.push(Vt._$),Ct=Tt[We[We.length-2]][We[We.length-1]],We.push(Ct);break;case 3:return!0}}return!0},"parse")},ve=(function(){var Ae={EOF:1,parseError:b(function(Re,We){if(this.yy.parser)this.yy.parser.parseError(Re,We);else throw new Error(Re)},"parseError"),setInput:b(function(Fe,Re){return this.yy=Re||this.yy||{},this._input=Fe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Fe=this._input[0];this.yytext+=Fe,this.yyleng++,this.offset++,this.match+=Fe,this.matched+=Fe;var Re=Fe.match(/(?:\r\n?|\n).*/g);return Re?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Fe},"input"),unput:b(function(Fe){var Re=Fe.length,We=Fe.split(/(?:\r\n?|\n)/g);this._input=Fe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Re),this.offset-=Re;var De=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),We.length-1&&(this.yylineno-=We.length-1);var Ye=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:We?(We.length===De.length?this.yylloc.first_column:0)+De[De.length-We.length].length-We[0].length:this.yylloc.first_column-Re},this.options.ranges&&(this.yylloc.range=[Ye[0],Ye[0]+this.yyleng-Re]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Fe){this.unput(this.match.slice(Fe))},"less"),pastInput:b(function(){var Fe=this.matched.substr(0,this.matched.length-this.match.length);return(Fe.length>20?"...":"")+Fe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Fe=this.match;return Fe.length<20&&(Fe+=this._input.substr(0,20-Fe.length)),(Fe.substr(0,20)+(Fe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Fe=this.pastInput(),Re=new Array(Fe.length+1).join("-");return Fe+this.upcomingInput()+` -`+Re+"^"},"showPosition"),test_match:b(function(Fe,Re){var We,De,Ye;if(this.options.backtrack_lexer&&(Ye={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ye.yylloc.range=this.yylloc.range.slice(0))),De=Fe[0].match(/(?:\r\n?|\n).*/g),De&&(this.yylineno+=De.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:De?De[De.length-1].length-De[De.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Fe[0].length},this.yytext+=Fe[0],this.match+=Fe[0],this.matches=Fe,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(Fe[0].length),this.matched+=Fe[0],We=this.performAction.call(this,this.yy,this,Re,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),We)return We;if(this._backtrack){for(var ue in Ye)this[ue]=Ye[ue];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Fe,Re,We,De;this._more||(this.yytext="",this.match="");for(var Ye=this._currentRules(),ue=0;ueRe[0].length)){if(Re=We,De=ue,this.options.backtrack_lexer){if(Fe=this.test_match(We,Ye[ue]),Fe!==!1)return Fe;if(this._backtrack){Re=!1;continue}else return!1}else if(!this.options.flex)break}return Re?(Fe=this.test_match(Re,Ye[De]),Fe!==!1?Fe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var Re=this.next();return Re||this.lex()},"lex"),begin:b(function(Re){this.conditionStack.push(Re)},"begin"),popState:b(function(){var Re=this.conditionStack.length-1;return Re>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(Re){return Re=this.conditionStack.length-1-Math.abs(Re||0),Re>=0?this.conditionStack[Re]:"INITIAL"},"topState"),pushState:b(function(Re){this.begin(Re)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(Re,We,De,Ye){var ue=Ye;switch(De){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return We.yytext=We.yytext.trim(),73;break;case 12:return We.yytext=We.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return We.yytext=We.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return We.yytext=We.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return We.yytext=We.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return Ae})();Ve.lexer=ve;function Oe(){this.yy={}}return b(Oe,"Parser"),Oe.prototype=Ve,Ve.Parser=Oe,new Oe})();zq.parser=zq;ibt=zq,nbt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},abt={FILLED:0,OPEN:1},sbt={LEFTOF:0,RIGHTOF:1,OVER:2},I_={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},obt=class{constructor(){this.state=new ny(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=yr,this.setAccDescription=br,this.setDiagramTitle=kr,this.getAccTitle=vr,this.getAccDescription=xr,this.getDiagramTitle=Tr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(we().wrap),this.LINETYPE=nbt,this.ARROWTYPE=abt,this.PLACEMENT=sbt}static{b(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,i,n){let a=this.state.records.currentBox,s;if(n!==void 0){let l;n.includes(` -`)?l=n+` +`},"getStyles"),d4t=f4t,TIe={};ed(TIe,{draw:()=>p4t});p4t=v(async function(e,t,r,n){fe.info("REF0:"),fe.info("Drawing requirement diagram (unified)",t);let{securityLevel:i,state:a,layout:s,look:o}=ze(),l=n.db.getData(),u=$l(t,i);l.type=n.type,l.layoutAlgorithm=Fu(s),l.nodeSpacing=a?.nodeSpacing??50,l.rankSpacing=a?.rankSpacing??50,l.markers=o==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],l.diagramId=t,await Ol(l,u);let h=8;ar.insertTitle(u,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Ao(u,h,"requirementDiagram",a?.useMaxWidth??!0)},"draw"),g4t={parser:c4t,get db(){return new u4t},renderer:TIe,styles:d4t}});var BIe={};cr(BIe,{diagram:()=>uEt});async function LIe(e,t){Tt.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=t,a=vt.splitBreaks(i).length,s=hi(i),o=s?await yy(i,ze()):ar.calculateTextDimensions(i,jm(je));if(!s){let f=o.height/a;t.height+=f,Tt.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===n){l=Tt.getVerticalPos()+u,je.rightAngles||(u+=je.boxMargin,l=Tt.getVerticalPos()+u),u+=30;let f=vt.getMax(h/2,je.width/2);Tt.insert(r-f,Tt.getVerticalPos()-10+u,n+f,Tt.getVerticalPos()+30+u)}else u+=je.boxMargin,l=Tt.getVerticalPos()+u,Tt.insert(r,l-10,n,l);return Tt.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,Tt.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}function Lc(e,t,r,n,i){Tt.bumpVerticalPos(r);let a=n;if(t.id&&t.message&&e[t.id]){let s=e[t.id].width,o=jm(je);t.message=ar.wrapLabel(`[${t.message}]`,s-2*je.wrapPadding,o),t.width=s,t.wrap=!0;let l=ar.calculateTextDimensions(t.message,o),u=vt.getMax(l.height,je.labelBoxHeight);a=n+u,fe.debug(`${u} - ${t.message}`)}i(t),Tt.bumpVerticalPos(a)}function DIe(e,t,r,n,i,a,s){function o(h,f){h.x{let s=jm(je),o=a.actorKeys.reduce((f,d)=>f+=e.get(d).width+(e.get(d).margin||0),0),l=je.boxMargin*8;o+=l,o-=2*je.boxTextMargin,a.wrap&&(a.name=ar.wrapLabel(a.name,o-2*je.wrapPadding,s));let u=ar.calculateTextDimensions(a.name,s);i=vt.getMax(u.height,i);let h=vt.getMax(o,u.width+2*je.wrapPadding);if(a.margin=je.boxTextMargin,oa.textMaxHeight=i),vt.getMax(n,je.height)}var sY,nY,m4t,y4t,v4t,x4t,x7,b4t,T4t,w4t,Ym,Up,Hp,T7,Xm,Mf,YC,C4t,w7,b7,xx,EIe,rn,AIe,k4t,S4t,E4t,A4t,_4t,R4t,L4t,I4t,M4t,D4t,N4t,O4t,P4t,_Ie,B4t,$4t,F4t,z4t,G4t,q4t,V4t,W4t,RIe,U4t,Df,H4t,Y4t,X4t,j4t,K4t,ti,je,Tt,Z4t,kIe,jm,vx,iY,Q4t,J4t,aY,IIe,MIe,C7,SIe,eEt,tEt,rEt,nEt,iEt,rY,aEt,PIe,sEt,oEt,lEt,cEt,uEt,$Ie=X(()=>{FA();cg();al();Ur();hr();ur();Yt();zr();sY=Ls(y2(),1),nY=(function(){var e=v(function(Se,Ne,Ae,Fe){for(Ae=Ae||{},Fe=Se.length;Fe--;Ae[Se[Fe]]=Ne);return Ae},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,12],l=[1,14],u=[1,15],h=[1,17],f=[1,18],d=[1,19],p=[1,25],g=[1,26],m=[1,27],y=[1,28],x=[1,29],b=[1,30],T=[1,31],k=[1,32],w=[1,33],C=[1,34],S=[1,35],E=[1,36],L=[1,37],N=[1,38],O=[1,39],R=[1,40],_=[1,42],D=[1,43],I=[1,44],M=[1,45],B=[1,46],P=[1,47],$=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],G=[1,74],q=[1,80],z=[1,81],V=[1,82],j=[1,83],ee=[1,84],ne=[1,85],Q=[1,86],pe=[1,87],te=[1,88],de=[1,89],ce=[1,90],ue=[1,91],Re=[1,92],ve=[1,93],Ge=[1,94],He=[1,95],Ue=[1,96],me=[1,97],De=[1,98],Ie=[1,99],Me=[1,100],re=[1,101],le=[1,102],oe=[1,103],he=[1,104],xe=[1,105],se=[2,78],F=[4,5,17,51,53,54],H=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],W=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],U=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],K=[5,52],Y=[70,71,72,73],Z=[1,151],Ce={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:v(function(Ne,Ae,Fe,Pe,We,be,lt){var $e=be.length-1;switch(We){case 3:return Pe.apply(be[$e]),be[$e];break;case 4:case 10:this.$=[];break;case 5:case 11:be[$e-1].push(be[$e]),this.$=be[$e-1];break;case 6:case 7:case 12:case 13:this.$=be[$e];break;case 8:case 9:case 14:this.$=[];break;case 16:be[$e].type="createParticipant",this.$=be[$e];break;case 17:be[$e-1].unshift({type:"boxStart",boxData:Pe.parseBoxData(be[$e-2])}),be[$e-1].push({type:"boxEnd",boxText:be[$e-2]}),this.$=be[$e-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(be[$e-2]),sequenceIndexStep:Number(be[$e-1]),sequenceVisible:!0,signalType:Pe.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(be[$e-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:Pe.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:Pe.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:Pe.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:Pe.LINETYPE.ACTIVE_START,actor:be[$e-1].actor};break;case 24:this.$={type:"activeEnd",signalType:Pe.LINETYPE.ACTIVE_END,actor:be[$e-1].actor};break;case 30:Pe.setDiagramTitle(be[$e].substring(6)),this.$=be[$e].substring(6);break;case 31:Pe.setDiagramTitle(be[$e].substring(7)),this.$=be[$e].substring(7);break;case 32:this.$=be[$e].trim(),Pe.setAccTitle(this.$);break;case 33:case 34:this.$=be[$e].trim(),Pe.setAccDescription(this.$);break;case 35:be[$e-1].unshift({type:"loopStart",loopText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.LOOP_START}),be[$e-1].push({type:"loopEnd",loopText:be[$e-2],signalType:Pe.LINETYPE.LOOP_END}),this.$=be[$e-1];break;case 36:be[$e-1].unshift({type:"rectStart",color:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.RECT_START}),be[$e-1].push({type:"rectEnd",color:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.RECT_END}),this.$=be[$e-1];break;case 37:be[$e-1].unshift({type:"optStart",optText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.OPT_START}),be[$e-1].push({type:"optEnd",optText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.OPT_END}),this.$=be[$e-1];break;case 38:be[$e-1].unshift({type:"altStart",altText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.ALT_START}),be[$e-1].push({type:"altEnd",signalType:Pe.LINETYPE.ALT_END}),this.$=be[$e-1];break;case 39:be[$e-1].unshift({type:"parStart",parText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.PAR_START}),be[$e-1].push({type:"parEnd",signalType:Pe.LINETYPE.PAR_END}),this.$=be[$e-1];break;case 40:be[$e-1].unshift({type:"parStart",parText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.PAR_OVER_START}),be[$e-1].push({type:"parEnd",signalType:Pe.LINETYPE.PAR_END}),this.$=be[$e-1];break;case 41:be[$e-1].unshift({type:"criticalStart",criticalText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.CRITICAL_START}),be[$e-1].push({type:"criticalEnd",signalType:Pe.LINETYPE.CRITICAL_END}),this.$=be[$e-1];break;case 42:be[$e-1].unshift({type:"breakStart",breakText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.BREAK_START}),be[$e-1].push({type:"breakEnd",optText:Pe.parseMessage(be[$e-2]),signalType:Pe.LINETYPE.BREAK_END}),this.$=be[$e-1];break;case 44:this.$=be[$e-3].concat([{type:"option",optionText:Pe.parseMessage(be[$e-1]),signalType:Pe.LINETYPE.CRITICAL_OPTION},be[$e]]);break;case 46:this.$=be[$e-3].concat([{type:"and",parText:Pe.parseMessage(be[$e-1]),signalType:Pe.LINETYPE.PAR_AND},be[$e]]);break;case 48:this.$=be[$e-3].concat([{type:"else",altText:Pe.parseMessage(be[$e-1]),signalType:Pe.LINETYPE.ALT_ELSE},be[$e]]);break;case 49:be[$e-3].draw="participant",be[$e-3].type="addParticipant",be[$e-3].description=Pe.parseMessage(be[$e-1]),this.$=be[$e-3];break;case 50:be[$e-1].draw="participant",be[$e-1].type="addParticipant",this.$=be[$e-1];break;case 51:be[$e-3].draw="actor",be[$e-3].type="addParticipant",be[$e-3].description=Pe.parseMessage(be[$e-1]),this.$=be[$e-3];break;case 52:case 57:be[$e-1].draw="actor",be[$e-1].type="addParticipant",this.$=be[$e-1];break;case 53:be[$e-1].type="destroyParticipant",this.$=be[$e-1];break;case 54:be[$e-3].draw="participant",be[$e-3].type="addParticipant",be[$e-3].description=Pe.parseMessage(be[$e-1]),this.$=be[$e-3];break;case 55:be[$e-1].draw="participant",be[$e-1].type="addParticipant",this.$=be[$e-1];break;case 56:be[$e-3].draw="actor",be[$e-3].type="addParticipant",be[$e-3].description=Pe.parseMessage(be[$e-1]),this.$=be[$e-3];break;case 58:this.$=[be[$e-1],{type:"addNote",placement:be[$e-2],actor:be[$e-1].actor,text:be[$e]}];break;case 59:be[$e-2]=[].concat(be[$e-1],be[$e-1]).slice(0,2),be[$e-2][0]=be[$e-2][0].actor,be[$e-2][1]=be[$e-2][1].actor,this.$=[be[$e-1],{type:"addNote",placement:Pe.PLACEMENT.OVER,actor:be[$e-2].slice(0,2),text:be[$e]}];break;case 60:this.$=[be[$e-1],{type:"addLinks",actor:be[$e-1].actor,text:be[$e]}];break;case 61:this.$=[be[$e-1],{type:"addALink",actor:be[$e-1].actor,text:be[$e]}];break;case 62:this.$=[be[$e-1],{type:"addProperties",actor:be[$e-1].actor,text:be[$e]}];break;case 63:this.$=[be[$e-1],{type:"addDetails",actor:be[$e-1].actor,text:be[$e]}];break;case 66:this.$=[be[$e-2],be[$e]];break;case 67:this.$=be[$e];break;case 68:this.$=Pe.PLACEMENT.LEFTOF;break;case 69:this.$=Pe.PLACEMENT.RIGHTOF;break;case 70:this.$=[be[$e-4],be[$e-1],{type:"addMessage",from:be[$e-4].actor,to:be[$e-1].actor,signalType:be[$e-3],msg:be[$e],activate:!0},{type:"activeStart",signalType:Pe.LINETYPE.ACTIVE_START,actor:be[$e-1].actor}];break;case 71:this.$=[be[$e-4],be[$e-1],{type:"addMessage",from:be[$e-4].actor,to:be[$e-1].actor,signalType:be[$e-3],msg:be[$e]},{type:"activeEnd",signalType:Pe.LINETYPE.ACTIVE_END,actor:be[$e-4].actor}];break;case 72:this.$=[be[$e-4],be[$e-1],{type:"addMessage",from:be[$e-4].actor,to:be[$e-1].actor,signalType:be[$e-3],msg:be[$e],activate:!0,centralConnection:Pe.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:Pe.LINETYPE.CENTRAL_CONNECTION,actor:be[$e-1].actor}];break;case 73:this.$=[be[$e-4],be[$e-1],{type:"addMessage",from:be[$e-4].actor,to:be[$e-1].actor,signalType:be[$e-2],msg:be[$e],activate:!1,centralConnection:Pe.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:Pe.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:be[$e-4].actor}];break;case 74:this.$=[be[$e-5],be[$e-1],{type:"addMessage",from:be[$e-5].actor,to:be[$e-1].actor,signalType:be[$e-3],msg:be[$e],activate:!0,centralConnection:Pe.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:Pe.LINETYPE.CENTRAL_CONNECTION,actor:be[$e-1].actor},{type:"centralConnectionReverse",signalType:Pe.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:be[$e-5].actor}];break;case 75:this.$=[be[$e-3],be[$e-1],{type:"addMessage",from:be[$e-3].actor,to:be[$e-1].actor,signalType:be[$e-2],msg:be[$e]}];break;case 76:this.$={type:"addParticipant",actor:be[$e-1],config:be[$e]};break;case 77:this.$=be[$e-1].trim();break;case 78:this.$={type:"addParticipant",actor:be[$e]};break;case 79:this.$=Pe.LINETYPE.SOLID_OPEN;break;case 80:this.$=Pe.LINETYPE.DOTTED_OPEN;break;case 81:this.$=Pe.LINETYPE.SOLID;break;case 82:this.$=Pe.LINETYPE.SOLID_TOP;break;case 83:this.$=Pe.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=Pe.LINETYPE.STICK_TOP;break;case 85:this.$=Pe.LINETYPE.STICK_BOTTOM;break;case 86:this.$=Pe.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=Pe.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=Pe.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=Pe.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=Pe.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=Pe.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=Pe.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=Pe.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=Pe.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=Pe.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=Pe.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=Pe.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=Pe.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=Pe.LINETYPE.DOTTED;break;case 100:this.$=Pe.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=Pe.LINETYPE.SOLID_CROSS;break;case 102:this.$=Pe.LINETYPE.DOTTED_CROSS;break;case 103:this.$=Pe.LINETYPE.SOLID_POINT;break;case 104:this.$=Pe.LINETYPE.DOTTED_POINT;break;case 105:this.$=Pe.parseMessage(be[$e].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},e($,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},e($,[2,7]),e($,[2,8]),e($,[2,9]),e($,[2,15]),{13:49,51:N,53:O,54:R},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:P},{23:56,73:P},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e($,[2,30]),e($,[2,31]),{33:[1,62]},{35:[1,63]},e($,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:G},{23:75,55:76,73:G},{23:77,73:P},{69:78,72:[1,79],78:q,79:z,80:V,81:j,82:ee,83:ne,84:Q,85:pe,86:te,87:de,88:ce,89:ue,90:Re,91:ve,92:Ge,93:He,94:Ue,95:me,96:De,97:Ie,98:Me,99:re,100:le,101:oe,102:he,103:xe},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:P},{23:111,73:P},{23:112,73:P},{23:113,73:P},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],se),e($,[2,6]),e($,[2,16]),e(F,[2,10],{11:114}),e($,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e($,[2,22]),{5:[1,118]},{5:[1,119]},e($,[2,25]),e($,[2,26]),e($,[2,27]),e($,[2,28]),e($,[2,29]),e($,[2,32]),e($,[2,33]),e(H,i,{7:120}),e(H,i,{7:121}),e(H,i,{7:122}),e(W,i,{41:123,7:124}),e(U,i,{43:125,7:126}),e(U,i,{7:126,43:127}),e(ae,i,{46:128,7:129}),e(H,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(K,se,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:P},{69:146,78:q,79:z,80:V,81:j,82:ee,83:ne,84:Q,85:pe,86:te,87:de,88:ce,89:ue,90:Re,91:ve,92:Ge,93:He,94:Ue,95:me,96:De,97:Ie,98:Me,99:re,100:le,101:oe,102:he,103:xe},e(Y,[2,79]),e(Y,[2,80]),e(Y,[2,81]),e(Y,[2,82]),e(Y,[2,83]),e(Y,[2,84]),e(Y,[2,85]),e(Y,[2,86]),e(Y,[2,87]),e(Y,[2,88]),e(Y,[2,89]),e(Y,[2,90]),e(Y,[2,91]),e(Y,[2,92]),e(Y,[2,93]),e(Y,[2,94]),e(Y,[2,95]),e(Y,[2,96]),e(Y,[2,97]),e(Y,[2,98]),e(Y,[2,99]),e(Y,[2,100]),e(Y,[2,101]),e(Y,[2,102]),e(Y,[2,103]),e(Y,[2,104]),{23:147,73:P},{23:149,60:148,73:P},{73:[2,68]},{73:[2,69]},{58:150,104:Z},{58:152,104:Z},{58:153,104:Z},{58:154,104:Z},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:N,53:O,54:R},{5:[1,160]},e($,[2,20]),e($,[2,21]),e($,[2,23]),e($,[2,24]),{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,161],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,162],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,163],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{17:[1,164]},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[2,47],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,50:[1,165],51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{17:[1,166]},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[2,45],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,49:[1,167],51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{17:[1,168]},{17:[1,169]},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[2,43],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,48:[1,170],51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{4:a,5:s,8:8,9:10,10:o,13:13,14:l,15:u,17:[1,171],18:16,19:h,22:f,23:41,24:d,25:20,26:21,27:22,28:23,29:24,30:p,31:g,32:m,34:y,36:x,37:b,38:T,39:k,40:w,42:C,44:S,45:E,47:L,51:N,53:O,54:R,56:_,61:D,62:I,63:M,64:B,73:P},{16:[1,172]},e($,[2,50]),{16:[1,173]},e($,[2,55]),e(K,[2,76]),{76:[1,174]},{16:[1,175]},e($,[2,52]),{16:[1,176]},e($,[2,57]),e($,[2,53]),{23:177,73:P},{23:178,73:P},{23:179,73:P},{58:180,104:Z},{23:181,72:[1,182],73:P},{58:183,104:Z},{58:184,104:Z},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e($,[2,17]),e(F,[2,11]),{13:186,51:N,53:O,54:R},e(F,[2,13]),e(F,[2,14]),e($,[2,19]),e($,[2,35]),e($,[2,36]),e($,[2,37]),e($,[2,38]),{16:[1,187]},e($,[2,39]),{16:[1,188]},e($,[2,40]),e($,[2,41]),{16:[1,189]},e($,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:Z},{58:196,104:Z},{58:197,104:Z},{5:[2,75]},{58:198,104:Z},{23:199,73:P},{5:[2,58]},{5:[2,59]},{23:200,73:P},e(F,[2,12]),e(W,i,{7:124,41:201}),e(U,i,{7:126,43:202}),e(ae,i,{7:129,46:203}),e($,[2,49]),e($,[2,54]),e(K,[2,77]),e($,[2,51]),e($,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:Z},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:v(function(Ne,Ae){if(Ae.recoverable)this.trace(Ne);else{var Fe=new Error(Ne);throw Fe.hash=Ae,Fe}},"parseError"),parse:v(function(Ne){var Ae=this,Fe=[0],Pe=[],We=[null],be=[],lt=this.table,$e="",at=0,bt=0,Et=0,pt=2,Ct=1,ht=be.slice.call(arguments,1),Te=Object.create(this.lexer),ot={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(ot.yy[gt]=this.yy[gt]);Te.setInput(Ne,ot.yy),ot.yy.lexer=Te,ot.yy.parser=this,typeof Te.yylloc>"u"&&(Te.yylloc={});var Qe=Te.yylloc;be.push(Qe);var _e=Te.options&&Te.options.ranges;typeof ot.yy.parseError=="function"?this.parseError=ot.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ze(ir){Fe.length=Fe.length-2*ir,We.length=We.length-ir,be.length=be.length-ir}v(Ze,"popStack");function nt(){var ir;return ir=Pe.pop()||Te.lex()||Ct,typeof ir!="number"&&(ir instanceof Array&&(Pe=ir,ir=Pe.pop()),ir=Ae.symbols_[ir]||ir),ir}v(nt,"lex");for(var ft,jt,yt,Ht,Er,rr,Ot={},Zt,Je,ut,kt;;){if(yt=Fe[Fe.length-1],this.defaultActions[yt]?Ht=this.defaultActions[yt]:((ft===null||typeof ft>"u")&&(ft=nt()),Ht=lt[yt]&<[yt][ft]),typeof Ht>"u"||!Ht.length||!Ht[0]){var lr="";kt=[];for(Zt in lt[yt])this.terminals_[Zt]&&Zt>pt&&kt.push("'"+this.terminals_[Zt]+"'");Te.showPosition?lr="Parse error on line "+(at+1)+`: +`+Te.showPosition()+` +Expecting `+kt.join(", ")+", got '"+(this.terminals_[ft]||ft)+"'":lr="Parse error on line "+(at+1)+": Unexpected "+(ft==Ct?"end of input":"'"+(this.terminals_[ft]||ft)+"'"),this.parseError(lr,{text:Te.match,token:this.terminals_[ft]||ft,line:Te.yylineno,loc:Qe,expected:kt})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+ft);switch(Ht[0]){case 1:Fe.push(ft),We.push(Te.yytext),be.push(Te.yylloc),Fe.push(Ht[1]),ft=null,jt?(ft=jt,jt=null):(bt=Te.yyleng,$e=Te.yytext,at=Te.yylineno,Qe=Te.yylloc,Et>0&&Et--);break;case 2:if(Je=this.productions_[Ht[1]][1],Ot.$=We[We.length-Je],Ot._$={first_line:be[be.length-(Je||1)].first_line,last_line:be[be.length-1].last_line,first_column:be[be.length-(Je||1)].first_column,last_column:be[be.length-1].last_column},_e&&(Ot._$.range=[be[be.length-(Je||1)].range[0],be[be.length-1].range[1]]),rr=this.performAction.apply(Ot,[$e,bt,at,ot.yy,Ht[1],We,be].concat(ht)),typeof rr<"u")return rr;Je&&(Fe=Fe.slice(0,-1*Je*2),We=We.slice(0,-1*Je),be=be.slice(0,-1*Je)),Fe.push(this.productions_[Ht[1]][0]),We.push(Ot.$),be.push(Ot._$),ut=lt[Fe[Fe.length-2]][Fe[Fe.length-1]],Fe.push(ut);break;case 3:return!0}}return!0},"parse")},we=(function(){var Se={EOF:1,parseError:v(function(Ae,Fe){if(this.yy.parser)this.yy.parser.parseError(Ae,Fe);else throw new Error(Ae)},"parseError"),setInput:v(function(Ne,Ae){return this.yy=Ae||this.yy||{},this._input=Ne,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var Ne=this._input[0];this.yytext+=Ne,this.yyleng++,this.offset++,this.match+=Ne,this.matched+=Ne;var Ae=Ne.match(/(?:\r\n?|\n).*/g);return Ae?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ne},"input"),unput:v(function(Ne){var Ae=Ne.length,Fe=Ne.split(/(?:\r\n?|\n)/g);this._input=Ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ae),this.offset-=Ae;var Pe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Fe.length-1&&(this.yylineno-=Fe.length-1);var We=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Fe?(Fe.length===Pe.length?this.yylloc.first_column:0)+Pe[Pe.length-Fe.length].length-Fe[0].length:this.yylloc.first_column-Ae},this.options.ranges&&(this.yylloc.range=[We[0],We[0]+this.yyleng-Ae]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(Ne){this.unput(this.match.slice(Ne))},"less"),pastInput:v(function(){var Ne=this.matched.substr(0,this.matched.length-this.match.length);return(Ne.length>20?"...":"")+Ne.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var Ne=this.match;return Ne.length<20&&(Ne+=this._input.substr(0,20-Ne.length)),(Ne.substr(0,20)+(Ne.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var Ne=this.pastInput(),Ae=new Array(Ne.length+1).join("-");return Ne+this.upcomingInput()+` +`+Ae+"^"},"showPosition"),test_match:v(function(Ne,Ae){var Fe,Pe,We;if(this.options.backtrack_lexer&&(We={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(We.yylloc.range=this.yylloc.range.slice(0))),Pe=Ne[0].match(/(?:\r\n?|\n).*/g),Pe&&(this.yylineno+=Pe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Pe?Pe[Pe.length-1].length-Pe[Pe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ne[0].length},this.yytext+=Ne[0],this.match+=Ne[0],this.matches=Ne,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(Ne[0].length),this.matched+=Ne[0],Fe=this.performAction.call(this,this.yy,this,Ae,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Fe)return Fe;if(this._backtrack){for(var be in We)this[be]=We[be];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ne,Ae,Fe,Pe;this._more||(this.yytext="",this.match="");for(var We=this._currentRules(),be=0;beAe[0].length)){if(Ae=Fe,Pe=be,this.options.backtrack_lexer){if(Ne=this.test_match(Fe,We[be]),Ne!==!1)return Ne;if(this._backtrack){Ae=!1;continue}else return!1}else if(!this.options.flex)break}return Ae?(Ne=this.test_match(Ae,We[Pe]),Ne!==!1?Ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var Ae=this.next();return Ae||this.lex()},"lex"),begin:v(function(Ae){this.conditionStack.push(Ae)},"begin"),popState:v(function(){var Ae=this.conditionStack.length-1;return Ae>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(Ae){return Ae=this.conditionStack.length-1-Math.abs(Ae||0),Ae>=0?this.conditionStack[Ae]:"INITIAL"},"topState"),pushState:v(function(Ae){this.begin(Ae)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(Ae,Fe,Pe,We){var be=We;switch(Pe){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return Fe.yytext=Fe.yytext.trim(),73;break;case 12:return Fe.yytext=Fe.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return Fe.yytext=Fe.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return Fe.yytext=Fe.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return Fe.yytext=Fe.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return Se})();Ce.lexer=we;function ke(){this.yy={}}return v(ke,"Parser"),ke.prototype=Ce,Ce.Parser=ke,new ke})();nY.parser=nY;m4t=nY,y4t={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},v4t={FILLED:0,OPEN:1},x4t={LEFTOF:0,RIGHTOF:1,OVER:2},x7={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},b4t=class{constructor(){this.state=new pv(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=Ar,this.setAccDescription=Ir,this.setDiagramTitle=$r,this.getAccTitle=Lr,this.getAccDescription=Mr,this.getDiagramTitle=Dr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(ze().wrap),this.LINETYPE=y4t,this.ARROWTYPE=v4t,this.PLACEMENT=x4t}static{v(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,n,i){let a=this.state.records.currentBox,s;if(i!==void 0){let l;i.includes(` +`)?l=i+` `:l=`{ -`+n+` -}`,s=If(l,{schema:Rf})}i=s?.type??i,s?.alias&&(!r||r.text===t)&&(r={text:s.alias,wrap:r?.wrap,type:i});let o=this.state.records.actors.get(e);if(o){if(this.state.records.currentBox&&o.box&&this.state.records.currentBox!==o.box)throw new Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=o.box?o.box:this.state.records.currentBox,o.box=a,o&&t===o.name&&r==null)return}if(r?.text==null&&(r={text:t,type:i}),(i==null||r.text==null)&&(r={text:t,type:i}),this.state.records.actors.set(e,{box:a,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let l=this.state.records.actors.get(this.state.records.prevActor);l&&(l.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:n,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:we().sequence?.wrap??!1}clear(){this.state.reset(),fr()}parseMessage(e){let t=e.trim(),{wrap:r,cleanedText:i}=this.extractWrap(t),n={text:i,wrap:r};return ee.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",i=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",i=e.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",i=e.trim())}let{wrap:n,cleanedText:a}=this.extractWrap(i);return{text:a?mr(a,we()):void 0,color:r,wrap:n}}addNote(e,t,r){let i={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let r=this.getActor(e);try{let i=mr(t.text,we());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let n=JSON.parse(i);this.insertLinks(r,n)}catch(i){ee.error("error while parsing actor link text",i)}}addALink(e,t){let r=this.getActor(e);try{let i={},n=mr(t.text,we()),a=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let s=n.slice(0,a-1).trim(),o=n.slice(a+1).trim();i[s]=o,this.insertLinks(r,i)}catch(i){ee.error("error while parsing actor link text",i)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let r in t)e.links[r]=t[r]}addProperties(e,t){let r=this.getActor(e);try{let i=mr(t.text,we()),n=JSON.parse(i);this.insertProperties(r,n)}catch(i){ee.error("error while parsing actor properties text",i)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let r=this.getActor(e),i=document.getElementById(t.text);try{let n=i.innerHTML,a=JSON.parse(n);a.properties&&this.insertProperties(r,a.properties),a.links&&this.insertLinks(r,a.links)}catch(n){ee.error("error while parsing actor details text",n)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(t=>{this.apply(t)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnection":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnectionReverse":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":yr(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return we().sequence}},lbt=b(e=>{let t=e.dropShadow??"none",{look:r}=we();return`.actor { +`+i+` +}`,s=Hd(l,{schema:Ud})}n=s?.type??n,s?.alias&&(!r||r.text===t)&&(r={text:s.alias,wrap:r?.wrap,type:n});let o=this.state.records.actors.get(e);if(o){if(this.state.records.currentBox&&o.box&&this.state.records.currentBox!==o.box)throw new Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=o.box?o.box:this.state.records.currentBox,o.box=a,o&&t===o.name&&r==null)return}if(r?.text==null&&(r={text:t,type:n}),(n==null||r.text==null)&&(r={text:t,type:n}),this.state.records.actors.set(e,{box:a,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor){let l=this.state.records.actors.get(this.state.records.prevActor);l&&(l.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:ze().sequence?.wrap??!1}clear(){this.state.reset(),pr()}parseMessage(e){let t=e.trim(),{wrap:r,cleanedText:n}=this.extractWrap(t),i={text:n,wrap:r};return fe.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",n=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=e.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",n=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(n);return{text:a?Cr(a,ze()):void 0,color:r,wrap:i}}addNote(e,t,r){let n={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let r=this.getActor(e);try{let n=Cr(t.text,ze());n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let i=JSON.parse(n);this.insertLinks(r,i)}catch(n){fe.error("error while parsing actor link text",n)}}addALink(e,t){let r=this.getActor(e);try{let n={},i=Cr(t.text,ze()),a=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let s=i.slice(0,a-1).trim(),o=i.slice(a+1).trim();n[s]=o,this.insertLinks(r,n)}catch(n){fe.error("error while parsing actor link text",n)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let r in t)e.links[r]=t[r]}addProperties(e,t){let r=this.getActor(e);try{let n=Cr(t.text,ze()),i=JSON.parse(n);this.insertProperties(r,i)}catch(n){fe.error("error while parsing actor properties text",n)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let r=this.getActor(e),n=document.getElementById(t.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&this.insertProperties(r,a.properties),a.links&&this.insertLinks(r,a.links)}catch(i){fe.error("error while parsing actor details text",i)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(t=>{this.apply(t)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnection":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnectionReverse":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":Ar(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return ze().sequence}},T4t=v(e=>{let t=e.dropShadow??"none",{look:r}=ze();return`.actor { stroke: ${e.actorBorder}; fill: ${e.actorBkg}; stroke-width: ${e.strokeWidth??1}; @@ -1969,25 +2043,25 @@ Expecting `+Ee.join(", ")+", got '"+(this.terminals_[at]||at)+"'":lt="Parse erro filter: ${t}; stroke: ${e.nodeBorder}; } -`},"getStyles"),cbt=lbt,Gg=36,Qd="actor-top",Jd="actor-bottom",N_="actor-box",qg="actor-man",jh=new Set(["redux-color","redux-dark-color"]),kw=b(function(e,t){let r=D0(e,t);return It().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),ubt=b(function(e,t,r,i,n){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,s=t.actorCnt,o=t.rectData;var l="none";n&&(l="block !important");let u=e.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),a!=null){var p=20;for(let y in a){var g=u.append("a"),m=(0,Vq.sanitizeUrl)(a[y]);g.attr("xlink:href",m),g.attr("target","_blank"),Nbt(i)(y,g,o.x+10,o.height+p,f,20,{class:"actor"},i),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),M_=b(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),D_=b(async function(e,t,r=null){let i=e.append("foreignObject"),n=await mm(t.text,It()),s=i.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(i.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){let o=e.node().firstChild;o.setAttribute("height",s.height+2*t.textMargin);let l=o.getBBox();i.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}i.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),t.class==="loopText"?i.attr("y",Math.round(u)):i.attr("y",Math.round(u-s.height))}return[i]},"drawKatex"),tv=b(function(e,t){let r=0,i=0,n=t.text.split(ht.lineBreakRegex),[a,s]=Ls(t.fontSize),o=[],l=0,u=b(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":u=b(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":u=b(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":u=b(()=>Math.round(t.y+(r+i+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[h,f]of n.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(l=h*a);let d=e.append("text");d.attr("x",t.x),d.attr("y",u()),t.anchor!==void 0&&d.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&d.style("font-family",t.fontFamily),s!==void 0&&d.style("font-size",s),t.fontWeight!==void 0&&d.style("font-weight",t.fontWeight),t.fill!==void 0&&d.attr("fill",t.fill),t.class!==void 0&&d.attr("class",t.class),t.dy!==void 0?d.attr("dy",t.dy):l!==0&&d.attr("dy",l);let p=f||uD;if(t.tspan){let g=d.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(p)}else d.text(p);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),o.push(d)}return o},"drawText"),oAe=b(function(e,t){function r(n,a,s,o,l){return n+","+a+" "+(n+s)+","+a+" "+(n+s)+","+(a+o-l)+" "+(n+s-l*1.2)+","+(a+o)+" "+n+","+(a+o)}b(r,"genPoints");let i=e.append("polygon");return i.attr("points",r(t.x,t.y,t.width,t.height,7)),i.attr("class","labelBox"),t.y=t.y+t.height/2,tv(e,t),i},"drawLabel"),zr=-1,lAe=b((e,t,r,i)=>{e.select&&r.forEach(n=>{let a=t.get(n),s=e.select("#actor"+a.actorCnt);!i.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):i.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),hbt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower();var g=p;i||(zr++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",M_(`actor${zr}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=zr,t.links!=null&&g.attr("id","root-"+zr),l==="neo"&&g.attr("data-look","neo"));let m=$a();var y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",i?y+=` ${Jd}`:y+=` ${Qd}`,m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.class=y,m.rx=3,m.ry=3,m.name=t.name,l==="neo"&&(m.rx=6,m.ry=6);let v=kw(g,m),x=n.get(t.name)??0;if(jh.has(u)&&(v.style("stroke",d[x%d.length]),v.style("fill",f[x%d.length])),l==="neo"&&v.attr("filter","url(#drop-shadow)"),t.rectData=m,t.properties?.icon){let C=t.properties.icon.trim();C.charAt(0)==="@"?eE(g,m.x+m.width-20,m.y+10,C.substr(1)):JS(g,m.x+m.width-20,m.y+10,C)}i||(g.attr("data-et","participant"),g.attr("data-type","participant"),g.attr("data-id",t.name)),Xh(r,zi(t.description))(t.description,g,m.x,m.y,m.width,m.height,{class:`actor ${N_}`},r);let T=t.height;if(v.node){let C=v.node().getBBox();t.height=C.height,T=C.height}return T},"drawActorTypeParticipant"),fbt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower();var g=p;i||(zr++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",M_(`actor${zr}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=zr,t.links!=null&&g.attr("id","root-"+zr),l==="neo"&&g.attr("data-look","neo"));let m=$a();var y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",i?y+=` ${Jd}`:y+=` ${Qd}`,m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.class=y,m.name=t.name;let v=6,x={...m,x:m.x+-v,y:m.y+ +v,class:"actor"},T=kw(g,m),C=kw(g,x);t.rectData=m,l==="neo"&&g.attr("filter","url(#drop-shadow)");let w=n.get(t.name)??0;if(jh.has(u)&&(T.style("stroke",d[w%d.length]),T.style("fill",f[w%d.length]),C.style("stroke",d[w%d.length]),C.style("fill",f[w%d.length])),t.properties?.icon){let E=t.properties.icon.trim();E.charAt(0)==="@"?eE(g,m.x+m.width-20,m.y+10,E.substr(1)):JS(g,m.x+m.width-20,m.y+10,E)}Xh(r,zi(t.description))(t.description,g,m.x-v,m.y+v,m.width,m.height,{class:`actor ${N_}`},r);let k=t.height;if(T.node){let E=T.node().getBBox();t.height=E.height,k=E.height}return i||(g.attr("data-et","participant"),g.attr("data-type","collections"),g.attr("data-id",t.name)),k},"drawActorTypeCollections"),dbt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower(),g=p;i||(zr++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",M_(`actor${zr}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=zr,t.links!=null&&g.attr("id","root-"+zr),l==="neo"&&g.attr("data-look","neo"));let m=$a(),y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",i?y+=` ${Jd}`:y+=` ${Qd}`,g.attr("class",y),m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.name=t.name;let v=m.height/2,x=v/(2.5+m.height/50),T=g.append("g"),C=g.append("g"),w=`M ${m.x},${m.y+v} - a ${x},${v} 0 0 0 0,${m.height} - h ${m.width-2*x} - a ${x},${v} 0 0 0 0,-${m.height} +`},"getStyles"),w4t=T4t,Ym=36,Up="actor-top",Hp="actor-bottom",T7="actor-box",Xm="actor-man",Mf=new Set(["redux-color","redux-dark-color"]),YC=v(function(e,t){let r=Lg(e,t);return It().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),C4t=v(function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,s=t.actorCnt,o=t.rectData;var l="none";i&&(l="block !important");let u=e.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),a!=null){var p=20;for(let y in a){var g=u.append("a"),m=(0,sY.sanitizeUrl)(a[y]);g.attr("xlink:href",m),g.attr("target","_blank"),H4t(n)(y,g,o.x+10,o.height+p,f,20,{class:"actor"},n),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),w7=v(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),b7=v(async function(e,t,r=null){let n=e.append("foreignObject"),i=await vy(t.text,It()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){let o=e.node().firstChild;o.setAttribute("height",s.height+2*t.textMargin);let l=o.getBBox();n.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}n.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),t.class==="loopText"?n.attr("y",Math.round(u)):n.attr("y",Math.round(u-s.height))}return[n]},"drawKatex"),xx=v(function(e,t){let r=0,n=0,i=t.text.split(vt.lineBreakRegex),[a,s]=fo(t.fontSize),o=[],l=0,u=v(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":u=v(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":u=v(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":u=v(()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[h,f]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(l=h*a);let d=e.append("text");d.attr("x",t.x),d.attr("y",u()),t.anchor!==void 0&&d.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&d.style("font-family",t.fontFamily),s!==void 0&&d.style("font-size",s),t.fontWeight!==void 0&&d.style("font-weight",t.fontWeight),t.fill!==void 0&&d.attr("fill",t.fill),t.class!==void 0&&d.attr("class",t.class),t.dy!==void 0?d.attr("dy",t.dy):l!==0&&d.attr("dy",l);let p=f||PD;if(t.tspan){let g=d.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(p)}else d.text(p);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},"drawText"),EIe=v(function(e,t){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}v(r,"genPoints");let n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,xx(e,t),n},"drawLabel"),rn=-1,AIe=v((e,t,r,n)=>{e.select&&r.forEach(i=>{let a=t.get(i),s=e.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),k4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower();var g=p;n||(rn++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",w7(`actor${rn}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=rn,t.links!=null&&g.attr("id","root-"+rn),l==="neo"&&g.attr("data-look","neo"));let m=Eo();var y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",n?y+=` ${Hp}`:y+=` ${Up}`,m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.class=y,m.rx=3,m.ry=3,m.name=t.name,l==="neo"&&(m.rx=6,m.ry=6);let x=YC(g,m),b=i.get(t.name)??0;if(Mf.has(u)&&(x.style("stroke",d[b%d.length]),x.style("fill",f[b%d.length])),l==="neo"&&x.attr("filter","url(#drop-shadow)"),t.rectData=m,t.properties?.icon){let k=t.properties.icon.trim();k.charAt(0)==="@"?LA(g,m.x+m.width-20,m.y+10,k.substr(1)):RA(g,m.x+m.width-20,m.y+10,k)}n||(g.attr("data-et","participant"),g.attr("data-type","participant"),g.attr("data-id",t.name)),Df(r,hi(t.description))(t.description,g,m.x,m.y,m.width,m.height,{class:`actor ${T7}`},r);let T=t.height;if(x.node){let k=x.node().getBBox();t.height=k.height,T=k.height}return T},"drawActorTypeParticipant"),S4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower();var g=p;n||(rn++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",w7(`actor${rn}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=rn,t.links!=null&&g.attr("id","root-"+rn),l==="neo"&&g.attr("data-look","neo"));let m=Eo();var y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",n?y+=` ${Hp}`:y+=` ${Up}`,m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.class=y,m.name=t.name;let x=6,b={...m,x:m.x+-x,y:m.y+ +x,class:"actor"},T=YC(g,m),k=YC(g,b);t.rectData=m,l==="neo"&&g.attr("filter","url(#drop-shadow)");let w=i.get(t.name)??0;if(Mf.has(u)&&(T.style("stroke",d[w%d.length]),T.style("fill",f[w%d.length]),k.style("stroke",d[w%d.length]),k.style("fill",f[w%d.length])),t.properties?.icon){let S=t.properties.icon.trim();S.charAt(0)==="@"?LA(g,m.x+m.width-20,m.y+10,S.substr(1)):RA(g,m.x+m.width-20,m.y+10,S)}Df(r,hi(t.description))(t.description,g,m.x-x,m.y+x,m.width,m.height,{class:`actor ${T7}`},r);let C=t.height;if(T.node){let S=T.node().getBBox();t.height=S.height,C=S.height}return n||(g.attr("data-et","participant"),g.attr("data-type","collections"),g.attr("data-id",t.name)),C},"drawActorTypeCollections"),E4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower(),g=p;n||(rn++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",w7(`actor${rn}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=rn,t.links!=null&&g.attr("id","root-"+rn),l==="neo"&&g.attr("data-look","neo"));let m=Eo(),y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",n?y+=` ${Hp}`:y+=` ${Up}`,g.attr("class",y),m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.name=t.name;let x=m.height/2,b=x/(2.5+m.height/50),T=g.append("g"),k=g.append("g"),w=`M ${m.x},${m.y+x} + a ${b},${x} 0 0 0 0,${m.height} + h ${m.width-2*b} + a ${b},${x} 0 0 0 0,-${m.height} Z - `;T.append("path").attr("d",w),C.append("path").attr("d",`M ${m.x},${m.y+v} - a ${x},${v} 0 0 0 0,${m.height}`),T.attr("transform",`translate(${x}, ${-(m.height/2)})`),C.attr("transform",`translate(${m.width-x}, ${-m.height/2})`),t.rectData=m,l==="neo"&&T.attr("filter","url(#drop-shadow)");let k=n.get(t.name)??0;if(jh.has(u)&&(T.style("stroke",d[k%d.length]),T.style("fill",f[k%d.length]),C.style("stroke",d[k%d.length]),C.style("fill",f[k%d.length])),t.properties?.icon){let N=t.properties.icon.trim(),P=m.x+m.width-20,O=m.y+10;N.charAt(0)==="@"?eE(g,P,O,N.substr(1)):JS(g,P,O,N)}Xh(r,zi(t.description))(t.description,g,m.x,m.y,m.width,m.height,{class:`actor ${N_}`},r);let E=t.height,A=T.select("path:last-child");if(A.node()){let N=A.node().getBBox();t.height=N.height,E=N.height}return i||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),E},"drawActorTypeQueue"),pbt=b(function(e,t,r,i,n,a){let s=i?t.stopy:t.starty,o=t.x+t.width/2,l=s+75,{look:u,theme:h,themeVariables:f}=r,{bkgColorArray:d,borderColorArray:p,actorBorder:g,actorBkg:m}=f,y=e.append("g").lower();i||(zr++,y.append("line").attr("id","actor"+zr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=zr);let v=e.append("g"),x=qg;i?x+=` ${Jd}`:x+=` ${Qd}`,v.attr("class",x),v.attr("name",t.name);let T=$a();T.x=t.x,T.y=s,T.fill="#eaeaea",T.width=t.width,T.height=t.height,T.class="actor";let C=t.x+t.width/2,w=s+32,k=22;v.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),v.append("circle").attr("cx",C).attr("cy",w).attr("r",k).attr("filter",`${u==="neo"?"url(#drop-shadow)":""}`),v.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${C}, ${w-k})`);let E=a.get(t.name)??0;jh.has(h)?(v.style("stroke",p[E%p.length]),v.style("fill",d[E%p.length])):(v.style("stroke",g),v.style("fill",m));let A=v.node().getBBox();return t.height=A.height+2*(r?.sequence?.labelBoxHeight??0),Xh(r,zi(t.description))(t.description,v,T.x,T.y+k+(i?5:12),T.width,T.height,{class:`actor ${qg}`},r),i||(v.attr("data-et","participant"),v.attr("data-type","control"),v.attr("data-id",t.name)),t.height},"drawActorTypeControl"),gbt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+75,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower(),g=e.append("g"),m="actor";i?m+=` ${Jd}`:m+=` ${Qd}`,g.attr("class",m),g.attr("name",t.name);let y=$a();y.x=t.x,y.y=a,y.fill="#eaeaea",y.width=t.width,y.height=t.height,y.class="actor";let v=t.x+t.width/2,x=a+(i?10:25),T=22;g.append("circle").attr("cx",v).attr("cy",x).attr("r",T).attr("width",t.width).attr("height",t.height),g.append("line").attr("x1",v-T).attr("x2",v+T).attr("y1",x+T).attr("y2",x+T).attr("stroke-width",2),l==="neo"&&g.attr("filter","url(#drop-shadow)");let C=n.get(t.name)??0;jh.has(u)&&(g.style("stroke",d[C%d.length]),g.style("fill",f[C%d.length]));let w=g.node().getBBox();return t.height=w.height+(r?.sequence?.labelBoxHeight??0),i||(zr++,p.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=zr),Xh(r,zi(t.description))(t.description,g,y.x,y.y+(i?15:30),y.width,y.height,{class:`actor ${qg}`},r),i?g.attr("transform",`translate(0, ${T})`):(g.attr("transform",`translate(0, ${T/2-5})`),g.attr("data-et","participant"),g.attr("data-type","entity"),g.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),mbt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height+2*r.boxTextMargin,{theme:l,themeVariables:u,look:h}=r,{bkgColorArray:f,borderColorArray:d,actorBorder:p}=u,g=e.append("g").lower(),m=g;i||(zr++,Object.keys(t.links||{}).length&&!r.forceMenus&&m.attr("onclick",M_(`actor${zr}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),m=g.append("g"),t.actorCnt=zr,t.links!=null&&m.attr("id","root-"+zr),h==="neo"&&m.attr("data-look","neo"));let y=$a(),v="actor";t.properties?.class?v=t.properties.class:y.fill="#eaeaea",i?v+=` ${Jd}`:v+=` ${Qd}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=v,y.name=t.name,y.x=t.x,y.y=a;let x=y.width/3,T=y.width/3,C=x/2,w=C/(2.5+x/50),k=m.append("g");k.attr("class",v);let E=` + `;T.append("path").attr("d",w),k.append("path").attr("d",`M ${m.x},${m.y+x} + a ${b},${x} 0 0 0 0,${m.height}`),T.attr("transform",`translate(${b}, ${-(m.height/2)})`),k.attr("transform",`translate(${m.width-b}, ${-m.height/2})`),t.rectData=m,l==="neo"&&T.attr("filter","url(#drop-shadow)");let C=i.get(t.name)??0;if(Mf.has(u)&&(T.style("stroke",d[C%d.length]),T.style("fill",f[C%d.length]),k.style("stroke",d[C%d.length]),k.style("fill",f[C%d.length])),t.properties?.icon){let L=t.properties.icon.trim(),N=m.x+m.width-20,O=m.y+10;L.charAt(0)==="@"?LA(g,N,O,L.substr(1)):RA(g,N,O,L)}Df(r,hi(t.description))(t.description,g,m.x,m.y,m.width,m.height,{class:`actor ${T7}`},r);let S=t.height,E=T.select("path:last-child");if(E.node()){let L=E.node().getBBox();t.height=L.height,S=L.height}return n||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),S},"drawActorTypeQueue"),A4t=v(function(e,t,r,n,i,a){let s=n?t.stopy:t.starty,o=t.x+t.width/2,l=s+75,{look:u,theme:h,themeVariables:f}=r,{bkgColorArray:d,borderColorArray:p,actorBorder:g,actorBkg:m}=f,y=e.append("g").lower();n||(rn++,y.append("line").attr("id","actor"+rn).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=rn);let x=e.append("g"),b=Xm;n?b+=` ${Hp}`:b+=` ${Up}`,x.attr("class",b),x.attr("name",t.name);let T=Eo();T.x=t.x,T.y=s,T.fill="#eaeaea",T.width=t.width,T.height=t.height,T.class="actor";let k=t.x+t.width/2,w=s+32,C=22;x.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),x.append("circle").attr("cx",k).attr("cy",w).attr("r",C).attr("filter",`${u==="neo"?"url(#drop-shadow)":""}`),x.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${k}, ${w-C})`);let S=a.get(t.name)??0;Mf.has(h)?(x.style("stroke",p[S%p.length]),x.style("fill",d[S%p.length])):(x.style("stroke",g),x.style("fill",m));let E=x.node().getBBox();return t.height=E.height+2*(r?.sequence?.labelBoxHeight??0),Df(r,hi(t.description))(t.description,x,T.x,T.y+C+(n?5:12),T.width,T.height,{class:`actor ${Xm}`},r),n||(x.attr("data-et","participant"),x.attr("data-type","control"),x.attr("data-id",t.name)),t.height},"drawActorTypeControl"),_4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+75,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d}=h,p=e.append("g").lower(),g=e.append("g"),m="actor";n?m+=` ${Hp}`:m+=` ${Up}`,g.attr("class",m),g.attr("name",t.name);let y=Eo();y.x=t.x,y.y=a,y.fill="#eaeaea",y.width=t.width,y.height=t.height,y.class="actor";let x=t.x+t.width/2,b=a+(n?10:25),T=22;g.append("circle").attr("cx",x).attr("cy",b).attr("r",T).attr("width",t.width).attr("height",t.height),g.append("line").attr("x1",x-T).attr("x2",x+T).attr("y1",b+T).attr("y2",b+T).attr("stroke-width",2),l==="neo"&&g.attr("filter","url(#drop-shadow)");let k=i.get(t.name)??0;Mf.has(u)&&(g.style("stroke",d[k%d.length]),g.style("fill",f[k%d.length]));let w=g.node().getBBox();return t.height=w.height+(r?.sequence?.labelBoxHeight??0),n||(rn++,p.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=rn),Df(r,hi(t.description))(t.description,g,y.x,y.y+(n?15:30),y.width,y.height,{class:`actor ${Xm}`},r),n?g.attr("transform",`translate(0, ${T})`):(g.attr("transform",`translate(0, ${T/2-5})`),g.attr("data-et","participant"),g.attr("data-type","entity"),g.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),R4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height+2*r.boxTextMargin,{theme:l,themeVariables:u,look:h}=r,{bkgColorArray:f,borderColorArray:d,actorBorder:p}=u,g=e.append("g").lower(),m=g;n||(rn++,Object.keys(t.links||{}).length&&!r.forceMenus&&m.attr("onclick",w7(`actor${rn}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),m=g.append("g"),t.actorCnt=rn,t.links!=null&&m.attr("id","root-"+rn),h==="neo"&&m.attr("data-look","neo"));let y=Eo(),x="actor";t.properties?.class?x=t.properties.class:y.fill="#eaeaea",n?x+=` ${Hp}`:x+=` ${Up}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=x,y.name=t.name,y.x=t.x,y.y=a;let b=y.width/3,T=y.width/3,k=b/2,w=k/(2.5+b/50),C=m.append("g");C.attr("class",x);let S=` M ${y.x},${y.y+w} - a ${C},${w} 0 0 0 ${x},0 - a ${C},${w} 0 0 0 -${x},0 + a ${k},${w} 0 0 0 ${b},0 + a ${k},${w} 0 0 0 -${b},0 l 0,${T-2*w} - a ${C},${w} 0 0 0 ${x},0 + a ${k},${w} 0 0 0 ${b},0 l 0,-${T-2*w} -`;k.append("path").attr("d",E),h==="neo"&&k.attr("filter","url(#drop-shadow)");let A=n.get(t.name)??0;jh.has(l)?(k.style("stroke",d[A%d.length]),k.style("fill",f[A%d.length])):k.style("stroke",p),k.attr("transform",`translate(${x}, ${w})`),t.rectData=y,Xh(r,zi(t.description))(t.description,m,y.x,y.y+35,y.width,y.height,{class:`actor ${N_}`},r);let N=k.select("path:last-child");if(N.node()){let P=N.node().getBBox();t.height=P.height+(r.sequence.labelBoxHeight??0)}return i||(m.attr("data-et","participant"),m.attr("data-type","database"),m.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),ybt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,l=22,u=e.append("g").lower(),{look:h,theme:f,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:g,actorBorder:m}=d;i||(zr++,u.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=zr);let y=e.append("g"),v=qg;i?v+=` ${Jd}`:v+=` ${Qd}`,y.attr("class",v),y.attr("name",t.name);let x=$a();x.x=t.x,x.y=a,x.fill="#eaeaea",x.width=t.width,x.height=t.height,x.class="actor",y.append("line").attr("id","actor-man-torso"+zr).attr("x1",t.x+t.width/2-l*2.5).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),y.append("line").attr("id","actor-man-arms"+zr).attr("x1",t.x+t.width/2-l*2.5).attr("y1",a+2).attr("x2",t.x+t.width/2-l*2.5).attr("y2",a+22),y.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",l),h==="neo"&&y.attr("filter","url(#drop-shadow)");let T=n.get(t.name)??0;jh.has(f)?(y.style("stroke",g[T%g.length]),y.style("fill",p[T%g.length])):y.style("stroke",m);let C=y.node().getBBox();return t.height=C.height+(r.sequence.labelBoxHeight??0),Xh(r,zi(t.description))(t.description,y,x.x,x.y+15,x.width,x.height,{class:`actor ${qg}`},r),y.attr("transform",`translate(0,${l/2+10})`),i||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),vbt=b(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d,actorBorder:p}=h,g=e.append("g").lower();i||(zr++,g.append("line").attr("id","actor"+zr).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=zr);let m=e.append("g"),y=qg;i?y+=` ${Jd}`:y+=` ${Qd}`,m.attr("class",y),m.attr("name",t.name),i||m.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let v=l==="neo"?.5:1,x=l==="neo"?a+(1-v)*30:a;m.append("line").attr("id","actor-man-torso"+zr).attr("x1",s).attr("y1",x+25*v).attr("x2",s).attr("y2",x+45*v),m.append("line").attr("id","actor-man-arms"+zr).attr("x1",s-Gg/2*v).attr("y1",x+33*v).attr("x2",s+Gg/2*v).attr("y2",x+33*v),m.append("line").attr("x1",s-Gg/2*v).attr("y1",x+60*v).attr("x2",s).attr("y2",x+45*v),m.append("line").attr("x1",s).attr("y1",x+45*v).attr("x2",s+(Gg/2-2)*v).attr("y2",x+60*v);let T=m.append("circle");T.attr("cx",t.x+t.width/2),T.attr("cy",x+10*v),T.attr("r",15*v),T.attr("width",t.width*v),T.attr("height",t.height*v);let C=m.node().getBBox();t.height=C.height;let w=$a();w.x=t.x,w.y=x,w.fill="#eaeaea",w.width=t.width,w.height=t.height/v,w.class="actor",w.rx=3,w.ry=3;let k=n.get(t.name)??0;return jh.has(u)?(m.style("stroke",d[k%d.length]),m.style("fill",f[k%d.length])):m.style("stroke",p),Xh(r,zi(t.description))(t.description,m,w.x,x+35*v-(l==="neo"?10:0),w.width,w.height,{class:`actor ${qg}`},r),t.height},"drawActorTypeActor"),bbt=b(async function(e,t,r,i,n,a,s){let o=s??new Map([...a.db.getActors().values()].map((l,u)=>[l.name,u]));switch(t.type){case"actor":return await vbt(e,t,r,i,o);case"participant":return await hbt(e,t,r,i,o);case"boundary":return await ybt(e,t,r,i,o);case"control":return await pbt(e,t,r,i,n,o);case"entity":return await gbt(e,t,r,i,o);case"database":return await mbt(e,t,r,i,o);case"collections":return await fbt(e,t,r,i,o);case"queue":return await dbt(e,t,r,i,o)}},"drawActor"),xbt=b(function(e,t,r){let n=e.append("g");cAe(n,t),t.name&&Xh(r)(t.name,n,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),n.lower()},"drawBox"),Tbt=b(function(e){return e.append("g")},"anchorElement"),wbt=b(function(e,t,r,i,n,a,s){let{theme:o,themeVariables:l}=i,{bkgColorArray:u,borderColorArray:h,mainBkg:f}=l,d=$a(),p=t.anchored,g=t.actor;d.x=t.startx,d.y=t.starty,d.class="activation"+n%3,d.width=t.stopx-t.startx,d.height=r-t.starty;let m=kw(p,d),v=(s??new Map([...a.db.getActors().values()].map((x,T)=>[x.name,T]))).get(g)??0;jh.has(o)&&(m.style("stroke",h[v%h.length]),m.style("fill",u[v%h.length]??f))},"drawActivation"),kbt=b(async function(e,t,r,i,n){let{boxMargin:a,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=i,d=e.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),p=b(function(y,v,x,T){return d.append("line").attr("x1",y).attr("y1",v).attr("x2",x).attr("y2",T).attr("class","loopLine")},"drawLoopLine");p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(y){p(t.startx,y.y,t.stopx,y.y).style("stroke-dasharray","3, 3")});let g=tE();g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=u,g.fontSize=h,g.fontWeight=f,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(l??0,50),g.height=o+(i.look==="neo"?15:0)||20,g.textMargin=s,g.class="labelText",oAe(d,g),g=uAe(),g.text=t.title,g.x=t.startx+l/2+(t.stopx-t.startx)/2,g.y=t.starty+a+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=u,g.fontSize=h,g.fontWeight=f,g.wrap=!0;let m=zi(g.text)?await D_(d,g,t):tv(d,g);if(t.sectionTitles!==void 0){for(let[y,v]of Object.entries(t.sectionTitles))if(v.message){g.text=v.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[y].y+a+s,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=u,g.fontSize=h,g.fontWeight=f,g.wrap=t.wrap,zi(g.text)?(t.starty=t.sections[y].y,await D_(d,g,t)):tv(d,g);let x=Math.round(m.map(T=>(T._groups||T)[0][0].getBBox().height).reduce((T,C)=>T+C));t.sections[y].height+=x-(a+s)}}return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),cAe=b(function(e,t){QS(e,t)},"drawBackgroundRect"),Cbt=b(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Sbt=b(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Ebt=b(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Abt=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),_bt=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Lbt=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Rbt=b(function(e,t){e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Ibt=b(function(e,t){let{theme:r}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),uAe=b(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Dbt=b(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Xh=(function(){function e(a,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(a);n(d,f)}b(e,"byText");function t(a,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:g,actorFontWeight:m}=d,[y,v]=Ls(p),x=a.split(ht.lineBreakRegex);for(let T=0;Te.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:b(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:b(function(e){this.boxes.push(e)},"addBox"),addActor:b(function(e){this.actors.push(e)},"addActor"),addLoop:b(function(e){this.loops.push(e)},"addLoop"),addMessage:b(function(e){this.messages.push(e)},"addMessage"),addNote:b(function(e){this.notes.push(e)},"addNote"),lastActor:b(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:b(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:b(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:b(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:b(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,dAe(we())},"init"),updateVal:b(function(e,t,r,i){e[t]===void 0?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:b(function(e,t,r,i){let n=this,a=0;function s(o){return b(function(u){a++;let h=n.sequenceItems.length-a+1;n.updateVal(u,"starty",t-h*Ge.boxMargin,Math.min),n.updateVal(u,"stopy",i+h*Ge.boxMargin,Math.max),n.updateVal(pt.data,"startx",e-h*Ge.boxMargin,Math.min),n.updateVal(pt.data,"stopx",r+h*Ge.boxMargin,Math.max),o!=="activation"&&(n.updateVal(u,"startx",e-h*Ge.boxMargin,Math.min),n.updateVal(u,"stopx",r+h*Ge.boxMargin,Math.max),n.updateVal(pt.data,"starty",t-h*Ge.boxMargin,Math.min),n.updateVal(pt.data,"stopy",i+h*Ge.boxMargin,Math.max))},"updateItemBounds")}b(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:b(function(e,t,r,i){let n=ht.getMin(e,r),a=ht.getMax(e,r),s=ht.getMin(t,i),o=ht.getMax(t,i);this.updateVal(pt.data,"startx",n,Math.min),this.updateVal(pt.data,"starty",s,Math.min),this.updateVal(pt.data,"stopx",a,Math.max),this.updateVal(pt.data,"stopy",o,Math.max),this.updateBounds(n,s,a,o)},"insert"),newActivation:b(function(e,t,r){let i=r.get(e.from),n=O_(e.from).length||0,a=i.x+i.width/2+(n-1)*Ge.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ge.activationWidth,stopy:void 0,actor:e.from,anchored:Ii.anchorElement(t)})},"newActivation"),endActivation:b(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:b(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:b(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:b(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:b(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:b(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:pt.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:b(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:b(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:b(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=ht.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:b(function(){return this.verticalPos},"getVerticalPos"),getBounds:b(function(){return{bounds:this.data,models:this.models}},"getBounds")},Fbt=b(async function(e,t,r){pt.bumpVerticalPos(Ge.boxMargin),t.height=Ge.boxMargin,t.starty=pt.getVerticalPos();let i=$a();i.x=t.startx,i.y=t.starty,i.width=t.width||Ge.width,i.class="note";let n=e.append("g");n.attr("data-et","note"),n.attr("data-id","i"+r);let a=Ii.drawRect(n,i),s=tE();s.x=t.startx,s.y=t.starty,s.width=i.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=Ge.noteFontFamily,s.fontSize=Ge.noteFontSize,s.fontWeight=Ge.noteFontWeight,s.anchor=Ge.noteAlign,s.textMargin=Ge.noteMargin,s.valign="center";let o=zi(s.text)?await D_(n,s):tv(n,s),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));a.attr("height",l+2*Ge.noteMargin),t.height+=l+2*Ge.noteMargin,pt.bumpVerticalPos(l+2*Ge.noteMargin),t.stopy=t.starty+l+2*Ge.noteMargin,t.stopx=t.startx+i.width,pt.insert(t.startx,t.starty,t.stopx,t.stopy),pt.models.addNote(t)},"drawNote"),aAe=b(function(e,t,r,i,n,a,s){let o=i.db.getActors(),l=o.get(t.from),u=o.get(t.to),h=r.sequenceVisible,f=l.x+l.width/2,d=u.x+u.width/2,p=f<=d,g=yAe(t,i),m=e.append("g"),y=16.5,v=b((k,E)=>{let A=k?y:-y;return E?-A:A},"getCircleOffset"),x=b(k=>{m.append("circle").attr("cx",k).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:T,CENTRAL_CONNECTION_REVERSE:C,CENTRAL_CONNECTION_DUAL:w}=i.db.LINETYPE;if(h)switch(t.centralConnection){case T:g&&(d+=v(p,!0));break;case C:g||(f+=v(p,!1));break;case w:g?d+=v(p,!0):f+=v(p,!1);break}switch(t.centralConnection){case T:x(d);break;case C:x(f);break;case w:x(f),x(d);break}},"drawCentralConnection"),Vg=b(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),ev=b(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Gq=b(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");b(hAe,"boundMessage");$bt=b(async function(e,t,r,i,n,a){let{startx:s,stopx:o,starty:l,message:u,type:h,sequenceIndex:f,sequenceVisible:d}=t,p=jt.calculateTextDimensions(u,Vg(Ge)),g=tE();g.x=Math.min(s,o),g.y=l+10,g.width=Math.abs(o-s),g.class="messageText",g.dy="1em",g.text=u,g.fontFamily=Ge.messageFontFamily,g.fontSize=Ge.messageFontSize,g.fontWeight=Ge.messageFontWeight,g.anchor=Ge.messageAlign,g.valign="center",g.textMargin=Ge.wrapPadding,g.tspan=!1,zi(g.text)?await D_(e,g,{startx:s,stopx:o,starty:r}):tv(e,g);let m=p.width,y;if(s===o){let x=d||Ge.showSequenceNumbers,T=yAe(n,i),C=Ybt(n,i),w=s+(x&&(T||C)?10:0);Ge.rightAngles?y=e.append("path").attr("d",`M ${w},${r} H ${s+ht.getMax(Ge.width/2,m/2)} V ${r+25} H ${s}`):y=e.append("path").attr("d","M "+w+","+r+" C "+(w+60)+","+(r-10)+" "+(s+60)+","+(r+30)+" "+s+","+(r+20)),$q(n,i)&&aAe(e,n,t,i,s,o,r)}else y=e.append("line"),y.attr("x1",s),y.attr("y1",r),y.attr("x2",o),y.attr("y2",r),$q(n,i)&&aAe(e,n,t,i,s,o,r);h===i.db.LINETYPE.DOTTED||h===i.db.LINETYPE.DOTTED_CROSS||h===i.db.LINETYPE.DOTTED_POINT||h===i.db.LINETYPE.DOTTED_OPEN||h===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||h===i.db.LINETYPE.SOLID_TOP_DOTTED||h===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||h===i.db.LINETYPE.STICK_TOP_DOTTED||h===i.db.LINETYPE.STICK_BOTTOM_DOTTED||h===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||h===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||h===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||h===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0"),y.attr("data-et","message"),y.attr("data-id","i"+t.id),y.attr("data-from",t.from),y.attr("data-to",t.to);let v="";if(Ge.arrowMarkerAbsolute&&(v=Tp(!0)),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),(h===i.db.LINETYPE.SOLID_TOP||h===i.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr("marker-end","url("+v+"#"+a+"-solidTopArrowHead)"),(h===i.db.LINETYPE.SOLID_BOTTOM||h===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr("marker-end","url("+v+"#"+a+"-solidBottomArrowHead)"),(h===i.db.LINETYPE.STICK_TOP||h===i.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr("marker-end","url("+v+"#"+a+"-stickTopArrowHead)"),(h===i.db.LINETYPE.STICK_BOTTOM||h===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr("marker-end","url("+v+"#"+a+"-stickBottomArrowHead)"),(h===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||h===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr("marker-start","url("+v+"#"+a+"-solidBottomArrowHead)"),(h===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||h===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr("marker-start","url("+v+"#"+a+"-solidTopArrowHead)"),(h===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||h===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr("marker-start","url("+v+"#"+a+"-stickBottomArrowHead)"),(h===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||h===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr("marker-start","url("+v+"#"+a+"-stickTopArrowHead)"),(h===i.db.LINETYPE.SOLID||h===i.db.LINETYPE.DOTTED)&&y.attr("marker-end","url("+v+"#"+a+"-arrowhead)"),(h===i.db.LINETYPE.BIDIRECTIONAL_SOLID||h===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr("marker-start","url("+v+"#"+a+"-arrowhead)"),y.attr("marker-end","url("+v+"#"+a+"-arrowhead)")),(h===i.db.LINETYPE.SOLID_POINT||h===i.db.LINETYPE.DOTTED_POINT)&&y.attr("marker-end","url("+v+"#"+a+"-filled-head)"),(h===i.db.LINETYPE.SOLID_CROSS||h===i.db.LINETYPE.DOTTED_CROSS)&&y.attr("marker-end","url("+v+"#"+a+"-crosshead)"),d||Ge.showSequenceNumbers){let x=h===i.db.LINETYPE.BIDIRECTIONAL_SOLID||h===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,T=h===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||h===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||h===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||h===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||h===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||h===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||h===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||h===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,C=6,w=$q(n,i),k=s,E=o;x?(ss?E=o-2*C:(E=o-C,k+=n?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),E+=w?15:0,y.attr("x2",E),y.attr("x1",k)):y.attr("x1",s+C);let A=0,N=s===o,P=s<=o;N?A=t.fromBounds+1:T?A=P?t.toBounds-1:t.fromBounds+1:A=P?t.fromBounds+1:t.toBounds-1;let O="12px",L=f.toString().length;L>5?O="7px":L>3&&(O="9px"),e.append("line").attr("x1",A).attr("y1",r).attr("x2",A).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+v+"#"+a+"-sequencenumber)"),e.append("text").attr("x",A).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",O).attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}},"drawMessage"),zbt=b(function(e,t,r,i,n,a,s){let o=0,l=0,u,h=0;for(let f of i){let d=t.get(f),p=d.box;u&&u!=p&&(s||pt.models.addBox(u),l+=Ge.boxMargin+u.margin),p&&p!=u&&(s||(p.x=o+l,p.y=n),l+=p.margin),d.width=ht.getMax(d.width||Ge.width,Ge.width),d.height=ht.getMax(d.height||Ge.height,Ge.height),d.margin=d.margin||Ge.actorMargin,h=ht.getMax(h,d.height),r.get(d.name)&&(l+=d.width/2),d.x=o+l,d.starty=pt.getVerticalPos(),pt.insert(d.x,n,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,pt.models.addActor(d)}u&&!s&&pt.models.addBox(u),pt.bumpVerticalPos(h)},"addActorRenderingData"),qq=b(async function(e,t,r,i,n,a,s){if(i){let o=0;pt.bumpVerticalPos(Ge.boxMargin*2);for(let l of r){let u=t.get(l);u.stopy||(u.stopy=pt.getVerticalPos());let h=await Ii.drawActor(e,u,Ge,!0,n,a,s);o=ht.getMax(o,h)}pt.bumpVerticalPos(o+Ge.boxMargin)}else for(let o of r){let l=t.get(o);await Ii.drawActor(e,l,Ge,!1,n,a,s)}},"drawActors"),fAe=b(function(e,t,r,i){let n=0,a=0;for(let s of r){let o=t.get(s),l=qbt(o),u=Ii.drawPopup(e,o,l,Ge,Ge.forceMenus,i);u.height>n&&(n=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),dAe=b(function(e){Di(Ge,e),e.fontFamily&&(Ge.actorFontFamily=Ge.noteFontFamily=Ge.messageFontFamily=e.fontFamily),e.fontSize&&(Ge.actorFontSize=Ge.noteFontSize=Ge.messageFontSize=e.fontSize),e.fontWeight&&(Ge.actorFontWeight=Ge.noteFontWeight=Ge.messageFontWeight=e.fontWeight)},"setConf"),O_=b(function(e){return pt.activations.filter(function(t){return t.actor===e})},"actorActivations"),sAe=b(function(e,t){let r=t.get(e),i=O_(e),n=i.reduce(function(s,o){return ht.getMin(s,o.startx)},r.x+r.width/2-1),a=i.reduce(function(s,o){return ht.getMax(s,o.stopx)},r.x+r.width/2+1);return[n,a]},"activationBounds");b(Kl,"adjustLoopHeightForWrap");b(pAe,"adjustCreatedDestroyedData");Gbt=b(async function(e,t,r,i){let{securityLevel:n,sequence:a,look:s}=we();Ge=a;let o;n==="sandbox"&&(o=Qe("#i"+t));let l=n==="sandbox"?Qe(o.nodes()[0].contentDocument.body):Qe("body"),u=n==="sandbox"?o.nodes()[0].contentDocument:document;pt.init(),ee.debug(i.db);let h=n==="sandbox"?l.select(`[id="${t}"]`):Qe(`[id="${t}"]`),f=i.db.getActors(),d=i.db.getCreatedActors(),p=i.db.getDestroyedActors(),g=i.db.getBoxes(),m=i.db.getActorKeys(),y=i.db.getMessages(),v=i.db.getDiagramTitle(),x=i.db.hasAtLeastOneBox(),T=i.db.hasAtLeastOneBoxWithTitle(),C=await gAe(f,y,i);if(Ge.height=await mAe(f,C,g),Ii.insertComputerIcon(h,t),Ii.insertDatabaseIcon(h,t),Ii.insertClockIcon(h,t),x&&(pt.bumpVerticalPos(Ge.boxMargin),T&&pt.bumpVerticalPos(g[0].textMaxHeight)),Ge.hideUnusedParticipants===!0){let $=new Set;y.forEach(G=>{$.add(G.from),$.add(G.to)}),m=m.filter(G=>$.has(G))}let w=new Map(m.map(($,G)=>[f.get($)?.name??$,G]));zbt(h,f,d,m,0,y,!1);let k=await Xbt(y,f,C,i);Ii.insertArrowHead(h,t),Ii.insertArrowCrossHead(h,t),Ii.insertArrowFilledHead(h,t),Ii.insertSequenceNumber(h,t),Ii.insertSolidTopArrowHead(h,t),Ii.insertSolidBottomArrowHead(h,t),Ii.insertStickTopArrowHead(h,t),Ii.insertStickBottomArrowHead(h,t),s==="neo"&&Ii.insertDropShadow(h,Ge);function E($,G){let U=pt.endActivation($);U.starty+18>G&&(U.starty=G-6,G+=12),Ii.drawActivation(h,U,G,Ge,O_($.from).length,i,w),pt.insert(U.startx,G-10,U.stopx,G)}b(E,"activeEnd");let A=1,N=1,P=[],O=[],L=0;for(let $ of y){let G,U,j;switch($.type){case i.db.LINETYPE.NOTE:pt.resetVerticalPos(),U=$.noteModel,await Fbt(h,U,$.id);break;case i.db.LINETYPE.ACTIVE_START:pt.newActivation($,h,f);break;case i.db.LINETYPE.CENTRAL_CONNECTION:pt.newActivation($,h,f);break;case i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:pt.newActivation($,h,f);break;case i.db.LINETYPE.ACTIVE_END:E($,pt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin+Ge.boxTextMargin,H=>pt.newLoop(H));break;case i.db.LINETYPE.LOOP_END:G=pt.endLoop(),await Ii.drawLoop(h,G,"loop",Ge,$),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos()),pt.models.addLoop(G);break;case i.db.LINETYPE.RECT_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin,H=>pt.newLoop(void 0,H.message));break;case i.db.LINETYPE.RECT_END:G=pt.endLoop(),O.push(G),pt.models.addLoop(G),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin+Ge.boxTextMargin,H=>pt.newLoop(H));break;case i.db.LINETYPE.OPT_END:G=pt.endLoop(),await Ii.drawLoop(h,G,"opt",Ge,$),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos()),pt.models.addLoop(G);break;case i.db.LINETYPE.ALT_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin+Ge.boxTextMargin,H=>pt.newLoop(H));break;case i.db.LINETYPE.ALT_ELSE:Kl(k,$,Ge.boxMargin+Ge.boxTextMargin,Ge.boxMargin,H=>pt.addSectionToLoop(H));break;case i.db.LINETYPE.ALT_END:G=pt.endLoop(),await Ii.drawLoop(h,G,"alt",Ge,$),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos()),pt.models.addLoop(G);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin+Ge.boxTextMargin,H=>pt.newLoop(H)),pt.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:Kl(k,$,Ge.boxMargin+Ge.boxTextMargin,Ge.boxMargin,H=>pt.addSectionToLoop(H));break;case i.db.LINETYPE.PAR_END:G=pt.endLoop(),await Ii.drawLoop(h,G,"par",Ge,$),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos()),pt.models.addLoop(G);break;case i.db.LINETYPE.AUTONUMBER:A=$.message.start||A,N=$.message.step||N,$.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin+Ge.boxTextMargin,H=>pt.newLoop(H));break;case i.db.LINETYPE.CRITICAL_OPTION:Kl(k,$,Ge.boxMargin+Ge.boxTextMargin,Ge.boxMargin,H=>pt.addSectionToLoop(H));break;case i.db.LINETYPE.CRITICAL_END:G=pt.endLoop(),await Ii.drawLoop(h,G,"critical",Ge,$),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos()),pt.models.addLoop(G);break;case i.db.LINETYPE.BREAK_START:Kl(k,$,Ge.boxMargin,Ge.boxMargin+Ge.boxTextMargin,H=>pt.newLoop(H));break;case i.db.LINETYPE.BREAK_END:G=pt.endLoop(),await Ii.drawLoop(h,G,"break",Ge,$),pt.bumpVerticalPos(G.stopy-pt.getVerticalPos()),pt.models.addLoop(G);break;default:try{j=$.msgModel,j.starty=pt.getVerticalPos(),j.sequenceIndex=A,j.sequenceVisible=i.db.showSequenceNumbers(),j.id=$.id,j.from=$.from,j.to=$.to;let H=await hAe(h,j);pAe($,j,H,L,f,d,p),P.push({messageModel:j,lineStartY:H,msg:$}),pt.models.addMessage(j)}catch(H){ee.error("error while drawing message",H)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.SOLID_TOP,i.db.LINETYPE.SOLID_BOTTOM,i.db.LINETYPE.STICK_TOP,i.db.LINETYPE.STICK_BOTTOM,i.db.LINETYPE.SOLID_TOP_DOTTED,i.db.LINETYPE.SOLID_BOTTOM_DOTTED,i.db.LINETYPE.STICK_TOP_DOTTED,i.db.LINETYPE.STICK_BOTTOM_DOTTED,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes($.type)&&(A=Math.round((A+N)*100)/100),L++}ee.debug("createdActors",d),ee.debug("destroyedActors",p),await qq(h,f,m,!1,t,i,w);for(let $ of P)await $bt(h,$.messageModel,$.lineStartY,i,$.msg,t);Ge.mirrorActors&&await qq(h,f,m,!0,t,i,w),O.forEach($=>Ii.drawBackgroundRect(h,$)),lAe(h,f,m,Ge);for(let $ of pt.models.boxes){$.height=pt.getVerticalPos()-$.y,pt.insert($.x,$.y,$.x+$.width,$.height);let G=Ge.boxMargin*2;$.startx=$.x-G,$.starty=$.y-G*.25,$.stopx=$.startx+$.width+2*G,$.stopy=$.starty+$.height+G*.75,$.stroke="rgb(0,0,0, 0.5)",Ii.drawBox(h,$,Ge)}x&&pt.bumpVerticalPos(Ge.boxMargin);let _=fAe(h,f,m,u),{bounds:R}=pt.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let D=R.stopy-R.starty;D<_.maxHeight&&(D=_.maxHeight);let I=D+2*Ge.diagramMarginY;Ge.mirrorActors&&(I=I-Ge.boxMargin+Ge.bottomMarginAdj);let B=R.stopx-R.startx;B<_.maxWidth&&(B=_.maxWidth);let M=B+2*Ge.diagramMarginX;v&&h.append("text").text(v).attr("x",(R.stopx-R.startx)/2-2*Ge.diagramMarginX).attr("y",-25),Mr(h,I,M,Ge.useMaxWidth);let F=v?40:0,z=f.size&&s==="neo"?30:0;h.attr("viewBox",R.startx-Ge.diagramMarginX+" -"+(Ge.diagramMarginY+F)+" "+M+" "+(I+F+z)),ee.debug("models:",pt.models)},"draw");b(gAe,"getMaxMessageWidthPerActor");qbt=b(function(e){let t=0,r=Gq(Ge);for(let i in e.links){let a=jt.calculateTextDimensions(i,r).width+2*Ge.wrapPadding+2*Ge.boxMargin;t2,d=b(y=>l?-y:y,"adjustValue");e.from===e.to?h=u:(e.activate&&!f&&(h+=d(Ge.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=d(3)));let p=[n,a,s,o],g=Math.abs(u-h);e.wrap&&e.message&&(e.message=jt.wrapLabel(e.message,ht.getMax(g+2*Ge.wrapPadding,Ge.width),Vg(Ge)));let m=jt.calculateTextDimensions(e.message,Vg(Ge));return{width:ht.getMax(e.wrap?0:m.width+2*Ge.wrapPadding,g+2*Ge.wrapPadding,Ge.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),Xbt=b(async function(e,t,r,i){let n={},a=[],s,o,l;for(let u of e){switch(u.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),n[s.id]=s,n[u.id]=s,a.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=a.pop(),n[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let f=t.get(u.from?u.from:u.to.actor),d=O_(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*Ge.activationWidth/2,g={startx:p,stopx:p+Ge.activationWidth,actor:u.from,enabled:!0};pt.activations.push(g)}break;case i.db.LINETYPE.ACTIVE_END:{let f=pt.activations.map(d=>d.actor).lastIndexOf(u.from);pt.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await Vbt(u,t,i),u.noteModel=o,a.forEach(f=>{s=f,s.from=ht.getMin(s.from,o.startx),s.to=ht.getMax(s.to,o.startx+o.width),s.width=ht.getMax(s.width,Math.abs(s.from-s.to))-Ge.labelBoxWidth})):(l=jbt(u,t,i),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(f=>{if(s=f,l.startx===l.stopx){let d=t.get(u.from),p=t.get(u.to);s.from=ht.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=ht.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=ht.getMax(s.width,Math.abs(s.to-s.from))-Ge.labelBoxWidth}else s.from=ht.getMin(l.startx,s.from),s.to=ht.getMax(l.stopx,s.to),s.width=ht.getMax(s.width,l.width)-Ge.labelBoxWidth}))}return pt.activations=[],ee.debug("Loop type widths:",n),n},"calculateLoopBounds"),Kbt={bounds:pt,drawActors:qq,drawActorsPopup:fAe,setConf:dAe,draw:Gbt},Zbt={parser:ibt,get db(){return new obt},renderer:Kbt,styles:cbt,init:b(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Zv({sequence:{wrap:e.wrap}}))},"init")}});var Wq,B_,xAe,TAe,P_,wAe,Wg,F_,Qbt,$_,Jbt,ext,txt,z_,Hq=q(()=>{Ld();Ed();Fl();il();Zo();$r();Er();er();Ar();Hv();Wq=(function(){var e=b(function(qe,Ue,ge,ce){for(ge=ge||{},ce=qe.length;ce--;ge[qe[ce]]=Ue);return ge},"o"),t=[1,18],r=[1,19],i=[1,20],n=[1,41],a=[1,26],s=[1,42],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],g=[1,36],m=[1,37],y=[1,38],v=[1,27],x=[1,28],T=[1,29],C=[1,30],w=[1,31],k=[1,44],E=[1,46],A=[1,43],N=[1,47],P=[1,9],O=[1,8,9],L=[1,58],_=[1,59],R=[1,60],D=[1,61],I=[1,62],B=[1,63],M=[1,64],F=[1,8,9,41],z=[1,77],$=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],G=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],U=[13,60,86,100,102,103],j=[13,60,73,74,86,100,102,103],H=[13,60,68,69,70,71,72,86,100,102,103],Q=[1,103],Y=[1,121],se=[1,117],J=[1,113],re=[1,119],ie=[1,114],te=[1,115],xe=[1,116],fe=[1,118],Se=[1,120],Me=[22,50,60,61,82,86,87,88,89,90],ke=[1,128],Ce=[12,39],Ie=[1,8,9,39,41,44,46],Pe=[1,8,9,22],pe=[1,153],Je=[1,8,9,61],Te=[1,8,9,22,50,60,61,82,86,87,88,89,90],Be={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className: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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:b(function(Ue,ge,ce,V,le,X,he){var Z=X.length-1;switch(le){case 8:this.$=X[Z-1];break;case 9:case 10:case 13:case 15:this.$=X[Z];break;case 11:case 14:this.$=X[Z-2]+"."+X[Z];break;case 12:case 16:this.$=X[Z-1]+X[Z];break;case 17:case 18:this.$=X[Z-1]+"~"+X[Z]+"~";break;case 19:V.addRelation(X[Z]);break;case 20:X[Z-1].title=V.cleanupLabel(X[Z]),V.addRelation(X[Z-1]);break;case 31:this.$=X[Z].trim(),V.setAccTitle(this.$);break;case 32:case 33:this.$=X[Z].trim(),V.setAccDescription(this.$);break;case 34:V.addClassesToNamespace(X[Z-3],X[Z-1][0],X[Z-1][1]),V.popNamespace();break;case 35:V.addClassesToNamespace(X[Z-4],X[Z-1][0],X[Z-1][1]),V.popNamespace();break;case 36:this.$=V.addNamespace(X[Z]);break;case 37:this.$=V.addNamespace(X[Z-1],X[Z]);break;case 38:this.$=[[X[Z]],[]];break;case 39:this.$=[[X[Z-1]],[]];break;case 40:X[Z][0].unshift(X[Z-2]),this.$=X[Z];break;case 41:this.$=[[],[X[Z]]];break;case 42:this.$=[[],[X[Z-1]]];break;case 43:X[Z][1].unshift(X[Z-2]),this.$=X[Z];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=X[Z];break;case 48:V.setCssClass(X[Z-2],X[Z]);break;case 49:V.addMembers(X[Z-3],X[Z-1]);break;case 51:V.setCssClass(X[Z-5],X[Z-3]),V.addMembers(X[Z-5],X[Z-1]);break;case 52:V.addAnnotation(X[Z-3],X[Z-1]);break;case 53:V.addAnnotation(X[Z-6],X[Z-4]),V.addMembers(X[Z-6],X[Z-1]);break;case 54:V.addAnnotation(X[Z-5],X[Z-3]);break;case 55:this.$=X[Z],V.addClass(X[Z]);break;case 56:this.$=X[Z-1],V.addClass(X[Z-1]),V.setClassLabel(X[Z-1],X[Z]);break;case 60:V.addAnnotation(X[Z],X[Z-2]);break;case 61:case 74:this.$=[X[Z]];break;case 62:X[Z].push(X[Z-1]),this.$=X[Z];break;case 63:break;case 64:V.addMember(X[Z-1],V.cleanupLabel(X[Z]));break;case 65:break;case 66:break;case 67:this.$={id1:X[Z-2],id2:X[Z],relation:X[Z-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:X[Z-3],id2:X[Z],relation:X[Z-1],relationTitle1:X[Z-2],relationTitle2:"none"};break;case 69:this.$={id1:X[Z-3],id2:X[Z],relation:X[Z-2],relationTitle1:"none",relationTitle2:X[Z-1]};break;case 70:this.$={id1:X[Z-4],id2:X[Z],relation:X[Z-2],relationTitle1:X[Z-3],relationTitle2:X[Z-1]};break;case 71:this.$=V.addNote(X[Z],X[Z-1]);break;case 72:this.$=V.addNote(X[Z]);break;case 73:this.$=X[Z-2],V.defineClass(X[Z-1],X[Z]);break;case 75:this.$=X[Z-2].concat([X[Z]]);break;case 76:V.setDirection("TB");break;case 77:V.setDirection("BT");break;case 78:V.setDirection("RL");break;case 79:V.setDirection("LR");break;case 80:this.$={type1:X[Z-2],type2:X[Z],lineType:X[Z-1]};break;case 81:this.$={type1:"none",type2:X[Z],lineType:X[Z-1]};break;case 82:this.$={type1:X[Z-1],type2:"none",lineType:X[Z]};break;case 83:this.$={type1:"none",type2:"none",lineType:X[Z]};break;case 84:this.$=V.relationType.AGGREGATION;break;case 85:this.$=V.relationType.EXTENSION;break;case 86:this.$=V.relationType.COMPOSITION;break;case 87:this.$=V.relationType.DEPENDENCY;break;case 88:this.$=V.relationType.LOLLIPOP;break;case 89:this.$=V.lineType.LINE;break;case 90:this.$=V.lineType.DOTTED_LINE;break;case 91:case 97:this.$=X[Z-2],V.setClickEvent(X[Z-1],X[Z]);break;case 92:case 98:this.$=X[Z-3],V.setClickEvent(X[Z-2],X[Z-1]),V.setTooltip(X[Z-2],X[Z]);break;case 93:this.$=X[Z-2],V.setLink(X[Z-1],X[Z]);break;case 94:this.$=X[Z-3],V.setLink(X[Z-2],X[Z-1],X[Z]);break;case 95:this.$=X[Z-3],V.setLink(X[Z-2],X[Z-1]),V.setTooltip(X[Z-2],X[Z]);break;case 96:this.$=X[Z-4],V.setLink(X[Z-3],X[Z-2],X[Z]),V.setTooltip(X[Z-3],X[Z-1]);break;case 99:this.$=X[Z-3],V.setClickEvent(X[Z-2],X[Z-1],X[Z]);break;case 100:this.$=X[Z-4],V.setClickEvent(X[Z-3],X[Z-2],X[Z-1]),V.setTooltip(X[Z-3],X[Z]);break;case 101:this.$=X[Z-3],V.setLink(X[Z-2],X[Z]);break;case 102:this.$=X[Z-4],V.setLink(X[Z-3],X[Z-1],X[Z]);break;case 103:this.$=X[Z-4],V.setLink(X[Z-3],X[Z-1]),V.setTooltip(X[Z-3],X[Z]);break;case 104:this.$=X[Z-5],V.setLink(X[Z-4],X[Z-2],X[Z]),V.setTooltip(X[Z-4],X[Z-1]);break;case 105:this.$=X[Z-2],V.setCssStyle(X[Z-1],X[Z]);break;case 106:V.setCssClass(X[Z-1],X[Z]);break;case 107:this.$=[X[Z]];break;case 108:X[Z-2].push(X[Z]),this.$=X[Z-2];break;case 110:this.$=X[Z-1]+X[Z];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:n,43:23,46:a,48:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:y,75:v,76:x,78:T,82:C,83:w,86:k,100:E,102:A,103:N},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(P,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:L,69:_,70:R,71:D,72:I,73:B,74:M}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:d,86:k,100:E,102:A},{16:39,17:40,19:70,60:d,86:k,100:E,102:A,103:N},{16:39,17:40,19:71,60:d,86:k,100:E,102:A,103:N},{16:39,17:40,19:72,60:d,86:k,100:E,102:A,103:N},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:d,86:k,100:E,102:A,103:N},{13:z,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e($,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:d,86:k,100:E,102:A,103:N}),e($,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:d,86:k,100:E,102:A,103:N},{16:39,17:40,19:87,60:d,86:k,100:E,102:A,103:N},e(G,[2,133]),e(G,[2,134]),e(G,[2,135]),e(G,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(P,[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,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:i,42:n,46:a,48:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:y,75:v,76:x,78:T,82:C,83:w,86:k,100:E,102:A,103:N}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:n,43:23,46:a,48:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:y,75:v,76:x,78:T,82:C,83:w,86:k,100:E,102:A,103:N},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:d,86:k,100:E,102:A,103:N},{53:92,66:56,67:57,68:L,69:_,70:R,71:D,72:I,73:B,74:M},e(O,[2,64]),{67:93,73:B,74:M},e(U,[2,83],{66:94,68:L,69:_,70:R,71:D,72:I}),e(j,[2,84]),e(j,[2,85]),e(j,[2,86]),e(j,[2,87]),e(j,[2,88]),e(H,[2,89]),e(H,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:s,54:u,56:h},{16:100,60:d,86:k,100:E,102:A},{41:[1,102],45:101,51:Q},{16:104,60:d,86:k,100:E,102:A},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:Y,50:se,59:110,60:J,82:re,84:111,85:112,86:ie,87:te,88:xe,89:fe,90:Se},{60:[1,122]},{13:z,55:123},e(F,[2,72]),e(F,[2,138]),{22:Y,50:se,59:124,60:J,61:[1,125],82:re,84:111,85:112,86:ie,87:te,88:xe,89:fe,90:Se},e(Me,[2,74]),{16:39,17:40,19:126,60:d,86:k,100:E,102:A,103:N},e($,[2,16]),e($,[2,17]),e($,[2,18]),{11:127,12:ke,39:[2,36]},e(Ce,[2,9],{16:85,17:86,15:130,18:[1,129],60:d,86:k,100:E,102:A,103:N}),e(Ce,[2,10]),e(Ie,[2,55],{11:131,12:ke}),e(P,[2,7]),{9:[1,132]},e(Pe,[2,67]),{16:39,17:40,19:133,60:d,86:k,100:E,102:A,103:N},{13:[1,135],16:39,17:40,19:134,60:d,86:k,100:E,102:A,103:N},e(U,[2,82],{66:136,68:L,69:_,70:R,71:D,72:I}),e(U,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:s,54:u,56:h},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:Q},{47:[1,145]},{16:39,17:40,19:146,60:d,86:k,100:E,102:A,103:N},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:pe}),e(Je,[2,107],{85:154,22:Y,50:se,60:J,82:re,86:ie,87:te,88:xe,89:fe,90:Se}),e(Te,[2,109]),e(Te,[2,111]),e(Te,[2,112]),e(Te,[2,113]),e(Te,[2,114]),e(Te,[2,115]),e(Te,[2,116]),e(Te,[2,117]),e(Te,[2,118]),e(Te,[2,119]),e(O,[2,106]),e(F,[2,71]),e(O,[2,73],{61:pe}),{60:[1,155]},e($,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:d,86:k,100:E,102:A,103:N},e(Ce,[2,12]),e(Ie,[2,56]),{1:[2,4]},e(Pe,[2,69]),e(Pe,[2,68]),{16:39,17:40,19:158,60:d,86:k,100:E,102:A,103:N},e(U,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:s,54:u,56:h},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:s,54:u,56:h},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:s,54:u,56:h},{45:163,51:Q},e(F,[2,49]),{41:[2,62]},e(F,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:Y,50:se,60:J,82:re,84:169,85:112,86:ie,87:te,88:xe,89:fe,90:Se},e(Te,[2,110]),e(Me,[2,75]),{14:[1,170]},e(Ce,[2,11]),e(Pe,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Q},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(Je,[2,108],{85:154,22:Y,50:se,60:J,82:re,86:ie,87:te,88:xe,89:fe,90:Se}),e(Ie,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(O,[2,104]),e(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:b(function(Ue,ge){if(ge.recoverable)this.trace(Ue);else{var ce=new Error(Ue);throw ce.hash=ge,ce}},"parseError"),parse:b(function(Ue){var ge=this,ce=[0],V=[],le=[null],X=[],he=this.table,Z="",Ve=0,ve=0,Oe=0,Ae=2,Fe=1,Re=X.slice.call(arguments,1),We=Object.create(this.lexer),De={yy:{}};for(var Ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ye)&&(De.yy[Ye]=this.yy[Ye]);We.setInput(Ue,De.yy),De.yy.lexer=We,De.yy.parser=this,typeof We.yylloc>"u"&&(We.yylloc={});var ue=We.yylloc;X.push(ue);var Tt=We.options&&We.options.ranges;typeof De.yy.parseError=="function"?this.parseError=De.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(at){ce.length=ce.length-2*at,le.length=le.length-at,X.length=X.length-at}b(be,"popStack");function it(){var at;return at=V.pop()||We.lex()||Fe,typeof at!="number"&&(at instanceof Array&&(V=at,at=V.pop()),at=ge.symbols_[at]||at),at}b(it,"lex");for(var ft,Dt,mt,vt,ut,oe,ot={},ct,et,me,Ze;;){if(mt=ce[ce.length-1],this.defaultActions[mt]?vt=this.defaultActions[mt]:((ft===null||typeof ft>"u")&&(ft=it()),vt=he[mt]&&he[mt][ft]),typeof vt>"u"||!vt.length||!vt[0]){var rt="";Ze=[];for(ct in he[mt])this.terminals_[ct]&&ct>Ae&&Ze.push("'"+this.terminals_[ct]+"'");We.showPosition?rt="Parse error on line "+(Ve+1)+`: -`+We.showPosition()+` -Expecting `+Ze.join(", ")+", got '"+(this.terminals_[ft]||ft)+"'":rt="Parse error on line "+(Ve+1)+": Unexpected "+(ft==Fe?"end of input":"'"+(this.terminals_[ft]||ft)+"'"),this.parseError(rt,{text:We.match,token:this.terminals_[ft]||ft,line:We.yylineno,loc:ue,expected:Ze})}if(vt[0]instanceof Array&&vt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+mt+", token: "+ft);switch(vt[0]){case 1:ce.push(ft),le.push(We.yytext),X.push(We.yylloc),ce.push(vt[1]),ft=null,Dt?(ft=Dt,Dt=null):(ve=We.yyleng,Z=We.yytext,Ve=We.yylineno,ue=We.yylloc,Oe>0&&Oe--);break;case 2:if(et=this.productions_[vt[1]][1],ot.$=le[le.length-et],ot._$={first_line:X[X.length-(et||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(et||1)].first_column,last_column:X[X.length-1].last_column},Tt&&(ot._$.range=[X[X.length-(et||1)].range[0],X[X.length-1].range[1]]),oe=this.performAction.apply(ot,[Z,ve,Ve,De.yy,vt[1],le,X].concat(Re)),typeof oe<"u")return oe;et&&(ce=ce.slice(0,-1*et*2),le=le.slice(0,-1*et),X=X.slice(0,-1*et)),ce.push(this.productions_[vt[1]][0]),le.push(ot.$),X.push(ot._$),me=he[ce[ce.length-2]][ce[ce.length-1]],ce.push(me);break;case 3:return!0}}return!0},"parse")},He=(function(){var qe={EOF:1,parseError:b(function(ge,ce){if(this.yy.parser)this.yy.parser.parseError(ge,ce);else throw new Error(ge)},"parseError"),setInput:b(function(Ue,ge){return this.yy=ge||this.yy||{},this._input=Ue,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Ue=this._input[0];this.yytext+=Ue,this.yyleng++,this.offset++,this.match+=Ue,this.matched+=Ue;var ge=Ue.match(/(?:\r\n?|\n).*/g);return ge?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ue},"input"),unput:b(function(Ue){var ge=Ue.length,ce=Ue.split(/(?:\r\n?|\n)/g);this._input=Ue+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ge),this.offset-=ge;var V=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ce.length-1&&(this.yylineno-=ce.length-1);var le=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ce?(ce.length===V.length?this.yylloc.first_column:0)+V[V.length-ce.length].length-ce[0].length:this.yylloc.first_column-ge},this.options.ranges&&(this.yylloc.range=[le[0],le[0]+this.yyleng-ge]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Ue){this.unput(this.match.slice(Ue))},"less"),pastInput:b(function(){var Ue=this.matched.substr(0,this.matched.length-this.match.length);return(Ue.length>20?"...":"")+Ue.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Ue=this.match;return Ue.length<20&&(Ue+=this._input.substr(0,20-Ue.length)),(Ue.substr(0,20)+(Ue.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Ue=this.pastInput(),ge=new Array(Ue.length+1).join("-");return Ue+this.upcomingInput()+` -`+ge+"^"},"showPosition"),test_match:b(function(Ue,ge){var ce,V,le;if(this.options.backtrack_lexer&&(le={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(le.yylloc.range=this.yylloc.range.slice(0))),V=Ue[0].match(/(?:\r\n?|\n).*/g),V&&(this.yylineno+=V.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:V?V[V.length-1].length-V[V.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ue[0].length},this.yytext+=Ue[0],this.match+=Ue[0],this.matches=Ue,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(Ue[0].length),this.matched+=Ue[0],ce=this.performAction.call(this,this.yy,this,ge,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ce)return ce;if(this._backtrack){for(var X in le)this[X]=le[X];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ue,ge,ce,V;this._more||(this.yytext="",this.match="");for(var le=this._currentRules(),X=0;Xge[0].length)){if(ge=ce,V=X,this.options.backtrack_lexer){if(Ue=this.test_match(ce,le[X]),Ue!==!1)return Ue;if(this._backtrack){ge=!1;continue}else return!1}else if(!this.options.flex)break}return ge?(Ue=this.test_match(ge,le[V]),Ue!==!1?Ue:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var ge=this.next();return ge||this.lex()},"lex"),begin:b(function(ge){this.conditionStack.push(ge)},"begin"),popState:b(function(){var ge=this.conditionStack.length-1;return ge>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(ge){return ge=this.conditionStack.length-1-Math.abs(ge||0),ge>=0?this.conditionStack[ge]:"INITIAL"},"topState"),pushState:b(function(ge){this.begin(ge)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(ge,ce,V,le){var X=le;switch(V){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),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)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}};return qe})();Be.lexer=He;function nt(){this.yy={}}return b(nt,"Parser"),nt.prototype=Be,Be.Parser=nt,new nt})();Wq.parser=Wq;B_=Wq,xAe=["#","+","~","-",""],TAe=class{static{b(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="";let r=mr(e,we());this.parseMember(r)}getDisplayDetails(){let e=this.visibility+Tc(this.id);this.memberType==="method"&&(e+=`(${Tc(this.parameters.trim())})`,this.returnType&&(e+=" : "+Tc(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";if(this.memberType==="method"){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let a=n[1]?n[1].trim():"";if(xAe.includes(a)&&(this.visibility=a),this.id=n[2],this.parameters=n[3]?n[3].trim():"",t=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",t===""){let s=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(s)&&(t=s,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let i=e.length,n=e.substring(0,1),a=e.substring(i-1);xAe.includes(n)&&(this.visibility=n),/[$*]/.exec(a)&&(t=a),this.id=e.substring(this.visibility===""?0:1,t===""?i:i-1)}this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${Tc(this.id)}${this.memberType==="method"?`(${Tc(this.parameters)})${this.returnType?" : "+Tc(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},P_="classId-",wAe=0,Wg=b(e=>ht.sanitizeText(e,we()),"sanitizeText"),F_=class Uq{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=b(t=>{let r=rE();Qe(t).select("svg").selectAll("g").filter(function(){return Qe(this).attr("title")!==null}).on("mouseover",a=>{let s=Qe(a.currentTarget),o=s.attr("title");if(!o)return;let l=a.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(No.sanitize(o)).style("left",`${window.scrollX+l.left+l.width/2}px`).style("top",`${window.scrollY+l.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),Qe(a.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=yr,this.getAccTitle=vr,this.setAccDescription=br,this.getAccDescription=xr,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,this.getConfig=b(()=>we().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.popNamespace=this.popNamespace.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)}static{b(this,"ClassDB")}splitClassNameAndType(t){let r=ht.sanitizeText(t,we()),i="",n=r;if(r.indexOf("~")>0){let a=r.split("~");n=Wg(a[0]),i=Wg(a[1])}return{className:n,type:i}}setClassLabel(t,r){let i=ht.sanitizeText(t,we());r&&(r=Wg(r));let{className:n}=this.splitClassNameAndType(i);this.classes.get(n).label=r,this.classes.get(n).text=`${r}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(t){let r=ht.sanitizeText(t,we()),{className:i,type:n}=this.splitClassNameAndType(r);if(this.classes.has(i))return;let a=ht.sanitizeText(i,we());this.classes.set(a,{id:a,type:n,label:a,text:`${a}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:P_+a+"-"+wAe}),wAe++}addInterface(t,r){let i={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(i)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){let r=ht.sanitizeText(t,we());if(this.classes.has(r)){let i=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${i}`:i}throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",fr()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){let r=typeof t=="number"?`note${t}`:t;return this.notes.get(r)}getNotes(){return this.notes}addRelation(t){ee.debug("Adding relation: "+JSON.stringify(t));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!r.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!r.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=ht.sanitizeText(t.relationTitle1.trim(),we()),t.relationTitle2=ht.sanitizeText(t.relationTitle2.trim(),we()),this.relations.push(t)}addAnnotation(t,r){let i=this.splitClassNameAndType(t).className;this.classes.get(i).annotations.push(r)}addMember(t,r){this.addClass(t);let i=this.splitClassNameAndType(t).className,n=this.classes.get(i);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?n.annotations.push(Wg(a.substring(2,a.length-2))):a.indexOf(")")>0?n.methods.push(new TAe(a,"method")):a&&n.members.push(new TAe(a,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(i=>this.addMember(t,i)))}addNote(t,r){let i=this.notes.size,n={id:`note${i}`,class:r,text:t,index:i};return this.notes.set(n.id,n),n.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),Wg(t.trim())}setCssClass(t,r){t.split(",").forEach(i=>{let n=i;/\d/.exec(i[0])&&(n=P_+n);let a=this.classes.get(n);a&&(a.cssClasses+=" "+r)})}defineClass(t,r){for(let i of t){let n=this.styleClasses.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.styleClasses.set(i,n)),r&&r.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");n.textStyles.push(s)}n.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(i)&&a.styles.push(...r.flatMap(s=>s.split(",")))})}}setTooltip(t,r){t.split(",").forEach(i=>{r!==void 0&&(this.classes.get(i).tooltip=Wg(r))})}getTooltip(t,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,r,i){let n=we();t.split(",").forEach(a=>{let s=a;/\d/.exec(a[0])&&(s=P_+s);let o=this.classes.get(s);o&&(o.link=jt.formatUrl(r,n),n.securityLevel==="sandbox"?o.linkTarget="_top":typeof i=="string"?o.linkTarget=Wg(i):o.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,i){t.split(",").forEach(n=>{this.setClickFunc(n,r,i),this.classes.get(n).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,r,i){let n=ht.sanitizeText(t,we());if(we().securityLevel!=="loose"||r===void 0)return;let s=n;if(this.classes.has(s)){let o=[];if(typeof i=="string"){o=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=this.lookUpDomId(s),u=document.querySelector(`[id="${l}"]`);u!==null&&u.addEventListener("click",()=>{jt.runFunc(r,...o)},!1)})}}bindFunctions(t){this.functions.forEach(r=>{r(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,r){let i=r.at(-1);return i?`${i}.${t}`:t}static getAncestorIds(t){let r=t.split("."),i=new Array(r.length);i[0]=r[0];for(let n=1;n0?a[s-1]:void 0,u=s===a.length-1,h=u&&r?r:n[s];this.namespaces.has(o)?u&&(this.namespaces.get(o).explicit=!0):this.namespaces.set(o,this.createNamespaceNode(o,h,l,u)),l&&this.linkParentChild(l,o)}return i}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r,i){if(this.namespaces.has(t)){for(let n of r){let{className:a}=this.splitClassNameAndType(n),s=this.getClass(a);s.parent=t,this.namespaces.get(t).classes.set(a,s)}for(let n of i){let a=this.getNote(n);a.parent=t,this.namespaces.get(t).notes.set(n,a)}}}setCssStyle(t,r){let i=this.classes.get(t);if(!(!r||!i))for(let n of r)n.includes(",")?i.styles.push(...n.split(",")):i.styles.push(n)}getArrowMarker(t){let r;switch(t){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(t){let r=t;for(;r;){let i=this.namespaces.get(r);if(!i)return;if(i.explicit)return r;r=i.parent}}getData(){let t=[],r=[],i=we(),n=i.class?.hierarchicalNamespaces??!0;for(let s of this.namespaces.values()){if(!n&&!s.explicit)continue;let o={id:s.id,label:n?s.label:s.id,isGroup:!0,padding:i.class.padding??16,shape:"rect",cssStyles:[],look:i.look,parentId:n?s.parent:void 0};t.push(o)}for(let s of this.classes.values()){let o=n?s.parent:this.resolveExplicitAncestor(s.parent),l={...s,type:void 0,isGroup:!1,parentId:o,look:i.look};t.push(l)}for(let s of this.notes.values()){let o=n?s.parent:this.resolveExplicitAncestor(s.parent),l={id:s.id,label:s.text,isGroup:!1,shape:"note",padding:i.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${i.themeVariables.noteBkgColor}`,`stroke: ${i.themeVariables.noteBorderColor}`],look:i.look,parentId:o,labelType:"markdown"};t.push(l);let u=this.classes.get(s.class)?.id;if(u){let h={id:`edgeNote${s.index}`,start:s.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:i.look};r.push(h)}}for(let s of this.interfaces){let o={id:s.id,label:s.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:i.look};t.push(o)}let a=0;for(let s of this.relations){a++;let o={id:Mc(s.id1,s.id2,{prefix:"id",counter:a}),start:s.id1,end:s.id2,type:"normal",label:s.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(s.relation.type1),arrowTypeEnd:this.getArrowMarker(s.relation.type2),startLabelRight:s.relationTitle1==="none"?"":s.relationTitle1,endLabelLeft:s.relationTitle2==="none"?"":s.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:s.style||"",pattern:s.relation.lineType==1?"dashed":"solid",look:i.look,labelType:"markdown"};r.push(o)}return{nodes:t,edges:r,other:{},config:i,direction:this.getDirection()}}},Qbt=b(e=>`g.classGroup text { +`;C.append("path").attr("d",S),h==="neo"&&C.attr("filter","url(#drop-shadow)");let E=i.get(t.name)??0;Mf.has(l)?(C.style("stroke",d[E%d.length]),C.style("fill",f[E%d.length])):C.style("stroke",p),C.attr("transform",`translate(${b}, ${w})`),t.rectData=y,Df(r,hi(t.description))(t.description,m,y.x,y.y+35,y.width,y.height,{class:`actor ${T7}`},r);let L=C.select("path:last-child");if(L.node()){let N=L.node().getBBox();t.height=N.height+(r.sequence.labelBoxHeight??0)}return n||(m.attr("data-et","participant"),m.attr("data-type","database"),m.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),L4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,l=22,u=e.append("g").lower(),{look:h,theme:f,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:g,actorBorder:m}=d;n||(rn++,u.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=rn);let y=e.append("g"),x=Xm;n?x+=` ${Hp}`:x+=` ${Up}`,y.attr("class",x),y.attr("name",t.name);let b=Eo();b.x=t.x,b.y=a,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor",y.append("line").attr("id","actor-man-torso"+rn).attr("x1",t.x+t.width/2-l*2.5).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),y.append("line").attr("id","actor-man-arms"+rn).attr("x1",t.x+t.width/2-l*2.5).attr("y1",a+2).attr("x2",t.x+t.width/2-l*2.5).attr("y2",a+22),y.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",l),h==="neo"&&y.attr("filter","url(#drop-shadow)");let T=i.get(t.name)??0;Mf.has(f)?(y.style("stroke",g[T%g.length]),y.style("fill",p[T%g.length])):y.style("stroke",m);let k=y.node().getBBox();return t.height=k.height+(r.sequence.labelBoxHeight??0),Df(r,hi(t.description))(t.description,y,b.x,b.y+15,b.width,b.height,{class:`actor ${Xm}`},r),y.attr("transform",`translate(0,${l/2+10})`),n||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),I4t=v(function(e,t,r,n,i){let a=n?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,{look:l,theme:u,themeVariables:h}=r,{bkgColorArray:f,borderColorArray:d,actorBorder:p}=h,g=e.append("g").lower();n||(rn++,g.append("line").attr("id","actor"+rn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=rn);let m=e.append("g"),y=Xm;n?y+=` ${Hp}`:y+=` ${Up}`,m.attr("class",y),m.attr("name",t.name),n||m.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let x=l==="neo"?.5:1,b=l==="neo"?a+(1-x)*30:a;m.append("line").attr("id","actor-man-torso"+rn).attr("x1",s).attr("y1",b+25*x).attr("x2",s).attr("y2",b+45*x),m.append("line").attr("id","actor-man-arms"+rn).attr("x1",s-Ym/2*x).attr("y1",b+33*x).attr("x2",s+Ym/2*x).attr("y2",b+33*x),m.append("line").attr("x1",s-Ym/2*x).attr("y1",b+60*x).attr("x2",s).attr("y2",b+45*x),m.append("line").attr("x1",s).attr("y1",b+45*x).attr("x2",s+(Ym/2-2)*x).attr("y2",b+60*x);let T=m.append("circle");T.attr("cx",t.x+t.width/2),T.attr("cy",b+10*x),T.attr("r",15*x),T.attr("width",t.width*x),T.attr("height",t.height*x);let k=m.node().getBBox();t.height=k.height;let w=Eo();w.x=t.x,w.y=b,w.fill="#eaeaea",w.width=t.width,w.height=t.height/x,w.class="actor",w.rx=3,w.ry=3;let C=i.get(t.name)??0;return Mf.has(u)?(m.style("stroke",d[C%d.length]),m.style("fill",f[C%d.length])):m.style("stroke",p),Df(r,hi(t.description))(t.description,m,w.x,b+35*x-(l==="neo"?10:0),w.width,w.height,{class:`actor ${Xm}`},r),t.height},"drawActorTypeActor"),M4t=v(async function(e,t,r,n,i,a,s){let o=s??new Map([...a.db.getActors().values()].map((l,u)=>[l.name,u]));switch(t.type){case"actor":return await I4t(e,t,r,n,o);case"participant":return await k4t(e,t,r,n,o);case"boundary":return await L4t(e,t,r,n,o);case"control":return await A4t(e,t,r,n,i,o);case"entity":return await _4t(e,t,r,n,o);case"database":return await R4t(e,t,r,n,o);case"collections":return await S4t(e,t,r,n,o);case"queue":return await E4t(e,t,r,n,o)}},"drawActor"),D4t=v(function(e,t,r){let i=e.append("g");_Ie(i,t),t.name&&Df(r)(t.name,i,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),N4t=v(function(e){return e.append("g")},"anchorElement"),O4t=v(function(e,t,r,n,i,a,s){let{theme:o,themeVariables:l}=n,{bkgColorArray:u,borderColorArray:h,mainBkg:f}=l,d=Eo(),p=t.anchored,g=t.actor;d.x=t.startx,d.y=t.starty,d.class="activation"+i%3,d.width=t.stopx-t.startx,d.height=r-t.starty;let m=YC(p,d),x=(s??new Map([...a.db.getActors().values()].map((b,T)=>[b.name,T]))).get(g)??0;Mf.has(o)&&(m.style("stroke",h[x%h.length]),m.style("fill",u[x%h.length]??f))},"drawActivation"),P4t=v(async function(e,t,r,n,i){let{boxMargin:a,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),p=v(function(y,x,b,T){return d.append("line").attr("x1",y).attr("y1",x).attr("x2",b).attr("y2",T).attr("class","loopLine")},"drawLoopLine");p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(y){p(t.startx,y.y,t.stopx,y.y).style("stroke-dasharray","3, 3")});let g=IA();g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=u,g.fontSize=h,g.fontWeight=f,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(l??0,50),g.height=o+(n.look==="neo"?15:0)||20,g.textMargin=s,g.class="labelText",EIe(d,g),g=RIe(),g.text=t.title,g.x=t.startx+l/2+(t.stopx-t.startx)/2,g.y=t.starty+a+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=u,g.fontSize=h,g.fontWeight=f,g.wrap=!0;let m=hi(g.text)?await b7(d,g,t):xx(d,g);if(t.sectionTitles!==void 0){for(let[y,x]of Object.entries(t.sectionTitles))if(x.message){g.text=x.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[y].y+a+s,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=u,g.fontSize=h,g.fontWeight=f,g.wrap=t.wrap,hi(g.text)?(t.starty=t.sections[y].y,await b7(d,g,t)):xx(d,g);let b=Math.round(m.map(T=>(T._groups||T)[0][0].getBBox().height).reduce((T,k)=>T+k));t.sections[y].height+=b-(a+s)}}return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),_Ie=v(function(e,t){_A(e,t)},"drawBackgroundRect"),B4t=v(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),$4t=v(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),F4t=v(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),z4t=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),G4t=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),q4t=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),V4t=v(function(e,t){e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),W4t=v(function(e,t){let{theme:r}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),RIe=v(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),U4t=v(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Df=(function(){function e(a,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(a);i(d,f)}v(e,"byText");function t(a,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:g,actorFontWeight:m}=d,[y,x]=fo(p),b=a.split(vt.lineBreakRegex);for(let T=0;Te.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:v(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:v(function(e){this.boxes.push(e)},"addBox"),addActor:v(function(e){this.actors.push(e)},"addActor"),addLoop:v(function(e){this.loops.push(e)},"addLoop"),addMessage:v(function(e){this.messages.push(e)},"addMessage"),addNote:v(function(e){this.notes.push(e)},"addNote"),lastActor:v(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:v(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:v(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:v(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:v(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,MIe(ze())},"init"),updateVal:v(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:v(function(e,t,r,n){let i=this,a=0;function s(o){return v(function(u){a++;let h=i.sequenceItems.length-a+1;i.updateVal(u,"starty",t-h*je.boxMargin,Math.min),i.updateVal(u,"stopy",n+h*je.boxMargin,Math.max),i.updateVal(Tt.data,"startx",e-h*je.boxMargin,Math.min),i.updateVal(Tt.data,"stopx",r+h*je.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",e-h*je.boxMargin,Math.min),i.updateVal(u,"stopx",r+h*je.boxMargin,Math.max),i.updateVal(Tt.data,"starty",t-h*je.boxMargin,Math.min),i.updateVal(Tt.data,"stopy",n+h*je.boxMargin,Math.max))},"updateItemBounds")}v(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:v(function(e,t,r,n){let i=vt.getMin(e,r),a=vt.getMax(e,r),s=vt.getMin(t,n),o=vt.getMax(t,n);this.updateVal(Tt.data,"startx",i,Math.min),this.updateVal(Tt.data,"starty",s,Math.min),this.updateVal(Tt.data,"stopx",a,Math.max),this.updateVal(Tt.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),newActivation:v(function(e,t,r){let n=r.get(e.from),i=C7(e.from).length||0,a=n.x+n.width/2+(i-1)*je.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+je.activationWidth,stopy:void 0,actor:e.from,anchored:ti.anchorElement(t)})},"newActivation"),endActivation:v(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:v(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:v(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:v(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:v(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:v(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Tt.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:v(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:v(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:v(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=vt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:v(function(){return this.verticalPos},"getVerticalPos"),getBounds:v(function(){return{bounds:this.data,models:this.models}},"getBounds")},Z4t=v(async function(e,t,r){Tt.bumpVerticalPos(je.boxMargin),t.height=je.boxMargin,t.starty=Tt.getVerticalPos();let n=Eo();n.x=t.startx,n.y=t.starty,n.width=t.width||je.width,n.class="note";let i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+r);let a=ti.drawRect(i,n),s=IA();s.x=t.startx,s.y=t.starty,s.width=n.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=je.noteFontFamily,s.fontSize=je.noteFontSize,s.fontWeight=je.noteFontWeight,s.anchor=je.noteAlign,s.textMargin=je.noteMargin,s.valign="center";let o=hi(s.text)?await b7(i,s):xx(i,s),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));a.attr("height",l+2*je.noteMargin),t.height+=l+2*je.noteMargin,Tt.bumpVerticalPos(l+2*je.noteMargin),t.stopy=t.starty+l+2*je.noteMargin,t.stopx=t.startx+n.width,Tt.insert(t.startx,t.starty,t.stopx,t.stopy),Tt.models.addNote(t)},"drawNote"),kIe=v(function(e,t,r,n,i,a,s){let o=n.db.getActors(),l=o.get(t.from),u=o.get(t.to),h=r.sequenceVisible,f=l.x+l.width/2,d=u.x+u.width/2,p=f<=d,g=PIe(t,n),m=e.append("g"),y=16.5,x=v((C,S)=>{let E=C?y:-y;return S?-E:E},"getCircleOffset"),b=v(C=>{m.append("circle").attr("cx",C).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:T,CENTRAL_CONNECTION_REVERSE:k,CENTRAL_CONNECTION_DUAL:w}=n.db.LINETYPE;if(h)switch(t.centralConnection){case T:g&&(d+=x(p,!0));break;case k:g||(f+=x(p,!1));break;case w:g?d+=x(p,!0):f+=x(p,!1);break}switch(t.centralConnection){case T:b(d);break;case k:b(f);break;case w:b(f),b(d);break}},"drawCentralConnection"),jm=v(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),vx=v(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),iY=v(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");v(LIe,"boundMessage");Q4t=v(async function(e,t,r,n,i,a){let{startx:s,stopx:o,starty:l,message:u,type:h,sequenceIndex:f,sequenceVisible:d}=t,p=ar.calculateTextDimensions(u,jm(je)),g=IA();g.x=Math.min(s,o),g.y=l+10,g.width=Math.abs(o-s),g.class="messageText",g.dy="1em",g.text=u,g.fontFamily=je.messageFontFamily,g.fontSize=je.messageFontSize,g.fontWeight=je.messageFontWeight,g.anchor=je.messageAlign,g.valign="center",g.textMargin=je.wrapPadding,g.tspan=!1,hi(g.text)?await b7(e,g,{startx:s,stopx:o,starty:r}):xx(e,g);let m=p.width,y;if(s===o){let b=d||je.showSequenceNumbers,T=PIe(i,n),k=sEt(i,n),w=s+(b&&(T||k)?10:0);je.rightAngles?y=e.append("path").attr("d",`M ${w},${r} H ${s+vt.getMax(je.width/2,m/2)} V ${r+25} H ${s}`):y=e.append("path").attr("d","M "+w+","+r+" C "+(w+60)+","+(r-10)+" "+(s+60)+","+(r+30)+" "+s+","+(r+20)),rY(i,n)&&kIe(e,i,t,n,s,o,r)}else y=e.append("line"),y.attr("x1",s),y.attr("y1",r),y.attr("x2",o),y.attr("y2",r),rY(i,n)&&kIe(e,i,t,n,s,o,r);h===n.db.LINETYPE.DOTTED||h===n.db.LINETYPE.DOTTED_CROSS||h===n.db.LINETYPE.DOTTED_POINT||h===n.db.LINETYPE.DOTTED_OPEN||h===n.db.LINETYPE.BIDIRECTIONAL_DOTTED||h===n.db.LINETYPE.SOLID_TOP_DOTTED||h===n.db.LINETYPE.SOLID_BOTTOM_DOTTED||h===n.db.LINETYPE.STICK_TOP_DOTTED||h===n.db.LINETYPE.STICK_BOTTOM_DOTTED||h===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||h===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||h===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||h===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0"),y.attr("data-et","message"),y.attr("data-id","i"+t.id),y.attr("data-from",t.from),y.attr("data-to",t.to);let x="";if(je.arrowMarkerAbsolute&&(x=bb(!0)),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),(h===n.db.LINETYPE.SOLID_TOP||h===n.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr("marker-end","url("+x+"#"+a+"-solidTopArrowHead)"),(h===n.db.LINETYPE.SOLID_BOTTOM||h===n.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr("marker-end","url("+x+"#"+a+"-solidBottomArrowHead)"),(h===n.db.LINETYPE.STICK_TOP||h===n.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr("marker-end","url("+x+"#"+a+"-stickTopArrowHead)"),(h===n.db.LINETYPE.STICK_BOTTOM||h===n.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr("marker-end","url("+x+"#"+a+"-stickBottomArrowHead)"),(h===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||h===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr("marker-start","url("+x+"#"+a+"-solidBottomArrowHead)"),(h===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||h===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr("marker-start","url("+x+"#"+a+"-solidTopArrowHead)"),(h===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||h===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr("marker-start","url("+x+"#"+a+"-stickBottomArrowHead)"),(h===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||h===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr("marker-start","url("+x+"#"+a+"-stickTopArrowHead)"),(h===n.db.LINETYPE.SOLID||h===n.db.LINETYPE.DOTTED)&&y.attr("marker-end","url("+x+"#"+a+"-arrowhead)"),(h===n.db.LINETYPE.BIDIRECTIONAL_SOLID||h===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr("marker-start","url("+x+"#"+a+"-arrowhead)"),y.attr("marker-end","url("+x+"#"+a+"-arrowhead)")),(h===n.db.LINETYPE.SOLID_POINT||h===n.db.LINETYPE.DOTTED_POINT)&&y.attr("marker-end","url("+x+"#"+a+"-filled-head)"),(h===n.db.LINETYPE.SOLID_CROSS||h===n.db.LINETYPE.DOTTED_CROSS)&&y.attr("marker-end","url("+x+"#"+a+"-crosshead)"),d||je.showSequenceNumbers){let b=h===n.db.LINETYPE.BIDIRECTIONAL_SOLID||h===n.db.LINETYPE.BIDIRECTIONAL_DOTTED,T=h===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||h===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||h===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||h===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||h===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||h===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||h===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||h===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,k=6,w=rY(i,n),C=s,S=o;b?(ss?S=o-2*k:(S=o-k,C+=i?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),S+=w?15:0,y.attr("x2",S),y.attr("x1",C)):y.attr("x1",s+k);let E=0,L=s===o,N=s<=o;L?E=t.fromBounds+1:T?E=N?t.toBounds-1:t.fromBounds+1:E=N?t.fromBounds+1:t.toBounds-1;let O="12px",R=f.toString().length;R>5?O="7px":R>3&&(O="9px"),e.append("line").attr("x1",E).attr("y1",r).attr("x2",E).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+x+"#"+a+"-sequencenumber)"),e.append("text").attr("x",E).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",O).attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}},"drawMessage"),J4t=v(function(e,t,r,n,i,a,s){let o=0,l=0,u,h=0;for(let f of n){let d=t.get(f),p=d.box;u&&u!=p&&(s||Tt.models.addBox(u),l+=je.boxMargin+u.margin),p&&p!=u&&(s||(p.x=o+l,p.y=i),l+=p.margin),d.width=vt.getMax(d.width||je.width,je.width),d.height=vt.getMax(d.height||je.height,je.height),d.margin=d.margin||je.actorMargin,h=vt.getMax(h,d.height),r.get(d.name)&&(l+=d.width/2),d.x=o+l,d.starty=Tt.getVerticalPos(),Tt.insert(d.x,i,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,Tt.models.addActor(d)}u&&!s&&Tt.models.addBox(u),Tt.bumpVerticalPos(h)},"addActorRenderingData"),aY=v(async function(e,t,r,n,i,a,s){if(n){let o=0;Tt.bumpVerticalPos(je.boxMargin*2);for(let l of r){let u=t.get(l);u.stopy||(u.stopy=Tt.getVerticalPos());let h=await ti.drawActor(e,u,je,!0,i,a,s);o=vt.getMax(o,h)}Tt.bumpVerticalPos(o+je.boxMargin)}else for(let o of r){let l=t.get(o);await ti.drawActor(e,l,je,!1,i,a,s)}},"drawActors"),IIe=v(function(e,t,r,n){let i=0,a=0;for(let s of r){let o=t.get(s),l=tEt(o),u=ti.drawPopup(e,o,l,je,je.forceMenus,n);u.height>i&&(i=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),MIe=v(function(e){ui(je,e),e.fontFamily&&(je.actorFontFamily=je.noteFontFamily=je.messageFontFamily=e.fontFamily),e.fontSize&&(je.actorFontSize=je.noteFontSize=je.messageFontSize=e.fontSize),e.fontWeight&&(je.actorFontWeight=je.noteFontWeight=je.messageFontWeight=e.fontWeight)},"setConf"),C7=v(function(e){return Tt.activations.filter(function(t){return t.actor===e})},"actorActivations"),SIe=v(function(e,t){let r=t.get(e),n=C7(e),i=n.reduce(function(s,o){return vt.getMin(s,o.startx)},r.x+r.width/2-1),a=n.reduce(function(s,o){return vt.getMax(s,o.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");v(Lc,"adjustLoopHeightForWrap");v(DIe,"adjustCreatedDestroyedData");eEt=v(async function(e,t,r,n){let{securityLevel:i,sequence:a,look:s,themeVariables:o}=ze();je=a;let l;i==="sandbox"&&(l=ct("#i"+t));let u=i==="sandbox"?ct(l.nodes()[0].contentDocument.body):ct("body"),h=i==="sandbox"?l.nodes()[0].contentDocument:document;Tt.init(),fe.debug(n.db);let f=i==="sandbox"?u.select(`[id="${t}"]`):ct(`[id="${t}"]`),d=n.db.getActors(),p=n.db.getCreatedActors(),g=n.db.getDestroyedActors(),m=n.db.getBoxes(),y=n.db.getActorKeys(),x=n.db.getMessages(),b=n.db.getDiagramTitle(),T=n.db.hasAtLeastOneBox(),k=n.db.hasAtLeastOneBoxWithTitle(),w=await NIe(d,x,n);if(je.height=await OIe(d,w,m),ti.insertComputerIcon(f,t),ti.insertDatabaseIcon(f,t),ti.insertClockIcon(f,t),T&&(Tt.bumpVerticalPos(je.boxMargin),k&&Tt.bumpVerticalPos(m[0].textMaxHeight)),je.hideUnusedParticipants===!0){let z=new Set;x.forEach(V=>{z.add(V.from),z.add(V.to)}),y=y.filter(V=>z.has(V))}let C=new Map(y.map((z,V)=>[d.get(z)?.name??z,V]));J4t(f,d,p,y,0,x,!1);let S=await lEt(x,d,w,n);ti.insertArrowHead(f,t),ti.insertArrowCrossHead(f,t),ti.insertArrowFilledHead(f,t),ti.insertSequenceNumber(f,t),ti.insertSolidTopArrowHead(f,t),ti.insertSolidBottomArrowHead(f,t),ti.insertStickTopArrowHead(f,t),ti.insertStickBottomArrowHead(f,t),s==="neo"&&ti.insertDropShadow(f,je);function E(z,V){let j=Tt.endActivation(z);j.starty+18>V&&(j.starty=V-6,V+=12),ti.drawActivation(f,j,V,je,C7(z.from).length,n,C),Tt.insert(j.startx,V-10,j.stopx,V)}v(E,"activeEnd");let L=1,N=1,O=[],R=[],_=0;for(let z of x){let V,j,ee;switch(z.type){case n.db.LINETYPE.NOTE:Tt.resetVerticalPos(),j=z.noteModel,await Z4t(f,j,z.id);break;case n.db.LINETYPE.ACTIVE_START:Tt.newActivation(z,f,d);break;case n.db.LINETYPE.CENTRAL_CONNECTION:Tt.newActivation(z,f,d);break;case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Tt.newActivation(z,f,d);break;case n.db.LINETYPE.ACTIVE_END:E(z,Tt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Lc(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,ne=>Tt.newLoop(ne));break;case n.db.LINETYPE.LOOP_END:V=Tt.endLoop(),await ti.drawLoop(f,V,"loop",je,z),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos()),Tt.models.addLoop(V);break;case n.db.LINETYPE.RECT_START:Lc(S,z,je.boxMargin,je.boxMargin,ne=>{let Q=ne.message;Q||(Q=o?.rectBkgColor||o?.actorBkg||"rgba(128, 128, 128, 0.5)"),Tt.newLoop(void 0,Q)});break;case n.db.LINETYPE.RECT_END:V=Tt.endLoop(),R.push(V),Tt.models.addLoop(V),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Lc(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,ne=>Tt.newLoop(ne));break;case n.db.LINETYPE.OPT_END:V=Tt.endLoop(),await ti.drawLoop(f,V,"opt",je,z),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos()),Tt.models.addLoop(V);break;case n.db.LINETYPE.ALT_START:Lc(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,ne=>Tt.newLoop(ne));break;case n.db.LINETYPE.ALT_ELSE:Lc(S,z,je.boxMargin+je.boxTextMargin,je.boxMargin,ne=>Tt.addSectionToLoop(ne));break;case n.db.LINETYPE.ALT_END:V=Tt.endLoop(),await ti.drawLoop(f,V,"alt",je,z),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos()),Tt.models.addLoop(V);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Lc(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,ne=>Tt.newLoop(ne)),Tt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Lc(S,z,je.boxMargin+je.boxTextMargin,je.boxMargin,ne=>Tt.addSectionToLoop(ne));break;case n.db.LINETYPE.PAR_END:V=Tt.endLoop(),await ti.drawLoop(f,V,"par",je,z),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos()),Tt.models.addLoop(V);break;case n.db.LINETYPE.AUTONUMBER:L=z.message.start||L,N=z.message.step||N,z.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Lc(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,ne=>Tt.newLoop(ne));break;case n.db.LINETYPE.CRITICAL_OPTION:Lc(S,z,je.boxMargin+je.boxTextMargin,je.boxMargin,ne=>Tt.addSectionToLoop(ne));break;case n.db.LINETYPE.CRITICAL_END:V=Tt.endLoop(),await ti.drawLoop(f,V,"critical",je,z),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos()),Tt.models.addLoop(V);break;case n.db.LINETYPE.BREAK_START:Lc(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,ne=>Tt.newLoop(ne));break;case n.db.LINETYPE.BREAK_END:V=Tt.endLoop(),await ti.drawLoop(f,V,"break",je,z),Tt.bumpVerticalPos(V.stopy-Tt.getVerticalPos()),Tt.models.addLoop(V);break;default:try{ee=z.msgModel,ee.starty=Tt.getVerticalPos(),ee.sequenceIndex=L,ee.sequenceVisible=n.db.showSequenceNumbers(),ee.id=z.id,ee.from=z.from,ee.to=z.to;let ne=await LIe(f,ee);DIe(z,ee,ne,_,d,p,g),O.push({messageModel:ee,lineStartY:ne,msg:z}),Tt.models.addMessage(ee)}catch(ne){fe.error("error while drawing message",ne)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(z.type)&&(L=Math.round((L+N)*100)/100),_++}fe.debug("createdActors",p),fe.debug("destroyedActors",g),await aY(f,d,y,!1,t,n,C);for(let z of O)await Q4t(f,z.messageModel,z.lineStartY,n,z.msg,t);je.mirrorActors&&await aY(f,d,y,!0,t,n,C),R.forEach(z=>ti.drawBackgroundRect(f,z)),AIe(f,d,y,je);for(let z of Tt.models.boxes){z.height=Tt.getVerticalPos()-z.y,Tt.insert(z.x,z.y,z.x+z.width,z.height);let V=je.boxMargin*2;z.startx=z.x-V,z.starty=z.y-V*.25,z.stopx=z.startx+z.width+2*V,z.stopy=z.starty+z.height+V*.75,z.stroke="rgb(0,0,0, 0.5)",ti.drawBox(f,z,je)}T&&Tt.bumpVerticalPos(je.boxMargin);let D=IIe(f,d,y,h),{bounds:I}=Tt.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let M=I.stopy-I.starty;M2,d=v(y=>l?-y:y,"adjustValue");e.from===e.to?h=u:(e.activate&&!f&&(h+=d(je.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=d(3)));let p=[i,a,s,o],g=Math.abs(u-h);e.wrap&&e.message&&(e.message=ar.wrapLabel(e.message,vt.getMax(g+2*je.wrapPadding,je.width),jm(je)));let m=ar.calculateTextDimensions(e.message,jm(je));return{width:vt.getMax(e.wrap?0:m.width+2*je.wrapPadding,g+2*je.wrapPadding,je.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),lEt=v(async function(e,t,r,n){let i={},a=[],s,o,l;for(let u of e){switch(u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),i[s.id]=s,i[u.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let f=t.get(u.from?u.from:u.to.actor),d=C7(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*je.activationWidth/2,g={startx:p,stopx:p+je.activationWidth,actor:u.from,enabled:!0};Tt.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let f=Tt.activations.map(d=>d.actor).lastIndexOf(u.from);Tt.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await rEt(u,t,n),u.noteModel=o,a.forEach(f=>{s=f,s.from=vt.getMin(s.from,o.startx),s.to=vt.getMax(s.to,o.startx+o.width),s.width=vt.getMax(s.width,Math.abs(s.from-s.to))-je.labelBoxWidth})):(l=oEt(u,t,n),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(f=>{if(s=f,l.startx===l.stopx){let d=t.get(u.from),p=t.get(u.to);s.from=vt.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=vt.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=vt.getMax(s.width,Math.abs(s.to-s.from))-je.labelBoxWidth}else s.from=vt.getMin(l.startx,s.from),s.to=vt.getMax(l.stopx,s.to),s.width=vt.getMax(s.width,l.width)-je.labelBoxWidth}))}return Tt.activations=[],fe.debug("Loop type widths:",i),i},"calculateLoopBounds"),cEt={bounds:Tt,drawActors:aY,drawActorsPopup:IIe,setConf:MIe,draw:eEt},uEt={parser:m4t,get db(){return new b4t},renderer:cEt,styles:w4t,init:v(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Tb({sequence:{wrap:e.wrap}}))},"init")}});var oY,S7,FIe,zIe,k7,GIe,Km,E7,hEt,A7,fEt,dEt,pEt,_7,cY=X(()=>{qu();sl();_o();ko();al();Ur();hr();ur();Yt();zr();gy();oY=(function(){var e=v(function(se,F,H,W){for(H=H||{},W=se.length;W--;H[se[W]]=F);return H},"o"),t=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,26],s=[1,42],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],g=[1,36],m=[1,37],y=[1,38],x=[1,27],b=[1,28],T=[1,29],k=[1,30],w=[1,31],C=[1,44],S=[1,46],E=[1,43],L=[1,47],N=[1,9],O=[1,8,9],R=[1,58],_=[1,59],D=[1,60],I=[1,61],M=[1,62],B=[1,63],P=[1,64],$=[1,8,9,41],G=[1,77],q=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],z=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],V=[13,60,86,100,102,103],j=[13,60,73,74,86,100,102,103],ee=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],Q=[1,121],pe=[1,117],te=[1,113],de=[1,119],ce=[1,114],ue=[1,115],Re=[1,116],ve=[1,118],Ge=[1,120],He=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],me=[12,39],De=[1,8,9,39,41,44,46],Ie=[1,8,9,22],Me=[1,153],re=[1,8,9,61],le=[1,8,9,22,50,60,61,82,86,87,88,89,90],oe={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className: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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:v(function(F,H,W,U,ae,K,Y){var Z=K.length-1;switch(ae){case 8:this.$=K[Z-1];break;case 9:case 10:case 13:case 15:this.$=K[Z];break;case 11:case 14:this.$=K[Z-2]+"."+K[Z];break;case 12:case 16:this.$=K[Z-1]+K[Z];break;case 17:case 18:this.$=K[Z-1]+"~"+K[Z]+"~";break;case 19:U.addRelation(K[Z]);break;case 20:K[Z-1].title=U.cleanupLabel(K[Z]),U.addRelation(K[Z-1]);break;case 31:this.$=K[Z].trim(),U.setAccTitle(this.$);break;case 32:case 33:this.$=K[Z].trim(),U.setAccDescription(this.$);break;case 34:U.addClassesToNamespace(K[Z-3],K[Z-1][0],K[Z-1][1]),U.popNamespace();break;case 35:U.addClassesToNamespace(K[Z-4],K[Z-1][0],K[Z-1][1]),U.popNamespace();break;case 36:this.$=U.addNamespace(K[Z]);break;case 37:this.$=U.addNamespace(K[Z-1],K[Z]);break;case 38:this.$=[[K[Z]],[]];break;case 39:this.$=[[K[Z-1]],[]];break;case 40:K[Z][0].unshift(K[Z-2]),this.$=K[Z];break;case 41:this.$=[[],[K[Z]]];break;case 42:this.$=[[],[K[Z-1]]];break;case 43:K[Z][1].unshift(K[Z-2]),this.$=K[Z];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=K[Z];break;case 48:U.setCssClass(K[Z-2],K[Z]);break;case 49:U.addMembers(K[Z-3],K[Z-1]);break;case 51:U.setCssClass(K[Z-5],K[Z-3]),U.addMembers(K[Z-5],K[Z-1]);break;case 52:U.addAnnotation(K[Z-3],K[Z-1]);break;case 53:U.addAnnotation(K[Z-6],K[Z-4]),U.addMembers(K[Z-6],K[Z-1]);break;case 54:U.addAnnotation(K[Z-5],K[Z-3]);break;case 55:this.$=K[Z],U.addClass(K[Z]);break;case 56:this.$=K[Z-1],U.addClass(K[Z-1]),U.setClassLabel(K[Z-1],K[Z]);break;case 60:U.addAnnotation(K[Z],K[Z-2]);break;case 61:case 74:this.$=[K[Z]];break;case 62:K[Z].push(K[Z-1]),this.$=K[Z];break;case 63:break;case 64:U.addMember(K[Z-1],U.cleanupLabel(K[Z]));break;case 65:break;case 66:break;case 67:this.$={id1:K[Z-2],id2:K[Z],relation:K[Z-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:K[Z-3],id2:K[Z],relation:K[Z-1],relationTitle1:K[Z-2],relationTitle2:"none"};break;case 69:this.$={id1:K[Z-3],id2:K[Z],relation:K[Z-2],relationTitle1:"none",relationTitle2:K[Z-1]};break;case 70:this.$={id1:K[Z-4],id2:K[Z],relation:K[Z-2],relationTitle1:K[Z-3],relationTitle2:K[Z-1]};break;case 71:this.$=U.addNote(K[Z],K[Z-1]);break;case 72:this.$=U.addNote(K[Z]);break;case 73:this.$=K[Z-2],U.defineClass(K[Z-1],K[Z]);break;case 75:this.$=K[Z-2].concat([K[Z]]);break;case 76:U.setDirection("TB");break;case 77:U.setDirection("BT");break;case 78:U.setDirection("RL");break;case 79:U.setDirection("LR");break;case 80:this.$={type1:K[Z-2],type2:K[Z],lineType:K[Z-1]};break;case 81:this.$={type1:"none",type2:K[Z],lineType:K[Z-1]};break;case 82:this.$={type1:K[Z-1],type2:"none",lineType:K[Z]};break;case 83:this.$={type1:"none",type2:"none",lineType:K[Z]};break;case 84:this.$=U.relationType.AGGREGATION;break;case 85:this.$=U.relationType.EXTENSION;break;case 86:this.$=U.relationType.COMPOSITION;break;case 87:this.$=U.relationType.DEPENDENCY;break;case 88:this.$=U.relationType.LOLLIPOP;break;case 89:this.$=U.lineType.LINE;break;case 90:this.$=U.lineType.DOTTED_LINE;break;case 91:case 97:this.$=K[Z-2],U.setClickEvent(K[Z-1],K[Z]);break;case 92:case 98:this.$=K[Z-3],U.setClickEvent(K[Z-2],K[Z-1]),U.setTooltip(K[Z-2],K[Z]);break;case 93:this.$=K[Z-2],U.setLink(K[Z-1],K[Z]);break;case 94:this.$=K[Z-3],U.setLink(K[Z-2],K[Z-1],K[Z]);break;case 95:this.$=K[Z-3],U.setLink(K[Z-2],K[Z-1]),U.setTooltip(K[Z-2],K[Z]);break;case 96:this.$=K[Z-4],U.setLink(K[Z-3],K[Z-2],K[Z]),U.setTooltip(K[Z-3],K[Z-1]);break;case 99:this.$=K[Z-3],U.setClickEvent(K[Z-2],K[Z-1],K[Z]);break;case 100:this.$=K[Z-4],U.setClickEvent(K[Z-3],K[Z-2],K[Z-1]),U.setTooltip(K[Z-3],K[Z]);break;case 101:this.$=K[Z-3],U.setLink(K[Z-2],K[Z]);break;case 102:this.$=K[Z-4],U.setLink(K[Z-3],K[Z-1],K[Z]);break;case 103:this.$=K[Z-4],U.setLink(K[Z-3],K[Z-1]),U.setTooltip(K[Z-3],K[Z]);break;case 104:this.$=K[Z-5],U.setLink(K[Z-4],K[Z-2],K[Z]),U.setTooltip(K[Z-4],K[Z-1]);break;case 105:this.$=K[Z-2],U.setCssStyle(K[Z-1],K[Z]);break;case 106:U.setCssClass(K[Z-1],K[Z]);break;case 107:this.$=[K[Z]];break;case 108:K[Z-2].push(K[Z]),this.$=K[Z-2];break;case 110:this.$=K[Z-1]+K[Z];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:a,48:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:y,75:x,76:b,78:T,82:k,83:w,86:C,100:S,102:E,103:L},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(N,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:R,69:_,70:D,71:I,72:M,73:B,74:P}),{39:[1,65]},e($,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:d,86:C,100:S,102:E},{16:39,17:40,19:70,60:d,86:C,100:S,102:E,103:L},{16:39,17:40,19:71,60:d,86:C,100:S,102:E,103:L},{16:39,17:40,19:72,60:d,86:C,100:S,102:E,103:L},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:d,86:C,100:S,102:E,103:L},{13:G,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(q,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:d,86:C,100:S,102:E,103:L}),e(q,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:d,86:C,100:S,102:E,103:L},{16:39,17:40,19:87,60:d,86:C,100:S,102:E,103:L},e(z,[2,133]),e(z,[2,134]),e(z,[2,135]),e(z,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(N,[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,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:n,42:i,46:a,48:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:y,75:x,76:b,78:T,82:k,83:w,86:C,100:S,102:E,103:L}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:a,48:s,51:o,52:l,54:u,56:h,57:f,60:d,62:p,63:g,64:m,65:y,75:x,76:b,78:T,82:k,83:w,86:C,100:S,102:E,103:L},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:d,86:C,100:S,102:E,103:L},{53:92,66:56,67:57,68:R,69:_,70:D,71:I,72:M,73:B,74:P},e(O,[2,64]),{67:93,73:B,74:P},e(V,[2,83],{66:94,68:R,69:_,70:D,71:I,72:M}),e(j,[2,84]),e(j,[2,85]),e(j,[2,86]),e(j,[2,87]),e(j,[2,88]),e(ee,[2,89]),e(ee,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:s,54:u,56:h},{16:100,60:d,86:C,100:S,102:E},{41:[1,102],45:101,51:ne},{16:104,60:d,86:C,100:S,102:E},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:Q,50:pe,59:110,60:te,82:de,84:111,85:112,86:ce,87:ue,88:Re,89:ve,90:Ge},{60:[1,122]},{13:G,55:123},e($,[2,72]),e($,[2,138]),{22:Q,50:pe,59:124,60:te,61:[1,125],82:de,84:111,85:112,86:ce,87:ue,88:Re,89:ve,90:Ge},e(He,[2,74]),{16:39,17:40,19:126,60:d,86:C,100:S,102:E,103:L},e(q,[2,16]),e(q,[2,17]),e(q,[2,18]),{11:127,12:Ue,39:[2,36]},e(me,[2,9],{16:85,17:86,15:130,18:[1,129],60:d,86:C,100:S,102:E,103:L}),e(me,[2,10]),e(De,[2,55],{11:131,12:Ue}),e(N,[2,7]),{9:[1,132]},e(Ie,[2,67]),{16:39,17:40,19:133,60:d,86:C,100:S,102:E,103:L},{13:[1,135],16:39,17:40,19:134,60:d,86:C,100:S,102:E,103:L},e(V,[2,82],{66:136,68:R,69:_,70:D,71:I,72:M}),e(V,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:s,54:u,56:h},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e($,[2,48],{39:[1,142]}),{41:[1,143]},e($,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:d,86:C,100:S,102:E,103:L},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:Me}),e(re,[2,107],{85:154,22:Q,50:pe,60:te,82:de,86:ce,87:ue,88:Re,89:ve,90:Ge}),e(le,[2,109]),e(le,[2,111]),e(le,[2,112]),e(le,[2,113]),e(le,[2,114]),e(le,[2,115]),e(le,[2,116]),e(le,[2,117]),e(le,[2,118]),e(le,[2,119]),e(O,[2,106]),e($,[2,71]),e(O,[2,73],{61:Me}),{60:[1,155]},e(q,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:d,86:C,100:S,102:E,103:L},e(me,[2,12]),e(De,[2,56]),{1:[2,4]},e(Ie,[2,69]),e(Ie,[2,68]),{16:39,17:40,19:158,60:d,86:C,100:S,102:E,103:L},e(V,[2,80]),e($,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:s,54:u,56:h},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:s,54:u,56:h},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:s,54:u,56:h},{45:163,51:ne},e($,[2,49]),{41:[2,62]},e($,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:Q,50:pe,60:te,82:de,84:169,85:112,86:ce,87:ue,88:Re,89:ve,90:Ge},e(le,[2,110]),e(He,[2,75]),{14:[1,170]},e(me,[2,11]),e(Ie,[2,70]),e($,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(re,[2,108],{85:154,22:Q,50:pe,60:te,82:de,86:ce,87:ue,88:Re,89:ve,90:Ge}),e(De,[2,8]),e($,[2,51]),{41:[1,175]},e($,[2,54]),e(O,[2,104]),e($,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:v(function(F,H){if(H.recoverable)this.trace(F);else{var W=new Error(F);throw W.hash=H,W}},"parseError"),parse:v(function(F){var H=this,W=[0],U=[],ae=[null],K=[],Y=this.table,Z="",Ce=0,we=0,ke=0,Se=2,Ne=1,Ae=K.slice.call(arguments,1),Fe=Object.create(this.lexer),Pe={yy:{}};for(var We in this.yy)Object.prototype.hasOwnProperty.call(this.yy,We)&&(Pe.yy[We]=this.yy[We]);Fe.setInput(F,Pe.yy),Pe.yy.lexer=Fe,Pe.yy.parser=this,typeof Fe.yylloc>"u"&&(Fe.yylloc={});var be=Fe.yylloc;K.push(be);var lt=Fe.options&&Fe.options.ranges;typeof Pe.yy.parseError=="function"?this.parseError=Pe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(ft){W.length=W.length-2*ft,ae.length=ae.length-ft,K.length=K.length-ft}v($e,"popStack");function at(){var ft;return ft=U.pop()||Fe.lex()||Ne,typeof ft!="number"&&(ft instanceof Array&&(U=ft,ft=U.pop()),ft=H.symbols_[ft]||ft),ft}v(at,"lex");for(var bt,Et,pt,Ct,ht,Te,ot={},gt,Qe,_e,Ze;;){if(pt=W[W.length-1],this.defaultActions[pt]?Ct=this.defaultActions[pt]:((bt===null||typeof bt>"u")&&(bt=at()),Ct=Y[pt]&&Y[pt][bt]),typeof Ct>"u"||!Ct.length||!Ct[0]){var nt="";Ze=[];for(gt in Y[pt])this.terminals_[gt]&>>Se&&Ze.push("'"+this.terminals_[gt]+"'");Fe.showPosition?nt="Parse error on line "+(Ce+1)+`: +`+Fe.showPosition()+` +Expecting `+Ze.join(", ")+", got '"+(this.terminals_[bt]||bt)+"'":nt="Parse error on line "+(Ce+1)+": Unexpected "+(bt==Ne?"end of input":"'"+(this.terminals_[bt]||bt)+"'"),this.parseError(nt,{text:Fe.match,token:this.terminals_[bt]||bt,line:Fe.yylineno,loc:be,expected:Ze})}if(Ct[0]instanceof Array&&Ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+bt);switch(Ct[0]){case 1:W.push(bt),ae.push(Fe.yytext),K.push(Fe.yylloc),W.push(Ct[1]),bt=null,Et?(bt=Et,Et=null):(we=Fe.yyleng,Z=Fe.yytext,Ce=Fe.yylineno,be=Fe.yylloc,ke>0&&ke--);break;case 2:if(Qe=this.productions_[Ct[1]][1],ot.$=ae[ae.length-Qe],ot._$={first_line:K[K.length-(Qe||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(Qe||1)].first_column,last_column:K[K.length-1].last_column},lt&&(ot._$.range=[K[K.length-(Qe||1)].range[0],K[K.length-1].range[1]]),Te=this.performAction.apply(ot,[Z,we,Ce,Pe.yy,Ct[1],ae,K].concat(Ae)),typeof Te<"u")return Te;Qe&&(W=W.slice(0,-1*Qe*2),ae=ae.slice(0,-1*Qe),K=K.slice(0,-1*Qe)),W.push(this.productions_[Ct[1]][0]),ae.push(ot.$),K.push(ot._$),_e=Y[W[W.length-2]][W[W.length-1]],W.push(_e);break;case 3:return!0}}return!0},"parse")},he=(function(){var se={EOF:1,parseError:v(function(H,W){if(this.yy.parser)this.yy.parser.parseError(H,W);else throw new Error(H)},"parseError"),setInput:v(function(F,H){return this.yy=H||this.yy||{},this._input=F,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var F=this._input[0];this.yytext+=F,this.yyleng++,this.offset++,this.match+=F,this.matched+=F;var H=F.match(/(?:\r\n?|\n).*/g);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),F},"input"),unput:v(function(F){var H=F.length,W=F.split(/(?:\r\n?|\n)/g);this._input=F+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-H),this.offset-=H;var U=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),W.length-1&&(this.yylineno-=W.length-1);var ae=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:W?(W.length===U.length?this.yylloc.first_column:0)+U[U.length-W.length].length-W[0].length:this.yylloc.first_column-H},this.options.ranges&&(this.yylloc.range=[ae[0],ae[0]+this.yyleng-H]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(F){this.unput(this.match.slice(F))},"less"),pastInput:v(function(){var F=this.matched.substr(0,this.matched.length-this.match.length);return(F.length>20?"...":"")+F.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var F=this.match;return F.length<20&&(F+=this._input.substr(0,20-F.length)),(F.substr(0,20)+(F.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var F=this.pastInput(),H=new Array(F.length+1).join("-");return F+this.upcomingInput()+` +`+H+"^"},"showPosition"),test_match:v(function(F,H){var W,U,ae;if(this.options.backtrack_lexer&&(ae={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ae.yylloc.range=this.yylloc.range.slice(0))),U=F[0].match(/(?:\r\n?|\n).*/g),U&&(this.yylineno+=U.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:U?U[U.length-1].length-U[U.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+F[0].length},this.yytext+=F[0],this.match+=F[0],this.matches=F,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(F[0].length),this.matched+=F[0],W=this.performAction.call(this,this.yy,this,H,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var K in ae)this[K]=ae[K];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var F,H,W,U;this._more||(this.yytext="",this.match="");for(var ae=this._currentRules(),K=0;KH[0].length)){if(H=W,U=K,this.options.backtrack_lexer){if(F=this.test_match(W,ae[K]),F!==!1)return F;if(this._backtrack){H=!1;continue}else return!1}else if(!this.options.flex)break}return H?(F=this.test_match(H,ae[U]),F!==!1?F:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var H=this.next();return H||this.lex()},"lex"),begin:v(function(H){this.conditionStack.push(H)},"begin"),popState:v(function(){var H=this.conditionStack.length-1;return H>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(H){return H=this.conditionStack.length-1-Math.abs(H||0),H>=0?this.conditionStack[H]:"INITIAL"},"topState"),pushState:v(function(H){this.begin(H)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(H,W,U,ae){var K=ae;switch(U){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),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)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}};return se})();oe.lexer=he;function xe(){this.yy={}}return v(xe,"Parser"),xe.prototype=oe,oe.Parser=xe,new xe})();oY.parser=oY;S7=oY,FIe=["#","+","~","-",""],zIe=class{static{v(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="";let r=Cr(e,ze());this.parseMember(r)}getDisplayDetails(){let e=this.visibility+eu(this.id);this.memberType==="method"&&(e+=`(${eu(this.parameters.trim())})`,this.returnType&&(e+=" : "+eu(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){let a=i[1]?i[1].trim():"";if(FIe.includes(a)&&(this.visibility=a),this.id=i[2],this.parameters=i[3]?i[3].trim():"",t=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",t===""){let s=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(s)&&(t=s,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,i=e.substring(0,1),a=e.substring(n-1);FIe.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(t=a),this.id=e.substring(this.visibility===""?0:1,t===""?n:n-1)}this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${eu(this.id)}${this.memberType==="method"?`(${eu(this.parameters)})${this.returnType?" : "+eu(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},k7="classId-",GIe=0,Km=v(e=>vt.sanitizeText(e,ze()),"sanitizeText"),E7=class lY{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=v(t=>{let r=dv();ct(t).select("svg").selectAll("g").filter(function(){return ct(this).attr("title")!==null}).on("mouseover",a=>{let s=ct(a.currentTarget),o=s.attr("title");if(!o)return;let l=a.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(co.sanitize(o)).style("left",`${window.scrollX+l.left+l.width/2}px`).style("top",`${window.scrollY+l.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),ct(a.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Ar,this.getAccTitle=Lr,this.setAccDescription=Ir,this.getAccDescription=Mr,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,this.getConfig=v(()=>ze().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.popNamespace=this.popNamespace.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)}static{v(this,"ClassDB")}splitClassNameAndType(t){let r=vt.sanitizeText(t,ze()),n="",i=r;if(r.indexOf("~")>0){let a=r.split("~");i=Km(a[0]),n=Km(a[1])}return{className:i,type:n}}setClassLabel(t,r){let n=vt.sanitizeText(t,ze());r&&(r=Km(r));let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=r,this.classes.get(i).text=`${r}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){let r=vt.sanitizeText(t,ze()),{className:n,type:i}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let a=vt.sanitizeText(n,ze());this.classes.set(a,{id:a,type:i,label:a,text:`${a}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:k7+a+"-"+GIe}),GIe++}addInterface(t,r){let n={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(n)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){let r=vt.sanitizeText(t,ze());if(this.classes.has(r)){let n=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${n}`:n}throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",pr()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){let r=typeof t=="number"?`note${t}`:t;return this.notes.get(r)}getNotes(){return this.notes}addRelation(t){fe.debug("Adding relation: "+JSON.stringify(t));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!r.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!r.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=vt.sanitizeText(t.relationTitle1.trim(),ze()),t.relationTitle2=vt.sanitizeText(t.relationTitle2.trim(),ze()),this.relations.push(t)}addAnnotation(t,r){let n=this.splitClassNameAndType(t).className;this.classes.get(n).annotations.push(r)}addMember(t,r){this.addClass(t);let n=this.splitClassNameAndType(t).className,i=this.classes.get(n);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?i.annotations.push(Km(a.substring(2,a.length-2))):a.indexOf(")")>0?i.methods.push(new zIe(a,"method")):a&&i.members.push(new zIe(a,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(t,n)))}addNote(t,r){let n=this.notes.size,i={id:`note${n}`,class:r,text:t,index:n};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),Km(t.trim())}setCssClass(t,r){t.split(",").forEach(n=>{let i=n;/\d/.exec(n[0])&&(i=k7+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.cssClasses+=" "+r)})}defineClass(t,r){for(let n of t){let i=this.styleClasses.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,i)),r&&r.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s)}i.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(n)&&a.styles.push(...r.flatMap(s=>s.split(",")))})}}setTooltip(t,r){t.split(",").forEach(n=>{if(r!==void 0){let i=this.splitClassNameAndType(n).className,a=this.classes.get(i);a&&(a.tooltip=Km(r))}})}getTooltip(t,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,r,n){let i=ze();t.split(",").forEach(a=>{let s=a;/\d/.exec(a[0])&&(s=k7+s),s=this.splitClassNameAndType(s).className;let o=this.classes.get(s);o&&(o.link=ar.formatUrl(r,i),i.securityLevel==="sandbox"?o.linkTarget="_top":typeof n=="string"?o.linkTarget=Km(n):o.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFunc(i,r,n);let a=this.splitClassNameAndType(i).className,s=this.classes.get(a);s&&(s.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,r,n){let i=vt.sanitizeText(t,ze());if(ze().securityLevel!=="loose"||r===void 0)return;let s=this.splitClassNameAndType(i).className;if(this.classes.has(s)){let o=[];if(typeof n=="string"){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=this.lookUpDomId(s),u=document.querySelector(`[id="${l}"]`);u!==null&&u.addEventListener("click",()=>{ar.runFunc(r,...o)},!1)})}}bindFunctions(t){this.functions.forEach(r=>{r(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,r){let n=r.at(-1);return n?`${n}.${t}`:t}static getAncestorIds(t){let r=t.split("."),n=new Array(r.length);n[0]=r[0];for(let i=1;i0?a[s-1]:void 0,u=s===a.length-1,h=u&&r?r:i[s];this.namespaces.has(o)?u&&(this.namespaces.get(o).explicit=!0):this.namespaces.set(o,this.createNamespaceNode(o,h,l,u)),l&&this.linkParentChild(l,o)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r,n){if(this.namespaces.has(t)){for(let i of r){let{className:a}=this.splitClassNameAndType(i),s=this.getClass(a);s.parent=t,this.namespaces.get(t).classes.set(a,s)}for(let i of n){let a=this.getNote(i);a.parent=t,this.namespaces.get(t).notes.set(i,a)}}}setCssStyle(t,r){let n=this.classes.get(t);if(!(!r||!n))for(let i of r)i.includes(",")?n.styles.push(...i.split(",")):n.styles.push(i)}getArrowMarker(t){let r;switch(t){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(t){let r=t;for(;r;){let n=this.namespaces.get(r);if(!n)return;if(n.explicit)return r;r=n.parent}}getData(){let t=[],r=[],n=ze(),i=n.class?.hierarchicalNamespaces??!0;for(let s of this.namespaces.values()){if(!i&&!s.explicit)continue;let o={id:s.id,label:i?s.label:s.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look,parentId:i?s.parent:void 0};t.push(o)}for(let s of this.classes.values()){let o=i?s.parent:this.resolveExplicitAncestor(s.parent),l={...s,type:void 0,isGroup:!1,parentId:o,look:n.look};t.push(l)}for(let s of this.notes.values()){let o=i?s.parent:this.resolveExplicitAncestor(s.parent),l={id:s.id,label:s.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:o,labelType:"markdown"};t.push(l);let u=this.classes.get(s.class)?.id;if(u){let h={id:`edgeNote${s.index}`,start:s.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(h)}}for(let s of this.interfaces){let o={id:s.id,label:s.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};t.push(o)}let a=0;for(let s of this.relations){a++;let o={id:uu(s.id1,s.id2,{prefix:"id",counter:a}),start:s.id1,end:s.id2,type:"normal",label:s.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(s.relation.type1),arrowTypeEnd:this.getArrowMarker(s.relation.type2),startLabelRight:s.relationTitle1==="none"?"":s.relationTitle1,endLabelLeft:s.relationTitle2==="none"?"":s.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:s.style||"",pattern:s.relation.lineType==1?"dashed":"solid",look:n.look,labelType:"markdown"};r.push(o)}return{nodes:t,edges:r,other:{},config:n,direction:this.getDirection()}}},hEt=v(e=>`g.classGroup text { fill: ${e.nodeBorder||e.classText}; stroke: none; font-family: ${e.fontFamily}; @@ -2186,13 +2260,13 @@ g.classGroup line { } text-align: center; } - ${nu()} -`,"getStyles"),$_=Qbt,Jbt=b((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir"),ext=b(function(e,t){return t.db.getClasses()},"getClasses"),txt=b(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing class diagram (v3)",t);let{securityLevel:n,state:a,layout:s}=we();i.db.setDiagramId(t);let o=i.db.getData(),l=rl(t,n);o.type=i.type,o.layoutAlgorithm=tu(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Ko(o,l);let u=8;jt.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(l,u,"classDiagram",a?.useMaxWidth??!0)},"draw"),z_={getClasses:ext,draw:txt,getDir:Jbt}});var kAe={};Lr(kAe,{diagram:()=>rxt});var rxt,CAe=q(()=>{Hq();Ld();Ed();Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();rxt={parser:B_,get db(){return new F_},renderer:z_,styles:$_,init:b(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var SAe={};Lr(SAe,{diagram:()=>ixt});var ixt,EAe=q(()=>{Hq();Ld();Ed();Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();ixt={parser:B_,get db(){return new F_},renderer:z_,styles:$_,init:b(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});function V_(e="",t=0,r="",i=Zq){let n=r!==null&&r.length>0?`${i}${r}`:"";return`${wxt}-${e}${n}-${t}`}function Cw(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(n=>{let a=r.get(n);a&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...a.styles])}));let i=e.find(n=>n.id===t.id);i?Object.assign(i,t):e.push(t)}function HAe(e){return e?.classes?.join(" ")??""}function YAe(e){return e?.styles??[]}var Xq,W_,nxt,MAe,AAe,iv,rv,Kq,axt,sxt,oxt,Ew,OAe,PAe,BAe,FAe,$Ae,zAe,Yq,jq,lxt,cxt,_Ae,LAe,uxt,hxt,Aw,fxt,dxt,GAe,pxt,gxt,mxt,yxt,vxt,bxt,xxt,Txt,qAe,VAe,wxt,Zq,kxt,RAe,WAe,Cxt,Sxt,UAe,q_,ep,Ext,IAe,Sw,Axt,xs,DAe,NAe,G_,Kh,_xt,U_,Qq=q(()=>{Fl();il();Zo();$r();Er();er();Xq=(function(){var e=b(function(F,z,$,G){for($=$||{},G=F.length;G--;$[F[G]]=z);return $},"o"),t=[1,2],r=[1,3],i=[1,4],n=[2,4],a=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,33],d=[1,20],p=[1,21],g=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],T=[1,28],C=[1,29],w=[1,30],k=[1,31],E=[1,32],A=[1,35],N=[1,36],P=[1,37],O=[1,38],L=[1,34],_=[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],R=[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],D=[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],I={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":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},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"},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]],performAction:b(function(z,$,G,U,j,H,Q){var Y=H.length-1;switch(j){case 3:return U.setRootDoc(H[Y]),H[Y];break;case 4:this.$=[];break;case 5:H[Y]!="nl"&&(H[Y-1].push(H[Y]),this.$=H[Y-1]);break;case 6:case 7:this.$=H[Y];break;case 8:this.$="nl";break;case 12:this.$=H[Y];break;case 13:let ie=H[Y-1];ie.description=U.trimColon(H[Y]),this.$=ie;break;case 14:this.$={stmt:"relation",state1:H[Y-2],state2:H[Y]};break;case 15:let te=U.trimColon(H[Y]);this.$={stmt:"relation",state1:H[Y-3],state2:H[Y-1],description:te};break;case 19:this.$={stmt:"state",id:H[Y-3],type:"default",description:"",doc:H[Y-1]};break;case 20:var se=H[Y],J=H[Y-2].trim();if(H[Y].match(":")){var re=H[Y].split(":");se=re[0],J=[J,re[1]]}this.$={stmt:"state",id:se,type:"default",description:J};break;case 21:this.$={stmt:"state",id:H[Y-3],type:"default",description:H[Y-5],doc:H[Y-1]};break;case 22:this.$={stmt:"state",id:H[Y],type:"fork"};break;case 23:this.$={stmt:"state",id:H[Y],type:"join"};break;case 24:this.$={stmt:"state",id:H[Y],type:"choice"};break;case 25:this.$={stmt:"state",id:U.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:H[Y-1].trim(),note:{position:H[Y-2].trim(),text:H[Y].trim()}};break;case 29:this.$=H[Y].trim(),U.setAccTitle(this.$);break;case 30:case 31:this.$=H[Y].trim(),U.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:H[Y-3],url:H[Y-2],tooltip:H[Y-1]};break;case 33:this.$={stmt:"click",id:H[Y-3],url:H[Y-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:H[Y-1].trim(),classes:H[Y].trim()};break;case 36:this.$={stmt:"style",id:H[Y-1].trim(),styleClass:H[Y].trim()};break;case 37:this.$={stmt:"applyClass",id:H[Y-1].trim(),styleClass:H[Y].trim()};break;case 38:U.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:U.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:U.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:U.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:H[Y].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:H[Y-2].trim(),classes:[H[Y].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:H[Y-2].trim(),classes:[H[Y].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},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],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:v,35:x,37:T,38:C,41:w,45:k,48:E,51:A,52:N,53:P,54:O,57:L},e(_,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:v,35:x,37:T,38:C,41:w,45:k,48:E,51:A,52:N,53:P,54:O,57:L},e(_,[2,7]),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(_,[2,11]),e(_,[2,12],{14:[1,40],15:[1,41]}),e(_,[2,16]),{18:[1,42]},e(_,[2,18],{20:[1,43]}),{23:[1,44]},e(_,[2,22]),e(_,[2,23]),e(_,[2,24]),e(_,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(_,[2,28]),{34:[1,49]},{36:[1,50]},e(_,[2,31]),{13:51,24:f,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(R,[2,44],{58:[1,56]}),e(R,[2,45],{58:[1,57]}),e(_,[2,38]),e(_,[2,39]),e(_,[2,40]),e(_,[2,41]),e(_,[2,6]),e(_,[2,13]),{13:58,24:f,57:L},e(_,[2,17]),e(D,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(_,[2,29]),e(_,[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(_,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,72],22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:v,35:x,37:T,38:C,41:w,45:k,48:E,51:A,52:N,53:P,54:O,57:L},e(_,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(_,[2,34]),e(_,[2,35]),e(_,[2,36]),e(_,[2,37]),e(R,[2,46]),e(R,[2,47]),e(_,[2,15]),e(_,[2,19]),e(D,n,{7:78}),e(_,[2,26]),e(_,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,81],22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:v,35:x,37:T,38:C,41:w,45:k,48:E,51:A,52:N,53:P,54:O,57:L},e(_,[2,32]),e(_,[2,33]),e(_,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:b(function(z,$){if($.recoverable)this.trace(z);else{var G=new Error(z);throw G.hash=$,G}},"parseError"),parse:b(function(z){var $=this,G=[0],U=[],j=[null],H=[],Q=this.table,Y="",se=0,J=0,re=0,ie=2,te=1,xe=H.slice.call(arguments,1),fe=Object.create(this.lexer),Se={yy:{}};for(var Me in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Me)&&(Se.yy[Me]=this.yy[Me]);fe.setInput(z,Se.yy),Se.yy.lexer=fe,Se.yy.parser=this,typeof fe.yylloc>"u"&&(fe.yylloc={});var ke=fe.yylloc;H.push(ke);var Ce=fe.options&&fe.options.ranges;typeof Se.yy.parseError=="function"?this.parseError=Se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ie(X){G.length=G.length-2*X,j.length=j.length-X,H.length=H.length-X}b(Ie,"popStack");function Pe(){var X;return X=U.pop()||fe.lex()||te,typeof X!="number"&&(X instanceof Array&&(U=X,X=U.pop()),X=$.symbols_[X]||X),X}b(Pe,"lex");for(var pe,Je,Te,Be,He,nt,qe={},Ue,ge,ce,V;;){if(Te=G[G.length-1],this.defaultActions[Te]?Be=this.defaultActions[Te]:((pe===null||typeof pe>"u")&&(pe=Pe()),Be=Q[Te]&&Q[Te][pe]),typeof Be>"u"||!Be.length||!Be[0]){var le="";V=[];for(Ue in Q[Te])this.terminals_[Ue]&&Ue>ie&&V.push("'"+this.terminals_[Ue]+"'");fe.showPosition?le="Parse error on line "+(se+1)+`: -`+fe.showPosition()+` -Expecting `+V.join(", ")+", got '"+(this.terminals_[pe]||pe)+"'":le="Parse error on line "+(se+1)+": Unexpected "+(pe==te?"end of input":"'"+(this.terminals_[pe]||pe)+"'"),this.parseError(le,{text:fe.match,token:this.terminals_[pe]||pe,line:fe.yylineno,loc:ke,expected:V})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Te+", token: "+pe);switch(Be[0]){case 1:G.push(pe),j.push(fe.yytext),H.push(fe.yylloc),G.push(Be[1]),pe=null,Je?(pe=Je,Je=null):(J=fe.yyleng,Y=fe.yytext,se=fe.yylineno,ke=fe.yylloc,re>0&&re--);break;case 2:if(ge=this.productions_[Be[1]][1],qe.$=j[j.length-ge],qe._$={first_line:H[H.length-(ge||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(ge||1)].first_column,last_column:H[H.length-1].last_column},Ce&&(qe._$.range=[H[H.length-(ge||1)].range[0],H[H.length-1].range[1]]),nt=this.performAction.apply(qe,[Y,J,se,Se.yy,Be[1],j,H].concat(xe)),typeof nt<"u")return nt;ge&&(G=G.slice(0,-1*ge*2),j=j.slice(0,-1*ge),H=H.slice(0,-1*ge)),G.push(this.productions_[Be[1]][0]),j.push(qe.$),H.push(qe._$),ce=Q[G[G.length-2]][G[G.length-1]],G.push(ce);break;case 3:return!0}}return!0},"parse")},B=(function(){var F={EOF:1,parseError:b(function($,G){if(this.yy.parser)this.yy.parser.parseError($,G);else throw new Error($)},"parseError"),setInput:b(function(z,$){return this.yy=$||this.yy||{},this._input=z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var z=this._input[0];this.yytext+=z,this.yyleng++,this.offset++,this.match+=z,this.matched+=z;var $=z.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),z},"input"),unput:b(function(z){var $=z.length,G=z.split(/(?:\r\n?|\n)/g);this._input=z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var U=this.match.split(/(?:\r\n?|\n)/g);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);var j=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:G?(G.length===U.length?this.yylloc.first_column:0)+U[U.length-G.length].length-G[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[j[0],j[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(z){this.unput(this.match.slice(z))},"less"),pastInput:b(function(){var z=this.matched.substr(0,this.matched.length-this.match.length);return(z.length>20?"...":"")+z.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var z=this.match;return z.length<20&&(z+=this._input.substr(0,20-z.length)),(z.substr(0,20)+(z.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var z=this.pastInput(),$=new Array(z.length+1).join("-");return z+this.upcomingInput()+` -`+$+"^"},"showPosition"),test_match:b(function(z,$){var G,U,j;if(this.options.backtrack_lexer&&(j={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(j.yylloc.range=this.yylloc.range.slice(0))),U=z[0].match(/(?:\r\n?|\n).*/g),U&&(this.yylineno+=U.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:U?U[U.length-1].length-U[U.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+z[0].length},this.yytext+=z[0],this.match+=z[0],this.matches=z,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(z[0].length),this.matched+=z[0],G=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),G)return G;if(this._backtrack){for(var H in j)this[H]=j[H];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var z,$,G,U;this._more||(this.yytext="",this.match="");for(var j=this._currentRules(),H=0;H$[0].length)){if($=G,U=H,this.options.backtrack_lexer){if(z=this.test_match(G,j[H]),z!==!1)return z;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(z=this.test_match($,j[U]),z!==!1?z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var $=this.next();return $||this.lex()},"lex"),begin:b(function($){this.conditionStack.push($)},"begin"),popState:b(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:b(function($){this.begin($)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function($,G,U,j){function H(){let Y=G.yytext.indexOf("%%");if(Y===0)return!1;if(Y>0){let se=G.yytext.slice(0,Y),J=G.yytext.slice(Y);J&&$.lexer.unput(J),G.yytext=se}return!0}b(H,"processId");var Q=j;switch(U){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),G.yytext=G.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),G.yytext=G.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!H())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),59;break;case 59:return this.popState(),this.pushState("NOTE_ID"),60;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:if(!H())return;return this.popState(),"ID";break;case 65:if(!H())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),G.yytext=G.yytext.substr(2).trim(),31;break;case 67:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return H()?24:void 0;case 73:return G.yytext=G.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),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,/^(?:[\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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/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]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return F})();I.lexer=B;function M(){this.yy={}}return b(M,"Parser"),M.prototype=I,I.Parser=M,new M})();Xq.parser=Xq;W_=Xq,nxt="TB",MAe="TB",AAe="dir",iv="state",rv="root",Kq="relation",axt="classDef",sxt="style",oxt="applyClass",Ew="default",OAe="divider",PAe="fill:none",BAe="fill: #333",FAe="c",$Ae="markdown",zAe="normal",Yq="rect",jq="rectWithTitle",lxt="stateStart",cxt="stateEnd",_Ae="divider",LAe="roundedWithTitle",uxt="note",hxt="noteGroup",Aw="statediagram",fxt="state",dxt=`${Aw}-${fxt}`,GAe="transition",pxt="note",gxt="note-edge",mxt=`${GAe} ${gxt}`,yxt=`${Aw}-${pxt}`,vxt="cluster",bxt=`${Aw}-${vxt}`,xxt="cluster-alt",Txt=`${Aw}-${xxt}`,qAe="parent",VAe="note",wxt="state",Zq="----",kxt=`${Zq}${VAe}`,RAe=`${Zq}${qAe}`,WAe=b((e,t=MAe)=>{if(!e.doc)return t;let r=t;for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir"),Cxt=b(function(e,t){return t.db.getClasses()},"getClasses"),Sxt=b(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing state diagram (v2)",t);let{securityLevel:n,state:a,layout:s}=we();i.db.extract(i.db.getRootDocV2());let o=i.db.getData(),l=rl(t,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,we().look==="neo"?o.markers=["barbNeo"]:o.markers=["barb"],o.diagramId=t,await Ko(o,l);let h=8;try{(typeof i.db.getLinks=="function"?i.db.getLinks():new Map).forEach((d,p)=>{let g=typeof p=="string"?p:typeof p?.id=="string"?p.id:"";if(!g){ee.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(p));return}let m=l.node()?.querySelectorAll("g"),y;if(m?.forEach(C=>{C.textContent?.trim()===g&&(y=C)}),!y){ee.warn("\u26A0\uFE0F Could not find node matching text:",g);return}let v=y.parentNode;if(!v){ee.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",g);return}let x=document.createElementNS("http://www.w3.org/2000/svg","a"),T=d.url.replace(/^"+|"+$/g,"");if(x.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",T),x.setAttribute("target","_blank"),d.tooltip){let C=d.tooltip.replace(/^"+|"+$/g,"");x.setAttribute("title",C)}v.replaceChild(x,y),x.appendChild(y),ee.info("\u{1F517} Wrapped node in
    tag for:",g,d.url)})}catch(f){ee.error("\u274C Error injecting clickable links:",f)}jt.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(l,h,Aw,a?.useMaxWidth??!0)},"draw"),UAe={getClasses:Cxt,draw:Sxt,getDir:WAe},q_=new Map,ep=0;b(V_,"stateDomId");Ext=b((e,t,r,i,n,a,s,o)=>{ee.trace("items",t),t.forEach(l=>{switch(l.stmt){case iv:Sw(e,l,r,i,n,a,s,o);break;case Ew:Sw(e,l,r,i,n,a,s,o);break;case Kq:{Sw(e,l.state1,r,i,n,a,s,o),Sw(e,l.state2,r,i,n,a,s,o);let u=s==="neo",h={id:"edge"+ep,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:u?"arrow_barb_neo":"arrow_barb",style:PAe,labelStyle:"",label:ht.sanitizeText(l.description??"",we()),arrowheadStyle:BAe,labelpos:FAe,labelType:$Ae,thickness:zAe,classes:GAe,look:s};n.push(h),ep++}break}})},"setupDoc"),IAe=b((e,t=MAe)=>{let r=t;if(e.doc)for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir");b(Cw,"insertOrUpdateNode");b(HAe,"getClassesFromDbInfo");b(YAe,"getStylesFromDbInfo");Sw=b((e,t,r,i,n,a,s,o)=>{let l=t.id,u=r.get(l),h=HAe(u),f=YAe(u),d=we();if(ee.info("dataFetcher parsedItem",t,u,f),l!=="root"){let p=Yq;t.start===!0?p=lxt:t.start===!1&&(p=cxt),t.type!==Ew&&(p=t.type),q_.get(l)||q_.set(l,{id:l,shape:p,description:ht.sanitizeText(l,d),cssClasses:`${h} ${dxt}`,cssStyles:f});let g=q_.get(l);t.description&&(Array.isArray(g.description)?(g.shape=jq,g.description.push(t.description)):g.description?.length&&g.description.length>0?(g.shape=jq,g.description===l?g.description=[t.description]:g.description=[g.description,t.description]):(g.shape=Yq,g.description=t.description),g.description=ht.sanitizeTextOrArray(g.description,d)),g.description?.length===1&&g.shape===jq&&(g.type==="group"?g.shape=LAe:g.shape=Yq),!g.type&&t.doc&&(ee.info("Setting cluster for XCX",l,IAe(t)),g.type="group",g.isGroup=!0,g.dir=IAe(t),g.shape=t.type===OAe?_Ae:LAe,g.cssClasses=`${g.cssClasses} ${bxt} ${a?Txt:""}`);let m={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:l,dir:g.dir,domId:V_(l,ep),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:s,labelType:"markdown"};if(m.shape===_Ae&&(m.label=""),e&&e.id!=="root"&&(ee.trace("Setting node ",l," to be child of its parent ",e.id),m.parentId=e.id),m.centerLabel=!0,t.note){let y={labelStyle:"",shape:uxt,label:t.note.text,labelType:"markdown",cssClasses:yxt,cssStyles:[],cssCompiledStyles:[],id:l+kxt+"-"+ep,domId:V_(l,ep,VAe),type:g.type,isGroup:g.type==="group",padding:d.flowchart?.padding,look:s,position:t.note.position},v=l+RAe,x={labelStyle:"",shape:hxt,label:t.note.text,cssClasses:g.cssClasses,cssStyles:[],id:l+RAe,domId:V_(l,ep,qAe),type:"group",isGroup:!0,padding:16,look:s,position:t.note.position};ep++,x.id=v,y.parentId=v,Cw(i,x,o),Cw(i,y,o),Cw(i,m,o);let T=l,C=y.id;t.note.position==="left of"&&(T=y.id,C=l),n.push({id:T+"-"+C,start:T,end:C,arrowhead:"none",arrowTypeEnd:"",style:PAe,labelStyle:"",classes:mxt,arrowheadStyle:BAe,labelpos:FAe,labelType:$Ae,thickness:zAe,look:s})}else Cw(i,m,o)}t.doc&&(ee.trace("Adding nodes children "),Ext(t,t.doc,r,i,n,!a,s,o))},"dataFetcher"),Axt=b(()=>{q_.clear(),ep=0},"reset"),xs={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},DAe=b(()=>new Map,"newClassesList"),NAe=b(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),G_=b(e=>JSON.parse(JSON.stringify(e)),"clone"),Kh=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=DAe(),this.documents={root:NAe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=vr,this.setAccTitle=yr,this.getAccDescription=xr,this.setAccDescription=br,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,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)}static{b(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let i of Array.isArray(e)?e:e.doc)switch(i.stmt){case iv:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Kq:this.addRelation(i.state1,i.state2,i.description);break;case axt:this.addStyleClass(i.id.trim(),i.classes);break;case sxt:this.handleStyleDef(i);break;case oxt:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}let t=this.getStates(),r=we();Axt(),Sw(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,r.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(e){let t=e.id.trim().split(","),r=e.styleClass.split(",");for(let i of t){let n=this.getState(i);if(!n){let a=i.trim();this.addState(a),n=this.getState(a)}n&&(n.styles=r.map(a=>a.replace(/;/g,"")?.trim()))}}setRootDoc(e){ee.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,r){if(t.stmt===Kq){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===iv&&(t.id===xs.START_NODE?(t.id=e.id+(r?"_start":"_end"),t.start=r):t.id=t.id.trim()),t.stmt!==rv&&t.stmt!==iv||!t.doc)return;let i=[],n=[];for(let a of t.doc)if(a.type===OAe){let s=G_(a);s.doc=G_(n),i.push(s),n=[]}else n.push(a);if(i.length>0&&n.length>0){let a={stmt:iv,id:dD(),type:"divider",doc:G_(n)};i.push(G_(a)),t.doc=i}t.doc.forEach(a=>this.docTranslator(t,a,!0))}getRootDocV2(){return this.docTranslator({id:rv,stmt:rv},{id:rv,stmt:rv,doc:this.rootDoc},!0),{id:rv,doc:this.rootDoc}}addState(e,t=Ew,r=void 0,i=void 0,n=void 0,a=void 0,s=void 0,o=void 0){let l=e?.trim();if(!this.currentDocument.states.has(l))ee.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:iv,id:l,descriptions:[],type:t,doc:r,note:n,classes:[],styles:[],textStyles:[]});else{let u=this.currentDocument.states.get(l);if(!u)throw new Error(`State not found: ${l}`);u.doc||(u.doc=r),u.type||(u.type=t)}if(i&&(ee.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(h=>this.addDescription(l,h.trim()))),n){let u=this.currentDocument.states.get(l);if(!u)throw new Error(`State not found: ${l}`);u.note=n,u.note.text=ht.sanitizeText(u.note.text,we())}a&&(ee.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(h=>this.setCssClass(l,h.trim()))),s&&(ee.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(h=>this.setStyle(l,h.trim()))),o&&(ee.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(h=>this.setTextStyle(l,h.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:NAe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=DAe(),e||(this.links=new Map,fr())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){ee.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),ee.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===xs.START_NODE?(this.startEndCount++,`${xs.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",t=Ew){return e===xs.START_NODE?xs.START_TYPE:t}endIdIfNeeded(e=""){return e===xs.END_NODE?(this.startEndCount++,`${xs.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",t=Ew){return e===xs.END_NODE?xs.END_TYPE:t}addRelationObjs(e,t,r=""){let i=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(i,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:ht.sanitizeText(r,we())})}addRelation(e,t,r){if(typeof e=="object"&&typeof t=="object")this.addRelationObjs(e,t,r);else if(typeof e=="string"&&typeof t=="string"){let i=this.startIdIfNeeded(e.trim()),n=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),s=this.endTypeIfNeeded(t);this.addState(i,n),this.addState(a,s),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:r?ht.sanitizeText(r,we()):void 0})}}addDescription(e,t){let r=this.currentDocument.states.get(e),i=t.startsWith(":")?t.replace(":","").trim():t;r?.descriptions?.push(ht.sanitizeText(i,we()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let r=this.classes.get(e);t&&r&&t.split(xs.STYLECLASS_SEP).forEach(i=>{let n=i.replace(/([^;]*);/,"$1").trim();if(RegExp(xs.COLOR_KEYWORD).exec(i)){let s=n.replace(xs.FILL_KEYWORD,xs.BG_FILL).replace(xs.COLOR_KEYWORD,xs.FILL_KEYWORD);r.textStyles.push(s)}r.styles.push(n)})}getClasses(){return this.classes}setCssClass(e,t){e.split(",").forEach(r=>{let i=this.getState(r);if(!i){let n=r.trim();this.addState(n),i=this.getState(n)}i?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===AAe)}getDirection(){return this.getDirectionStatement()?.value??nxt}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:AAe,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=we();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:WAe(this.getRootDocV2())}}getConfig(){return we().state}},_xt=b(e=>` + ${Gu()} +`,"getStyles"),A7=hEt,fEt=v((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),dEt=v(function(e,t){return t.db.getClasses()},"getClasses"),pEt=v(async function(e,t,r,n){fe.info("REF0:"),fe.info("Drawing class diagram (v3)",t);let{securityLevel:i,state:a,layout:s}=ze();n.db.setDiagramId(t);let o=n.db.getData(),l=$l(t,i);o.type=n.type,o.layoutAlgorithm=Fu(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Ol(o,l);let u=8;ar.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Ao(l,u,"classDiagram",a?.useMaxWidth??!0)},"draw"),_7={getClasses:dEt,draw:pEt,getDir:fEt}});var qIe={};cr(qIe,{diagram:()=>gEt});var gEt,VIe=X(()=>{cY();qu();sl();_o();ko();al();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();gEt={parser:S7,get db(){return new E7},renderer:_7,styles:A7,init:v(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var WIe={};cr(WIe,{diagram:()=>mEt});var mEt,UIe=X(()=>{cY();qu();sl();_o();ko();al();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();mEt={parser:S7,get db(){return new E7},renderer:_7,styles:A7,init:v(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});function I7(e="",t=0,r="",n=pY){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${OEt}-${e}${i}-${t}`}function XC(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{let a=r.get(i);a&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...a.styles])}));let n=e.find(i=>i.id===t.id);n?Object.assign(n,t):e.push(t)}function hMe(e){return e?.classes?.join(" ")??""}function fMe(e){return e?.styles??[]}var fY,M7,yEt,JIe,HIe,Tx,bx,dY,vEt,xEt,bEt,KC,eMe,tMe,rMe,nMe,iMe,aMe,uY,hY,TEt,wEt,YIe,XIe,CEt,kEt,ZC,SEt,EEt,sMe,AEt,_Et,REt,LEt,IEt,MEt,DEt,NEt,oMe,lMe,OEt,pY,PEt,jIe,cMe,BEt,$Et,uMe,L7,Yp,FEt,KIe,jC,zEt,ro,ZIe,QIe,R7,Nf,GEt,D7,gY=X(()=>{sl();_o();ko();al();Ur();hr();ur();Yt();zr();gy();fY=(function(){var e=v(function($,G,q,z){for(q=q||{},z=$.length;z--;q[$[z]]=G);return q},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,33],d=[1,20],p=[1,21],g=[1,22],m=[1,23],y=[1,24],x=[1,26],b=[1,27],T=[1,28],k=[1,29],w=[1,30],C=[1,31],S=[1,32],E=[1,35],L=[1,36],N=[1,37],O=[1,38],R=[1,34],_=[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],D=[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],I=[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],M={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":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},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"},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]],performAction:v(function(G,q,z,V,j,ee,ne){var Q=ee.length-1;switch(j){case 3:return V.setRootDoc(ee[Q]),ee[Q];break;case 4:this.$=[];break;case 5:ee[Q]!="nl"&&(ee[Q-1].push(ee[Q]),this.$=ee[Q-1]);break;case 6:case 7:this.$=ee[Q];break;case 8:this.$="nl";break;case 12:this.$=ee[Q];break;case 13:let ce=ee[Q-1];ce.description=V.trimColon(ee[Q]),this.$=ce;break;case 14:this.$={stmt:"relation",state1:ee[Q-2],state2:ee[Q]};break;case 15:let ue=V.trimColon(ee[Q]);this.$={stmt:"relation",state1:ee[Q-3],state2:ee[Q-1],description:ue};break;case 19:this.$={stmt:"state",id:ee[Q-3],type:"default",description:"",doc:ee[Q-1]};break;case 20:var pe=ee[Q],te=ee[Q-2].trim();if(ee[Q].match(":")){var de=ee[Q].split(":");pe=de[0],te=[te,de[1]]}this.$={stmt:"state",id:pe,type:"default",description:te};break;case 21:this.$={stmt:"state",id:ee[Q-3],type:"default",description:ee[Q-5],doc:ee[Q-1]};break;case 22:this.$={stmt:"state",id:ee[Q],type:"fork"};break;case 23:this.$={stmt:"state",id:ee[Q],type:"join"};break;case 24:this.$={stmt:"state",id:ee[Q],type:"choice"};break;case 25:this.$={stmt:"state",id:V.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:ee[Q-1].trim(),note:{position:ee[Q-2].trim(),text:ee[Q].trim()}};break;case 29:this.$=ee[Q].trim(),V.setAccTitle(this.$);break;case 30:case 31:this.$=ee[Q].trim(),V.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:ee[Q-3],url:ee[Q-2],tooltip:ee[Q-1]};break;case 33:this.$={stmt:"click",id:ee[Q-3],url:ee[Q-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:ee[Q-1].trim(),classes:ee[Q].trim()};break;case 36:this.$={stmt:"style",id:ee[Q-1].trim(),styleClass:ee[Q].trim()};break;case 37:this.$={stmt:"applyClass",id:ee[Q-1].trim(),styleClass:ee[Q].trim()};break;case 38:V.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:V.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:V.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:V.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:ee[Q].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:ee[Q-2].trim(),classes:[ee[Q].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:ee[Q-2].trim(),classes:[ee[Q].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},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:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:x,35:b,37:T,38:k,41:w,45:C,48:S,51:E,52:L,53:N,54:O,57:R},e(_,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:x,35:b,37:T,38:k,41:w,45:C,48:S,51:E,52:L,53:N,54:O,57:R},e(_,[2,7]),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(_,[2,11]),e(_,[2,12],{14:[1,40],15:[1,41]}),e(_,[2,16]),{18:[1,42]},e(_,[2,18],{20:[1,43]}),{23:[1,44]},e(_,[2,22]),e(_,[2,23]),e(_,[2,24]),e(_,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(_,[2,28]),{34:[1,49]},{36:[1,50]},e(_,[2,31]),{13:51,24:f,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(D,[2,44],{58:[1,56]}),e(D,[2,45],{58:[1,57]}),e(_,[2,38]),e(_,[2,39]),e(_,[2,40]),e(_,[2,41]),e(_,[2,6]),e(_,[2,13]),{13:58,24:f,57:R},e(_,[2,17]),e(I,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(_,[2,29]),e(_,[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(_,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,72],22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:x,35:b,37:T,38:k,41:w,45:C,48:S,51:E,52:L,53:N,54:O,57:R},e(_,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(_,[2,34]),e(_,[2,35]),e(_,[2,36]),e(_,[2,37]),e(D,[2,46]),e(D,[2,47]),e(_,[2,15]),e(_,[2,19]),e(I,i,{7:78}),e(_,[2,26]),e(_,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,81],22:h,24:f,25:d,26:p,27:g,28:m,29:y,32:25,33:x,35:b,37:T,38:k,41:w,45:C,48:S,51:E,52:L,53:N,54:O,57:R},e(_,[2,32]),e(_,[2,33]),e(_,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:v(function(G,q){if(q.recoverable)this.trace(G);else{var z=new Error(G);throw z.hash=q,z}},"parseError"),parse:v(function(G){var q=this,z=[0],V=[],j=[null],ee=[],ne=this.table,Q="",pe=0,te=0,de=0,ce=2,ue=1,Re=ee.slice.call(arguments,1),ve=Object.create(this.lexer),Ge={yy:{}};for(var He in this.yy)Object.prototype.hasOwnProperty.call(this.yy,He)&&(Ge.yy[He]=this.yy[He]);ve.setInput(G,Ge.yy),Ge.yy.lexer=ve,Ge.yy.parser=this,typeof ve.yylloc>"u"&&(ve.yylloc={});var Ue=ve.yylloc;ee.push(Ue);var me=ve.options&&ve.options.ranges;typeof Ge.yy.parseError=="function"?this.parseError=Ge.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(K){z.length=z.length-2*K,j.length=j.length-K,ee.length=ee.length-K}v(De,"popStack");function Ie(){var K;return K=V.pop()||ve.lex()||ue,typeof K!="number"&&(K instanceof Array&&(V=K,K=V.pop()),K=q.symbols_[K]||K),K}v(Ie,"lex");for(var Me,re,le,oe,he,xe,se={},F,H,W,U;;){if(le=z[z.length-1],this.defaultActions[le]?oe=this.defaultActions[le]:((Me===null||typeof Me>"u")&&(Me=Ie()),oe=ne[le]&&ne[le][Me]),typeof oe>"u"||!oe.length||!oe[0]){var ae="";U=[];for(F in ne[le])this.terminals_[F]&&F>ce&&U.push("'"+this.terminals_[F]+"'");ve.showPosition?ae="Parse error on line "+(pe+1)+`: +`+ve.showPosition()+` +Expecting `+U.join(", ")+", got '"+(this.terminals_[Me]||Me)+"'":ae="Parse error on line "+(pe+1)+": Unexpected "+(Me==ue?"end of input":"'"+(this.terminals_[Me]||Me)+"'"),this.parseError(ae,{text:ve.match,token:this.terminals_[Me]||Me,line:ve.yylineno,loc:Ue,expected:U})}if(oe[0]instanceof Array&&oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+le+", token: "+Me);switch(oe[0]){case 1:z.push(Me),j.push(ve.yytext),ee.push(ve.yylloc),z.push(oe[1]),Me=null,re?(Me=re,re=null):(te=ve.yyleng,Q=ve.yytext,pe=ve.yylineno,Ue=ve.yylloc,de>0&&de--);break;case 2:if(H=this.productions_[oe[1]][1],se.$=j[j.length-H],se._$={first_line:ee[ee.length-(H||1)].first_line,last_line:ee[ee.length-1].last_line,first_column:ee[ee.length-(H||1)].first_column,last_column:ee[ee.length-1].last_column},me&&(se._$.range=[ee[ee.length-(H||1)].range[0],ee[ee.length-1].range[1]]),xe=this.performAction.apply(se,[Q,te,pe,Ge.yy,oe[1],j,ee].concat(Re)),typeof xe<"u")return xe;H&&(z=z.slice(0,-1*H*2),j=j.slice(0,-1*H),ee=ee.slice(0,-1*H)),z.push(this.productions_[oe[1]][0]),j.push(se.$),ee.push(se._$),W=ne[z[z.length-2]][z[z.length-1]],z.push(W);break;case 3:return!0}}return!0},"parse")},B=(function(){var $={EOF:1,parseError:v(function(q,z){if(this.yy.parser)this.yy.parser.parseError(q,z);else throw new Error(q)},"parseError"),setInput:v(function(G,q){return this.yy=q||this.yy||{},this._input=G,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var G=this._input[0];this.yytext+=G,this.yyleng++,this.offset++,this.match+=G,this.matched+=G;var q=G.match(/(?:\r\n?|\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),G},"input"),unput:v(function(G){var q=G.length,z=G.split(/(?:\r\n?|\n)/g);this._input=G+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;var V=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var j=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===V.length?this.yylloc.first_column:0)+V[V.length-z.length].length-z[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[j[0],j[0]+this.yyleng-q]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(G){this.unput(this.match.slice(G))},"less"),pastInput:v(function(){var G=this.matched.substr(0,this.matched.length-this.match.length);return(G.length>20?"...":"")+G.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var G=this.match;return G.length<20&&(G+=this._input.substr(0,20-G.length)),(G.substr(0,20)+(G.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var G=this.pastInput(),q=new Array(G.length+1).join("-");return G+this.upcomingInput()+` +`+q+"^"},"showPosition"),test_match:v(function(G,q){var z,V,j;if(this.options.backtrack_lexer&&(j={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(j.yylloc.range=this.yylloc.range.slice(0))),V=G[0].match(/(?:\r\n?|\n).*/g),V&&(this.yylineno+=V.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:V?V[V.length-1].length-V[V.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+G[0].length},this.yytext+=G[0],this.match+=G[0],this.matches=G,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(G[0].length),this.matched+=G[0],z=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var ee in j)this[ee]=j[ee];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var G,q,z,V;this._more||(this.yytext="",this.match="");for(var j=this._currentRules(),ee=0;eeq[0].length)){if(q=z,V=ee,this.options.backtrack_lexer){if(G=this.test_match(z,j[ee]),G!==!1)return G;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?(G=this.test_match(q,j[V]),G!==!1?G:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var q=this.next();return q||this.lex()},"lex"),begin:v(function(q){this.conditionStack.push(q)},"begin"),popState:v(function(){var q=this.conditionStack.length-1;return q>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},"topState"),pushState:v(function(q){this.begin(q)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(q,z,V,j){function ee(){let Q=z.yytext.indexOf("%%");if(Q===0)return!1;if(Q>0){let pe=z.yytext.slice(0,Q),te=z.yytext.slice(Q);te&&q.lexer.unput(te),z.yytext=pe}return!0}v(ee,"processId");var ne=j;switch(V){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!ee())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+z.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!ee())return;return this.popState(),"ID";break;case 66:if(!ee())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 68:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return ee()?24:void 0;case 74:return z.yytext=z.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),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,/^(?:[\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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/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]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return $})();M.lexer=B;function P(){this.yy={}}return v(P,"Parser"),P.prototype=M,M.Parser=P,new P})();fY.parser=fY;M7=fY,yEt="TB",JIe="TB",HIe="dir",Tx="state",bx="root",dY="relation",vEt="classDef",xEt="style",bEt="applyClass",KC="default",eMe="divider",tMe="fill:none",rMe="fill: #333",nMe="c",iMe="markdown",aMe="normal",uY="rect",hY="rectWithTitle",TEt="stateStart",wEt="stateEnd",YIe="divider",XIe="roundedWithTitle",CEt="note",kEt="noteGroup",ZC="statediagram",SEt="state",EEt=`${ZC}-${SEt}`,sMe="transition",AEt="note",_Et="note-edge",REt=`${sMe} ${_Et}`,LEt=`${ZC}-${AEt}`,IEt="cluster",MEt=`${ZC}-${IEt}`,DEt="cluster-alt",NEt=`${ZC}-${DEt}`,oMe="parent",lMe="note",OEt="state",pY="----",PEt=`${pY}${lMe}`,jIe=`${pY}${oMe}`,cMe=v((e,t=JIe)=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),BEt=v(function(e,t){return t.db.getClasses()},"getClasses"),$Et=v(async function(e,t,r,n){fe.info("REF0:"),fe.info("Drawing state diagram (v2)",t);let{securityLevel:i,state:a,layout:s}=ze();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=$l(t,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,ze().look==="neo"?o.markers=["barbNeo"]:o.markers=["barb"],o.diagramId=t,await Ol(o,l);let h=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((d,p)=>{let g=typeof p=="string"?p:typeof p?.id=="string"?p.id:"",m=o.nodes.find(w=>w.id===g);if(!g){fe.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(p));return}let y=l.node()?.querySelectorAll("g.node, g.rough-node"),x;if(y?.forEach(w=>{let C=w.textContent?.trim();(w.id===m?.domId||C===g)&&(x=w)}),!x){fe.warn("\u26A0\uFE0F Could not find node matching text:",g);return}let b=x.parentNode;if(!b){fe.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",g);return}let T=document.createElementNS("http://www.w3.org/2000/svg","a"),k=d.url.replace(/^"+|"+$/g,"");if(T.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",k),T.setAttribute("target","_blank"),d.tooltip){let w=d.tooltip.replace(/^"+|"+$/g,"");T.setAttribute("title",w),x.setAttribute("title",w)}b.replaceChild(T,x),T.appendChild(x),fe.info("\u{1F517} Wrapped node in tag for:",g,d.url)})}catch(f){fe.error("\u274C Error injecting clickable links:",f)}ar.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Ao(l,h,ZC,a?.useMaxWidth??!0)},"draw"),uMe={getClasses:BEt,draw:$Et,getDir:cMe},L7=new Map,Yp=0;v(I7,"stateDomId");FEt=v((e,t,r,n,i,a,s,o)=>{fe.trace("items",t),t.forEach(l=>{switch(l.stmt){case Tx:jC(e,l,r,n,i,a,s,o);break;case KC:jC(e,l,r,n,i,a,s,o);break;case dY:{jC(e,l.state1,r,n,i,a,s,o),jC(e,l.state2,r,n,i,a,s,o);let u=s==="neo",h={id:"edge"+Yp,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:u?"arrow_barb_neo":"arrow_barb",style:tMe,labelStyle:"",label:vt.sanitizeText(l.description??"",ze()),arrowheadStyle:rMe,labelpos:nMe,labelType:iMe,thickness:aMe,classes:sMe,look:s};i.push(h),Yp++}break}})},"setupDoc"),KIe=v((e,t=JIe)=>{let r=t;if(e.doc)for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");v(XC,"insertOrUpdateNode");v(hMe,"getClassesFromDbInfo");v(fMe,"getStylesFromDbInfo");jC=v((e,t,r,n,i,a,s,o)=>{let l=t.id,u=r.get(l),h=hMe(u),f=fMe(u),d=ze();if(fe.info("dataFetcher parsedItem",t,u,f),l!=="root"){let p=uY;t.start===!0?p=TEt:t.start===!1&&(p=wEt),t.type!==KC&&(p=t.type),L7.get(l)||L7.set(l,{id:l,shape:p,description:vt.sanitizeText(l,d),cssClasses:`${h} ${EEt}`,cssStyles:f});let g=L7.get(l);t.description&&(Array.isArray(g.description)?(g.shape=hY,g.description.push(t.description)):g.description?.length&&g.description.length>0?(g.shape=hY,g.description===l?g.description=[t.description]:g.description=[g.description,t.description]):(g.shape=uY,g.description=t.description),g.description=vt.sanitizeTextOrArray(g.description,d)),g.description?.length===1&&g.shape===hY&&(g.type==="group"?g.shape=XIe:g.shape=uY),!g.type&&t.doc&&(fe.info("Setting cluster for XCX",l,KIe(t)),g.type="group",g.isGroup=!0,g.dir=KIe(t),g.shape=t.type===eMe?YIe:XIe,g.cssClasses=`${g.cssClasses} ${MEt} ${a?NEt:""}`);let m={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:l,dir:g.dir,domId:I7(l,Yp),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:s,labelType:"markdown"};if(m.shape===YIe&&(m.label=""),e&&e.id!=="root"&&(fe.trace("Setting node ",l," to be child of its parent ",e.id),m.parentId=e.id),m.centerLabel=!0,t.note){let y={labelStyle:"",shape:CEt,label:t.note.text,labelType:"markdown",cssClasses:LEt,cssStyles:[],cssCompiledStyles:[],id:l+PEt+"-"+Yp,domId:I7(l,Yp,lMe),type:g.type,isGroup:g.type==="group",padding:d.flowchart?.padding,look:s,position:t.note.position},x=l+jIe,b={labelStyle:"",shape:kEt,label:t.note.text,cssClasses:g.cssClasses,cssStyles:[],id:l+jIe,domId:I7(l,Yp,oMe),type:"group",isGroup:!0,padding:16,look:s,position:t.note.position};Yp++,b.id=x,y.parentId=x,XC(n,b,o),XC(n,y,o),XC(n,m,o);let T=l,k=y.id;t.note.position==="left of"&&(T=y.id,k=l),i.push({id:T+"-"+k,start:T,end:k,arrowhead:"none",arrowTypeEnd:"",style:tMe,labelStyle:"",classes:REt,arrowheadStyle:rMe,labelpos:nMe,labelType:iMe,thickness:aMe,look:s})}else XC(n,m,o)}t.doc&&(fe.trace("Adding nodes children "),FEt(t,t.doc,r,n,i,!a,s,o))},"dataFetcher"),zEt=v(()=>{L7.clear(),Yp=0},"reset"),ro={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},ZIe=v(()=>new Map,"newClassesList"),QIe=v(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),R7=v(e=>JSON.parse(JSON.stringify(e)),"clone"),Nf=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ZIe(),this.documents={root:QIe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=Lr,this.setAccTitle=Ar,this.getAccDescription=Mr,this.setAccDescription=Ir,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,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),this.bindFunctions=this.bindFunctions.bind(this)}static{v(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let n of Array.isArray(e)?e:e.doc)switch(n.stmt){case Tx:this.addState(n.id.trim(),n.type,n.doc,n.description,n.note);break;case dY:this.addRelation(n.state1,n.state2,n.description);break;case vEt:this.addStyleClass(n.id.trim(),n.classes);break;case xEt:this.handleStyleDef(n);break;case bEt:this.setCssClass(n.id.trim(),n.styleClass);break;case"click":this.addLink(n.id,n.url,n.tooltip);break}let t=this.getStates(),r=ze();zEt(),jC(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,r.look,this.classes);for(let n of this.nodes)if(Array.isArray(n.label)){if(n.description=n.label.slice(1),n.isGroup&&n.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${n.id}]`);n.label=n.label[0]}}handleStyleDef(e){let t=e.id.trim().split(","),r=e.styleClass.split(",");for(let n of t){let i=this.getState(n);if(!i){let a=n.trim();this.addState(a),i=this.getState(a)}i&&(i.styles=r.map(a=>a.replace(/;/g,"")?.trim()))}}setRootDoc(e){fe.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,r){if(t.stmt===dY){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===Tx&&(t.id===ro.START_NODE?(t.id=e.id+(r?"_start":"_end"),t.start=r):t.id=t.id.trim()),t.stmt!==bx&&t.stmt!==Tx||!t.doc)return;let n=[],i=[];for(let a of t.doc)if(a.type===eMe){let s=R7(a);s.doc=R7(i),n.push(s),i=[]}else i.push(a);if(n.length>0&&i.length>0){let a={stmt:Tx,id:FD(),type:"divider",doc:R7(i)};n.push(R7(a)),t.doc=n}t.doc.forEach(a=>this.docTranslator(t,a,!0))}getRootDocV2(){return this.docTranslator({id:bx,stmt:bx},{id:bx,stmt:bx,doc:this.rootDoc},!0),{id:bx,doc:this.rootDoc}}addState(e,t=KC,r=void 0,n=void 0,i=void 0,a=void 0,s=void 0,o=void 0){let l=e?.trim();if(!this.currentDocument.states.has(l))fe.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:Tx,id:l,descriptions:[],type:t,doc:r,note:i,classes:[],styles:[],textStyles:[]});else{let u=this.currentDocument.states.get(l);if(!u)throw new Error(`State not found: ${l}`);u.doc||(u.doc=r),u.type||(u.type=t)}if(n&&(fe.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(h=>this.addDescription(l,h.trim()))),i){let u=this.currentDocument.states.get(l);if(!u)throw new Error(`State not found: ${l}`);u.note=i,u.note.text=vt.sanitizeText(u.note.text,ze())}a&&(fe.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(h=>this.setCssClass(l,h.trim()))),s&&(fe.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(h=>this.setStyle(l,h.trim()))),o&&(fe.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(h=>this.setTextStyle(l,h.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:QIe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ZIe(),e||(this.links=new Map,pr())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){fe.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),fe.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===ro.START_NODE?(this.startEndCount++,`${ro.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",t=KC){return e===ro.START_NODE?ro.START_TYPE:t}endIdIfNeeded(e=""){return e===ro.END_NODE?(this.startEndCount++,`${ro.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",t=KC){return e===ro.END_NODE?ro.END_TYPE:t}addRelationObjs(e,t,r=""){let n=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(n,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:vt.sanitizeText(r,ze())})}addRelation(e,t,r){if(typeof e=="object"&&typeof t=="object")this.addRelationObjs(e,t,r);else if(typeof e=="string"&&typeof t=="string"){let n=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),s=this.endTypeIfNeeded(t);this.addState(n,i),this.addState(a,s),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:r?vt.sanitizeText(r,ze()):void 0})}}addDescription(e,t){let r=this.currentDocument.states.get(e),n=t.startsWith(":")?t.replace(":","").trim():t;r?.descriptions?.push(vt.sanitizeText(n,ze()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let r=this.classes.get(e);t&&r&&t.split(ro.STYLECLASS_SEP).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(ro.COLOR_KEYWORD).exec(n)){let s=i.replace(ro.FILL_KEYWORD,ro.BG_FILL).replace(ro.COLOR_KEYWORD,ro.FILL_KEYWORD);r.textStyles.push(s)}r.styles.push(i)})}getClasses(){return this.classes}setupToolTips(e){let t=dv();ct(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",i=>{let a=ct(i.currentTarget),s=a.attr("title");if(s===null)return;let o=i.currentTarget?.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.style("left",window.scrollX+o.left+(o.right-o.left)/2+"px").style("top",window.scrollY+o.bottom+"px"),t.html(co.sanitize(s)),a.classed("hover",!0)}).on("mouseout",i=>{t.transition().duration(500).style("opacity",0),ct(i.currentTarget).classed("hover",!1)})}setCssClass(e,t){e.split(",").forEach(r=>{let n=this.getState(r);if(!n){let i=r.trim();this.addState(i),n=this.getState(i)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===HIe)}getDirection(){return this.getDirectionStatement()?.value??yEt}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:HIe,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=ze();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:cMe(this.getRootDocV2())}}getConfig(){return ze().state}},GEt=v(e=>` defs [id$="-barbEnd"] { fill: ${e.transitionColor}; stroke: ${e.transitionColor}; @@ -2417,12 +2491,12 @@ g.stateGroup line { ry: ${e.radius}px; filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${e.svgId}-drop-shadow)`):"none"} } -`,"getStyles"),U_=_xt});var ZAe={};Lr(ZAe,{diagram:()=>Wxt});var Lxt,Rxt,Ixt,Dxt,Nxt,Mxt,Oxt,Pxt,Bxt,jAe,XAe,Fxt,So,Jq,$xt,zxt,Gxt,qxt,KAe,Vxt,Wxt,QAe=q(()=>{Qq();Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();Ar();zN();Wo();Ar();Lxt=b(e=>e.append("circle").attr("class","start-state").attr("r",we().state.sizeUnit).attr("cx",we().state.padding+we().state.sizeUnit).attr("cy",we().state.padding+we().state.sizeUnit),"drawStartState"),Rxt=b(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",we().state.textHeight).attr("class","divider").attr("x2",we().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Ixt=b((e,t)=>{let r=e.append("text").attr("x",2*we().state.padding).attr("y",we().state.textHeight+2*we().state.padding).attr("font-size",we().state.fontSize).attr("class","state-title").text(t.id),i=r.node().getBBox();return e.insert("rect",":first-child").attr("x",we().state.padding).attr("y",we().state.padding).attr("width",i.width+2*we().state.padding).attr("height",i.height+2*we().state.padding).attr("rx",we().state.radius),r},"drawSimpleState"),Dxt=b((e,t)=>{let r=b(function(d,p,g){let m=d.append("tspan").attr("x",2*we().state.padding).text(p);g||m.attr("dy",we().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*we().state.padding).attr("y",we().state.textHeight+1.3*we().state.padding).attr("font-size",we().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),a=n.height,s=e.append("text").attr("x",we().state.padding).attr("y",a+we().state.padding*.4+we().state.dividerMargin+we().state.textHeight).attr("class","state-description"),o=!0,l=!0;t.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=e.append("line").attr("x1",we().state.padding).attr("y1",we().state.padding+a+we().state.dividerMargin/2).attr("y2",we().state.padding+a+we().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,n.width);return u.attr("x2",f+3*we().state.padding),e.insert("rect",":first-child").attr("x",we().state.padding).attr("y",we().state.padding).attr("width",f+2*we().state.padding).attr("height",h.height+a+2*we().state.padding).attr("rx",we().state.radius),e},"drawDescrState"),Nxt=b((e,t,r)=>{let i=we().state.padding,n=2*we().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",we().state.titleShift).attr("font-size",we().state.fontSize).attr("class","state-title").text(t.id),h=l.node().getBBox().width+n,f=Math.max(h,s);f===s&&(f=f+n);let d,p=e.node().getBBox();t.doc,d=o-i,h>s&&(d=(s-f)/2+i),Math.abs(o-p.x)s&&(d=o-(h-s)/2);let g=1-we().state.textHeight;return e.insert("rect",":first-child").attr("x",d).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+we().state.textHeight+we().state.titleShift+1).attr("rx","0"),l.attr("x",d+i),h<=s&&l.attr("x",o+(f-n)/2-h/2+i),e.insert("rect",":first-child").attr("x",d).attr("y",we().state.titleShift-we().state.textHeight-we().state.padding).attr("width",f).attr("height",we().state.textHeight*3).attr("rx",we().state.radius),e.insert("rect",":first-child").attr("x",d).attr("y",we().state.titleShift-we().state.textHeight-we().state.padding).attr("width",f).attr("height",p.height+3+2*we().state.textHeight).attr("rx",we().state.radius),e},"addTitleAndBox"),Mxt=b(e=>(e.append("circle").attr("class","end-state-outer").attr("r",we().state.sizeUnit+we().state.miniPadding).attr("cx",we().state.padding+we().state.sizeUnit+we().state.miniPadding).attr("cy",we().state.padding+we().state.sizeUnit+we().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",we().state.sizeUnit).attr("cx",we().state.padding+we().state.sizeUnit+2).attr("cy",we().state.padding+we().state.sizeUnit+2)),"drawEndState"),Oxt=b((e,t)=>{let r=we().state.forkWidth,i=we().state.forkHeight;if(t.parentId){let n=r;r=i,i=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",we().state.padding).attr("y",we().state.padding)},"drawForkJoinState"),Pxt=b((e,t,r,i)=>{let n=0,a=i.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=e.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let o=s.split(ht.lineBreakRegex),l=1.25*we().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=a.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}n+=l,f.attr("x",t+we().state.noteMargin),f.attr("y",r+n+1.25*we().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),Bxt=b((e,t)=>{t.attr("class","state-note");let r=t.append("rect").attr("x",0).attr("y",we().state.padding),i=t.append("g"),{textWidth:n,textHeight:a}=Pxt(e,0,0,i);return r.attr("height",a+2*we().state.noteMargin),r.attr("width",n+we().state.noteMargin*2),r},"drawNote"),jAe=b(function(e,t){let r=t.id,i={id:r,label:t.id,width:0,height:0},n=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&Lxt(n),t.type==="end"&&Mxt(n),(t.type==="fork"||t.type==="join")&&Oxt(n,t),t.type==="note"&&Bxt(t.note.text,n),t.type==="divider"&&Rxt(n),t.type==="default"&&t.descriptions.length===0&&Ixt(n,t),t.type==="default"&&t.descriptions.length>0&&Dxt(n,t);let a=n.node().getBBox();return i.width=a.width+2*we().state.padding,i.height=a.height+2*we().state.padding,i},"drawState"),XAe=0,Fxt=b(function(e,t,r){let i=b(function(l){switch(l){case Kh.relationType.AGGREGATION:return"aggregation";case Kh.relationType.EXTENSION:return"extension";case Kh.relationType.COMPOSITION:return"composition";case Kh.relationType.DEPENDENCY:return"dependency"}},"getRelationType");t.points=t.points.filter(l=>!Number.isNaN(l.y));let n=t.points,a=Ic().x(function(l){return l.x}).y(function(l){return l.y}).curve(Dc),s=e.append("path").attr("d",a(n)).attr("id","edge"+XAe).attr("class","transition"),o="";if(we().state.arrowMarkerAbsolute&&(o=Tp(!0)),s.attr("marker-end","url("+o+"#"+i(Kh.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=e.append("g").attr("class","stateLabel"),{x:u,y:h}=jt.calcLabelPosition(t.points),f=ht.getRows(r.title),d=0,p=[],g=0,m=0;for(let x=0;x<=f.length;x++){let T=l.append("text").attr("text-anchor","middle").text(f[x]).attr("x",u).attr("y",h+d),C=T.node().getBBox();g=Math.max(g,C.width),m=Math.min(m,C.x),ee.info(C.x,u,h+d),d===0&&(d=T.node().getBBox().height,ee.info("Title height",d,h)),p.push(T)}let y=d*f.length;if(f.length>1){let x=(f.length-1)*d*.5;p.forEach((T,C)=>T.attr("y",h+C*d-x)),y=d*f.length}let v=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-g/2-we().state.padding/2).attr("y",h-y/2-we().state.padding/2-3.5).attr("width",g+we().state.padding).attr("height",y+we().state.padding),ee.info(v)}XAe++},"drawEdge"),Jq={},$xt=b(function(){},"setConf"),zxt=b(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Gxt=b(function(e,t,r,i){So=we().state;let n=we().securityLevel,a;n==="sandbox"&&(a=Qe("#i"+t));let s=n==="sandbox"?Qe(a.nodes()[0].contentDocument.body):Qe("body"),o=n==="sandbox"?a.nodes()[0].contentDocument:document;ee.debug("Rendering diagram "+e);let l=s.select(`[id='${t}']`);zxt(l);let u=i.db.getRootDoc(),h=l.append("g").attr("id",t+"-root");KAe(u,h,void 0,!1,s,o,i);let f=So.padding,d=l.node().getBBox(),p=d.width+f*2,g=d.height+f*2,m=p*1.75;Mr(l,g,m,So.useMaxWidth),l.attr("viewBox",`${d.x-So.padding} ${d.y-So.padding} `+p+" "+g)},"draw"),qxt=b(e=>e?e.length*So.fontSizeFactor:1,"getLabelWidth"),KAe=b((e,t,r,i,n,a,s)=>{let o=new ui({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let w=C.parentElement,k=0,E=0;w&&(w.parentElement&&(k=w.parentElement.getBBox().width),E=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(E)&&(E=0)),C.setAttribute("x1",0-E+8),C.setAttribute("x2",k-E-8)})):ee.debug("No Node "+x+": "+JSON.stringify(o.node(x)))});let y=m.getBBox();o.edges().forEach(function(x){x!==void 0&&o.edge(x)!==void 0&&(ee.debug("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(o.edge(x))),Fxt(t,o.edge(x),o.edge(x).relation))}),y=m.getBBox();let v={id:r||"root",label:r||"root",width:0,height:0};return v.width=y.width+2*So.padding,v.height=y.height+2*So.padding,ee.debug("Doc rendered",v,o),v},"renderDoc"),Vxt={setConf:$xt,draw:Gxt},Wxt={parser:W_,get db(){return new Kh(1)},renderer:Vxt,styles:U_,init:b(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var JAe={};Lr(JAe,{diagram:()=>Uxt});var Uxt,e_e=q(()=>{Qq();Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();Uxt={parser:W_,get db(){return new Kh(2)},renderer:UAe,styles:U_,init:b(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var c_e={};Lr(c_e,{diagram:()=>fTt});function l_e(e){let t=we().journey,r=t.maxLabelWidth;H_=0;let i=60;Object.keys(Zh).forEach(n=>{let a=Zh[n].color,s={cx:20,cy:i,r:7,fill:a,stroke:"#000",pos:Zh[n].position};Rw.drawCircle(e,s);let o=e.append("text").attr("visibility","hidden").text(n),l=o.node().getBoundingClientRect().width;o.remove();let u=[];if(l<=r)u=[n];else{let h=n.split(" "),f="";o=e.append("text").attr("visibility","hidden"),h.forEach(d=>{let p=f?`${f} ${d}`:d;if(o.text(p),o.node().getBoundingClientRect().width>r){if(f&&u.push(f),f=d,o.text(d),o.node().getBoundingClientRect().width>r){let m="";for(let y of d)m+=y,o.text(m+"-"),o.node().getBoundingClientRect().width>r&&(u.push(m.slice(0,-1)+"-"),m=y);f=m}}else f=p}),f&&u.push(f),o.remove()}u.forEach((h,f)=>{let d={x:40,y:i+7+f*20,fill:"#666",text:h,textMargin:t.boxTextMargin??5},g=Rw.drawText(e,d).node().getBoundingClientRect().width;g>H_&&g>t.leftMargin-g&&(H_=g)}),i+=Math.max(20,u.length*20)})}var tV,Hxt,nv,iV,_w,Lw,Yxt,jxt,Xxt,Kxt,Zxt,Qxt,Jxt,t_e,eTt,r_e,tTt,rTt,nV,iTt,a_e,s_e,nTt,aTt,rV,sTt,oTt,o_e,lTt,Rw,cTt,Zh,H_,Zl,tp,uTt,dl,eV,i_e,hTt,n_e,fTt,u_e=q(()=>{Ld();Ed();Er();er();Ar();Ar();tV=(function(){var e=b(function(f,d,p,g){for(p=p||{},g=f.length;g--;p[f[g]]=d);return p},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],n=[1,11],a=[1,12],s=[1,13],o=[1,14],l={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:b(function(d,p,g,m,y,v,x){var T=v.length-1;switch(y){case 1:return v[T-1];case 2:this.$=[];break;case 3:v[T-1].push(v[T]),this.$=v[T-1];break;case 4:case 5:this.$=v[T];break;case 6:case 7:this.$=[];break;case 8:m.setDiagramTitle(v[T].substr(6)),this.$=v[T].substr(6);break;case 9:this.$=v[T].trim(),m.setAccTitle(this.$);break;case 10:case 11:this.$=v[T].trim(),m.setAccDescription(this.$);break;case 12:m.addSection(v[T].substr(8)),this.$=v[T].substr(8);break;case 13:m.addTask(v[T-1],v[T]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:n,16:a,17:s,18:o},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:i,14:n,16:a,17:s,18:o},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:b(function(d,p){if(p.recoverable)this.trace(d);else{var g=new Error(d);throw g.hash=p,g}},"parseError"),parse:b(function(d){var p=this,g=[0],m=[],y=[null],v=[],x=this.table,T="",C=0,w=0,k=0,E=2,A=1,N=v.slice.call(arguments,1),P=Object.create(this.lexer),O={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(O.yy[L]=this.yy[L]);P.setInput(d,O.yy),O.yy.lexer=P,O.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var _=P.yylloc;v.push(_);var R=P.options&&P.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(J){g.length=g.length-2*J,y.length=y.length-J,v.length=v.length-J}b(D,"popStack");function I(){var J;return J=m.pop()||P.lex()||A,typeof J!="number"&&(J instanceof Array&&(m=J,J=m.pop()),J=p.symbols_[J]||J),J}b(I,"lex");for(var B,M,F,z,$,G,U={},j,H,Q,Y;;){if(F=g[g.length-1],this.defaultActions[F]?z=this.defaultActions[F]:((B===null||typeof B>"u")&&(B=I()),z=x[F]&&x[F][B]),typeof z>"u"||!z.length||!z[0]){var se="";Y=[];for(j in x[F])this.terminals_[j]&&j>E&&Y.push("'"+this.terminals_[j]+"'");P.showPosition?se="Parse error on line "+(C+1)+`: -`+P.showPosition()+` -Expecting `+Y.join(", ")+", got '"+(this.terminals_[B]||B)+"'":se="Parse error on line "+(C+1)+": Unexpected "+(B==A?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(se,{text:P.match,token:this.terminals_[B]||B,line:P.yylineno,loc:_,expected:Y})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+B);switch(z[0]){case 1:g.push(B),y.push(P.yytext),v.push(P.yylloc),g.push(z[1]),B=null,M?(B=M,M=null):(w=P.yyleng,T=P.yytext,C=P.yylineno,_=P.yylloc,k>0&&k--);break;case 2:if(H=this.productions_[z[1]][1],U.$=y[y.length-H],U._$={first_line:v[v.length-(H||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(H||1)].first_column,last_column:v[v.length-1].last_column},R&&(U._$.range=[v[v.length-(H||1)].range[0],v[v.length-1].range[1]]),G=this.performAction.apply(U,[T,w,C,O.yy,z[1],y,v].concat(N)),typeof G<"u")return G;H&&(g=g.slice(0,-1*H*2),y=y.slice(0,-1*H),v=v.slice(0,-1*H)),g.push(this.productions_[z[1]][0]),y.push(U.$),v.push(U._$),Q=x[g[g.length-2]][g[g.length-1]],g.push(Q);break;case 3:return!0}}return!0},"parse")},u=(function(){var f={EOF:1,parseError:b(function(p,g){if(this.yy.parser)this.yy.parser.parseError(p,g);else throw new Error(p)},"parseError"),setInput:b(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:b(function(d){var p=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var m=this.match.split(/(?:\r\n?|\n)/g);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);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===m.length?this.yylloc.first_column:0)+m[m.length-g.length].length-g[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(d){this.unput(this.match.slice(d))},"less"),pastInput:b(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+` -`+p+"^"},"showPosition"),test_match:b(function(d,p){var g,m,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),m=d[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,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(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var v in y)this[v]=y[v];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,g,m;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),v=0;vp[0].length)){if(p=g,m=v,this.options.backtrack_lexer){if(d=this.test_match(g,y[v]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,y[m]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var p=this.next();return p||this.lex()},"lex"),begin:b(function(p){this.conditionStack.push(p)},"begin"),popState:b(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:b(function(p){this.begin(p)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(p,g,m,y){var v=y;switch(m){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),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],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}}};return f})();l.lexer=u;function h(){this.yy={}}return b(h,"Parser"),h.prototype=l,l.Parser=h,new h})();tV.parser=tV;Hxt=tV,nv="",iV=[],_w=[],Lw=[],Yxt=b(function(){iV.length=0,_w.length=0,nv="",Lw.length=0,fr()},"clear"),jxt=b(function(e){nv=e,iV.push(e)},"addSection"),Xxt=b(function(){return iV},"getSections"),Kxt=b(function(){let e=t_e(),t=100,r=0;for(;!e&&r{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},"updateActors"),Qxt=b(function(e,t){let r=t.substr(1).split(":"),i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));let a=n.map(o=>o.trim()),s={section:nv,type:nv,people:a,task:e,score:i};Lw.push(s)},"addTask"),Jxt=b(function(e){let t={section:nv,type:nv,description:e,task:e,classes:[]};_w.push(t)},"addTaskOrg"),t_e=b(function(){let e=b(function(r){return Lw[r].processed},"compileTask"),t=!0;for(let[r,i]of Lw.entries())e(r),t=t&&i.processed;return t},"compileTasks"),eTt=b(function(){return Zxt()},"getActors"),r_e={getConfig:b(()=>we().journey,"getConfig"),clear:Yxt,setDiagramTitle:kr,getDiagramTitle:Tr,setAccTitle:yr,getAccTitle:vr,setAccDescription:br,getAccDescription:xr,addSection:jxt,getSections:Xxt,getTasks:Kxt,addTask:Qxt,addTaskOrg:Jxt,getActors:eTt},tTt=b(e=>`.label { +`,"getStyles"),D7=GEt});var mMe={};cr(mMe,{diagram:()=>n5t});var qEt,VEt,WEt,UEt,HEt,YEt,XEt,jEt,KEt,dMe,pMe,ZEt,ml,mY,QEt,JEt,e5t,t5t,gMe,r5t,n5t,yMe=X(()=>{gY();sl();_o();ko();al();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();zr();nP();rl();zr();qEt=v(e=>e.append("circle").attr("class","start-state").attr("r",ze().state.sizeUnit).attr("cx",ze().state.padding+ze().state.sizeUnit).attr("cy",ze().state.padding+ze().state.sizeUnit),"drawStartState"),VEt=v(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",ze().state.textHeight).attr("class","divider").attr("x2",ze().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),WEt=v((e,t)=>{let r=e.append("text").attr("x",2*ze().state.padding).attr("y",ze().state.textHeight+2*ze().state.padding).attr("font-size",ze().state.fontSize).attr("class","state-title").text(t.id),n=r.node().getBBox();return e.insert("rect",":first-child").attr("x",ze().state.padding).attr("y",ze().state.padding).attr("width",n.width+2*ze().state.padding).attr("height",n.height+2*ze().state.padding).attr("rx",ze().state.radius),r},"drawSimpleState"),UEt=v((e,t)=>{let r=v(function(d,p,g){let m=d.append("tspan").attr("x",2*ze().state.padding).text(p);g||m.attr("dy",ze().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*ze().state.padding).attr("y",ze().state.textHeight+1.3*ze().state.padding).attr("font-size",ze().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),a=i.height,s=e.append("text").attr("x",ze().state.padding).attr("y",a+ze().state.padding*.4+ze().state.dividerMargin+ze().state.textHeight).attr("class","state-description"),o=!0,l=!0;t.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=e.append("line").attr("x1",ze().state.padding).attr("y1",ze().state.padding+a+ze().state.dividerMargin/2).attr("y2",ze().state.padding+a+ze().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,i.width);return u.attr("x2",f+3*ze().state.padding),e.insert("rect",":first-child").attr("x",ze().state.padding).attr("y",ze().state.padding).attr("width",f+2*ze().state.padding).attr("height",h.height+a+2*ze().state.padding).attr("rx",ze().state.radius),e},"drawDescrState"),HEt=v((e,t,r)=>{let n=ze().state.padding,i=2*ze().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",ze().state.titleShift).attr("font-size",ze().state.fontSize).attr("class","state-title").text(t.id),h=l.node().getBBox().width+i,f=Math.max(h,s);f===s&&(f=f+i);let d,p=e.node().getBBox();t.doc,d=o-n,h>s&&(d=(s-f)/2+n),Math.abs(o-p.x)s&&(d=o-(h-s)/2);let g=1-ze().state.textHeight;return e.insert("rect",":first-child").attr("x",d).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+ze().state.textHeight+ze().state.titleShift+1).attr("rx","0"),l.attr("x",d+n),h<=s&&l.attr("x",o+(f-i)/2-h/2+n),e.insert("rect",":first-child").attr("x",d).attr("y",ze().state.titleShift-ze().state.textHeight-ze().state.padding).attr("width",f).attr("height",ze().state.textHeight*3).attr("rx",ze().state.radius),e.insert("rect",":first-child").attr("x",d).attr("y",ze().state.titleShift-ze().state.textHeight-ze().state.padding).attr("width",f).attr("height",p.height+3+2*ze().state.textHeight).attr("rx",ze().state.radius),e},"addTitleAndBox"),YEt=v(e=>(e.append("circle").attr("class","end-state-outer").attr("r",ze().state.sizeUnit+ze().state.miniPadding).attr("cx",ze().state.padding+ze().state.sizeUnit+ze().state.miniPadding).attr("cy",ze().state.padding+ze().state.sizeUnit+ze().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",ze().state.sizeUnit).attr("cx",ze().state.padding+ze().state.sizeUnit+2).attr("cy",ze().state.padding+ze().state.sizeUnit+2)),"drawEndState"),XEt=v((e,t)=>{let r=ze().state.forkWidth,n=ze().state.forkHeight;if(t.parentId){let i=r;r=n,n=i}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",ze().state.padding).attr("y",ze().state.padding)},"drawForkJoinState"),jEt=v((e,t,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=e.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let o=s.split(vt.lineBreakRegex),l=1.25*ze().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=a.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}i+=l,f.attr("x",t+ze().state.noteMargin),f.attr("y",r+i+1.25*ze().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),KEt=v((e,t)=>{t.attr("class","state-note");let r=t.append("rect").attr("x",0).attr("y",ze().state.padding),n=t.append("g"),{textWidth:i,textHeight:a}=jEt(e,0,0,n);return r.attr("height",a+2*ze().state.noteMargin),r.attr("width",i+ze().state.noteMargin*2),r},"drawNote"),dMe=v(function(e,t){let r=t.id,n={id:r,label:t.id,width:0,height:0},i=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&qEt(i),t.type==="end"&&YEt(i),(t.type==="fork"||t.type==="join")&&XEt(i,t),t.type==="note"&&KEt(t.note.text,i),t.type==="divider"&&VEt(i),t.type==="default"&&t.descriptions.length===0&&WEt(i,t),t.type==="default"&&t.descriptions.length>0&&UEt(i,t);let a=i.node().getBBox();return n.width=a.width+2*ze().state.padding,n.height=a.height+2*ze().state.padding,n},"drawState"),pMe=0,ZEt=v(function(e,t,r){let n=v(function(l){switch(l){case Nf.relationType.AGGREGATION:return"aggregation";case Nf.relationType.EXTENSION:return"extension";case Nf.relationType.COMPOSITION:return"composition";case Nf.relationType.DEPENDENCY:return"dependency"}},"getRelationType");t.points=t.points.filter(l=>!Number.isNaN(l.y));let i=t.points,a=dd().x(function(l){return l.x}).y(function(l){return l.y}).curve(pd),s=e.append("path").attr("d",a(i)).attr("id","edge"+pMe).attr("class","transition"),o="";if(ze().state.arrowMarkerAbsolute&&(o=bb(!0)),s.attr("marker-end","url("+o+"#"+n(Nf.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=e.append("g").attr("class","stateLabel"),{x:u,y:h}=ar.calcLabelPosition(t.points),f=vt.getRows(r.title),d=0,p=[],g=0,m=0;for(let b=0;b<=f.length;b++){let T=l.append("text").attr("text-anchor","middle").text(f[b]).attr("x",u).attr("y",h+d),k=T.node().getBBox();g=Math.max(g,k.width),m=Math.min(m,k.x),fe.info(k.x,u,h+d),d===0&&(d=T.node().getBBox().height,fe.info("Title height",d,h)),p.push(T)}let y=d*f.length;if(f.length>1){let b=(f.length-1)*d*.5;p.forEach((T,k)=>T.attr("y",h+k*d-b)),y=d*f.length}let x=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-g/2-ze().state.padding/2).attr("y",h-y/2-ze().state.padding/2-3.5).attr("width",g+ze().state.padding).attr("height",y+ze().state.padding),fe.info(x)}pMe++},"drawEdge"),mY={},QEt=v(function(){},"setConf"),JEt=v(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),e5t=v(function(e,t,r,n){ml=ze().state;let i=ze().securityLevel,a;i==="sandbox"&&(a=ct("#i"+t));let s=i==="sandbox"?ct(a.nodes()[0].contentDocument.body):ct("body"),o=i==="sandbox"?a.nodes()[0].contentDocument:document;fe.debug("Rendering diagram "+e);let l=s.select(`[id='${t}']`);JEt(l);let u=n.db.getRootDoc(),h=l.append("g").attr("id",t+"-root");gMe(u,h,void 0,!1,s,o,n);let f=ml.padding,d=l.node().getBBox(),p=d.width+f*2,g=d.height+f*2,m=p*1.75;Vr(l,g,m,ml.useMaxWidth),l.attr("viewBox",`${d.x-ml.padding} ${d.y-ml.padding} `+p+" "+g)},"draw"),t5t=v(e=>e?e.length*ml.fontSizeFactor:1,"getLabelWidth"),gMe=v((e,t,r,n,i,a,s)=>{let o=new Rn({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let w=k.parentElement,C=0,S=0;w&&(w.parentElement&&(C=w.parentElement.getBBox().width),S=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(S)&&(S=0)),k.setAttribute("x1",0-S+8),k.setAttribute("x2",C-S-8)})):fe.debug("No Node "+b+": "+JSON.stringify(o.node(b)))});let y=m.getBBox();o.edges().forEach(function(b){b!==void 0&&o.edge(b)!==void 0&&(fe.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(o.edge(b))),ZEt(t,o.edge(b),o.edge(b).relation))}),y=m.getBBox();let x={id:r||"root",label:r||"root",width:0,height:0};return x.width=y.width+2*ml.padding,x.height=y.height+2*ml.padding,fe.debug("Doc rendered",x,o),x},"renderDoc"),r5t={setConf:QEt,draw:e5t},n5t={parser:M7,get db(){return new Nf(1)},renderer:r5t,styles:D7,init:v(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var vMe={};cr(vMe,{diagram:()=>i5t});var i5t,xMe=X(()=>{gY();sl();_o();ko();al();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();i5t={parser:M7,get db(){return new Nf(2)},renderer:uMe,styles:D7,init:v(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var _Me={};cr(_Me,{diagram:()=>S5t});function AMe(e){let t=ze().journey,r=t.maxLabelWidth;N7=0;let n=60;Object.keys(Of).forEach(i=>{let a=Of[i].color,s={cx:20,cy:n,r:7,fill:a,stroke:"#000",pos:Of[i].position};ek.drawCircle(e,s);let o=e.append("text").attr("visibility","hidden").text(i),l=o.node().getBoundingClientRect().width;o.remove();let u=[];if(l<=r)u=[i];else{let h=i.split(" "),f="";o=e.append("text").attr("visibility","hidden"),h.forEach(d=>{let p=f?`${f} ${d}`:d;if(o.text(p),o.node().getBoundingClientRect().width>r){if(f&&u.push(f),f=d,o.text(d),o.node().getBoundingClientRect().width>r){let m="";for(let y of d)m+=y,o.text(m+"-"),o.node().getBoundingClientRect().width>r&&(u.push(m.slice(0,-1)+"-"),m=y);f=m}}else f=p}),f&&u.push(f),o.remove()}u.forEach((h,f)=>{let d={x:40,y:n+7+f*20,fill:"#666",text:h,textMargin:t.boxTextMargin??5},g=ek.drawText(e,d).node().getBoundingClientRect().width;g>N7&&g>t.leftMargin-g&&(N7=g)}),n+=Math.max(20,u.length*20)})}var vY,a5t,wx,bY,QC,JC,s5t,o5t,l5t,c5t,u5t,h5t,f5t,bMe,d5t,TMe,p5t,g5t,TY,m5t,kMe,SMe,y5t,v5t,xY,x5t,b5t,EMe,T5t,ek,w5t,Of,N7,Ic,Xp,C5t,Ul,yY,wMe,k5t,CMe,S5t,RMe=X(()=>{qu();al();hr();ur();Yt();zr();zr();vY=(function(){var e=v(function(f,d,p,g){for(p=p||{},g=f.length;g--;p[f[g]]=d);return p},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,14],l={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:v(function(d,p,g,m,y,x,b){var T=x.length-1;switch(y){case 1:return x[T-1];case 2:this.$=[];break;case 3:x[T-1].push(x[T]),this.$=x[T-1];break;case 4:case 5:this.$=x[T];break;case 6:case 7:this.$=[];break;case 8:m.setDiagramTitle(x[T].substr(6)),this.$=x[T].substr(6);break;case 9:this.$=x[T].trim(),m.setAccTitle(this.$);break;case 10:case 11:this.$=x[T].trim(),m.setAccDescription(this.$);break;case 12:m.addSection(x[T].substr(8)),this.$=x[T].substr(8);break;case 13:m.addTask(x[T-1],x[T]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:o},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:o},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:v(function(d,p){if(p.recoverable)this.trace(d);else{var g=new Error(d);throw g.hash=p,g}},"parseError"),parse:v(function(d){var p=this,g=[0],m=[],y=[null],x=[],b=this.table,T="",k=0,w=0,C=0,S=2,E=1,L=x.slice.call(arguments,1),N=Object.create(this.lexer),O={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(O.yy[R]=this.yy[R]);N.setInput(d,O.yy),O.yy.lexer=N,O.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var _=N.yylloc;x.push(_);var D=N.options&&N.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(te){g.length=g.length-2*te,y.length=y.length-te,x.length=x.length-te}v(I,"popStack");function M(){var te;return te=m.pop()||N.lex()||E,typeof te!="number"&&(te instanceof Array&&(m=te,te=m.pop()),te=p.symbols_[te]||te),te}v(M,"lex");for(var B,P,$,G,q,z,V={},j,ee,ne,Q;;){if($=g[g.length-1],this.defaultActions[$]?G=this.defaultActions[$]:((B===null||typeof B>"u")&&(B=M()),G=b[$]&&b[$][B]),typeof G>"u"||!G.length||!G[0]){var pe="";Q=[];for(j in b[$])this.terminals_[j]&&j>S&&Q.push("'"+this.terminals_[j]+"'");N.showPosition?pe="Parse error on line "+(k+1)+`: +`+N.showPosition()+` +Expecting `+Q.join(", ")+", got '"+(this.terminals_[B]||B)+"'":pe="Parse error on line "+(k+1)+": Unexpected "+(B==E?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(pe,{text:N.match,token:this.terminals_[B]||B,line:N.yylineno,loc:_,expected:Q})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+B);switch(G[0]){case 1:g.push(B),y.push(N.yytext),x.push(N.yylloc),g.push(G[1]),B=null,P?(B=P,P=null):(w=N.yyleng,T=N.yytext,k=N.yylineno,_=N.yylloc,C>0&&C--);break;case 2:if(ee=this.productions_[G[1]][1],V.$=y[y.length-ee],V._$={first_line:x[x.length-(ee||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(ee||1)].first_column,last_column:x[x.length-1].last_column},D&&(V._$.range=[x[x.length-(ee||1)].range[0],x[x.length-1].range[1]]),z=this.performAction.apply(V,[T,w,k,O.yy,G[1],y,x].concat(L)),typeof z<"u")return z;ee&&(g=g.slice(0,-1*ee*2),y=y.slice(0,-1*ee),x=x.slice(0,-1*ee)),g.push(this.productions_[G[1]][0]),y.push(V.$),x.push(V._$),ne=b[g[g.length-2]][g[g.length-1]],g.push(ne);break;case 3:return!0}}return!0},"parse")},u=(function(){var f={EOF:1,parseError:v(function(p,g){if(this.yy.parser)this.yy.parser.parseError(p,g);else throw new Error(p)},"parseError"),setInput:v(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:v(function(d){var p=d.length,g=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var m=this.match.split(/(?:\r\n?|\n)/g);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);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===m.length?this.yylloc.first_column:0)+m[m.length-g.length].length-g[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(d){this.unput(this.match.slice(d))},"less"),pastInput:v(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+` +`+p+"^"},"showPosition"),test_match:v(function(d,p){var g,m,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),m=d[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,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(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var x in y)this[x]=y[x];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,g,m;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),x=0;xp[0].length)){if(p=g,m=x,this.options.backtrack_lexer){if(d=this.test_match(g,y[x]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,y[m]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var p=this.next();return p||this.lex()},"lex"),begin:v(function(p){this.conditionStack.push(p)},"begin"),popState:v(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:v(function(p){this.begin(p)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(p,g,m,y){var x=y;switch(m){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),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],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}}};return f})();l.lexer=u;function h(){this.yy={}}return v(h,"Parser"),h.prototype=l,l.Parser=h,new h})();vY.parser=vY;a5t=vY,wx="",bY=[],QC=[],JC=[],s5t=v(function(){bY.length=0,QC.length=0,wx="",JC.length=0,pr()},"clear"),o5t=v(function(e){wx=e,bY.push(e)},"addSection"),l5t=v(function(){return bY},"getSections"),c5t=v(function(){let e=bMe(),t=100,r=0;for(;!e&&r{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},"updateActors"),h5t=v(function(e,t){let r=t.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(o=>o.trim()),s={section:wx,type:wx,people:a,task:e,score:n};JC.push(s)},"addTask"),f5t=v(function(e){let t={section:wx,type:wx,description:e,task:e,classes:[]};QC.push(t)},"addTaskOrg"),bMe=v(function(){let e=v(function(r){return JC[r].processed},"compileTask"),t=!0;for(let[r,n]of JC.entries())e(r),t=t&&n.processed;return t},"compileTasks"),d5t=v(function(){return u5t()},"getActors"),TMe={getConfig:v(()=>ze().journey,"getConfig"),clear:s5t,setDiagramTitle:$r,getDiagramTitle:Dr,setAccTitle:Ar,getAccTitle:Lr,setAccDescription:Ir,getAccDescription:Mr,addSection:o5t,getSections:l5t,getTasks:c5t,addTask:h5t,addTaskOrg:f5t,getActors:d5t},p5t=v(e=>`.label { font-family: ${e.fontFamily}; color: ${e.textColor}; } @@ -2472,7 +2546,7 @@ Expecting `+Y.join(", ")+", got '"+(this.terminals_[B]||B)+"'":se="Parse error o fill: ${e.arrowheadColor}; } - .edgePath .path { + .edgePaths .path { stroke: ${e.lineColor}; stroke-width: 1.5px; } @@ -2554,17 +2628,17 @@ Expecting `+Y.join(", ")+", got '"+(this.terminals_[B]||B)+"'":se="Parse error o .actor-5 { ${e.actor5?`fill: ${e.actor5}`:""}; } - ${nu()} -`,"getStyles"),rTt=tTt,nV=b(function(e,t){return D0(e,t)},"drawRect"),iTt=b(function(e,t){let i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=e.append("g");n.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=Rc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}b(a,"smile");function s(l){let u=Rc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}b(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return b(o,"ambivalent"),t.score>3?a(n):t.score<3?s(n):o(n),i},"drawFace"),a_e=b(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),s_e=b(function(e,t){return F1e(e,t)},"drawText"),nTt=b(function(e,t){function r(n,a,s,o,l){return n+","+a+" "+(n+s)+","+a+" "+(n+s)+","+(a+o-l)+" "+(n+s-l*1.2)+","+(a+o)+" "+n+","+(a+o)}b(r,"genPoints");let i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,s_e(e,t)},"drawLabel"),aTt=b(function(e,t,r){let i=e.append("g"),n=$a();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,nV(i,n),o_e(r)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),rV=-1,sTt=b(function(e,t,r,i){let n=t.x+r.width/2,a=e.append("g");rV++,a.append("line").attr("id",i+"-task"+rV).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),iTt(a,{cx:n,cy:300+(5-t.score)*30,score:t.score});let o=$a();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,nV(a,o);let l=t.x+14;t.people.forEach(u=>{let h=t.actors[u].color,f={cx:l,cy:t.y,r:7,fill:h,stroke:"#000",title:u,pos:t.actors[u].position};a_e(a,f),l+=10}),o_e(r)(t.task,a,o.x,o.y,o.width,o.height,{class:"task"},r,t.colour)},"drawTask"),oTt=b(function(e,t){QS(e,t)},"drawBackgroundRect"),o_e=(function(){function e(n,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(d,h)}b(e,"byText");function t(n,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=n.split(//gi);for(let y=0;y{Zh[C]={color:Zl.actorColours[m%Zl.actorColours.length],position:m},m++}),l_e(f),tp=Zl.leftMargin+H_,dl.insert(0,0,tp,Object.keys(Zh).length*50),hTt(f,d,0,t);let y=dl.getBounds();p&&f.append("text").text(p).attr("x",tp).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o);let v=y.stopy-y.starty+2*Zl.diagramMarginY,x=tp+y.stopx+2*Zl.diagramMarginX;Mr(f,v,x,Zl.useMaxWidth),f.append("line").attr("x1",tp).attr("y1",Zl.height*4).attr("x2",x-tp-4).attr("y2",Zl.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)");let T=p?70:0;f.attr("viewBox",`${y.startx} -25 ${x} ${v+T}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",v+T+25)},"draw"),dl={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:b(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:b(function(e,t,r,i){e[t]===void 0?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:b(function(e,t,r,i){let n=we().journey,a=this,s=0;function o(l){return b(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",t-f*n.boxMargin,Math.min),a.updateVal(h,"stopy",i+f*n.boxMargin,Math.max),a.updateVal(dl.data,"startx",e-f*n.boxMargin,Math.min),a.updateVal(dl.data,"stopx",r+f*n.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",e-f*n.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*n.boxMargin,Math.max),a.updateVal(dl.data,"starty",t-f*n.boxMargin,Math.min),a.updateVal(dl.data,"stopy",i+f*n.boxMargin,Math.max))},"updateItemBounds")}b(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:b(function(e,t,r,i){let n=Math.min(e,r),a=Math.max(e,r),s=Math.min(t,i),o=Math.max(t,i);this.updateVal(dl.data,"startx",n,Math.min),this.updateVal(dl.data,"starty",s,Math.min),this.updateVal(dl.data,"stopx",a,Math.max),this.updateVal(dl.data,"stopy",o,Math.max),this.updateBounds(n,s,a,o)},"insert"),bumpVerticalPos:b(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:b(function(){return this.verticalPos},"getVerticalPos"),getBounds:b(function(){return this.data},"getBounds")},eV=Zl.sectionFills,i_e=Zl.sectionColours,hTt=b(function(e,t,r,i){let n=we().journey,a="",s=n.height*2+n.diagramMarginY,o=r+s,l=0,u="#CCC",h="black",f=0;for(let[d,p]of t.entries()){if(a!==p.section){u=eV[l%eV.length],f=l%eV.length,h=i_e[l%i_e.length];let m=0,y=p.section;for(let x=d;x(Zh[y]&&(m[y]=Zh[y]),m),{});p.x=d*n.taskMargin+d*n.width+tp,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=g,Rw.drawTask(e,p,n,i),dl.insert(p.x,p.y,p.x+p.width+n.taskMargin,450)}},"drawTasks"),n_e={setConf:cTt,draw:uTt},fTt={parser:Hxt,db:r_e,renderer:n_e,styles:rTt,init:b(e=>{n_e.setConf(e.journey),r_e.clear()},"init")}});var M_e={};Lr(M_e,{diagram:()=>zTt});function uV(e,t){e.each(function(){var r=Qe(this),i=r.text().split(/(\s+|
    )/).reverse(),n,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;ht||n==="
    ")&&(a.pop(),u.text(a.join(" ").trim()),n==="
    "?a=[""]:a=[n],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(n))})}var aV,dTt,m_e,av,y_e,oV,lV,Y_,sv,v_e,b_e,x_e,T_e,w_e,k_e,C_e,S_e,E_e,A_e,h_e,pTt,__e,j_,gTt,mTt,L_e,yTt,vTt,sV,bTt,xTt,TTt,cV,R_e,wTt,kTt,CTt,STt,Ks,ETt,f_e,ATt,_Tt,X_,Qh,LTt,hV,RTt,I_e,ITt,d_e,D_e,p_e,N_e,DTt,g_e,NTt,MTt,OTt,PTt,BTt,FTt,$Tt,zTt,O_e=q(()=>{Ja();$r();Er();er();Ar();Ar();Sn();aV=(function(){var e=b(function(d,p,g,m){for(g=g||{},m=d.length;m--;g[d[m]]=p);return g},"o"),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],n=[1,14],a=[1,15],s=[1,16],o=[1,19],l=[1,20],u={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:b(function(p,g,m,y,v,x,T){var C=x.length-1;switch(v){case 1:return x[C-1];case 3:y.setDirection("LR");break;case 4:y.setDirection("TD");break;case 5:this.$=[];break;case 6:x[C-1].push(x[C]),this.$=x[C-1];break;case 7:case 8:this.$=x[C];break;case 9:case 10:this.$=[];break;case 11:y.getCommonDb().setDiagramTitle(x[C].substr(6)),this.$=x[C].substr(6);break;case 12:this.$=x[C].trim(),y.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=x[C].trim(),y.getCommonDb().setAccDescription(this.$);break;case 15:y.addSection(x[C].substr(8)),this.$=x[C].substr(8);break;case 18:y.addTask(x[C],0,""),this.$=x[C];break;case 19:y.addEvent(x[C].substr(2)),this.$=x[C];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:n,19:a,20:s,21:17,22:18,23:o,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:i,17:n,19:a,20:s,21:17,22:18,23:o,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:b(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),parse:b(function(p){var g=this,m=[0],y=[],v=[null],x=[],T=this.table,C="",w=0,k=0,E=0,A=2,N=1,P=x.slice.call(arguments,1),O=Object.create(this.lexer),L={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(L.yy[_]=this.yy[_]);O.setInput(p,L.yy),L.yy.lexer=O,L.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var R=O.yylloc;x.push(R);var D=O.options&&O.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(re){m.length=m.length-2*re,v.length=v.length-re,x.length=x.length-re}b(I,"popStack");function B(){var re;return re=y.pop()||O.lex()||N,typeof re!="number"&&(re instanceof Array&&(y=re,re=y.pop()),re=g.symbols_[re]||re),re}b(B,"lex");for(var M,F,z,$,G,U,j={},H,Q,Y,se;;){if(z=m[m.length-1],this.defaultActions[z]?$=this.defaultActions[z]:((M===null||typeof M>"u")&&(M=B()),$=T[z]&&T[z][M]),typeof $>"u"||!$.length||!$[0]){var J="";se=[];for(H in T[z])this.terminals_[H]&&H>A&&se.push("'"+this.terminals_[H]+"'");O.showPosition?J="Parse error on line "+(w+1)+`: + ${Gu()} +`,"getStyles"),g5t=p5t,TY=v(function(e,t){return Lg(e,t)},"drawRect"),m5t=v(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=cu().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}v(a,"smile");function s(l){let u=cu().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}v(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return v(o,"ambivalent"),t.score>3?a(i):t.score<3?s(i):o(i),n},"drawFace"),kMe=v(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),SMe=v(function(e,t){return kTe(e,t)},"drawText"),y5t=v(function(e,t){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}v(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,SMe(e,t)},"drawLabel"),v5t=v(function(e,t,r){let n=e.append("g"),i=Eo();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,TY(n,i),EMe(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),xY=-1,x5t=v(function(e,t,r,n){let i=t.x+r.width/2,a=e.append("g");xY++,a.append("line").attr("id",n+"-task"+xY).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),m5t(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=Eo();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,TY(a,o);let l=t.x+14;t.people.forEach(u=>{let h=t.actors[u].color,f={cx:l,cy:t.y,r:7,fill:h,stroke:"#000",title:u,pos:t.actors[u].position};kMe(a,f),l+=10}),EMe(r)(t.task,a,o.x,o.y,o.width,o.height,{class:"task"},r,t.colour)},"drawTask"),b5t=v(function(e,t){_A(e,t)},"drawBackgroundRect"),EMe=(function(){function e(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}v(e,"byText");function t(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let y=0;y{Of[k]={color:Ic.actorColours[m%Ic.actorColours.length],position:m},m++}),AMe(f),Xp=Ic.leftMargin+N7,Ul.insert(0,0,Xp,Object.keys(Of).length*50),k5t(f,d,0,t);let y=Ul.getBounds();p&&f.append("text").text(p).attr("x",Xp).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o);let x=y.stopy-y.starty+2*Ic.diagramMarginY,b=Xp+y.stopx+2*Ic.diagramMarginX;Vr(f,x,b,Ic.useMaxWidth),f.append("line").attr("x1",Xp).attr("y1",Ic.height*4).attr("x2",b-Xp-4).attr("y2",Ic.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)");let T=p?70:0;f.attr("viewBox",`${y.startx} -25 ${b} ${x+T}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",x+T+25)},"draw"),Ul={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:v(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:v(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:v(function(e,t,r,n){let i=ze().journey,a=this,s=0;function o(l){return v(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",t-f*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(Ul.data,"startx",e-f*i.boxMargin,Math.min),a.updateVal(Ul.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",e-f*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(Ul.data,"starty",t-f*i.boxMargin,Math.min),a.updateVal(Ul.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}v(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:v(function(e,t,r,n){let i=Math.min(e,r),a=Math.max(e,r),s=Math.min(t,n),o=Math.max(t,n);this.updateVal(Ul.data,"startx",i,Math.min),this.updateVal(Ul.data,"starty",s,Math.min),this.updateVal(Ul.data,"stopx",a,Math.max),this.updateVal(Ul.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:v(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:v(function(){return this.verticalPos},"getVerticalPos"),getBounds:v(function(){return this.data},"getBounds")},yY=Ic.sectionFills,wMe=Ic.sectionColours,k5t=v(function(e,t,r,n){let i=ze().journey,a="",s=i.height*2+i.diagramMarginY,o=r+s,l=0,u="#CCC",h="black",f=0;for(let[d,p]of t.entries()){if(a!==p.section){u=yY[l%yY.length],f=l%yY.length,h=wMe[l%wMe.length];let m=0,y=p.section;for(let b=d;b(Of[y]&&(m[y]=Of[y]),m),{});p.x=d*i.taskMargin+d*i.width+Xp,p.y=o,p.width=i.diagramMarginX,p.height=i.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=g,ek.drawTask(e,p,i,n),Ul.insert(p.x,p.y,p.x+p.width+i.taskMargin,450)}},"drawTasks"),CMe={setConf:w5t,draw:C5t},S5t={parser:a5t,db:TMe,renderer:CMe,styles:g5t,init:v(e=>{CMe.setConf(e.journey),TMe.clear()},"init")}});var JMe={};cr(JMe,{diagram:()=>J5t});function AY(e,t){e.each(function(){var r=ct(this),n=r.text().split(/(\s+|
    )/).reverse(),i,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;ht||i==="
    ")&&(a.pop(),u.text(a.join(" ").trim()),i==="
    "?a=[""]:a=[i],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(i))})}var wY,E5t,OMe,Cx,PMe,kY,SY,O7,kx,BMe,$Me,FMe,zMe,GMe,qMe,VMe,WMe,UMe,HMe,LMe,A5t,YMe,P7,_5t,R5t,XMe,L5t,I5t,CY,M5t,D5t,N5t,EY,jMe,O5t,P5t,B5t,$5t,Bo,F5t,IMe,z5t,G5t,B7,Pf,q5t,_Y,V5t,KMe,W5t,MMe,ZMe,DMe,QMe,U5t,NMe,H5t,Y5t,X5t,j5t,K5t,Z5t,Q5t,J5t,eDe=X(()=>{qi();Ur();hr();ur();Yt();zr();zr();Qi();wY=(function(){var e=v(function(d,p,g,m){for(g=g||{},m=d.length;m--;g[d[m]]=p);return g},"o"),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],n=[1,13],i=[1,14],a=[1,15],s=[1,16],o=[1,19],l=[1,20],u={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:v(function(p,g,m,y,x,b,T){var k=b.length-1;switch(x){case 1:return b[k-1];case 3:y.setDirection("LR");break;case 4:y.setDirection("TD");break;case 5:this.$=[];break;case 6:b[k-1].push(b[k]),this.$=b[k-1];break;case 7:case 8:this.$=b[k];break;case 9:case 10:this.$=[];break;case 11:y.getCommonDb().setDiagramTitle(b[k].substr(6)),this.$=b[k].substr(6);break;case 12:this.$=b[k].trim(),y.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=b[k].trim(),y.getCommonDb().setAccDescription(this.$);break;case 15:y.addSection(b[k].substr(8)),this.$=b[k].substr(8);break;case 18:y.addTask(b[k],0,""),this.$=b[k];break;case 19:y.addEvent(b[k].substr(2)),this.$=b[k];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:n,17:i,19:a,20:s,21:17,22:18,23:o,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:n,17:i,19:a,20:s,21:17,22:18,23:o,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:v(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),parse:v(function(p){var g=this,m=[0],y=[],x=[null],b=[],T=this.table,k="",w=0,C=0,S=0,E=2,L=1,N=b.slice.call(arguments,1),O=Object.create(this.lexer),R={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(R.yy[_]=this.yy[_]);O.setInput(p,R.yy),R.yy.lexer=O,R.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var D=O.yylloc;b.push(D);var I=O.options&&O.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M(de){m.length=m.length-2*de,x.length=x.length-de,b.length=b.length-de}v(M,"popStack");function B(){var de;return de=y.pop()||O.lex()||L,typeof de!="number"&&(de instanceof Array&&(y=de,de=y.pop()),de=g.symbols_[de]||de),de}v(B,"lex");for(var P,$,G,q,z,V,j={},ee,ne,Q,pe;;){if(G=m[m.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((P===null||typeof P>"u")&&(P=B()),q=T[G]&&T[G][P]),typeof q>"u"||!q.length||!q[0]){var te="";pe=[];for(ee in T[G])this.terminals_[ee]&&ee>E&&pe.push("'"+this.terminals_[ee]+"'");O.showPosition?te="Parse error on line "+(w+1)+`: `+O.showPosition()+` -Expecting `+se.join(", ")+", got '"+(this.terminals_[M]||M)+"'":J="Parse error on line "+(w+1)+": Unexpected "+(M==N?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(J,{text:O.match,token:this.terminals_[M]||M,line:O.yylineno,loc:R,expected:se})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+M);switch($[0]){case 1:m.push(M),v.push(O.yytext),x.push(O.yylloc),m.push($[1]),M=null,F?(M=F,F=null):(k=O.yyleng,C=O.yytext,w=O.yylineno,R=O.yylloc,E>0&&E--);break;case 2:if(Q=this.productions_[$[1]][1],j.$=v[v.length-Q],j._$={first_line:x[x.length-(Q||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(Q||1)].first_column,last_column:x[x.length-1].last_column},D&&(j._$.range=[x[x.length-(Q||1)].range[0],x[x.length-1].range[1]]),U=this.performAction.apply(j,[C,k,w,L.yy,$[1],v,x].concat(P)),typeof U<"u")return U;Q&&(m=m.slice(0,-1*Q*2),v=v.slice(0,-1*Q),x=x.slice(0,-1*Q)),m.push(this.productions_[$[1]][0]),v.push(j.$),x.push(j._$),Y=T[m[m.length-2]][m[m.length-1]],m.push(Y);break;case 3:return!0}}return!0},"parse")},h=(function(){var d={EOF:1,parseError:b(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:b(function(p,g){return this.yy=g||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:b(function(p){var g=p.length,m=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===y.length?this.yylloc.first_column:0)+y[y.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(p){this.unput(this.match.slice(p))},"less"),pastInput:b(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+` -`+g+"^"},"showPosition"),test_match:b(function(p,g){var m,y,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var x in v)this[x]=v[x];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),x=0;xg[0].length)){if(g=m,y=x,this.options.backtrack_lexer){if(p=this.test_match(m,v[x]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,v[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var g=this.next();return g||this.lex()},"lex"),begin:b(function(g){this.conditionStack.push(g)},"begin"),popState:b(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:b(function(g){this.begin(g)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(g,m,y,v){var x=v;switch(y){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return d})();u.lexer=h;function f(){this.yy={}}return b(f,"Parser"),f.prototype=u,u.Parser=f,new f})();aV.parser=aV;dTt=aV,m_e={};gf(m_e,{addEvent:()=>E_e,addSection:()=>w_e,addTask:()=>S_e,addTaskOrg:()=>A_e,clear:()=>b_e,default:()=>pTt,getCommonDb:()=>v_e,getDirection:()=>T_e,getSections:()=>k_e,getTasks:()=>C_e,setDirection:()=>x_e});av="",y_e=0,oV="LR",lV=[],Y_=[],sv=[],v_e=b(()=>a4,"getCommonDb"),b_e=b(function(){lV.length=0,Y_.length=0,av="",sv.length=0,oV="LR",fr()},"clear"),x_e=b(function(e){oV=e},"setDirection"),T_e=b(function(){return oV},"getDirection"),w_e=b(function(e){av=e,lV.push(e)},"addSection"),k_e=b(function(){return lV},"getSections"),C_e=b(function(){let e=h_e(),t=100,r=0;for(;!e&&rr.id===y_e-1).events.push(e)},"addEvent"),A_e=b(function(e){let t={section:av,type:av,description:e,task:e,classes:[]};Y_.push(t)},"addTaskOrg"),h_e=b(function(){let e=b(function(r){return sv[r].processed},"compileTask"),t=!0;for(let[r,i]of sv.entries())e(r),t=t&&i.processed;return t},"compileTasks"),pTt={clear:b_e,getCommonDb:v_e,getDirection:T_e,setDirection:x_e,addSection:w_e,getSections:k_e,getTasks:C_e,addTask:S_e,addTaskOrg:A_e,addEvent:E_e},__e=0,j_=b(function(e,t){let r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.class!==void 0&&r.attr("class",t.class),r},"drawRect"),gTt=b(function(e,t){let i=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=e.append("g");n.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=Rc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}b(a,"smile");function s(l){let u=Rc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}b(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return b(o,"ambivalent"),t.score>3?a(n):t.score<3?s(n):o(n),i},"drawFace"),mTt=b(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),L_e=b(function(e,t){let r=t.text.replace(//gi," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0&&i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),i},"drawText"),yTt=b(function(e,t){function r(n,a,s,o,l){return n+","+a+" "+(n+s)+","+a+" "+(n+s)+","+(a+o-l)+" "+(n+s-l*1.2)+","+(a+o)+" "+n+","+(a+o)}b(r,"genPoints");let i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,L_e(e,t)},"drawLabel"),vTt=b(function(e,t,r){let i=e.append("g"),n=cV();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,j_(i,n),R_e(r)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),sV=-1,bTt=b(function(e,t,r,i){let n=t.x+r.width/2,a=e.append("g");sV++,a.append("line").attr("id",i+"-task"+sV).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),gTt(a,{cx:n,cy:300+(5-t.score)*30,score:t.score});let o=cV();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,j_(a,o),R_e(r)(t.task,a,o.x,o.y,o.width,o.height,{class:"task"},r,t.colour)},"drawTask"),xTt=b(function(e,t){j_(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),TTt=b(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),cV=b(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),R_e=(function(){function e(n,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(d,h)}b(e,"byText");function t(n,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=n.split(//gi);for(let y=0;y0?`M0 ${t.height-o} v${-t.height+2*o} q0,-${s},${s},-${s} h${t.width-2*o} q${s},0,${s},${s} v${t.height-o} H0 Z`:`M0 ${t.height-o} v${-(t.height-o)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+__e++).attr("class","node-bkg node-"+t.type).attr("d",l),a?.includes("redux")||e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),Ks={drawRect:j_,drawCircle:mTt,drawSection:vTt,drawText:L_e,drawLabel:yTt,drawTask:bTt,drawBackgroundRect:xTt,getTextObj:TTt,getNoteRect:cV,initGraphics:wTt,drawNode:kTt,getVirtualNodeHeight:CTt},ETt=b(function(e,t,r,i){let n=we(),{look:a,theme:s,themeVariables:o}=n,{useGradient:l,gradientStart:u,gradientStop:h}=o,f=n.timeline?.leftMargin??50;ee.debug("timeline",i.db);let d=n.securityLevel,p;d==="sandbox"&&(p=Qe("#i"+t));let m=(d==="sandbox"?Qe(p.nodes()[0].contentDocument.body):Qe("body")).select("#"+t);m.append("g");let y=i.db.getTasks(),v=i.db.getCommonDb().getDiagramTitle();ee.debug("task",y),Ks.initGraphics(m,t);let x=i.db.getSections();ee.debug("sections",x);let T=0,C=0,w=0,k=0,E=50+f,A=50;k=50;let N=0,P=!0;x.forEach(function(D){let I={number:N,descr:D,section:N,width:150,padding:20,maxHeight:T},B=Ks.getVirtualNodeHeight(m,I,n);ee.debug("sectionHeight before draw",B),T=Math.max(T,B+20)});let O=0,L=0;ee.debug("tasks.length",y.length);for(let[D,I]of y.entries()){let B={number:D,descr:I,section:I.section,width:150,padding:20,maxHeight:C},M=Ks.getVirtualNodeHeight(m,B,n);ee.debug("taskHeight before draw",M),C=Math.max(C,M+20),O=Math.max(O,I.events.length);let F=0;for(let z of I.events){let $={descr:z,section:I.section,number:I.section,width:150,padding:20,maxHeight:50};F+=Ks.getVirtualNodeHeight(m,$,n)}I.events.length>0&&(F+=(I.events.length-1)*10),L=Math.max(L,F)}ee.debug("maxSectionHeight before draw",T),ee.debug("maxTaskHeight before draw",C),x&&x.length>0?x.forEach(D=>{let I=y.filter(z=>z.section===D),B={number:N,descr:D,section:N,width:200*Math.max(I.length,1)-50,padding:20,maxHeight:T};ee.debug("sectionNode",B);let M=m.append("g"),F=Ks.drawNode(M,B,N,n,t);ee.debug("sectionNode output",F),M.attr("transform",`translate(${E}, ${k})`),A+=T+50,I.length>0&&f_e(m,I,N,E,A,C,n,O,L,T,!1,t),E+=200*Math.max(I.length,1),A=k,N++}):(P=!1,f_e(m,y,N,E,A,C,n,O,L,T,!0,t));let _=m.node().getBBox();if(ee.debug("bounds",_),v&&m.append("text").text(v).attr("x",a==="neo"?_.x*2+f:_.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),w=P?T+C+150:C+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",w).attr("x2",_.width+3*f).attr("y2",w).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),a==="neo"&&l&&s!=="neutral"){let D=m.select("defs"),B=(D.empty()?m.append("defs"):D).append("linearGradient").attr("id",m.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}wc(void 0,m,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),f_e=b(function(e,t,r,i,n,a,s,o,l,u,h,f){for(let d of t){let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a};ee.debug("taskNode",p);let g=e.append("g").attr("class","taskWrapper"),y=Ks.drawNode(g,p,r,s,f).height;if(ee.debug("taskHeight after draw",y),g.attr("transform",`translate(${i}, ${n})`),a=Math.max(a,y),d.events){let v=e.append("g").attr("class","lineWrapper"),x=a;n+=100,x=x+ATt(e,d.events,r,i,n,s,f),n-=100,v.append("line").attr("x1",i+190/2).attr("y1",n+a).attr("x2",i+190/2).attr("y2",n+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}i=i+200,h&&!s.timeline?.disableMulticolor&&r++}n=n-10},"drawTasks"),ATt=b(function(e,t,r,i,n,a,s){let o=0,l=n;n=n+100;for(let u of t){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};ee.debug("eventNode",h);let f=e.append("g").attr("class","eventWrapper"),p=Ks.drawNode(f,h,r,a,s,!0).height;o=o+p,f.attr("transform",`translate(${i}, ${n})`),n=n+10+p}return n=l,o},"drawEvents"),_Tt={setConf:b(()=>{},"setConf"),draw:ETt},X_=200,Qh=5,LTt=X_+Qh*2,hV=X_+100,RTt=hV+Qh*2,I_e=10,ITt=0,d_e=20,D_e=20,p_e=30,N_e=50,DTt=b(function(e,t,r,i){let n=we(),a=n.timeline?.leftMargin??50;ee.debug("timeline",i.db);let s=yi(t);s.append("g");let o=i.db.getTasks(),l=i.db.getCommonDb().getDiagramTitle();ee.debug("task",o),Ks.initGraphics(s);let u=i.db.getSections();ee.debug("sections",u);let h=0,f=0,d=50+a,p=50,g=p,m=d,y=LTt+D_e,v=RTt+N_e,x=m+y,T=0,C=u&&u.length>0,w=C?x:d+y,k=Math.max(50,y+v-Qh*2);u.forEach(function(D){let I={number:T,descr:D,section:T,width:k,padding:Qh,maxHeight:h},B=Ks.getVirtualNodeHeight(s,I,n);ee.debug("sectionHeight before draw",B),h=Math.max(h,B)});let E=0;ee.debug("tasks.length",o.length);for(let[D,I]of o.entries()){let B={number:D,descr:I,section:I.section,width:X_,padding:Qh,maxHeight:f},M=Ks.getVirtualNodeHeight(s,B,n);ee.debug("taskHeight before draw",M),f=Math.max(f,M);let F=0;for(let z of I.events){let $={descr:z,section:I.section,number:I.section,width:hV,padding:Qh,maxHeight:50};F+=Ks.getVirtualNodeHeight(s,$,n)}I.events.length>0&&(F+=(I.events.length-1)*I_e),E=Math.max(E,F)+ITt}ee.debug("maxSectionHeight before draw",h),ee.debug("maxTaskHeight before draw",f);let N=Math.max(f,E)+p_e;C?u.forEach(D=>{let I=o.filter(j=>j.section===D),B={number:T,descr:D,section:T,width:k,padding:Qh,maxHeight:h};ee.debug("sectionNode",B);let M=s.append("g"),F=Ks.drawNode(M,B,T,n);ee.debug("sectionNode output",F);let z=w-y;M.attr("transform",`translate(${z}, ${p})`);let $=p+F.height+d_e;I.length>0&&g_e(s,I,T,w,$,f,n,N,!1);let G=I.length,U=F.height+d_e+N*Math.max(G,1)-(G>0?p_e*2:0);p+=U,T++}):g_e(s,o,T,w,p,f,n,N,!0);let P=s.node()?.getBBox();if(!P)throw new Error("bbox not found");if(ee.debug("bounds",P),l){if(s.append("text").text(l).attr("x",P.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),P=s.node()?.getBBox(),!P)throw new Error("bbox not found");ee.debug("bounds after title",P)}let[O]=Ls(n.fontSize),L=(O??16)*2,_=(O??16)*.5+20,R=s.append("g").attr("class","lineWrapper");R.append("line").attr("x1",w).attr("y1",g-L).attr("x2",w).attr("y2",P.y+P.height+_).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),R.lower(),wc(void 0,s,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),g_e=b(function(e,t,r,i,n,a,s,o,l){for(let u of t){let h={descr:u.task,section:r,number:r,width:X_,padding:Qh,maxHeight:a};ee.debug("taskNode",h);let f=e.append("g").attr("class","taskWrapper"),d=Ks.drawNode(f,h,r,s),p=d.height;ee.debug("taskHeight after draw",p);let g=i-D_e-d.width;if(f.attr("transform",`translate(${g}, ${n})`),a=Math.max(a,p),u.events&&u.events.length>0){let m=n,y=i+N_e;NTt(e,u.events,r,i,y,m,s)}n=n+o,l&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),NTt=b(function(e,t,r,i,n,a,s){let o=a;for(let l of t){let u={descr:l,section:r,number:r,width:hV,padding:Qh,maxHeight:0};ee.debug("eventNode",u);let h=e.append("g").attr("class","eventWrapper"),d=Ks.drawNode(h,u,r,s).height;h.attr("transform",`translate(${n}, ${o})`);let p=e.append("g").attr("class","lineWrapper"),g=o+d/2;p.append("line").attr("x1",i).attr("y1",g).attr("x2",n).attr("y2",g).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+d+I_e}return o-a},"drawEvents"),MTt={setConf:b(()=>{},"setConf"),draw:DTt},OTt=b(e=>{let{theme:t}=It(),r=t?.includes("dark"),i=t?.includes("color"),n=e.svgId?.replace(/^#/,"")??"",a=n?`url(#${n}-drop-shadow)`:e.dropShadow??"none",s="";for(let o=0;o1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+P);switch(q[0]){case 1:m.push(P),x.push(O.yytext),b.push(O.yylloc),m.push(q[1]),P=null,$?(P=$,$=null):(C=O.yyleng,k=O.yytext,w=O.yylineno,D=O.yylloc,S>0&&S--);break;case 2:if(ne=this.productions_[q[1]][1],j.$=x[x.length-ne],j._$={first_line:b[b.length-(ne||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(ne||1)].first_column,last_column:b[b.length-1].last_column},I&&(j._$.range=[b[b.length-(ne||1)].range[0],b[b.length-1].range[1]]),V=this.performAction.apply(j,[k,C,w,R.yy,q[1],x,b].concat(N)),typeof V<"u")return V;ne&&(m=m.slice(0,-1*ne*2),x=x.slice(0,-1*ne),b=b.slice(0,-1*ne)),m.push(this.productions_[q[1]][0]),x.push(j.$),b.push(j._$),Q=T[m[m.length-2]][m[m.length-1]],m.push(Q);break;case 3:return!0}}return!0},"parse")},h=(function(){var d={EOF:1,parseError:v(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:v(function(p,g){return this.yy=g||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:v(function(p){var g=p.length,m=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===y.length?this.yylloc.first_column:0)+y[y.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(p){this.unput(this.match.slice(p))},"less"),pastInput:v(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:v(function(p,g){var m,y,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var b in x)this[b]=x[b];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,y;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),b=0;bg[0].length)){if(g=m,y=b,this.options.backtrack_lexer){if(p=this.test_match(m,x[b]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,x[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var g=this.next();return g||this.lex()},"lex"),begin:v(function(g){this.conditionStack.push(g)},"begin"),popState:v(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:v(function(g){this.begin(g)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(g,m,y,x){var b=x;switch(y){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return d})();u.lexer=h;function f(){this.yy={}}return v(f,"Parser"),f.prototype=u,u.Parser=f,new f})();wY.parser=wY;E5t=wY,OMe={};ed(OMe,{addEvent:()=>UMe,addSection:()=>GMe,addTask:()=>WMe,addTaskOrg:()=>HMe,clear:()=>$Me,default:()=>A5t,getCommonDb:()=>BMe,getDirection:()=>zMe,getSections:()=>qMe,getTasks:()=>VMe,setDirection:()=>FMe});Cx="",PMe=0,kY="LR",SY=[],O7=[],kx=[],BMe=v(()=>LS,"getCommonDb"),$Me=v(function(){SY.length=0,O7.length=0,Cx="",kx.length=0,kY="LR",pr()},"clear"),FMe=v(function(e){kY=e},"setDirection"),zMe=v(function(){return kY},"getDirection"),GMe=v(function(e){Cx=e,SY.push(e)},"addSection"),qMe=v(function(){return SY},"getSections"),VMe=v(function(){let e=LMe(),t=100,r=0;for(;!e&&rr.id===PMe-1).events.push(e)},"addEvent"),HMe=v(function(e){let t={section:Cx,type:Cx,description:e,task:e,classes:[]};O7.push(t)},"addTaskOrg"),LMe=v(function(){let e=v(function(r){return kx[r].processed},"compileTask"),t=!0;for(let[r,n]of kx.entries())e(r),t=t&&n.processed;return t},"compileTasks"),A5t={clear:$Me,getCommonDb:BMe,getDirection:zMe,setDirection:FMe,addSection:GMe,getSections:qMe,getTasks:VMe,addTask:WMe,addTaskOrg:HMe,addEvent:UMe},YMe=0,P7=v(function(e,t){let r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.class!==void 0&&r.attr("class",t.class),r},"drawRect"),_5t=v(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=cu().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}v(a,"smile");function s(l){let u=cu().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}v(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return v(o,"ambivalent"),t.score>3?a(i):t.score<3?s(i):o(i),n},"drawFace"),R5t=v(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),XMe=v(function(e,t){let r=t.text.replace(//gi," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class!==void 0&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),L5t=v(function(e,t){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}v(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,XMe(e,t)},"drawLabel"),I5t=v(function(e,t,r){let n=e.append("g"),i=EY();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,P7(n,i),jMe(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),CY=-1,M5t=v(function(e,t,r,n){let i=t.x+r.width/2,a=e.append("g");CY++,a.append("line").attr("id",n+"-task"+CY).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),_5t(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=EY();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,P7(a,o),jMe(r)(t.task,a,o.x,o.y,o.width,o.height,{class:"task"},r,t.colour)},"drawTask"),D5t=v(function(e,t){P7(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),N5t=v(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),EY=v(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),jMe=(function(){function e(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}v(e,"byText");function t(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(//gi);for(let y=0;y0?`M0 ${t.height-o} v${-t.height+2*o} q0,-${s},${s},-${s} h${t.width-2*o} q${s},0,${s},${s} v${t.height-o} H0 Z`:`M0 ${t.height-o} v${-(t.height-o)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",n+"-node-"+YMe++).attr("class","node-bkg node-"+t.type).attr("d",l),a?.includes("redux")||e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),Bo={drawRect:P7,drawCircle:R5t,drawSection:I5t,drawText:XMe,drawLabel:L5t,drawTask:M5t,drawBackgroundRect:D5t,getTextObj:N5t,getNoteRect:EY,initGraphics:O5t,drawNode:P5t,getVirtualNodeHeight:B5t},F5t=v(function(e,t,r,n){let i=ze(),{look:a,theme:s,themeVariables:o}=i,{useGradient:l,gradientStart:u,gradientStop:h}=o,f=i.timeline?.leftMargin??50;fe.debug("timeline",n.db);let d=i.securityLevel,p;d==="sandbox"&&(p=ct("#i"+t));let m=(d==="sandbox"?ct(p.nodes()[0].contentDocument.body):ct("body")).select("#"+t);m.append("g");let y=n.db.getTasks(),x=n.db.getCommonDb().getDiagramTitle();fe.debug("task",y),Bo.initGraphics(m,t);let b=n.db.getSections();fe.debug("sections",b);let T=0,k=0,w=0,C=0,S=50+f,E=50;C=50;let L=0,N=!0;b.forEach(function(I){let M={number:L,descr:I,section:L,width:150,padding:20,maxHeight:T},B=Bo.getVirtualNodeHeight(m,M,i);fe.debug("sectionHeight before draw",B),T=Math.max(T,B+20)});let O=0,R=0;fe.debug("tasks.length",y.length);for(let[I,M]of y.entries()){let B={number:I,descr:M,section:M.section,width:150,padding:20,maxHeight:k},P=Bo.getVirtualNodeHeight(m,B,i);fe.debug("taskHeight before draw",P),k=Math.max(k,P+20),O=Math.max(O,M.events.length);let $=0;for(let G of M.events){let q={descr:G,section:M.section,number:M.section,width:150,padding:20,maxHeight:50};$+=Bo.getVirtualNodeHeight(m,q,i)}M.events.length>0&&($+=(M.events.length-1)*10),R=Math.max(R,$)}fe.debug("maxSectionHeight before draw",T),fe.debug("maxTaskHeight before draw",k),b&&b.length>0?b.forEach(I=>{let M=y.filter(G=>G.section===I),B={number:L,descr:I,section:L,width:200*Math.max(M.length,1)-50,padding:20,maxHeight:T};fe.debug("sectionNode",B);let P=m.append("g"),$=Bo.drawNode(P,B,L,i,t);fe.debug("sectionNode output",$),P.attr("transform",`translate(${S}, ${C})`),E+=T+50,M.length>0&&IMe(m,M,L,S,E,k,i,O,R,T,!1,t),S+=200*Math.max(M.length,1),E=C,L++}):(N=!1,IMe(m,y,L,S,E,k,i,O,R,T,!0,t));let _=m.node().getBBox();if(fe.debug("bounds",_),x&&m.append("text").text(x).attr("x",a==="neo"?_.x*2+f:_.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),w=N?T+k+150:k+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",w).attr("x2",_.width+3*f).attr("y2",w).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),a==="neo"&&l&&s!=="neutral"){let I=m.select("defs"),B=(I.empty()?m.append("defs"):I).append("linearGradient").attr("id",m.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}tu(void 0,m,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),IMe=v(function(e,t,r,n,i,a,s,o,l,u,h,f){for(let d of t){let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a};fe.debug("taskNode",p);let g=e.append("g").attr("class","taskWrapper"),y=Bo.drawNode(g,p,r,s,f).height;if(fe.debug("taskHeight after draw",y),g.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,y),d.events){let x=e.append("g").attr("class","lineWrapper"),b=a;i+=100,b=b+z5t(e,d.events,r,n,i,s,f),i-=100,x.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),z5t=v(function(e,t,r,n,i,a,s){let o=0,l=i;i=i+100;for(let u of t){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};fe.debug("eventNode",h);let f=e.append("g").attr("class","eventWrapper"),p=Bo.drawNode(f,h,r,a,s,!0).height;o=o+p,f.attr("transform",`translate(${n}, ${i})`),i=i+10+p}return i=l,o},"drawEvents"),G5t={setConf:v(()=>{},"setConf"),draw:F5t},B7=200,Pf=5,q5t=B7+Pf*2,_Y=B7+100,V5t=_Y+Pf*2,KMe=10,W5t=0,MMe=20,ZMe=20,DMe=30,QMe=50,U5t=v(function(e,t,r,n){let i=ze(),a=i.timeline?.leftMargin??50;fe.debug("timeline",n.db);let s=xn(t);s.append("g");let o=n.db.getTasks(),l=n.db.getCommonDb().getDiagramTitle();fe.debug("task",o),Bo.initGraphics(s);let u=n.db.getSections();fe.debug("sections",u);let h=0,f=0,d=50+a,p=50,g=p,m=d,y=q5t+ZMe,x=V5t+QMe,b=m+y,T=0,k=u&&u.length>0,w=k?b:d+y,C=Math.max(50,y+x-Pf*2);u.forEach(function(I){let M={number:T,descr:I,section:T,width:C,padding:Pf,maxHeight:h},B=Bo.getVirtualNodeHeight(s,M,i);fe.debug("sectionHeight before draw",B),h=Math.max(h,B)});let S=0;fe.debug("tasks.length",o.length);for(let[I,M]of o.entries()){let B={number:I,descr:M,section:M.section,width:B7,padding:Pf,maxHeight:f},P=Bo.getVirtualNodeHeight(s,B,i);fe.debug("taskHeight before draw",P),f=Math.max(f,P);let $=0;for(let G of M.events){let q={descr:G,section:M.section,number:M.section,width:_Y,padding:Pf,maxHeight:50};$+=Bo.getVirtualNodeHeight(s,q,i)}M.events.length>0&&($+=(M.events.length-1)*KMe),S=Math.max(S,$)+W5t}fe.debug("maxSectionHeight before draw",h),fe.debug("maxTaskHeight before draw",f);let L=Math.max(f,S)+DMe;k?u.forEach(I=>{let M=o.filter(j=>j.section===I),B={number:T,descr:I,section:T,width:C,padding:Pf,maxHeight:h};fe.debug("sectionNode",B);let P=s.append("g"),$=Bo.drawNode(P,B,T,i);fe.debug("sectionNode output",$);let G=w-y;P.attr("transform",`translate(${G}, ${p})`);let q=p+$.height+MMe;M.length>0&&NMe(s,M,T,w,q,f,i,L,!1);let z=M.length,V=$.height+MMe+L*Math.max(z,1)-(z>0?DMe*2:0);p+=V,T++}):NMe(s,o,T,w,p,f,i,L,!0);let N=s.node()?.getBBox();if(!N)throw new Error("bbox not found");if(fe.debug("bounds",N),l){if(s.append("text").text(l).attr("x",N.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),N=s.node()?.getBBox(),!N)throw new Error("bbox not found");fe.debug("bounds after title",N)}let[O]=fo(i.fontSize),R=(O??16)*2,_=(O??16)*.5+20,D=s.append("g").attr("class","lineWrapper");D.append("line").attr("x1",w).attr("y1",g-R).attr("x2",w).attr("y2",N.y+N.height+_).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),D.lower(),tu(void 0,s,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),NMe=v(function(e,t,r,n,i,a,s,o,l){for(let u of t){let h={descr:u.task,section:r,number:r,width:B7,padding:Pf,maxHeight:a};fe.debug("taskNode",h);let f=e.append("g").attr("class","taskWrapper"),d=Bo.drawNode(f,h,r,s),p=d.height;fe.debug("taskHeight after draw",p);let g=n-ZMe-d.width;if(f.attr("transform",`translate(${g}, ${i})`),a=Math.max(a,p),u.events&&u.events.length>0){let m=i,y=n+QMe;H5t(e,u.events,r,n,y,m,s)}i=i+o,l&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),H5t=v(function(e,t,r,n,i,a,s){let o=a;for(let l of t){let u={descr:l,section:r,number:r,width:_Y,padding:Pf,maxHeight:0};fe.debug("eventNode",u);let h=e.append("g").attr("class","eventWrapper"),d=Bo.drawNode(h,u,r,s).height;h.attr("transform",`translate(${i}, ${o})`);let p=e.append("g").attr("class","lineWrapper"),g=o+d/2;p.append("line").attr("x1",n).attr("y1",g).attr("x2",i).attr("y2",g).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+d+KMe}return o-a},"drawEvents"),Y5t={setConf:v(()=>{},"setConf"),draw:U5t},X5t=v(e=>{let{theme:t}=It(),r=t?.includes("dark"),n=t?.includes("color"),i=e.svgId?.replace(/^#/,"")??"",a=i?`url(#${i}-drop-shadow)`:e.dropShadow??"none",s="";for(let o=0;o{let t="";for(let r=0;r{let t="";for(let r=0;r{let{theme:t}=It(),r=t?.includes("redux"),i=t==="neutral",n=e.svgId?.replace(/^#/,"")??"",a="";if(e.useGradient&&n&&e.THEME_COLOR_LIMIT&&!i)for(let s=0;s{let{theme:t}=It(),r=t?.includes("redux"),n=t==="neutral",i=e.svgId?.replace(/^#/,"")??"",a="";if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!n)for(let s=0;s{},"setConf"),draw:b((e,t,r,i)=>(i?.db?.getDirection?.()??"LR")==="TD"?MTt.draw(e,t,r,i):_Tt.draw(e,t,r,i),"draw")},zTt={db:m_e,renderer:$Tt,parser:dTt,styles:FTt}});function P_e(e,t=0){return(La[e[t+0]]+La[e[t+1]]+La[e[t+2]]+La[e[t+3]]+"-"+La[e[t+4]]+La[e[t+5]]+"-"+La[e[t+6]]+La[e[t+7]]+"-"+La[e[t+8]]+La[e[t+9]]+"-"+La[e[t+10]]+La[e[t+11]]+La[e[t+12]]+La[e[t+13]]+La[e[t+14]]+La[e[t+15]]).toLowerCase()}var La,B_e=q(()=>{La=[];for(let e=0;e<256;++e)La.push((e+256).toString(16).slice(1))});function fV(){return crypto.getRandomValues(GTt)}var GTt,F_e=q(()=>{GTt=new Uint8Array(16)});function qTt(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():VTt(e,t,r)}function VTt(e,t,r){e=e||{};let i=e.random??e.rng?.()??fV();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let n=0;n<16;++n)t[r+n]=i[n];return t}return P_e(i)}var dV,$_e=q(()=>{F_e();B_e();dV=qTt});var z_e=q(()=>{$_e()});var G_e={};Lr(G_e,{diagram:()=>JTt});var pV,WTt,UTt,Jh,HTt,YTt,jTt,XTt,KTt,ZTt,QTt,JTt,q_e=q(()=>{Fl();il();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();z_e();Sn();pV=(function(){var e=b(function(C,w,k,E){for(k=k||{},E=C.length;E--;k[C[E]]=w);return k},"o"),t=[1,4],r=[1,13],i=[1,12],n=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:b(function(w,k,E,A,N,P,O){var L=P.length-1;switch(N){case 6:case 7:return A;case 8:A.getLogger().trace("Stop NL ");break;case 9:A.getLogger().trace("Stop EOF ");break;case 11:A.getLogger().trace("Stop NL2 ");break;case 12:A.getLogger().trace("Stop EOF2 ");break;case 15:A.getLogger().info("Node: ",P[L].id),A.addNode(P[L-1].length,P[L].id,P[L].descr,P[L].type);break;case 16:A.getLogger().trace("Icon: ",P[L]),A.decorateNode({icon:P[L]});break;case 17:case 21:A.decorateNode({class:P[L]});break;case 18:A.getLogger().trace("SPACELIST");break;case 19:A.getLogger().trace("Node: ",P[L].id),A.addNode(0,P[L].id,P[L].descr,P[L].type);break;case 20:A.decorateNode({icon:P[L]});break;case 25:A.getLogger().trace("node found ..",P[L-2]),this.$={id:P[L-1],descr:P[L-1],type:A.getType(P[L-2],P[L])};break;case 26:this.$={id:P[L],descr:P[L],type:A.nodeType.DEFAULT};break;case 27:A.getLogger().trace("node found ..",P[L-3]),this.$={id:P[L-3],descr:P[L-1],type:A.getType(P[L-2],P[L])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:o},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:o},e(p,[2,14],{7:g,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:g,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:b(function(w,k){if(k.recoverable)this.trace(w);else{var E=new Error(w);throw E.hash=k,E}},"parseError"),parse:b(function(w){var k=this,E=[0],A=[],N=[null],P=[],O=this.table,L="",_=0,R=0,D=0,I=2,B=1,M=P.slice.call(arguments,1),F=Object.create(this.lexer),z={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(z.yy[$]=this.yy[$]);F.setInput(w,z.yy),z.yy.lexer=F,z.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var G=F.yylloc;P.push(G);var U=F.options&&F.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(Ce){E.length=E.length-2*Ce,N.length=N.length-Ce,P.length=P.length-Ce}b(j,"popStack");function H(){var Ce;return Ce=A.pop()||F.lex()||B,typeof Ce!="number"&&(Ce instanceof Array&&(A=Ce,Ce=A.pop()),Ce=k.symbols_[Ce]||Ce),Ce}b(H,"lex");for(var Q,Y,se,J,re,ie,te={},xe,fe,Se,Me;;){if(se=E[E.length-1],this.defaultActions[se]?J=this.defaultActions[se]:((Q===null||typeof Q>"u")&&(Q=H()),J=O[se]&&O[se][Q]),typeof J>"u"||!J.length||!J[0]){var ke="";Me=[];for(xe in O[se])this.terminals_[xe]&&xe>I&&Me.push("'"+this.terminals_[xe]+"'");F.showPosition?ke="Parse error on line "+(_+1)+`: -`+F.showPosition()+` -Expecting `+Me.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":ke="Parse error on line "+(_+1)+": Unexpected "+(Q==B?"end of input":"'"+(this.terminals_[Q]||Q)+"'"),this.parseError(ke,{text:F.match,token:this.terminals_[Q]||Q,line:F.yylineno,loc:G,expected:Me})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+se+", token: "+Q);switch(J[0]){case 1:E.push(Q),N.push(F.yytext),P.push(F.yylloc),E.push(J[1]),Q=null,Y?(Q=Y,Y=null):(R=F.yyleng,L=F.yytext,_=F.yylineno,G=F.yylloc,D>0&&D--);break;case 2:if(fe=this.productions_[J[1]][1],te.$=N[N.length-fe],te._$={first_line:P[P.length-(fe||1)].first_line,last_line:P[P.length-1].last_line,first_column:P[P.length-(fe||1)].first_column,last_column:P[P.length-1].last_column},U&&(te._$.range=[P[P.length-(fe||1)].range[0],P[P.length-1].range[1]]),ie=this.performAction.apply(te,[L,R,_,z.yy,J[1],N,P].concat(M)),typeof ie<"u")return ie;fe&&(E=E.slice(0,-1*fe*2),N=N.slice(0,-1*fe),P=P.slice(0,-1*fe)),E.push(this.productions_[J[1]][0]),N.push(te.$),P.push(te._$),Se=O[E[E.length-2]][E[E.length-1]],E.push(Se);break;case 3:return!0}}return!0},"parse")},x=(function(){var C={EOF:1,parseError:b(function(k,E){if(this.yy.parser)this.yy.parser.parseError(k,E);else throw new Error(k)},"parseError"),setInput:b(function(w,k){return this.yy=k||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var k=w.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:b(function(w){var k=w.length,E=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var N=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===A.length?this.yylloc.first_column:0)+A[A.length-E.length].length-E[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(w){this.unput(this.match.slice(w))},"less"),pastInput:b(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var w=this.pastInput(),k=new Array(w.length+1).join("-");return w+this.upcomingInput()+` -`+k+"^"},"showPosition"),test_match:b(function(w,k){var E,A,N;if(this.options.backtrack_lexer&&(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(N.yylloc.range=this.yylloc.range.slice(0))),A=w[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],E=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var P in N)this[P]=N[P];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,k,E,A;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),P=0;Pk[0].length)){if(k=E,A=P,this.options.backtrack_lexer){if(w=this.test_match(E,N[P]),w!==!1)return w;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(w=this.test_match(k,N[A]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var k=this.next();return k||this.lex()},"lex"),begin:b(function(k){this.conditionStack.push(k)},"begin"),popState:b(function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:b(function(k){this.begin(k)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(k,E,A,N){var P=N;switch(A){case 0:return k.getLogger().trace("Found comment",E.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:k.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return k.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:k.getLogger().trace("end icon"),this.popState();break;case 10:return k.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return k.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return k.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return k.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:k.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return k.getLogger().trace("description:",E.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),k.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),k.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),k.getLogger().trace("node end ...",E.yytext),"NODE_DEND";break;case 30:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),k.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),k.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return k.getLogger().trace("Long description:",E.yytext),20;break;case 36:return k.getLogger().trace("Long description:",E.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\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],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return C})();v.lexer=x;function T(){this.yy={}}return b(T,"Parser"),T.prototype=v,v.Parser=T,new T})();pV.parser=pV;WTt=pV,UTt=12,Jh={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},HTt=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=Jh,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{b(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,t,r,i){ee.info("addNode",e,t,r,i);let n=!1;this.nodes.length===0?(this.baseLevel=e,e=0,n=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,n=!1);let a=we(),s=a.mindmap?.padding??rr.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2;break}let o={id:this.count++,nodeId:mr(t,a),level:e,descr:mr(r,a),type:i,children:[],width:a.mindmap?.maxNodeWidth??rr.mindmap.maxNodeWidth,padding:s,isRoot:n},l=this.getParent(e);if(l)l.children.push(o),this.nodes.push(o);else if(n)this.nodes.push(o);else throw new Error(`There can be only one root. No parent could be found for ("${o.descr}")`)}getType(e,t){switch(ee.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return t===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=we(),r=this.nodes[this.nodes.length-1];e.icon&&(r.icon=mr(e.icon,t)),e.class&&(r.class=mr(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(e.level===0?e.section=void 0:e.section=t,e.children)for(let[r,i]of e.children.entries()){let n=e.level===0?r%(UTt-1):t;this.assignSections(i,n)}}flattenNodes(e,t){let r=we(),i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let n=i.join(" "),a=b(o=>{let u=(r.theme?.toLowerCase()??"").includes("redux");switch(o){case Jh.CIRCLE:return"mindmapCircle";case Jh.RECT:return"rect";case Jh.ROUNDED_RECT:return"rounded";case Jh.CLOUD:return"cloud";case Jh.BANG:return"bang";case Jh.HEXAGON:return"hexagon";case Jh.DEFAULT:return u?"rounded":"defaultMindmapNode";case Jh.NO_BORDER:default:return"rect"}},"getShapeFromType"),s={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:n,cssStyles:[],look:r.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(s),e.children)for(let o of e.children)this.flattenNodes(o,t)}generateEdges(e,t){if(!e.children)return;let r=we();for(let i of e.children){let n="edge";i.section!==void 0&&(n+=` section-edge-${i.section}`);let a=e.level+1;n+=` edge-depth-${a}`;let s={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:r.look,classes:n,depth:e.level,section:i.section};t.push(s),this.generateEdges(i,t)}}getData(){let e=this.getMindmap(),t=we(),i=tj().layout!==void 0,n=t;if(i||(n.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:n};ee.debug("getData: mindmapRoot",e,t),this.assignSections(e);let a=[],s=[];this.flattenNodes(e,a),this.generateEdges(e,s),ee.debug(`getData: processed ${a.length} nodes and ${s.length} edges`);let o=new Map;for(let l of a)o.set(l.id,{shape:l.shape,width:l.width,height:l.height,padding:l.padding});return{nodes:a,edges:s,config:n,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+dV()}}getLogger(){return ee}},YTt=b(async(e,t,r,i)=>{ee.debug(`Rendering mindmap diagram -`+e);let n=i.db,a=n.getData(),s=rl(t,a.config.securityLevel);if(a.type=i.type,a.layoutAlgorithm=tu(a.config.layout,{fallback:"cose-bilkent"}),a.diagramId=t,!n.getMindmap())return;a.nodes.forEach(d=>{d.shape==="rounded"?(d.radius=15,d.taper=15,d.stroke="none",d.width=0,d.padding=15):d.shape==="circle"?d.padding=10:d.shape==="rect"?(d.width=0,d.padding=10):d.shape==="hexagon"&&(d.width=0,d.height=0)}),await Ko(a,s);let{themeVariables:l}=It(),{useGradient:u,gradientStart:h,gradientStop:f}=l;if(u&&h&&f){let d=s.attr("id"),p=s.append("defs").append("linearGradient").attr("id",`${d}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}Gs(s,a.config.mindmap?.padding??rr.mindmap.padding,"mindmapDiagram",a.config.mindmap?.useMaxWidth??rr.mindmap.useMaxWidth)},"draw"),jTt={draw:YTt},XTt=b(e=>{let{theme:t,look:r}=e,i="";for(let n=0;n{},"setConf"),draw:v((e,t,r,n)=>(n?.db?.getDirection?.()??"LR")==="TD"?Y5t.draw(e,t,r,n):G5t.draw(e,t,r,n),"draw")},J5t={db:OMe,renderer:Q5t,parser:E5t,styles:Z5t}});function tDe(e,t=0){return(ls[e[t+0]]+ls[e[t+1]]+ls[e[t+2]]+ls[e[t+3]]+"-"+ls[e[t+4]]+ls[e[t+5]]+"-"+ls[e[t+6]]+ls[e[t+7]]+"-"+ls[e[t+8]]+ls[e[t+9]]+"-"+ls[e[t+10]]+ls[e[t+11]]+ls[e[t+12]]+ls[e[t+13]]+ls[e[t+14]]+ls[e[t+15]]).toLowerCase()}var ls,rDe=X(()=>{ls=[];for(let e=0;e<256;++e)ls.push((e+256).toString(16).slice(1))});function RY(){return crypto.getRandomValues(e3t)}var e3t,nDe=X(()=>{e3t=new Uint8Array(16)});function t3t(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():r3t(e,t,r)}function r3t(e,t,r){e=e||{};let n=e.random??e.rng?.()??RY();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return tDe(n)}var LY,iDe=X(()=>{nDe();rDe();LY=t3t});var aDe=X(()=>{iDe()});var sDe={};cr(sDe,{diagram:()=>f3t});var IY,n3t,i3t,Bf,a3t,s3t,o3t,l3t,c3t,u3t,h3t,f3t,oDe=X(()=>{sl();_o();ko();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();aDe();Qi();IY=(function(){var e=v(function(k,w,C,S){for(C=C||{},S=k.length;S--;C[k[S]]=w);return C},"o"),t=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],x={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:v(function(w,C,S,E,L,N,O){var R=N.length-1;switch(L){case 6:case 7:return E;case 8:E.getLogger().trace("Stop NL ");break;case 9:E.getLogger().trace("Stop EOF ");break;case 11:E.getLogger().trace("Stop NL2 ");break;case 12:E.getLogger().trace("Stop EOF2 ");break;case 15:E.getLogger().info("Node: ",N[R].id),E.addNode(N[R-1].length,N[R].id,N[R].descr,N[R].type);break;case 16:E.getLogger().trace("Icon: ",N[R]),E.decorateNode({icon:N[R]});break;case 17:case 21:E.decorateNode({class:N[R]});break;case 18:E.getLogger().trace("SPACELIST");break;case 19:E.getLogger().trace("Node: ",N[R].id),E.addNode(0,N[R].id,N[R].descr,N[R].type);break;case 20:E.decorateNode({icon:N[R]});break;case 25:E.getLogger().trace("node found ..",N[R-2]),this.$={id:N[R-1],descr:N[R-1],type:E.getType(N[R-2],N[R])};break;case 26:this.$={id:N[R],descr:N[R],type:E.nodeType.DEFAULT};break;case 27:E.getLogger().trace("node found ..",N[R-3]),this.$={id:N[R-3],descr:N[R-1],type:E.getType(N[R-2],N[R])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},e(p,[2,14],{7:g,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:g,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:v(function(w,C){if(C.recoverable)this.trace(w);else{var S=new Error(w);throw S.hash=C,S}},"parseError"),parse:v(function(w){var C=this,S=[0],E=[],L=[null],N=[],O=this.table,R="",_=0,D=0,I=0,M=2,B=1,P=N.slice.call(arguments,1),$=Object.create(this.lexer),G={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(G.yy[q]=this.yy[q]);$.setInput(w,G.yy),G.yy.lexer=$,G.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var z=$.yylloc;N.push(z);var V=$.options&&$.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(me){S.length=S.length-2*me,L.length=L.length-me,N.length=N.length-me}v(j,"popStack");function ee(){var me;return me=E.pop()||$.lex()||B,typeof me!="number"&&(me instanceof Array&&(E=me,me=E.pop()),me=C.symbols_[me]||me),me}v(ee,"lex");for(var ne,Q,pe,te,de,ce,ue={},Re,ve,Ge,He;;){if(pe=S[S.length-1],this.defaultActions[pe]?te=this.defaultActions[pe]:((ne===null||typeof ne>"u")&&(ne=ee()),te=O[pe]&&O[pe][ne]),typeof te>"u"||!te.length||!te[0]){var Ue="";He=[];for(Re in O[pe])this.terminals_[Re]&&Re>M&&He.push("'"+this.terminals_[Re]+"'");$.showPosition?Ue="Parse error on line "+(_+1)+`: +`+$.showPosition()+` +Expecting `+He.join(", ")+", got '"+(this.terminals_[ne]||ne)+"'":Ue="Parse error on line "+(_+1)+": Unexpected "+(ne==B?"end of input":"'"+(this.terminals_[ne]||ne)+"'"),this.parseError(Ue,{text:$.match,token:this.terminals_[ne]||ne,line:$.yylineno,loc:z,expected:He})}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pe+", token: "+ne);switch(te[0]){case 1:S.push(ne),L.push($.yytext),N.push($.yylloc),S.push(te[1]),ne=null,Q?(ne=Q,Q=null):(D=$.yyleng,R=$.yytext,_=$.yylineno,z=$.yylloc,I>0&&I--);break;case 2:if(ve=this.productions_[te[1]][1],ue.$=L[L.length-ve],ue._$={first_line:N[N.length-(ve||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(ve||1)].first_column,last_column:N[N.length-1].last_column},V&&(ue._$.range=[N[N.length-(ve||1)].range[0],N[N.length-1].range[1]]),ce=this.performAction.apply(ue,[R,D,_,G.yy,te[1],L,N].concat(P)),typeof ce<"u")return ce;ve&&(S=S.slice(0,-1*ve*2),L=L.slice(0,-1*ve),N=N.slice(0,-1*ve)),S.push(this.productions_[te[1]][0]),L.push(ue.$),N.push(ue._$),Ge=O[S[S.length-2]][S[S.length-1]],S.push(Ge);break;case 3:return!0}}return!0},"parse")},b=(function(){var k={EOF:1,parseError:v(function(C,S){if(this.yy.parser)this.yy.parser.parseError(C,S);else throw new Error(C)},"parseError"),setInput:v(function(w,C){return this.yy=C||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:v(function(w){var C=w.length,S=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===E.length?this.yylloc.first_column:0)+E[E.length-S.length].length-S[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(w){this.unput(this.match.slice(w))},"less"),pastInput:v(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:v(function(w,C){var S,E,L;if(this.options.backtrack_lexer&&(L={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(L.yylloc.range=this.yylloc.range.slice(0))),E=w[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],S=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var N in L)this[N]=L[N];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,C,S,E;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),N=0;NC[0].length)){if(C=S,E=N,this.options.backtrack_lexer){if(w=this.test_match(S,L[N]),w!==!1)return w;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(w=this.test_match(C,L[E]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var C=this.next();return C||this.lex()},"lex"),begin:v(function(C){this.conditionStack.push(C)},"begin"),popState:v(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:v(function(C){this.begin(C)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(C,S,E,L){var N=L;switch(E){case 0:return C.getLogger().trace("Found comment",S.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:C.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return C.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:C.getLogger().trace("end icon"),this.popState();break;case 10:return C.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return C.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return C.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return C.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:C.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return C.getLogger().trace("description:",S.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),C.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),C.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),C.getLogger().trace("node end ...",S.yytext),"NODE_DEND";break;case 30:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),C.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),C.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return C.getLogger().trace("Long description:",S.yytext),20;break;case 36:return C.getLogger().trace("Long description:",S.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\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],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return k})();x.lexer=b;function T(){this.yy={}}return v(T,"Parser"),T.prototype=x,x.Parser=T,new T})();IY.parser=IY;n3t=IY,i3t=12,Bf={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},a3t=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=Bf,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{v(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,t,r,n){fe.info("addNode",e,t,r,n);let i=!1;this.nodes.length===0?(this.baseLevel=e,e=0,i=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,i=!1);let a=ze(),s=a.mindmap?.padding??dr.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2;break}let o={id:this.count++,nodeId:Cr(t,a),level:e,descr:Cr(r,a),type:n,children:[],width:a.mindmap?.maxNodeWidth??dr.mindmap.maxNodeWidth,padding:s,isRoot:i},l=this.getParent(e);if(l)l.children.push(o),this.nodes.push(o);else if(i)this.nodes.push(o);else throw new Error(`There can be only one root. No parent could be found for ("${o.descr}")`)}getType(e,t){switch(fe.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return t===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=ze(),r=this.nodes[this.nodes.length-1];e.icon&&(r.icon=Cr(e.icon,t)),e.class&&(r.class=Cr(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(e.level===0?e.section=void 0:e.section=t,e.children)for(let[r,n]of e.children.entries()){let i=e.level===0?r%(i3t-1):t;this.assignSections(n,i)}}flattenNodes(e,t){let r=ze(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);let i=n.join(" "),a=v(o=>{let u=(r.theme?.toLowerCase()??"").includes("redux");switch(o){case Bf.CIRCLE:return"mindmapCircle";case Bf.RECT:return"rect";case Bf.ROUNDED_RECT:return"rounded";case Bf.CLOUD:return"cloud";case Bf.BANG:return"bang";case Bf.HEXAGON:return"hexagon";case Bf.DEFAULT:return u?"rounded":"defaultMindmapNode";case Bf.NO_BORDER:default:return"rect"}},"getShapeFromType"),s={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:i,cssStyles:[],look:r.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(s),e.children)for(let o of e.children)this.flattenNodes(o,t)}generateEdges(e,t){if(!e.children)return;let r=ze();for(let n of e.children){let i="edge";n.section!==void 0&&(i+=` section-edge-${n.section}`);let a=e.level+1;i+=` edge-depth-${a}`;let s={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:r.look,classes:i,depth:e.level,section:n.section};t.push(s),this.generateEdges(n,t)}}getData(){let e=this.getMindmap(),t=ze(),n=AS().layout!==void 0,i=t;if(n||(i.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:i};fe.debug("getData: mindmapRoot",e,t),this.assignSections(e);let a=[],s=[];this.flattenNodes(e,a),this.generateEdges(e,s),fe.debug(`getData: processed ${a.length} nodes and ${s.length} edges`);let o=new Map;for(let l of a)o.set(l.id,{shape:l.shape,width:l.width,height:l.height,padding:l.padding});return{nodes:a,edges:s,config:i,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+LY()}}getLogger(){return fe}},s3t=v(async(e,t,r,n)=>{fe.debug(`Rendering mindmap diagram +`+e);let i=n.db,a=i.getData(),s=$l(t,a.config.securityLevel);if(a.type=n.type,a.layoutAlgorithm=Fu(a.config.layout,{fallback:"cose-bilkent"}),a.diagramId=t,!i.getMindmap())return;a.nodes.forEach(d=>{d.shape==="rounded"?(d.radius=15,d.taper=15,d.stroke="none",d.width=0,d.padding=15):d.shape==="circle"?d.padding=10:d.shape==="rect"?(d.width=0,d.padding=10):d.shape==="hexagon"&&(d.width=0,d.height=0)}),await Ol(a,s);let{themeVariables:l}=It(),{useGradient:u,gradientStart:h,gradientStop:f}=l;if(u&&h&&f){let d=s.attr("id"),p=s.append("defs").append("linearGradient").attr("id",`${d}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}Ao(s,a.config.mindmap?.padding??dr.mindmap.padding,"mindmapDiagram",a.config.mindmap?.useMaxWidth??dr.mindmap.useMaxWidth)},"draw"),o3t={draw:s3t},l3t=v(e=>{let{theme:t,look:r}=e,n="";for(let i=0;i{let i="";for(let n=0;n{let n="";for(let i=0;i{let{theme:t}=e,r=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return` + }`;return n},"genGradient"),u3t=v(e=>{let{theme:t}=e,r=e.svgId,n=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return` .edge { stroke-width: 3; } - ${XTt(e)} + ${l3t(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } @@ -2760,7 +2834,7 @@ Expecting `+Me.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":ke="Parse error text-align: center; } [data-look="neo"].mindmap-node { - filter: ${i}; + filter: ${n}; } [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { fill: ${t?.includes("redux")?e.mainBkg:e.git0}; @@ -2768,38 +2842,38 @@ Expecting `+Me.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":ke="Parse error [data-look="neo"].mindmap-node.section-root .text-inner-tspan { fill: ${t?.includes("redux")?e.nodeBorder:e["cScaleLabel"+(t==="neutral"?1:0)]}; } - ${e.useGradient&&r&&e.mainBkg?KTt(e.THEME_COLOR_LIMIT,r,e.mainBkg):""} -`},"getStyles"),QTt=ZTt,JTt={get db(){return new HTt},renderer:jTt,parser:WTt,styles:QTt}});var W_e={};Lr(W_e,{diagram:()=>vwt});var gV,ewt,pl,yV,mV,vV,twt,rwt,V_e,iwt,nwt,Kn,awt,swt,owt,lwt,cwt,uwt,hwt,fwt,dwt,pwt,gwt,mwt,ywt,vwt,U_e=q(()=>{Ja();Ld();Z2();Is();ts();rs();ya();$r();Er();er();Sn();gV=(function(){var e=b(function(E,A,N,P){for(N=N||{},P=E.length;P--;N[E[P]]=A);return N},"o"),t=[1,4],r=[1,13],i=[1,12],n=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],T=[1,38],C={trace:b(function(){},"trace"),yy:{},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},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"},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]],performAction:b(function(A,N,P,O,L,_,R){var D=_.length-1;switch(L){case 6:case 7:return O;case 8:O.getLogger().trace("Stop NL ");break;case 9:O.getLogger().trace("Stop EOF ");break;case 11:O.getLogger().trace("Stop NL2 ");break;case 12:O.getLogger().trace("Stop EOF2 ");break;case 15:O.getLogger().info("Node: ",_[D-1].id),O.addNode(_[D-2].length,_[D-1].id,_[D-1].descr,_[D-1].type,_[D]);break;case 16:O.getLogger().info("Node: ",_[D].id),O.addNode(_[D-1].length,_[D].id,_[D].descr,_[D].type);break;case 17:O.getLogger().trace("Icon: ",_[D]),O.decorateNode({icon:_[D]});break;case 18:case 23:O.decorateNode({class:_[D]});break;case 19:O.getLogger().trace("SPACELIST");break;case 20:O.getLogger().trace("Node: ",_[D-1].id),O.addNode(0,_[D-1].id,_[D-1].descr,_[D-1].type,_[D]);break;case 21:O.getLogger().trace("Node: ",_[D].id),O.addNode(0,_[D].id,_[D].descr,_[D].type);break;case 22:O.decorateNode({icon:_[D]});break;case 27:O.getLogger().trace("node found ..",_[D-2]),this.$={id:_[D-1],descr:_[D-1],type:O.getType(_[D-2],_[D])};break;case 28:this.$={id:_[D],descr:_[D],type:0};break;case 29:O.getLogger().trace("node found ..",_[D-3]),this.$={id:_[D-3],descr:_[D-1],type:O.getType(_[D-2],_[D])};break;case 30:this.$=_[D-1]+_[D];break;case 31:this.$=_[D];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:o},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:o},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:T}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(d,[2,15],{24:T}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:b(function(A,N){if(N.recoverable)this.trace(A);else{var P=new Error(A);throw P.hash=N,P}},"parseError"),parse:b(function(A){var N=this,P=[0],O=[],L=[null],_=[],R=this.table,D="",I=0,B=0,M=0,F=2,z=1,$=_.slice.call(arguments,1),G=Object.create(this.lexer),U={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(U.yy[j]=this.yy[j]);G.setInput(A,U.yy),U.yy.lexer=G,U.yy.parser=this,typeof G.yylloc>"u"&&(G.yylloc={});var H=G.yylloc;_.push(H);var Q=G.options&&G.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(pe){P.length=P.length-2*pe,L.length=L.length-pe,_.length=_.length-pe}b(Y,"popStack");function se(){var pe;return pe=O.pop()||G.lex()||z,typeof pe!="number"&&(pe instanceof Array&&(O=pe,pe=O.pop()),pe=N.symbols_[pe]||pe),pe}b(se,"lex");for(var J,re,ie,te,xe,fe,Se={},Me,ke,Ce,Ie;;){if(ie=P[P.length-1],this.defaultActions[ie]?te=this.defaultActions[ie]:((J===null||typeof J>"u")&&(J=se()),te=R[ie]&&R[ie][J]),typeof te>"u"||!te.length||!te[0]){var Pe="";Ie=[];for(Me in R[ie])this.terminals_[Me]&&Me>F&&Ie.push("'"+this.terminals_[Me]+"'");G.showPosition?Pe="Parse error on line "+(I+1)+`: -`+G.showPosition()+` -Expecting `+Ie.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Pe="Parse error on line "+(I+1)+": Unexpected "+(J==z?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Pe,{text:G.match,token:this.terminals_[J]||J,line:G.yylineno,loc:H,expected:Ie})}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ie+", token: "+J);switch(te[0]){case 1:P.push(J),L.push(G.yytext),_.push(G.yylloc),P.push(te[1]),J=null,re?(J=re,re=null):(B=G.yyleng,D=G.yytext,I=G.yylineno,H=G.yylloc,M>0&&M--);break;case 2:if(ke=this.productions_[te[1]][1],Se.$=L[L.length-ke],Se._$={first_line:_[_.length-(ke||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(ke||1)].first_column,last_column:_[_.length-1].last_column},Q&&(Se._$.range=[_[_.length-(ke||1)].range[0],_[_.length-1].range[1]]),fe=this.performAction.apply(Se,[D,B,I,U.yy,te[1],L,_].concat($)),typeof fe<"u")return fe;ke&&(P=P.slice(0,-1*ke*2),L=L.slice(0,-1*ke),_=_.slice(0,-1*ke)),P.push(this.productions_[te[1]][0]),L.push(Se.$),_.push(Se._$),Ce=R[P[P.length-2]][P[P.length-1]],P.push(Ce);break;case 3:return!0}}return!0},"parse")},w=(function(){var E={EOF:1,parseError:b(function(N,P){if(this.yy.parser)this.yy.parser.parseError(N,P);else throw new Error(N)},"parseError"),setInput:b(function(A,N){return this.yy=N||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var N=A.match(/(?:\r\n?|\n).*/g);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),A},"input"),unput:b(function(A){var N=A.length,P=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var O=this.match.split(/(?:\r\n?|\n)/g);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);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:P?(P.length===O.length?this.yylloc.first_column:0)+O[O.length-P.length].length-P[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(A){this.unput(this.match.slice(A))},"less"),pastInput:b(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var A=this.pastInput(),N=new Array(A.length+1).join("-");return A+this.upcomingInput()+` -`+N+"^"},"showPosition"),test_match:b(function(A,N){var P,O,L;if(this.options.backtrack_lexer&&(L={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(L.yylloc.range=this.yylloc.range.slice(0))),O=A[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,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(A[0].length),this.matched+=A[0],P=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var _ in L)this[_]=L[_];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,N,P,O;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),_=0;_N[0].length)){if(N=P,O=_,this.options.backtrack_lexer){if(A=this.test_match(P,L[_]),A!==!1)return A;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(A=this.test_match(N,L[O]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var N=this.next();return N||this.lex()},"lex"),begin:b(function(N){this.conditionStack.push(N)},"begin"),popState:b(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:b(function(N){this.begin(N)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(N,P,O,L){var _=L;switch(O){case 0:return this.pushState("shapeData"),P.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let R=/\n\s*/g;return P.yytext=P.yytext.replace(R,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return N.getLogger().trace("Found comment",P.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:N.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return N.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:N.getLogger().trace("end icon"),this.popState();break;case 16:return N.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return N.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return N.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return N.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:N.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return N.getLogger().trace("description:",P.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),N.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),N.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),N.getLogger().trace("node end ...",P.yytext),"NODE_DEND";break;case 36:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),N.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),N.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return N.getLogger().trace("Long description:",P.yytext),21;break;case 42:return N.getLogger().trace("Long description:",P.yytext),21;break}},"anonymous"),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],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}}};return E})();C.lexer=w;function k(){this.yy={}}return b(k,"Parser"),k.prototype=C,C.Parser=k,new k})();gV.parser=gV;ewt=gV,pl=[],yV=[],mV=0,vV={},twt=b(()=>{pl=[],yV=[],mV=0,vV={}},"clear"),rwt=b(e=>{if(pl.length===0)return null;let t=pl[0].level,r=null;for(let i=pl.length-1;i>=0;i--)if(pl[i].level===t&&!r&&(r=pl[i]),pl[i].levelo.parentId===n.id);for(let o of s){let l={id:o.id,parentId:n.id,label:mr(o.label??"",i),labelType:"markdown",isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(l)}}return{nodes:t,edges:e,other:{},config:we()}},"getData"),nwt=b((e,t,r,i,n)=>{let a=we(),s=a.mindmap?.padding??rr.mindmap.padding;switch(i){case Kn.ROUNDED_RECT:case Kn.RECT:case Kn.HEXAGON:s*=2}let o={id:mr(t,a)||"kbn"+mV++,level:e,label:mr(r,a),width:a.mindmap?.maxNodeWidth??rr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(n!==void 0){let u;n.includes(` -`)?u=n+` + ${e.useGradient&&r&&e.mainBkg?c3t(e.THEME_COLOR_LIMIT,r,e.mainBkg):""} +`},"getStyles"),h3t=u3t,f3t={get db(){return new a3t},renderer:o3t,parser:n3t,styles:h3t}});var cDe={};cr(cDe,{diagram:()=>I3t});var MY,d3t,Hl,NY,DY,OY,p3t,g3t,lDe,m3t,y3t,Ca,v3t,x3t,b3t,T3t,w3t,C3t,k3t,S3t,E3t,A3t,_3t,R3t,L3t,I3t,uDe=X(()=>{qi();qu();cg();ms();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();Qi();MY=(function(){var e=v(function(S,E,L,N){for(L=L||{},N=S.length;N--;L[S[N]]=E);return L},"o"),t=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],x=[1,36],b=[1,6,7,11,13,16,17,20,23],T=[1,38],k={trace:v(function(){},"trace"),yy:{},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},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"},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]],performAction:v(function(E,L,N,O,R,_,D){var I=_.length-1;switch(R){case 6:case 7:return O;case 8:O.getLogger().trace("Stop NL ");break;case 9:O.getLogger().trace("Stop EOF ");break;case 11:O.getLogger().trace("Stop NL2 ");break;case 12:O.getLogger().trace("Stop EOF2 ");break;case 15:O.getLogger().info("Node: ",_[I-1].id),O.addNode(_[I-2].length,_[I-1].id,_[I-1].descr,_[I-1].type,_[I]);break;case 16:O.getLogger().info("Node: ",_[I].id),O.addNode(_[I-1].length,_[I].id,_[I].descr,_[I].type);break;case 17:O.getLogger().trace("Icon: ",_[I]),O.decorateNode({icon:_[I]});break;case 18:case 23:O.decorateNode({class:_[I]});break;case 19:O.getLogger().trace("SPACELIST");break;case 20:O.getLogger().trace("Node: ",_[I-1].id),O.addNode(0,_[I-1].id,_[I-1].descr,_[I-1].type,_[I]);break;case 21:O.getLogger().trace("Node: ",_[I].id),O.addNode(0,_[I].id,_[I].descr,_[I].type);break;case 22:O.decorateNode({icon:_[I]});break;case 27:O.getLogger().trace("node found ..",_[I-2]),this.$={id:_[I-1],descr:_[I-1],type:O.getType(_[I-2],_[I])};break;case 28:this.$={id:_[I],descr:_[I],type:0};break;case 29:O.getLogger().trace("node found ..",_[I-3]),this.$={id:_[I-3],descr:_[I-1],type:O.getType(_[I-2],_[I])};break;case 30:this.$=_[I-1]+_[I];break;case 31:this.$=_[I];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},e(m,[2,14],{7:y,11:x}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:T}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:x}),e(b,[2,11]),e(b,[2,12]),e(d,[2,15],{24:T}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:v(function(E,L){if(L.recoverable)this.trace(E);else{var N=new Error(E);throw N.hash=L,N}},"parseError"),parse:v(function(E){var L=this,N=[0],O=[],R=[null],_=[],D=this.table,I="",M=0,B=0,P=0,$=2,G=1,q=_.slice.call(arguments,1),z=Object.create(this.lexer),V={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(V.yy[j]=this.yy[j]);z.setInput(E,V.yy),V.yy.lexer=z,V.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ee=z.yylloc;_.push(ee);var ne=z.options&&z.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Q(Me){N.length=N.length-2*Me,R.length=R.length-Me,_.length=_.length-Me}v(Q,"popStack");function pe(){var Me;return Me=O.pop()||z.lex()||G,typeof Me!="number"&&(Me instanceof Array&&(O=Me,Me=O.pop()),Me=L.symbols_[Me]||Me),Me}v(pe,"lex");for(var te,de,ce,ue,Re,ve,Ge={},He,Ue,me,De;;){if(ce=N[N.length-1],this.defaultActions[ce]?ue=this.defaultActions[ce]:((te===null||typeof te>"u")&&(te=pe()),ue=D[ce]&&D[ce][te]),typeof ue>"u"||!ue.length||!ue[0]){var Ie="";De=[];for(He in D[ce])this.terminals_[He]&&He>$&&De.push("'"+this.terminals_[He]+"'");z.showPosition?Ie="Parse error on line "+(M+1)+`: +`+z.showPosition()+` +Expecting `+De.join(", ")+", got '"+(this.terminals_[te]||te)+"'":Ie="Parse error on line "+(M+1)+": Unexpected "+(te==G?"end of input":"'"+(this.terminals_[te]||te)+"'"),this.parseError(Ie,{text:z.match,token:this.terminals_[te]||te,line:z.yylineno,loc:ee,expected:De})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ce+", token: "+te);switch(ue[0]){case 1:N.push(te),R.push(z.yytext),_.push(z.yylloc),N.push(ue[1]),te=null,de?(te=de,de=null):(B=z.yyleng,I=z.yytext,M=z.yylineno,ee=z.yylloc,P>0&&P--);break;case 2:if(Ue=this.productions_[ue[1]][1],Ge.$=R[R.length-Ue],Ge._$={first_line:_[_.length-(Ue||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(Ue||1)].first_column,last_column:_[_.length-1].last_column},ne&&(Ge._$.range=[_[_.length-(Ue||1)].range[0],_[_.length-1].range[1]]),ve=this.performAction.apply(Ge,[I,B,M,V.yy,ue[1],R,_].concat(q)),typeof ve<"u")return ve;Ue&&(N=N.slice(0,-1*Ue*2),R=R.slice(0,-1*Ue),_=_.slice(0,-1*Ue)),N.push(this.productions_[ue[1]][0]),R.push(Ge.$),_.push(Ge._$),me=D[N[N.length-2]][N[N.length-1]],N.push(me);break;case 3:return!0}}return!0},"parse")},w=(function(){var S={EOF:1,parseError:v(function(L,N){if(this.yy.parser)this.yy.parser.parseError(L,N);else throw new Error(L)},"parseError"),setInput:v(function(E,L){return this.yy=L||this.yy||{},this._input=E,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var E=this._input[0];this.yytext+=E,this.yyleng++,this.offset++,this.match+=E,this.matched+=E;var L=E.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),E},"input"),unput:v(function(E){var L=E.length,N=E.split(/(?:\r\n?|\n)/g);this._input=E+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var O=this.match.split(/(?:\r\n?|\n)/g);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);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===O.length?this.yylloc.first_column:0)+O[O.length-N.length].length-N[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(E){this.unput(this.match.slice(E))},"less"),pastInput:v(function(){var E=this.matched.substr(0,this.matched.length-this.match.length);return(E.length>20?"...":"")+E.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var E=this.match;return E.length<20&&(E+=this._input.substr(0,20-E.length)),(E.substr(0,20)+(E.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var E=this.pastInput(),L=new Array(E.length+1).join("-");return E+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:v(function(E,L){var N,O,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),O=E[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+E[0].length},this.yytext+=E[0],this.match+=E[0],this.matches=E,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(E[0].length),this.matched+=E[0],N=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var _ in R)this[_]=R[_];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var E,L,N,O;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),_=0;_L[0].length)){if(L=N,O=_,this.options.backtrack_lexer){if(E=this.test_match(N,R[_]),E!==!1)return E;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(E=this.test_match(L,R[O]),E!==!1?E:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var L=this.next();return L||this.lex()},"lex"),begin:v(function(L){this.conditionStack.push(L)},"begin"),popState:v(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:v(function(L){this.begin(L)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(L,N,O,R){var _=R;switch(O){case 0:return this.pushState("shapeData"),N.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let D=/\n\s*/g;return N.yytext=N.yytext.replace(D,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return L.getLogger().trace("Found comment",N.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:L.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return L.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:L.getLogger().trace("end icon"),this.popState();break;case 16:return L.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return L.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return L.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return L.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:L.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return L.getLogger().trace("description:",N.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),L.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),L.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),L.getLogger().trace("node end ...",N.yytext),"NODE_DEND";break;case 36:return this.popState(),L.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),L.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),L.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),L.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),L.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return L.getLogger().trace("Long description:",N.yytext),21;break;case 42:return L.getLogger().trace("Long description:",N.yytext),21;break}},"anonymous"),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],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}}};return S})();k.lexer=w;function C(){this.yy={}}return v(C,"Parser"),C.prototype=k,k.Parser=C,new C})();MY.parser=MY;d3t=MY,Hl=[],NY=[],DY=0,OY={},p3t=v(()=>{Hl=[],NY=[],DY=0,OY={}},"clear"),g3t=v(e=>{if(Hl.length===0)return null;let t=Hl[0].level,r=null;for(let n=Hl.length-1;n>=0;n--)if(Hl[n].level===t&&!r&&(r=Hl[n]),Hl[n].levelo.parentId===i.id);for(let o of s){let l={id:o.id,parentId:i.id,label:Cr(o.label??"",n),labelType:"markdown",isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(l)}}return{nodes:t,edges:e,other:{},config:ze()}},"getData"),y3t=v((e,t,r,n,i)=>{let a=ze(),s=a.mindmap?.padding??dr.mindmap.padding;switch(n){case Ca.ROUNDED_RECT:case Ca.RECT:case Ca.HEXAGON:s*=2}let o={id:Cr(t,a)||"kbn"+DY++,level:e,label:Cr(r,a),width:a.mindmap?.maxNodeWidth??dr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let u;i.includes(` +`)?u=i+` `:u=`{ -`+n+` -}`;let h=If(u,{schema:Rf});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(o.shape=h?.shape),h?.label&&(o.label=h?.label),h?.icon&&(o.icon=h?.icon.toString()),h?.assigned&&(o.assigned=h?.assigned.toString()),h?.ticket&&(o.ticket=h?.ticket.toString()),h?.priority&&(o.priority=h?.priority)}let l=rwt(e);l?o.parentId=l.id||"kbn"+mV++:yV.push(o),pl.push(o)},"addNode"),Kn={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},awt=b((e,t)=>{switch(ee.debug("In get type",e,t),e){case"[":return Kn.RECT;case"(":return t===")"?Kn.ROUNDED_RECT:Kn.CLOUD;case"((":return Kn.CIRCLE;case")":return Kn.CLOUD;case"))":return Kn.BANG;case"{{":return Kn.HEXAGON;default:return Kn.DEFAULT}},"getType"),swt=b((e,t)=>{vV[e]=t},"setElementForId"),owt=b(e=>{if(!e)return;let t=we(),r=pl[pl.length-1];e.icon&&(r.icon=mr(e.icon,t)),e.class&&(r.cssClasses=mr(e.class,t))},"decorateNode"),lwt=b(e=>{switch(e){case Kn.DEFAULT:return"no-border";case Kn.RECT:return"rect";case Kn.ROUNDED_RECT:return"rounded-rect";case Kn.CIRCLE:return"circle";case Kn.CLOUD:return"cloud";case Kn.BANG:return"bang";case Kn.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),cwt=b(()=>ee,"getLogger"),uwt=b(e=>vV[e],"getElementById"),hwt={clear:twt,addNode:nwt,getSections:V_e,getData:iwt,nodeType:Kn,getType:awt,setElementForId:swt,decorateNode:owt,type2Str:lwt,getLogger:cwt,getElementById:uwt},fwt=hwt,dwt=b(async(e,t,r,i)=>{ee.debug(`Rendering kanban diagram -`+e);let a=i.db.getData(),s=we();s.htmlLabels=!1;let o=yi(t);for(let y of a.nodes)y.domId=`${t}-${y.id}`;let l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(y=>y.isGroup),f=0,d=10,p=[],g=25;for(let y of h){let v=s?.kanban?.sectionWidth||200;f=f+1,y.x=v*f+(f-1)*d/2,y.width=v,y.y=0,y.height=v*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+f;let x=await t1(l,y);g=Math.max(g,x?.labelBBox?.height),p.push(x)}let m=0;for(let y of h){let v=p[m];m=m+1;let x=s?.kanban?.sectionWidth||200,T=-x*3/2+g,C=T,w=a.nodes.filter(A=>A.parentId===y.id);for(let A of w){if(A.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");A.x=y.x,A.width=x-1.5*d;let P=(await r0(u,A,{config:s})).node().getBBox();A.y=C+P.height/2,await Sb(A),C=A.y+P.height/2+d/2}let k=v.cluster.select("rect"),E=Math.max(C-T+3*d,50)+(g-25);k.attr("height",E)}wc(void 0,o,s.mindmap?.padding??rr.kanban.padding,s.mindmap?.useMaxWidth??rr.kanban.useMaxWidth)},"draw"),pwt={draw:dwt},gwt=b(e=>{let t="";for(let i=0;ie.darkMode?Xe(i,n):je(i,n),"adjuster");for(let i=0;i{switch(fe.debug("In get type",e,t),e){case"[":return Ca.RECT;case"(":return t===")"?Ca.ROUNDED_RECT:Ca.CLOUD;case"((":return Ca.CIRCLE;case")":return Ca.CLOUD;case"))":return Ca.BANG;case"{{":return Ca.HEXAGON;default:return Ca.DEFAULT}},"getType"),x3t=v((e,t)=>{OY[e]=t},"setElementForId"),b3t=v(e=>{if(!e)return;let t=ze(),r=Hl[Hl.length-1];e.icon&&(r.icon=Cr(e.icon,t)),e.class&&(r.cssClasses=Cr(e.class,t))},"decorateNode"),T3t=v(e=>{switch(e){case Ca.DEFAULT:return"no-border";case Ca.RECT:return"rect";case Ca.ROUNDED_RECT:return"rounded-rect";case Ca.CIRCLE:return"circle";case Ca.CLOUD:return"cloud";case Ca.BANG:return"bang";case Ca.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),w3t=v(()=>fe,"getLogger"),C3t=v(e=>OY[e],"getElementById"),k3t={clear:p3t,addNode:y3t,getSections:lDe,getData:m3t,nodeType:Ca,getType:v3t,setElementForId:x3t,decorateNode:b3t,type2Str:T3t,getLogger:w3t,getElementById:C3t},S3t=k3t,E3t=v(async(e,t,r,n)=>{fe.debug(`Rendering kanban diagram +`+e);let a=n.db.getData(),s=ze();s.htmlLabels=!1;let o=xn(t);for(let y of a.nodes)y.domId=`${t}-${y.id}`;let l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(y=>y.isGroup),f=0,d=10,p=[],g=25;for(let y of h){let x=s?.kanban?.sectionWidth||200;f=f+1,y.x=x*f+(f-1)*d/2,y.width=x,y.y=0,y.height=x*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+f;let b=await wd(l,y);g=Math.max(g,b?.labelBBox?.height),p.push(b)}let m=0;for(let y of h){let x=p[m];m=m+1;let b=s?.kanban?.sectionWidth||200,T=-b*3/2+g,k=T,w=a.nodes.filter(E=>E.parentId===y.id);for(let E of w){if(E.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");E.x=y.x,E.width=b-1.5*d;let N=(await mu(u,E,{config:s})).node().getBBox();E.y=k+N.height/2,await yu(E),k=E.y+N.height/2+d/2}let C=x.cluster.select("rect"),S=Math.max(k-T+3*d,50)+(g-25);C.attr("height",S)}tu(void 0,o,s.mindmap?.padding??dr.kanban.padding,s.mindmap?.useMaxWidth??dr.kanban.useMaxWidth)},"draw"),A3t={draw:E3t},_3t=v(e=>{let t="";for(let n=0;ne.darkMode?tt(n,i):et(n,i),"adjuster");for(let n=0;n` + `}return t},"genSections"),R3t=v(e=>` .edge { stroke-width: 3; } - ${gwt(e)} + ${_3t(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } @@ -2856,15 +2930,15 @@ Expecting `+Ie.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Pe="Parse error dominant-baseline: middle; text-align: center; } - ${nu()} -`,"getStyles"),ywt=mwt,vwt={db:fwt,renderer:pwt,parser:ewt,styles:ywt}});function Iw(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}var H_e=q(()=>{});function ov(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}var Y_e=q(()=>{});function lv(e,t){let r=0;if(t===void 0)for(let i of e)(i=+i)&&(r+=i);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&(r+=n)}return r}var j_e=q(()=>{});var bV=q(()=>{H_e();Y_e();j_e()});function bwt(e){return e.target.depth}function xV(e){return e.depth}function TV(e,t){return t-1-e.height}function Dw(e,t){return e.sourceLinks.length?e.depth:t-1}function wV(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?ov(e.sourceLinks,bwt)-1:0}var kV=q(()=>{bV()});function cv(e){return function(){return e}}var X_e=q(()=>{});function K_e(e,t){return K_(e.source,t.source)||e.index-t.index}function Z_e(e,t){return K_(e.target,t.target)||e.index-t.index}function K_(e,t){return e.y0-t.y0}function CV(e){return e.value}function xwt(e){return e.index}function Twt(e){return e.nodes}function wwt(e){return e.links}function Q_e(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function J_e({nodes:e}){for(let t of e){let r=t.y0,i=r;for(let n of t.sourceLinks)n.y0=r+n.width/2,r+=n.width;for(let n of t.targetLinks)n.y1=i+n.width/2,i+=n.width}}function Z_(){let e=0,t=0,r=1,i=1,n=24,a=8,s,o=xwt,l=Dw,u,h,f=Twt,d=wwt,p=6;function g(){let D={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return m(D),y(D),v(D),x(D),w(D),J_e(D),D}g.update=function(D){return J_e(D),D},g.nodeId=function(D){return arguments.length?(o=typeof D=="function"?D:cv(D),g):o},g.nodeAlign=function(D){return arguments.length?(l=typeof D=="function"?D:cv(D),g):l},g.nodeSort=function(D){return arguments.length?(u=D,g):u},g.nodeWidth=function(D){return arguments.length?(n=+D,g):n},g.nodePadding=function(D){return arguments.length?(a=s=+D,g):a},g.nodes=function(D){return arguments.length?(f=typeof D=="function"?D:cv(D),g):f},g.links=function(D){return arguments.length?(d=typeof D=="function"?D:cv(D),g):d},g.linkSort=function(D){return arguments.length?(h=D,g):h},g.size=function(D){return arguments.length?(e=t=0,r=+D[0],i=+D[1],g):[r-e,i-t]},g.extent=function(D){return arguments.length?(e=+D[0][0],r=+D[1][0],t=+D[0][1],i=+D[1][1],g):[[e,t],[r,i]]},g.iterations=function(D){return arguments.length?(p=+D,g):p};function m({nodes:D,links:I}){for(let[M,F]of D.entries())F.index=M,F.sourceLinks=[],F.targetLinks=[];let B=new Map(D.map((M,F)=>[o(M,F,D),M]));for(let[M,F]of I.entries()){F.index=M;let{source:z,target:$}=F;typeof z!="object"&&(z=F.source=Q_e(B,z)),typeof $!="object"&&($=F.target=Q_e(B,$)),z.sourceLinks.push(F),$.targetLinks.push(F)}if(h!=null)for(let{sourceLinks:M,targetLinks:F}of D)M.sort(h),F.sort(h)}function y({nodes:D}){for(let I of D)I.value=I.fixedValue===void 0?Math.max(lv(I.sourceLinks,CV),lv(I.targetLinks,CV)):I.fixedValue}function v({nodes:D}){let I=D.length,B=new Set(D),M=new Set,F=0;for(;B.size;){for(let z of B){z.depth=F;for(let{target:$}of z.sourceLinks)M.add($)}if(++F>I)throw new Error("circular link");B=M,M=new Set}}function x({nodes:D}){let I=D.length,B=new Set(D),M=new Set,F=0;for(;B.size;){for(let z of B){z.height=F;for(let{source:$}of z.targetLinks)M.add($)}if(++F>I)throw new Error("circular link");B=M,M=new Set}}function T({nodes:D}){let I=Iw(D,F=>F.depth)+1,B=(r-e-n)/(I-1),M=new Array(I);for(let F of D){let z=Math.max(0,Math.min(I-1,Math.floor(l.call(null,F,I))));F.layer=z,F.x0=e+z*B,F.x1=F.x0+n,M[z]?M[z].push(F):M[z]=[F]}if(u)for(let F of M)F.sort(u);return M}function C(D){let I=ov(D,B=>(i-t-(B.length-1)*s)/lv(B,CV));for(let B of D){let M=t;for(let F of B){F.y0=M,F.y1=M+F.value*I,M=F.y1+s;for(let z of F.sourceLinks)z.width=z.value*I}M=(i-M+s)/(B.length+1);for(let F=0;FB.length)-1)),C(I);for(let B=0;B0))continue;let j=(G/U-$.y0)*I;$.y0+=j,$.y1+=j,O($)}u===void 0&&z.sort(K_),A(z,B)}}function E(D,I,B){for(let M=D.length,F=M-2;F>=0;--F){let z=D[F];for(let $ of z){let G=0,U=0;for(let{target:H,value:Q}of $.sourceLinks){let Y=Q*(H.layer-$.layer);G+=R($,H)*Y,U+=Y}if(!(U>0))continue;let j=(G/U-$.y0)*I;$.y0+=j,$.y1+=j,O($)}u===void 0&&z.sort(K_),A(z,B)}}function A(D,I){let B=D.length>>1,M=D[B];P(D,M.y0-s,B-1,I),N(D,M.y1+s,B+1,I),P(D,i,D.length-1,I),N(D,t,0,I)}function N(D,I,B,M){for(;B1e-6&&(F.y0+=z,F.y1+=z),I=F.y1+s}}function P(D,I,B,M){for(;B>=0;--B){let F=D[B],z=(F.y1-I)*M;z>1e-6&&(F.y0-=z,F.y1-=z),I=F.y0-s}}function O({sourceLinks:D,targetLinks:I}){if(h===void 0){for(let{source:{sourceLinks:B}}of I)B.sort(Z_e);for(let{target:{targetLinks:B}}of D)B.sort(K_e)}}function L(D){if(h===void 0)for(let{sourceLinks:I,targetLinks:B}of D)I.sort(Z_e),B.sort(K_e)}function _(D,I){let B=D.y0-(D.sourceLinks.length-1)*s/2;for(let{target:M,width:F}of D.sourceLinks){if(M===I)break;B+=F+s}for(let{source:M,width:F}of I.targetLinks){if(M===D)break;B-=F}return B}function R(D,I){let B=I.y0-(I.targetLinks.length-1)*s/2;for(let{source:M,width:F}of I.targetLinks){if(M===D)break;B+=F+s}for(let{target:M,width:F}of D.sourceLinks){if(M===I)break;B-=F}return B}return g}var e7e=q(()=>{bV();kV();X_e()});function AV(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t7e(){return new AV}var SV,EV,Ug,kwt,_V,r7e=q(()=>{SV=Math.PI,EV=2*SV,Ug=1e-6,kwt=EV-Ug;AV.prototype=t7e.prototype={constructor:AV,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},bezierCurveTo:function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},arcTo:function(e,t,r,i,n){e=+e,t=+t,r=+r,i=+i,n=+n;var a=this._x1,s=this._y1,o=r-e,l=i-t,u=a-e,h=s-t,f=u*u+h*h;if(n<0)throw new Error("negative radius: "+n);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>Ug)if(!(Math.abs(h*o-l*u)>Ug)||!n)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var d=r-a,p=i-s,g=o*o+l*l,m=d*d+p*p,y=Math.sqrt(g),v=Math.sqrt(f),x=n*Math.tan((SV-Math.acos((g+f-m)/(2*y*v)))/2),T=x/v,C=x/y;Math.abs(T-1)>Ug&&(this._+="L"+(e+T*u)+","+(t+T*h)),this._+="A"+n+","+n+",0,0,"+ +(h*d>u*p)+","+(this._x1=e+C*o)+","+(this._y1=t+C*l)}},arc:function(e,t,r,i,n,a){e=+e,t=+t,r=+r,a=!!a;var s=r*Math.cos(i),o=r*Math.sin(i),l=e+s,u=t+o,h=1^a,f=a?i-n:n-i;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Ug||Math.abs(this._y1-u)>Ug)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%EV+EV),f>kwt?this._+="A"+r+","+r+",0,1,"+h+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>Ug&&(this._+="A"+r+","+r+",0,"+ +(f>=SV)+","+h+","+(this._x1=e+r*Math.cos(n))+","+(this._y1=t+r*Math.sin(n))))},rect:function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},toString:function(){return this._}};_V=t7e});var i7e=q(()=>{r7e()});function LV(e){return function(){return e}}var n7e=q(()=>{});function a7e(e){return e[0]}function s7e(e){return e[1]}var o7e=q(()=>{});var l7e,c7e=q(()=>{l7e=Array.prototype.slice});function Cwt(e){return e.source}function Swt(e){return e.target}function Ewt(e){var t=Cwt,r=Swt,i=a7e,n=s7e,a=null;function s(){var o,l=l7e.call(arguments),u=t.apply(this,l),h=r.apply(this,l);if(a||(a=o=_V()),e(a,+i.apply(this,(l[0]=u,l)),+n.apply(this,l),+i.apply(this,(l[0]=h,l)),+n.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(i=typeof o=="function"?o:LV(+o),s):i},s.y=function(o){return arguments.length?(n=typeof o=="function"?o:LV(+o),s):n},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function Awt(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function RV(){return Ewt(Awt)}var u7e=q(()=>{i7e();c7e();n7e();o7e()});var h7e=q(()=>{u7e()});function _wt(e){return[e.source.x1,e.y0]}function Lwt(e){return[e.target.x0,e.y1]}function IV(){return RV().source(_wt).target(Lwt)}var f7e=q(()=>{h7e()});var d7e=q(()=>{e7e();kV();f7e()});var g7e={};Lr(g7e,{diagram:()=>Ywt});var DV,Q_,e7,t7,J_,Rwt,Iwt,Dwt,Nwt,Mwt,Owt,Pwt,Bwt,Fwt,p7e,$wt,zwt,Gwt,qwt,Vwt,Wwt,Uwt,Hwt,Ywt,m7e=q(()=>{Er();er();Ar();d7e();DV=(function(){var e=b(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),t=[1,9],r=[1,10],i=[1,5,10,12],n={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:b(function(l,u,h,f,d,p,g){var m=p.length-1;switch(d){case 7:let y=f.findOrCreateNode(p[m-4].trim().replaceAll('""','"')),v=f.findOrCreateNode(p[m-2].trim().replaceAll('""','"')),x=parseFloat(p[m].trim());f.addLink(y,v,x);break;case 8:case 9:case 11:this.$=p[m];break;case 10:this.$=p[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:r},{15:18,16:7,17:8,18:t,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:t,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:b(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:b(function(l){var u=this,h=[0],f=[],d=[null],p=[],g=this.table,m="",y=0,v=0,x=0,T=2,C=1,w=p.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(E.yy[A]=this.yy[A]);k.setInput(l,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var N=k.yylloc;p.push(N);var P=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(H){h.length=h.length-2*H,d.length=d.length-H,p.length=p.length-H}b(O,"popStack");function L(){var H;return H=f.pop()||k.lex()||C,typeof H!="number"&&(H instanceof Array&&(f=H,H=f.pop()),H=u.symbols_[H]||H),H}b(L,"lex");for(var _,R,D,I,B,M,F={},z,$,G,U;;){if(D=h[h.length-1],this.defaultActions[D]?I=this.defaultActions[D]:((_===null||typeof _>"u")&&(_=L()),I=g[D]&&g[D][_]),typeof I>"u"||!I.length||!I[0]){var j="";U=[];for(z in g[D])this.terminals_[z]&&z>T&&U.push("'"+this.terminals_[z]+"'");k.showPosition?j="Parse error on line "+(y+1)+`: -`+k.showPosition()+` -Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":j="Parse error on line "+(y+1)+": Unexpected "+(_==C?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(j,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:N,expected:U})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+_);switch(I[0]){case 1:h.push(_),d.push(k.yytext),p.push(k.yylloc),h.push(I[1]),_=null,R?(_=R,R=null):(v=k.yyleng,m=k.yytext,y=k.yylineno,N=k.yylloc,x>0&&x--);break;case 2:if($=this.productions_[I[1]][1],F.$=d[d.length-$],F._$={first_line:p[p.length-($||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-($||1)].first_column,last_column:p[p.length-1].last_column},P&&(F._$.range=[p[p.length-($||1)].range[0],p[p.length-1].range[1]]),M=this.performAction.apply(F,[m,v,y,E.yy,I[1],d,p].concat(w)),typeof M<"u")return M;$&&(h=h.slice(0,-1*$*2),d=d.slice(0,-1*$),p=p.slice(0,-1*$)),h.push(this.productions_[I[1]][0]),d.push(F.$),p.push(F._$),G=g[h[h.length-2]][h[h.length-1]],h.push(G);break;case 3:return!0}}return!0},"parse")},a=(function(){var o={EOF:1,parseError:b(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:b(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:b(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(l){this.unput(this.match.slice(l))},"less"),pastInput:b(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` -`+u+"^"},"showPosition"),test_match:b(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var u=this.next();return u||this.lex()},"lex"),begin:b(function(u){this.conditionStack.push(u)},"begin"),popState:b(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:b(function(u){this.begin(u)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return o})();n.lexer=a;function s(){this.yy={}}return b(s,"Parser"),s.prototype=n,n.Parser=s,new s})();DV.parser=DV;Q_=DV,e7=[],t7=[],J_=new Map,Rwt=b(()=>{e7=[],t7=[],J_=new Map,fr()},"clear"),Iwt=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{b(this,"SankeyLink")}},Dwt=b((e,t,r)=>{e7.push(new Iwt(e,t,r))},"addLink"),Nwt=class{constructor(e){this.ID=e}static{b(this,"SankeyNode")}},Mwt=b(e=>{e=ht.sanitizeText(e,we());let t=J_.get(e);return t===void 0&&(t=new Nwt(e),J_.set(e,t),t7.push(t)),t},"findOrCreateNode"),Owt=b(()=>t7,"getNodes"),Pwt=b(()=>e7,"getLinks"),Bwt=b(()=>({nodes:t7.map(e=>({id:e.ID})),links:e7.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),Fwt={nodesMap:J_,getConfig:b(()=>we().sankey,"getConfig"),getNodes:Owt,getLinks:Pwt,getGraph:Bwt,addLink:Dwt,findOrCreateNode:Mwt,getAccTitle:vr,setAccTitle:yr,getAccDescription:xr,setAccDescription:br,getDiagramTitle:Tr,setDiagramTitle:kr,clear:Rwt},p7e=class NV{static{b(this,"Uid")}static{this.count=0}static next(t){return new NV(t+ ++NV.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},$wt={left:xV,right:TV,center:wV,justify:Dw},zwt=b(e=>{let t=0,r=0;for(let i of e){let n=i.value??0;n>t&&(t=n,r=i.layer??0)}return r},"findCentralNodeLayer"),Gwt=b(function(e,t,r,i){let{securityLevel:n,sankey:a}=we(),s=s4.sankey,o;n==="sandbox"&&(o=Qe("#i"+t));let l=n==="sandbox"?Qe(o.nodes()[0].contentDocument.body):Qe("body"),u=n==="sandbox"?l.select(`[id="${t}"]`):Qe(`[id="${t}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,m=a?.suffix??s.suffix,y=a?.showValues??s.showValues,v=a?.nodeWidth??s.nodeWidth??10,x=a?.nodePadding??s.nodePadding??12,T=a?.labelStyle??s.labelStyle??"legacy",C=a?.nodeColors??{},w=i.db.getGraph(),k=$wt[p];Z_().nodeId(M=>M.id).nodeWidth(v).nodePadding(x+(y?15:0)).nodeAlign(k).extent([[0,0],[h,f]])(w);let A=zwt(w.nodes),N=no(lI),P=b(M=>C[M]??N(M),"getNodeColor");u.append("g").attr("class","nodes").selectAll(".node").data(w.nodes).join("g").attr("class","node").attr("id",M=>(M.uid=p7e.next("node-")).id).attr("transform",function(M){return"translate("+M.x0+","+M.y0+")"}).attr("x",M=>M.x0).attr("y",M=>M.y0).append("rect").attr("height",M=>M.y1-M.y0).attr("width",M=>M.x1-M.x0).attr("fill",M=>P(M.id));let O=b(({id:M,value:F})=>y?`${M} -${g}${Math.round(F*100)/100}${m}`:M,"getText"),L=b(M=>T==="outlined"?(M.layer??0)_.selectAll(M?`.${M}`:"text").data(w.nodes).join("text").attr("class",M??null).attr("x",F=>L(F).x).attr("y",F=>(F.y1+F.y0)/2).attr("dy",`${y?"0":"0.35"}em`).attr("text-anchor",F=>L(F).anchor).text(O),"appendLabel");T==="outlined"?(R("sankey-label-bg"),R("sankey-label-fg")):R();let D=u.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(w.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),I=a?.linkColor??"gradient";if(I==="gradient"){let M=D.append("linearGradient").attr("id",F=>(F.uid=p7e.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",F=>F.source.x1).attr("x2",F=>F.target.x0);M.append("stop").attr("offset","0%").attr("stop-color",F=>P(F.source.id)),M.append("stop").attr("offset","100%").attr("stop-color",F=>P(F.target.id))}let B;switch(I){case"gradient":B=b(M=>M.uid,"coloring");break;case"source":B=b(M=>P(M.source.id),"coloring");break;case"target":B=b(M=>P(M.target.id),"coloring");break;default:B=I}D.append("path").attr("d",IV()).attr("stroke",B).attr("stroke-width",M=>Math.max(1,M.width)),wc(void 0,u,0,d)},"draw"),qwt={draw:Gwt},Vwt=b(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` -`).trim(),"prepareTextForParsing"),Wwt=b(e=>`.label { + ${Gu()} +`,"getStyles"),L3t=R3t,I3t={db:S3t,renderer:A3t,parser:d3t,styles:L3t}});function tk(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var hDe=X(()=>{});function Sx(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var fDe=X(()=>{});function Ex(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}var dDe=X(()=>{});var PY=X(()=>{hDe();fDe();dDe()});function M3t(e){return e.target.depth}function BY(e){return e.depth}function $Y(e,t){return t-1-e.height}function rk(e,t){return e.sourceLinks.length?e.depth:t-1}function FY(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Sx(e.sourceLinks,M3t)-1:0}var zY=X(()=>{PY()});function Ax(e){return function(){return e}}var pDe=X(()=>{});function gDe(e,t){return $7(e.source,t.source)||e.index-t.index}function mDe(e,t){return $7(e.target,t.target)||e.index-t.index}function $7(e,t){return e.y0-t.y0}function GY(e){return e.value}function D3t(e){return e.index}function N3t(e){return e.nodes}function O3t(e){return e.links}function yDe(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function vDe({nodes:e}){for(let t of e){let r=t.y0,n=r;for(let i of t.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of t.targetLinks)i.y1=n+i.width/2,n+=i.width}}function F7(){let e=0,t=0,r=1,n=1,i=24,a=8,s,o=D3t,l=rk,u,h,f=N3t,d=O3t,p=6;function g(){let I={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return m(I),y(I),x(I),b(I),w(I),vDe(I),I}g.update=function(I){return vDe(I),I},g.nodeId=function(I){return arguments.length?(o=typeof I=="function"?I:Ax(I),g):o},g.nodeAlign=function(I){return arguments.length?(l=typeof I=="function"?I:Ax(I),g):l},g.nodeSort=function(I){return arguments.length?(u=I,g):u},g.nodeWidth=function(I){return arguments.length?(i=+I,g):i},g.nodePadding=function(I){return arguments.length?(a=s=+I,g):a},g.nodes=function(I){return arguments.length?(f=typeof I=="function"?I:Ax(I),g):f},g.links=function(I){return arguments.length?(d=typeof I=="function"?I:Ax(I),g):d},g.linkSort=function(I){return arguments.length?(h=I,g):h},g.size=function(I){return arguments.length?(e=t=0,r=+I[0],n=+I[1],g):[r-e,n-t]},g.extent=function(I){return arguments.length?(e=+I[0][0],r=+I[1][0],t=+I[0][1],n=+I[1][1],g):[[e,t],[r,n]]},g.iterations=function(I){return arguments.length?(p=+I,g):p};function m({nodes:I,links:M}){for(let[P,$]of I.entries())$.index=P,$.sourceLinks=[],$.targetLinks=[];let B=new Map(I.map((P,$)=>[o(P,$,I),P]));for(let[P,$]of M.entries()){$.index=P;let{source:G,target:q}=$;typeof G!="object"&&(G=$.source=yDe(B,G)),typeof q!="object"&&(q=$.target=yDe(B,q)),G.sourceLinks.push($),q.targetLinks.push($)}if(h!=null)for(let{sourceLinks:P,targetLinks:$}of I)P.sort(h),$.sort(h)}function y({nodes:I}){for(let M of I)M.value=M.fixedValue===void 0?Math.max(Ex(M.sourceLinks,GY),Ex(M.targetLinks,GY)):M.fixedValue}function x({nodes:I}){let M=I.length,B=new Set(I),P=new Set,$=0;for(;B.size;){for(let G of B){G.depth=$;for(let{target:q}of G.sourceLinks)P.add(q)}if(++$>M)throw new Error("circular link");B=P,P=new Set}}function b({nodes:I}){let M=I.length,B=new Set(I),P=new Set,$=0;for(;B.size;){for(let G of B){G.height=$;for(let{source:q}of G.targetLinks)P.add(q)}if(++$>M)throw new Error("circular link");B=P,P=new Set}}function T({nodes:I}){let M=tk(I,$=>$.depth)+1,B=(r-e-i)/(M-1),P=new Array(M);for(let $ of I){let G=Math.max(0,Math.min(M-1,Math.floor(l.call(null,$,M))));$.layer=G,$.x0=e+G*B,$.x1=$.x0+i,P[G]?P[G].push($):P[G]=[$]}if(u)for(let $ of P)$.sort(u);return P}function k(I){let M=Sx(I,B=>(n-t-(B.length-1)*s)/Ex(B,GY));for(let B of I){let P=t;for(let $ of B){$.y0=P,$.y1=P+$.value*M,P=$.y1+s;for(let G of $.sourceLinks)G.width=G.value*M}P=(n-P+s)/(B.length+1);for(let $=0;$B.length)-1)),k(M);for(let B=0;B0))continue;let j=(z/V-q.y0)*M;q.y0+=j,q.y1+=j,O(q)}u===void 0&&G.sort($7),E(G,B)}}function S(I,M,B){for(let P=I.length,$=P-2;$>=0;--$){let G=I[$];for(let q of G){let z=0,V=0;for(let{target:ee,value:ne}of q.sourceLinks){let Q=ne*(ee.layer-q.layer);z+=D(q,ee)*Q,V+=Q}if(!(V>0))continue;let j=(z/V-q.y0)*M;q.y0+=j,q.y1+=j,O(q)}u===void 0&&G.sort($7),E(G,B)}}function E(I,M){let B=I.length>>1,P=I[B];N(I,P.y0-s,B-1,M),L(I,P.y1+s,B+1,M),N(I,n,I.length-1,M),L(I,t,0,M)}function L(I,M,B,P){for(;B1e-6&&($.y0+=G,$.y1+=G),M=$.y1+s}}function N(I,M,B,P){for(;B>=0;--B){let $=I[B],G=($.y1-M)*P;G>1e-6&&($.y0-=G,$.y1-=G),M=$.y0-s}}function O({sourceLinks:I,targetLinks:M}){if(h===void 0){for(let{source:{sourceLinks:B}}of M)B.sort(mDe);for(let{target:{targetLinks:B}}of I)B.sort(gDe)}}function R(I){if(h===void 0)for(let{sourceLinks:M,targetLinks:B}of I)M.sort(mDe),B.sort(gDe)}function _(I,M){let B=I.y0-(I.sourceLinks.length-1)*s/2;for(let{target:P,width:$}of I.sourceLinks){if(P===M)break;B+=$+s}for(let{source:P,width:$}of M.targetLinks){if(P===I)break;B-=$}return B}function D(I,M){let B=M.y0-(M.targetLinks.length-1)*s/2;for(let{source:P,width:$}of M.targetLinks){if(P===I)break;B+=$+s}for(let{target:P,width:$}of I.sourceLinks){if(P===M)break;B-=$}return B}return g}var xDe=X(()=>{PY();zY();pDe()});function WY(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function bDe(){return new WY}var qY,VY,Zm,P3t,UY,TDe=X(()=>{qY=Math.PI,VY=2*qY,Zm=1e-6,P3t=VY-Zm;WY.prototype=bDe.prototype={constructor:WY,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-e,l=n-t,u=a-e,h=s-t,f=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>Zm)if(!(Math.abs(h*o-l*u)>Zm)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var d=r-a,p=n-s,g=o*o+l*l,m=d*d+p*p,y=Math.sqrt(g),x=Math.sqrt(f),b=i*Math.tan((qY-Math.acos((g+f-m)/(2*y*x)))/2),T=b/x,k=b/y;Math.abs(T-1)>Zm&&(this._+="L"+(e+T*u)+","+(t+T*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>u*p)+","+(this._x1=e+k*o)+","+(this._y1=t+k*l)}},arc:function(e,t,r,n,i,a){e=+e,t=+t,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=e+s,u=t+o,h=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Zm||Math.abs(this._y1-u)>Zm)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%VY+VY),f>P3t?this._+="A"+r+","+r+",0,1,"+h+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>Zm&&(this._+="A"+r+","+r+",0,"+ +(f>=qY)+","+h+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};UY=bDe});var wDe=X(()=>{TDe()});function HY(e){return function(){return e}}var CDe=X(()=>{});function kDe(e){return e[0]}function SDe(e){return e[1]}var EDe=X(()=>{});var ADe,_De=X(()=>{ADe=Array.prototype.slice});function B3t(e){return e.source}function $3t(e){return e.target}function F3t(e){var t=B3t,r=$3t,n=kDe,i=SDe,a=null;function s(){var o,l=ADe.call(arguments),u=t.apply(this,l),h=r.apply(this,l);if(a||(a=o=UY()),e(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=h,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:HY(+o),s):n},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:HY(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function z3t(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function YY(){return F3t(z3t)}var RDe=X(()=>{wDe();_De();CDe();EDe()});var LDe=X(()=>{RDe()});function G3t(e){return[e.source.x1,e.y0]}function q3t(e){return[e.target.x0,e.y1]}function XY(){return YY().source(G3t).target(q3t)}var IDe=X(()=>{LDe()});var MDe=X(()=>{xDe();zY();IDe()});var NDe={};cr(NDe,{diagram:()=>sAt});var jY,z7,q7,V7,G7,V3t,W3t,U3t,H3t,Y3t,X3t,j3t,K3t,Z3t,DDe,Q3t,J3t,eAt,tAt,rAt,nAt,iAt,aAt,sAt,ODe=X(()=>{hr();ur();Yt();zr();MDe();jY=(function(){var e=v(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),t=[1,9],r=[1,10],n=[1,5,10,12],i={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:v(function(l,u,h,f,d,p,g){var m=p.length-1;switch(d){case 7:let y=f.findOrCreateNode(p[m-4].trim().replaceAll('""','"')),x=f.findOrCreateNode(p[m-2].trim().replaceAll('""','"')),b=parseFloat(p[m].trim());f.addLink(y,x,b);break;case 8:case 9:case 11:this.$=p[m];break;case 10:this.$=p[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(n,[2,8]),e(n,[2,9]),{19:[1,16]},e(n,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:r},{15:18,16:7,17:8,18:t,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(n,[2,10]),{15:21,16:7,17:8,18:t,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:v(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:v(function(l){var u=this,h=[0],f=[],d=[null],p=[],g=this.table,m="",y=0,x=0,b=0,T=2,k=1,w=p.slice.call(arguments,1),C=Object.create(this.lexer),S={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(S.yy[E]=this.yy[E]);C.setInput(l,S.yy),S.yy.lexer=C,S.yy.parser=this,typeof C.yylloc>"u"&&(C.yylloc={});var L=C.yylloc;p.push(L);var N=C.options&&C.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(ee){h.length=h.length-2*ee,d.length=d.length-ee,p.length=p.length-ee}v(O,"popStack");function R(){var ee;return ee=f.pop()||C.lex()||k,typeof ee!="number"&&(ee instanceof Array&&(f=ee,ee=f.pop()),ee=u.symbols_[ee]||ee),ee}v(R,"lex");for(var _,D,I,M,B,P,$={},G,q,z,V;;){if(I=h[h.length-1],this.defaultActions[I]?M=this.defaultActions[I]:((_===null||typeof _>"u")&&(_=R()),M=g[I]&&g[I][_]),typeof M>"u"||!M.length||!M[0]){var j="";V=[];for(G in g[I])this.terminals_[G]&&G>T&&V.push("'"+this.terminals_[G]+"'");C.showPosition?j="Parse error on line "+(y+1)+`: +`+C.showPosition()+` +Expecting `+V.join(", ")+", got '"+(this.terminals_[_]||_)+"'":j="Parse error on line "+(y+1)+": Unexpected "+(_==k?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(j,{text:C.match,token:this.terminals_[_]||_,line:C.yylineno,loc:L,expected:V})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+_);switch(M[0]){case 1:h.push(_),d.push(C.yytext),p.push(C.yylloc),h.push(M[1]),_=null,D?(_=D,D=null):(x=C.yyleng,m=C.yytext,y=C.yylineno,L=C.yylloc,b>0&&b--);break;case 2:if(q=this.productions_[M[1]][1],$.$=d[d.length-q],$._$={first_line:p[p.length-(q||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(q||1)].first_column,last_column:p[p.length-1].last_column},N&&($._$.range=[p[p.length-(q||1)].range[0],p[p.length-1].range[1]]),P=this.performAction.apply($,[m,x,y,S.yy,M[1],d,p].concat(w)),typeof P<"u")return P;q&&(h=h.slice(0,-1*q*2),d=d.slice(0,-1*q),p=p.slice(0,-1*q)),h.push(this.productions_[M[1]][0]),d.push($.$),p.push($._$),z=g[h[h.length-2]][h[h.length-1]],h.push(z);break;case 3:return!0}}return!0},"parse")},a=(function(){var o={EOF:1,parseError:v(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:v(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:v(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(l){this.unput(this.match.slice(l))},"less"),pastInput:v(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:v(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var u=this.next();return u||this.lex()},"lex"),begin:v(function(u){this.conditionStack.push(u)},"begin"),popState:v(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:v(function(u){this.begin(u)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return o})();i.lexer=a;function s(){this.yy={}}return v(s,"Parser"),s.prototype=i,i.Parser=s,new s})();jY.parser=jY;z7=jY,q7=[],V7=[],G7=new Map,V3t=v(()=>{q7=[],V7=[],G7=new Map,pr()},"clear"),W3t=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{v(this,"SankeyLink")}},U3t=v((e,t,r)=>{q7.push(new W3t(e,t,r))},"addLink"),H3t=class{constructor(e){this.ID=e}static{v(this,"SankeyNode")}},Y3t=v(e=>{e=vt.sanitizeText(e,ze());let t=G7.get(e);return t===void 0&&(t=new H3t(e),G7.set(e,t),V7.push(t)),t},"findOrCreateNode"),X3t=v(()=>V7,"getNodes"),j3t=v(()=>q7,"getLinks"),K3t=v(()=>({nodes:V7.map(e=>({id:e.ID})),links:q7.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),Z3t={nodesMap:G7,getConfig:v(()=>ze().sankey,"getConfig"),getNodes:X3t,getLinks:j3t,getGraph:K3t,addLink:U3t,findOrCreateNode:Y3t,getAccTitle:Lr,setAccTitle:Ar,getAccDescription:Mr,setAccDescription:Ir,getDiagramTitle:Dr,setDiagramTitle:$r,clear:V3t},DDe=class KY{static{v(this,"Uid")}static{this.count=0}static next(t){return new KY(t+ ++KY.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},Q3t={left:BY,right:$Y,center:FY,justify:rk},J3t=v(e=>{let t=0,r=0;for(let n of e){let i=n.value??0;i>t&&(t=i,r=n.layer??0)}return r},"findCentralNodeLayer"),eAt=v(function(e,t,r,n){let{securityLevel:i,sankey:a}=ze(),s=IS.sankey,o;i==="sandbox"&&(o=ct("#i"+t));let l=i==="sandbox"?ct(o.nodes()[0].contentDocument.body):ct("body"),u=i==="sandbox"?l.select(`[id="${t}"]`):ct(`[id="${t}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,m=a?.suffix??s.suffix,y=a?.showValues??s.showValues,x=a?.nodeWidth??s.nodeWidth??10,b=a?.nodePadding??s.nodePadding??12,T=a?.labelStyle??s.labelStyle??"legacy",k=a?.nodeColors??{},w=n.db.getGraph(),C=Q3t[p];F7().nodeId(P=>P.id).nodeWidth(x).nodePadding(b+(y?15:0)).nodeAlign(C).extent([[0,0],[h,f]])(w);let E=J3t(w.nodes),L=Yo(jM),N=v(P=>k[P]??L(P),"getNodeColor");u.append("g").attr("class","nodes").selectAll(".node").data(w.nodes).join("g").attr("class","node").attr("id",P=>(P.uid=DDe.next("node-")).id).attr("transform",function(P){return"translate("+P.x0+","+P.y0+")"}).attr("x",P=>P.x0).attr("y",P=>P.y0).append("rect").attr("height",P=>P.y1-P.y0).attr("width",P=>P.x1-P.x0).attr("fill",P=>N(P.id));let O=v(({id:P,value:$})=>y?`${P} +${g}${Math.round($*100)/100}${m}`:P,"getText"),R=v(P=>T==="outlined"?(P.layer??0)_.selectAll(P?`.${P}`:"text").data(w.nodes).join("text").attr("class",P??null).attr("x",$=>R($).x).attr("y",$=>($.y1+$.y0)/2).attr("dy",`${y?"0":"0.35"}em`).attr("text-anchor",$=>R($).anchor).text(O),"appendLabel");T==="outlined"?(D("sankey-label-bg"),D("sankey-label-fg")):D();let I=u.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(w.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),M=a?.linkColor??"gradient";if(M==="gradient"){let P=I.append("linearGradient").attr("id",$=>($.uid=DDe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",$=>$.source.x1).attr("x2",$=>$.target.x0);P.append("stop").attr("offset","0%").attr("stop-color",$=>N($.source.id)),P.append("stop").attr("offset","100%").attr("stop-color",$=>N($.target.id))}let B;switch(M){case"gradient":B=v(P=>P.uid,"coloring");break;case"source":B=v(P=>N(P.source.id),"coloring");break;case"target":B=v(P=>N(P.target.id),"coloring");break;default:B=M}I.append("path").attr("d",XY()).attr("stroke",B).attr("stroke-width",P=>Math.max(1,P.width)),tu(void 0,u,0,d)},"draw"),tAt={draw:eAt},rAt=v(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),nAt=v(e=>`.label { font-family: ${e.fontFamily}; } @@ -2896,7 +2970,7 @@ ${g}${Math.round(F*100)/100}${m}`:M,"getText"),L=b(M=>T==="outlined"?(M.layer??0 stroke-opacity: 0.5; mix-blend-mode: multiply; } -`,"getStyles"),Uwt=Wwt,Hwt=Q_.parse.bind(Q_);Q_.parse=e=>Hwt(Vwt(e));Ywt={styles:Uwt,parser:Q_,db:Fwt,renderer:qwt}});var b7e={};Lr(b7e,{diagram:()=>ikt});var jwt,y7e,Xwt,Kwt,Zwt,v7e,Qwt,Jwt,ekt,tkt,rkt,ikt,x7e=q(()=>{Ja();au();$r();Er();er();fl();jwt=rr.packet,y7e=class{constructor(){this.packet=[],this.setAccTitle=yr,this.getAccTitle=vr,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,this.getAccDescription=xr,this.setAccDescription=br}static{b(this,"PacketDB")}getConfig(){let e=Yr({...jwt,...It().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){fr(),this.packet=[]}},Xwt=1e4,Kwt=b((e,t)=>{Un(e,t);let r=-1,i=[],n=1,{bitsPerRow:a}=t.getConfig();for(let{start:s,end:o,bits:l,label:u}of e.blocks){if(s!==void 0&&o!==void 0&&o{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];let i=t*r-1,n=t*r;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),v7e={parser:{yy:void 0},parse:b(async e=>{let t=await xn("packet",e),r=v7e.parser?.yy;if(!(r instanceof y7e))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");ee.debug(t),Kwt(t,r)},"parse")},Qwt=b((e,t,r,i)=>{let n=i.db,a=n.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=n.getPacket(),f=n.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),g=l*u+2,m=yi(t);m.attr("viewBox",`0 0 ${g} ${p}`),Mr(m,p,g,a.useMaxWidth);for(let[y,v]of h.entries())Jwt(m,v,y,a);m.append("text").text(f).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),Jwt=b((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=e.append("g"),h=r*(i+a)+a;for(let f of t){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-n;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",i).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let g=f.end===f.start,m=h-2;u.append("text").attr("x",d+(g?p/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||u.append("text").attr("x",d+p).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),ekt={draw:Qwt},tkt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},rkt=b(({packet:e}={})=>{let t=Yr(tkt,e);return` +`,"getStyles"),iAt=nAt,aAt=z7.parse.bind(z7);z7.parse=e=>aAt(rAt(e));sAt={styles:iAt,parser:z7,db:Z3t,renderer:tAt}});var $De={};cr($De,{diagram:()=>mAt});var oAt,PDe,lAt,cAt,uAt,BDe,hAt,fAt,dAt,pAt,gAt,mAt,FDe=X(()=>{Us();qi();Ur();hr();ur();Yt();ss();oAt=dr.packet,PDe=class{constructor(){this.packet=[],this.setAccTitle=Ar,this.getAccTitle=Lr,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,this.getAccDescription=Mr,this.setAccDescription=Ir}static{v(this,"PacketDB")}getConfig(){let e=Qr({...oAt,...It().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){pr(),this.packet=[]}},lAt=1e4,cAt=v((e,t)=>{Fn(e,t);let r=-1,n=[],i=1,{bitsPerRow:a}=t.getConfig();for(let{start:s,end:o,bits:l,label:u}of e.blocks){if(s!==void 0&&o!==void 0&&o{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];let n=t*r-1,i=t*r;return[{start:e.start,end:n,label:e.label,bits:n-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),BDe={parser:{yy:void 0},parse:v(async e=>{let t=await Ei("packet",e),r=BDe.parser?.yy;if(!(r instanceof PDe))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");fe.debug(t),cAt(t,r)},"parse")},hAt=v((e,t,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=i.getPacket(),f=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),g=l*u+2,m=xn(t);m.attr("viewBox",`0 0 ${g} ${p}`),Vr(m,p,g,a.useMaxWidth);for(let[y,x]of h.entries())fAt(m,x,y,a);m.append("text").text(f).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),fAt=v((e,t,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=e.append("g"),h=r*(n+a)+a;for(let f of t){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-i;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let g=f.end===f.start,m=h-2;u.append("text").attr("x",d+(g?p/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||u.append("text").attr("x",d+p).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),dAt={draw:hAt},pAt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},gAt=v(({packet:e}={})=>{let t=Qr(pAt,e);return` .packetByte { font-size: ${t.byteFontSize}; } @@ -2919,20 +2993,20 @@ ${g}${Math.round(F*100)/100}${m}`:M,"getText"),L=b(M=>T==="outlined"?(M.layer??0 stroke-width: ${t.blockStrokeWidth}; fill: ${t.blockFillColor}; } - `},"styles"),ikt={parser:v7e,get db(){return new y7e},renderer:ekt,styles:rkt}});var A7e={};Lr(A7e,{diagram:()=>kkt});function k7e(e,t,r,i,n,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;r.forEach((u,h)=>{if(u.entries.length!==o)return;let f=u.entries.map((d,p)=>{let g=2*Math.PI*p/o-Math.PI/2,m=C7e(d,i,n,l),y=m*Math.cos(g),v=m*Math.sin(g);return{x:y,y:v}});a==="circle"?e.append("path").attr("d",S7e(f,s.curveTension)).attr("class",`radarCurve-${h}`):a==="polygon"&&e.append("polygon").attr("points",f.map(d=>`${d.x},${d.y}`).join(" ")).attr("class",`radarCurve-${h}`)})}function C7e(e,t,r,i){let n=Math.min(Math.max(e,t),r);return i*(n-t)/(r-t)}function S7e(e,t){let r=e.length,i=`M${e[0].x},${e[0].y}`;for(let n=0;n{let u=e.append("g").attr("transform",`translate(${n}, ${a+l*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}var uv,T7e,Hg,nkt,akt,w7e,skt,okt,lkt,ckt,ukt,hkt,fkt,Nw,dkt,pkt,gkt,mkt,ykt,vkt,bkt,xkt,Tkt,wkt,kkt,_7e=q(()=>{Ja();au();$r();Er();er();fl();uv={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},T7e={axes:[],curves:[],options:uv},Hg=structuredClone(T7e),nkt=rr.radar,akt=b(()=>Yr({...nkt,...It().radar}),"getConfig"),w7e=b(()=>Hg.axes,"getAxes"),skt=b(()=>Hg.curves,"getCurves"),okt=b(()=>Hg.options,"getOptions"),lkt=b(e=>{Hg.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),ckt=b(e=>{Hg.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:ukt(t.entries)}))},"setCurves"),ukt=b(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=w7e();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let i=e.find(n=>n.axis?.$refText===r.name);if(i===void 0)throw new Error("Missing entry for axis "+r.label);return i.value})},"computeCurveEntries"),hkt=b(e=>{let t=e.reduce((r,i)=>(r[i.name]=i,r),{});Hg.options={showLegend:t.showLegend?.value??uv.showLegend,ticks:t.ticks?.value??uv.ticks,max:t.max?.value??uv.max,min:t.min?.value??uv.min,graticule:t.graticule?.value??uv.graticule}},"setOptions"),fkt=b(()=>{fr(),Hg=structuredClone(T7e)},"clear"),Nw={getAxes:w7e,getCurves:skt,getOptions:okt,setAxes:lkt,setCurves:ckt,setOptions:hkt,getConfig:akt,clear:fkt,setAccTitle:yr,getAccTitle:vr,setDiagramTitle:kr,getDiagramTitle:Tr,getAccDescription:xr,setAccDescription:br},dkt=b(e=>{Un(e,Nw);let{axes:t,curves:r,options:i}=e;Nw.setAxes(t),Nw.setCurves(r),Nw.setOptions(i)},"populate"),pkt={parse:b(async e=>{let t=await xn("radar",e);ee.debug(t),dkt(t)},"parse")},gkt=b((e,t,r,i)=>{let n=i.db,a=n.getAxes(),s=n.getCurves(),o=n.getOptions(),l=n.getConfig(),u=n.getDiagramTitle(),h=yi(t),f=mkt(h,l),d=o.max??Math.max(...s.map(m=>Math.max(...m.entries))),p=o.min,g=Math.min(l.width,l.height)/2;ykt(f,a,g,o.ticks,o.graticule),vkt(f,a,g,l),k7e(f,a,s,p,d,o.graticule,l),E7e(f,s,o.showLegend,l),f.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),mkt=b((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return Mr(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} ${i}`),e.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),ykt=b((e,t,r,i,n)=>{if(n==="circle")for(let a=0;a{let f=2*h*Math.PI/a-Math.PI/2,d=o*Math.cos(f),p=o*Math.sin(f);return`${d},${p}`}).join(" ");e.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),vkt=b((e,t,r,i)=>{let n=t.length;for(let a=0;a{let r="";for(let i=0;iPAt});function qDe(e,t,r,n,i,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;r.forEach((u,h)=>{if(u.entries.length!==o)return;let f=u.entries.map((d,p)=>{let g=2*Math.PI*p/o-Math.PI/2,m=VDe(d,n,i,l),y=m*Math.cos(g),x=m*Math.sin(g);return{x:y,y:x}});a==="circle"?e.append("path").attr("d",WDe(f,s.curveTension)).attr("class",`radarCurve-${h}`):a==="polygon"&&e.append("polygon").attr("points",f.map(d=>`${d.x},${d.y}`).join(" ")).attr("class",`radarCurve-${h}`)})}function VDe(e,t,r,n){let i=Math.min(Math.max(e,t),r);return n*(i-t)/(r-t)}function WDe(e,t){let r=e.length,n=`M${e[0].x},${e[0].y}`;for(let i=0;i{let u=e.append("g").attr("transform",`translate(${i}, ${a+l*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}var _x,W7,zDe,lh,yAt,vAt,GDe,xAt,bAt,TAt,wAt,CAt,kAt,SAt,nk,EAt,AAt,_At,RAt,LAt,IAt,MAt,DAt,NAt,OAt,PAt,YDe=X(()=>{Us();qi();Ur();hr();ur();Yt();ss();_x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},W7=32,zDe={axes:[],curves:[],options:_x},lh=structuredClone(zDe),yAt=dr.radar,vAt=v(()=>Qr({...yAt,...It().radar}),"getConfig"),GDe=v(()=>lh.axes,"getAxes"),xAt=v(()=>lh.curves,"getCurves"),bAt=v(()=>lh.options,"getOptions"),TAt=v(e=>{lh.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),wAt=v(e=>{lh.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:CAt(t.entries)}))},"setCurves"),CAt=v(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=GDe();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let n=e.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),kAt=v(e=>{let t=e.reduce((r,n)=>(r[n.name]=n,r),{});lh.options={showLegend:t.showLegend?.value??_x.showLegend,ticks:t.ticks?.value??_x.ticks,max:t.max?.value??_x.max,min:t.min?.value??_x.min,graticule:t.graticule?.value??_x.graticule},lh.options.ticks>W7&&(fe.warn(`Radar diagram ticks (${lh.options.ticks}) exceeds maximum allowed (${W7}). Using ${W7} instead.`),lh.options.ticks=W7)},"setOptions"),SAt=v(()=>{pr(),lh=structuredClone(zDe)},"clear"),nk={getAxes:GDe,getCurves:xAt,getOptions:bAt,setAxes:TAt,setCurves:wAt,setOptions:kAt,getConfig:vAt,clear:SAt,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,getAccDescription:Mr,setAccDescription:Ir},EAt=v(e=>{Fn(e,nk);let{axes:t,curves:r,options:n}=e;nk.setAxes(t),nk.setCurves(r),nk.setOptions(n)},"populate"),AAt={parse:v(async e=>{let t=await Ei("radar",e);fe.debug(t),EAt(t)},"parse")},_At=v((e,t,r,n)=>{let i=n.db,a=i.getAxes(),s=i.getCurves(),o=i.getOptions(),l=i.getConfig(),u=i.getDiagramTitle(),h=xn(t),f=RAt(h,l),d=o.max??Math.max(...s.map(m=>Math.max(...m.entries))),p=o.min,g=Math.min(l.width,l.height)/2;LAt(f,a,g,o.ticks,o.graticule),IAt(f,a,g,l),qDe(f,a,s,p,d,o.graticule,l),UDe(f,s,o.showLegend,l),f.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),RAt=v((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return Vr(e,n,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} ${n}`).attr("overflow","visible"),e.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),LAt=v((e,t,r,n,i)=>{if(i==="circle")for(let a=0;a{let f=2*h*Math.PI/a-Math.PI/2,d=o*Math.cos(f),p=o*Math.sin(f);return`${d},${p}`}).join(" ");e.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),IAt=v((e,t,r,n)=>{let i=t.length;for(let a=0;a.01?"start":l<-.01?"end":"middle",f=u>.01?"hanging":u<-.01?"auto":"central",d=4;e.append("text").text(s).attr("x",r*n.axisLabelFactor*l+d*l).attr("y",r*n.axisLabelFactor*u+d*u).attr("text-anchor",h).attr("dominant-baseline",f).attr("class","radarAxisLabel")}},"drawAxes");v(qDe,"drawCurves");v(VDe,"relativeRadius");v(WDe,"closedRoundCurve");v(UDe,"drawLegend");MAt={draw:_At},DAt=v((e,t)=>{let r="";for(let n=0;n{let t=yl(),r=It(),i=Yr(t,r.themeVariables),n=Yr(i.radar,e);return{themeVariables:i,radarOptions:n}},"buildRadarStyleOptions"),wkt=b(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=Tkt(e);return` + `}return r},"genIndexStyles"),NAt=v(e=>{let t=ds(),r=It(),n=Qr(t,r.themeVariables),i=Qr(n.radar,e);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),OAt=v(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=NAt(e);return` .radarTitle { font-size: ${t.fontSize}; color: ${t.titleColor}; @@ -2944,8 +3018,6 @@ ${g}${Math.round(F*100)/100}${m}`:M,"getText"),L=b(M=>T==="outlined"?(M.layer??0 stroke-width: ${r.axisStrokeWidth}; } .radarAxisLabel { - dominant-baseline: middle; - text-anchor: middle; font-size: ${r.axisLabelFontSize}px; color: ${r.axisColor}; } @@ -2960,26 +3032,26 @@ ${g}${Math.round(F*100)/100}${m}`:M,"getText"),L=b(M=>T==="outlined"?(M.layer??0 font-size: ${r.legendFontSize}px; dominant-baseline: hanging; } - ${xkt(t,r)} - `},"styles"),kkt={parser:pkt,db:Nw,renderer:bkt,styles:wkt}});var a8e={};Lr(a8e,{diagram:()=>K4t});function z7e(e){switch(ee.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return ee.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function G7e(e){return ee.debug("typeStr2Type",e),e==="=="?"thick":"normal"}function q7e(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function V7e(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function W7e(e){return e.includes("==")?"thick":"normal"}function U7e(e){return e.includes(".-")?"dotted":"solid"}function BV(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let r=t%e,i=Math.floor(t/e);return{px:r,py:i}}function n7(e,t,r=0,i=0){ee.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let n=0,a=0;if(e.children?.length>0){for(let p of e.children)n7(p,t);let s=s4t(e);n=s.width,a=s.height,ee.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",n,a);for(let p of e.children)p.size&&(ee.debug(`abc95 Setting size of children of ${e.id} id=${p.id} ${n} ${a} ${JSON.stringify(p.size)}`),p.size.width=n*(p.widthInColumns??1)+Tn*((p.widthInColumns??1)-1),p.size.height=a,p.size.x=0,p.size.y=0,ee.debug(`abc95 updating size of ${e.id} children child:${p.id} maxWidth:${n} maxHeight:${a}`));for(let p of e.children)n7(p,t,n,a);let o=e.columns??-1,l=0;for(let p of e.children)l+=p.widthInColumns??1;let u=e.children.length;o>0&&o0?Math.min(e.children.length,o):e.children.length;if(p>0){let g=(f-p*Tn-Tn)/p;ee.debug("abc95 (growing to fit) width",e.id,f,e.size?.width,g);for(let m of e.children)m.size&&(m.size.width=g)}}e.size={width:f,height:d,x:0,y:0}}ee.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function VV(e,t){ee.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let r=e.columns??-1;if(ee.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,n=e.children.length*i+(e.children.length-1)*Tn;ee.debug("widthOfChildren 88",n,"posX");let a=new Map;{let h=0;for(let f of e.children){if(!f.size)continue;let{py:d}=BV(r,h),p=a.get(d)??0;f.size.height>p&&a.set(d,f.size.height);let g=f?.widthInColumns??1;r>0&&(g=Math.min(g,r-h%r)),h+=g}}let s=new Map;{let h=0,f=[...a.keys()].sort((d,p)=>d-p);for(let d of f)s.set(d,h),h+=(a.get(d)??0)+Tn}let o=0;ee.debug("abc91 block?.size?.x",e.id,e?.size?.x);let l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-Tn,u=0;for(let h of e.children){let f=e;if(!h.size)continue;let{width:d,height:p}=h.size,{px:g,py:m}=BV(r,o);if(m!=u&&(u=m,l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-Tn,ee.debug("New row in layout for block",e.id," and child ",h.id,u)),ee.debug(`abc89 layout blocks (child) id: ${h.id} Pos: ${o} (px, py) ${g},${m} (${f?.size?.x},${f?.size?.y}) parent: ${f.id} width: ${d}${Tn}`),f.size){let v=d/2;h.size.x=l+Tn+v,ee.debug(`abc91 layout blocks (calc) px, pyid:${h.id} startingPos=X${l} new startingPosX${h.size.x} ${v} padding=${Tn} width=${d} halfWidth=${v} => x:${h.size.x} y:${h.size.y} ${h.widthInColumns} (width * (child?.w || 1)) / 2 ${d*(h?.widthInColumns??1)/2}`),l=h.size.x+v;let x=s.get(m)??0,T=a.get(m)??p;h.size.y=f.size.y-f.size.height/2+x+T/2+Tn,ee.debug(`abc88 layout blocks (calc) px, pyid:${h.id}startingPosX${l}${Tn}${v}=>x:${h.size.x}y:${h.size.y}${h.widthInColumns}(width * (child?.w || 1)) / 2${d*(h?.widthInColumns??1)/2}`)}h.children&&VV(h,t);let y=h?.widthInColumns??1;r>0&&(y=Math.min(y,r-o%r)),o+=y,ee.debug("abc88 columnsPos",h,o)}}ee.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function WV(e,{minX:t,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:a,y:s,width:o,height:l}=e.size;a-o/2i&&(i=a+o/2),s+l/2>n&&(n=s+l/2)}if(e.children)for(let a of e.children)({minX:t,minY:r,maxX:i,maxY:n}=WV(a,{minX:t,minY:r,maxX:i,maxY:n}));return{minX:t,minY:r,maxX:i,maxY:n}}function H7e(e){let t=e.getBlock("root");if(!t)return;n7(t,e,0,0),VV(t,e),ee.debug("getBlocks",JSON.stringify(t,null,2));let{minX:r,minY:i,maxX:n,maxY:a}=WV(t),s=a-i,o=n-r;return{x:r,y:i,width:o,height:s}}function Mw(e,t){Hr(we())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function Y7e(e,t){return e.intersect(t)}function j7e(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),u=Math.abs(t*r*s/l);i.x0}function Q7e(e,t,r){var i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(g){s=Math.min(s,g.x),o=Math.min(o,g.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));for(var l=i-e.width/2-s,u=n-e.height/2-o,h=0;h1&&a.sort(function(g,m){var y=g.x-r.x,v=g.y-r.y,x=Math.sqrt(y*y+v*v),T=m.x-r.x,C=m.y-r.y,w=Math.sqrt(T*T+C*C);return x{n.push(o,0)},"addBorder"),s=b(o=>{n.push(0,o)},"skipBorder");t.includes("t")?(ee.debug("add top border"),a(r)):s(r),t.includes("r")?(ee.debug("add right border"),a(i)):s(i),t.includes("b")?(ee.debug("add bottom border"),a(r)):s(r),t.includes("l")?(ee.debug("add left border"),a(i)):s(i),e.attr("stroke-dasharray",n.join(" "))}function UV(e,t,r=!1){let i=e,n="default";(i?.classes?.length||0)>0&&(n=(i?.classes??[]).join(" ")),n=n+" flowchart-label";let a=0,s="",o;switch(i.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let l=JC(i?.styles??[]),u=i.label,h=i.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:n,style:l.style,id:i.id,domId:f?`${f}-${i.id}`:i.id,directions:i.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:i.type,padding:o??It()?.block?.padding??0,widthInColumns:i.widthInColumns??1}}async function e8e(e,t,r){let i=UV(t,r,!1);if(i.type==="group")return;let n=It(),a=await J7e(e,i,{config:n}),s=a.node().getBBox(),o=r.getBlock(i.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function t8e(e,t,r){let i=UV(t,r,!0);if(r.getBlock(i.id).type!=="space"){let a=It();await J7e(e,i,{config:a}),t.intersect=i?.intersect,H4t(i)}}async function s7(e,t,r,i){for(let n of t)await i(e,n,r),n.children&&await s7(e,n.children,r,i)}async function r8e(e,t,r){await s7(e,t,r,e8e)}async function i8e(e,t,r){await s7(e,t,r,t8e)}async function n8e(e,t,r,i,n){let a=new ui({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of t)if(s.start&&s.end){let o=i.getBlock(s.start),l=i.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}],d=n?`${n}-${s.id}`:s.id,p=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",g=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",m=`${p} ${g} flowchart-link LS-a1 LE-b1`;p4t(e,{v:s.start,w:s.end,name:d},{...s,id:d,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:m},void 0,"block",a,n),s.label&&(await u4t(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:m}),h4t({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var OV,Ckt,Jl,zV,PV,L7e,R7e,Skt,F7e,Ekt,i7,GV,Akt,_kt,Lkt,Rkt,$7e,qV,Ow,Ikt,I7e,Dkt,Nkt,Mkt,Okt,Pkt,Bkt,Fkt,$kt,zkt,Gkt,qkt,Vkt,Wkt,Ukt,MV,Hkt,Ykt,jkt,Xkt,Kkt,Zkt,Qkt,Jkt,e4t,t4t,r4t,i4t,n4t,a4t,Tn,s4t,o4t,Ql,l4t,c4t,D7e,FV,za,u4t,h4t,f4t,d4t,N7e,p4t,g4t,m4t,y4t,X7e,v4t,b4t,x4t,T4t,w4t,Ui,ca,dn,k4t,C4t,M7e,Eo,O7e,S4t,E4t,A4t,_4t,L4t,R4t,I4t,D4t,N4t,M4t,O4t,P4t,B4t,F4t,$4t,z4t,G4t,q4t,V4t,P7e,W4t,U4t,B7e,r7,J7e,H4t,Y4t,j4t,X4t,K4t,s8e=q(()=>{Ld();oo();ts();ya();$r();Er();er();KC();Sn();Ar();Wo();Ar();Ar();Ar();OV=(function(){var e=b(function(T,C,w,k){for(w=w||{},k=T.length;k--;w[T[k]]=C);return w},"o"),t=[1,15],r=[1,7],i=[1,13],n=[1,14],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],d=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],y={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:b(function(C,w,k,E,A,N,P){var O=N.length-1;switch(A){case 4:E.getLogger().debug("Rule: separator (NL) ");break;case 5:E.getLogger().debug("Rule: separator (Space) ");break;case 6:E.getLogger().debug("Rule: separator (EOF) ");break;case 7:E.getLogger().debug("Rule: hierarchy: ",N[O-1]),E.setHierarchy(N[O-1]);break;case 8:E.getLogger().debug("Stop NL ");break;case 9:E.getLogger().debug("Stop EOF ");break;case 10:E.getLogger().debug("Stop NL2 ");break;case 11:E.getLogger().debug("Stop EOF2 ");break;case 12:E.getLogger().debug("Rule: statement: ",N[O]),typeof N[O].length=="number"?this.$=N[O]:this.$=[N[O]];break;case 13:E.getLogger().debug("Rule: statement #2: ",N[O-1]),this.$=[N[O-1]].concat(N[O]);break;case 14:E.getLogger().debug("Rule: link: ",N[O],C),this.$={edgeTypeStr:N[O],label:""};break;case 15:E.getLogger().debug("Rule: LABEL link: ",N[O-3],N[O-1],N[O]),this.$={edgeTypeStr:N[O],label:N[O-1]};break;case 18:let L=parseInt(N[O]),_=E.generateId();this.$={id:_,type:"space",label:"",width:L,children:[]};break;case 23:E.getLogger().debug("Rule: (nodeStatement link node) ",N[O-2],N[O-1],N[O]," typestr: ",N[O-1].edgeTypeStr);let R=E.edgeStrToEdgeData(N[O-1].edgeTypeStr),D=E.edgeStrToEdgeStartData(N[O-1].edgeTypeStr),I=E.edgeStrToThickness(N[O-1].edgeTypeStr),B=E.edgeStrToPattern(N[O-1].edgeTypeStr);this.$=[{id:N[O-2].id,label:N[O-2].label,type:N[O-2].type,directions:N[O-2].directions},{id:N[O-2].id+"-"+N[O].id,start:N[O-2].id,end:N[O].id,label:N[O-1].label,type:"edge",thickness:I,pattern:B,directions:N[O].directions,arrowTypeEnd:R,arrowTypeStart:D},{id:N[O].id,label:N[O].label,type:E.typeStr2Type(N[O].typeStr),directions:N[O].directions}];break;case 24:E.getLogger().debug("Rule: nodeStatement (abc88 node size) ",N[O-1],N[O]),this.$={id:N[O-1].id,label:N[O-1].label,type:E.typeStr2Type(N[O-1].typeStr),directions:N[O-1].directions,widthInColumns:parseInt(N[O],10)};break;case 25:E.getLogger().debug("Rule: nodeStatement (node) ",N[O]),this.$={id:N[O].id,label:N[O].label,type:E.typeStr2Type(N[O].typeStr),directions:N[O].directions,widthInColumns:1};break;case 26:E.getLogger().debug("APA123",this?this:"na"),E.getLogger().debug("COLUMNS: ",N[O]),this.$={type:"column-setting",columns:N[O]==="auto"?-1:parseInt(N[O])};break;case 27:E.getLogger().debug("Rule: id-block statement : ",N[O-2],N[O-1]);let M=E.generateId();this.$={...N[O-2],type:"composite",children:N[O-1]};break;case 28:E.getLogger().debug("Rule: blockStatement : ",N[O-2],N[O-1],N[O]);let F=E.generateId();this.$={id:F,type:"composite",label:"",children:N[O-1]};break;case 29:E.getLogger().debug("Rule: node (NODE_ID separator): ",N[O]),this.$={id:N[O]};break;case 30:E.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",N[O-1],N[O]),this.$={id:N[O-1],label:N[O].label,typeStr:N[O].typeStr,directions:N[O].directions};break;case 31:E.getLogger().debug("Rule: dirList: ",N[O]),this.$=[N[O]];break;case 32:E.getLogger().debug("Rule: dirList: ",N[O-1],N[O]),this.$=[N[O-1]].concat(N[O]);break;case 33:E.getLogger().debug("Rule: nodeShapeNLabel: ",N[O-2],N[O-1],N[O]),this.$={typeStr:N[O-2]+N[O],label:N[O-1]};break;case 34:E.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",N[O-3],N[O-2]," #3:",N[O-1],N[O]),this.$={typeStr:N[O-3]+N[O],label:N[O-2],directions:N[O-1]};break;case 35:case 36:this.$={type:"classDef",id:N[O-1].trim(),css:N[O].trim()};break;case 37:this.$={type:"applyClass",id:N[O-1].trim(),styleClass:N[O].trim()};break;case 38:this.$={type:"applyStyles",id:N[O-1].trim(),stylesStr:N[O].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:s,43:o,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:i,29:n,31:a,39:s,43:o,46:l}),e(h,[2,16],{14:22,15:f,16:d}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(p,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(p,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(g,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},e(h,[2,27]),e(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},e(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:b(function(C,w){if(w.recoverable)this.trace(C);else{var k=new Error(C);throw k.hash=w,k}},"parseError"),parse:b(function(C){var w=this,k=[0],E=[],A=[null],N=[],P=this.table,O="",L=0,_=0,R=0,D=2,I=1,B=N.slice.call(arguments,1),M=Object.create(this.lexer),F={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(F.yy[z]=this.yy[z]);M.setInput(C,F.yy),F.yy.lexer=M,F.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var $=M.yylloc;N.push($);var G=M.options&&M.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(ke){k.length=k.length-2*ke,A.length=A.length-ke,N.length=N.length-ke}b(U,"popStack");function j(){var ke;return ke=E.pop()||M.lex()||I,typeof ke!="number"&&(ke instanceof Array&&(E=ke,ke=E.pop()),ke=w.symbols_[ke]||ke),ke}b(j,"lex");for(var H,Q,Y,se,J,re,ie={},te,xe,fe,Se;;){if(Y=k[k.length-1],this.defaultActions[Y]?se=this.defaultActions[Y]:((H===null||typeof H>"u")&&(H=j()),se=P[Y]&&P[Y][H]),typeof se>"u"||!se.length||!se[0]){var Me="";Se=[];for(te in P[Y])this.terminals_[te]&&te>D&&Se.push("'"+this.terminals_[te]+"'");M.showPosition?Me="Parse error on line "+(L+1)+`: -`+M.showPosition()+` -Expecting `+Se.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Me="Parse error on line "+(L+1)+": Unexpected "+(H==I?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(Me,{text:M.match,token:this.terminals_[H]||H,line:M.yylineno,loc:$,expected:Se})}if(se[0]instanceof Array&&se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+H);switch(se[0]){case 1:k.push(H),A.push(M.yytext),N.push(M.yylloc),k.push(se[1]),H=null,Q?(H=Q,Q=null):(_=M.yyleng,O=M.yytext,L=M.yylineno,$=M.yylloc,R>0&&R--);break;case 2:if(xe=this.productions_[se[1]][1],ie.$=A[A.length-xe],ie._$={first_line:N[N.length-(xe||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(xe||1)].first_column,last_column:N[N.length-1].last_column},G&&(ie._$.range=[N[N.length-(xe||1)].range[0],N[N.length-1].range[1]]),re=this.performAction.apply(ie,[O,_,L,F.yy,se[1],A,N].concat(B)),typeof re<"u")return re;xe&&(k=k.slice(0,-1*xe*2),A=A.slice(0,-1*xe),N=N.slice(0,-1*xe)),k.push(this.productions_[se[1]][0]),A.push(ie.$),N.push(ie._$),fe=P[k[k.length-2]][k[k.length-1]],k.push(fe);break;case 3:return!0}}return!0},"parse")},v=(function(){var T={EOF:1,parseError:b(function(w,k){if(this.yy.parser)this.yy.parser.parseError(w,k);else throw new Error(w)},"parseError"),setInput:b(function(C,w){return this.yy=w||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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var w=C.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:b(function(C){var w=C.length,k=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===E.length?this.yylloc.first_column:0)+E[E.length-k.length].length-k[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(C){this.unput(this.match.slice(C))},"less"),pastInput:b(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var C=this.pastInput(),w=new Array(C.length+1).join("-");return C+this.upcomingInput()+` -`+w+"^"},"showPosition"),test_match:b(function(C,w){var k,E,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),E=C[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},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],k=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var N in A)this[N]=A[N];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,w,k,E;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),N=0;Nw[0].length)){if(w=k,E=N,this.options.backtrack_lexer){if(C=this.test_match(k,A[N]),C!==!1)return C;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(C=this.test_match(w,A[E]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var w=this.next();return w||this.lex()},"lex"),begin:b(function(w){this.conditionStack.push(w)},"begin"),popState:b(function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},"topState"),pushState:b(function(w){this.begin(w)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(w,k,E,A){var N=A;switch(E){case 0:return w.getLogger().debug("Found block-beta"),10;break;case 1:return w.getLogger().debug("Found id-block"),29;break;case 2:return w.getLogger().debug("Found block"),10;break;case 3:w.getLogger().debug(".",k.yytext);break;case 4:w.getLogger().debug("_",k.yytext);break;case 5:return 5;case 6:return k.yytext=-1,28;break;case 7:return k.yytext=k.yytext.replace(/columns\s+/,""),w.getLogger().debug("COLUMNS (LEX)",k.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:w.getLogger().debug("LEX: POPPING STR:",k.yytext),this.popState();break;case 13:return w.getLogger().debug("LEX: STR end:",k.yytext),"STR";break;case 14:return k.yytext=k.yytext.replace(/space\:/,""),w.getLogger().debug("SPACE NUM (LEX)",k.yytext),21;break;case 15:return k.yytext="1",w.getLogger().debug("COLUMNS (LEX)",k.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),w.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),w.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),w.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),w.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),w.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),w.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),w.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),w.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),w.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),w.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return w.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return w.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return w.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return w.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return w.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return w.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return w.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),w.getLogger().debug("LEX ARR START"),37;break;case 74:return w.getLogger().debug("Lex: NODE_ID",k.yytext),31;break;case 75:return w.getLogger().debug("Lex: EOF",k.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:w.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:w.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return w.getLogger().debug("LEX: NODE_DESCR:",k.yytext),"NODE_DESCR";break;case 83:w.getLogger().debug("LEX POPPING"),this.popState();break;case 84:w.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return k.yytext=k.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (right): dir:",k.yytext),"DIR";break;case 86:return k.yytext=k.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (left):",k.yytext),"DIR";break;case 87:return k.yytext=k.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (x):",k.yytext),"DIR";break;case 88:return k.yytext=k.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (y):",k.yytext),"DIR";break;case 89:return k.yytext=k.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (up):",k.yytext),"DIR";break;case 90:return k.yytext=k.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (down):",k.yytext),"DIR";break;case 91:return k.yytext="]>",w.getLogger().debug("Lex (ARROW_DIR end):",k.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return w.getLogger().debug("Lex: LINK","#"+k.yytext+"#"),15;break;case 93:return w.getLogger().debug("Lex: LINK",k.yytext),15;break;case 94:return w.getLogger().debug("Lex: LINK",k.yytext),15;break;case 95:return w.getLogger().debug("Lex: LINK",k.yytext),15;break;case 96:return w.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 97:return w.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 98:return w.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return w.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),w.getLogger().debug("Lex: LINK","#"+k.yytext+"#"),15;break;case 102:return this.popState(),w.getLogger().debug("Lex: LINK",k.yytext),15;break;case 103:return this.popState(),w.getLogger().debug("Lex: LINK",k.yytext),15;break;case 104:return w.getLogger().debug("Lex: COLON",k.yytext),k.yytext=k.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T})();y.lexer=v;function x(){this.yy={}}return b(x,"Parser"),x.prototype=y,y.Parser=x,new x})();OV.parser=OV;Ckt=OV,Jl=new Map,zV=[],PV=new Map,L7e="color",R7e="fill",Skt="bgFill",F7e=",",Ekt=we(),i7=new Map,GV="",Akt=b(e=>ht.sanitizeText(e,Ekt),"sanitizeText"),_kt=b(function(e,t=""){let r=i7.get(e);r||(r={id:e,styles:[],textStyles:[]},i7.set(e,r)),t?.split(F7e).forEach(i=>{let n=i.replace(/([^;]*);/,"$1").trim();if(RegExp(L7e).exec(i)){let s=n.replace(R7e,Skt).replace(L7e,R7e);r.textStyles.push(s)}r.styles.push(n)})},"addStyleClass"),Lkt=b(function(e,t=""){let r=Jl.get(e);t!=null&&(r.styles=t.split(F7e))},"addStyle2Node"),Rkt=b(function(e,t){e.split(",").forEach(function(r){let i=Jl.get(r);if(i===void 0){let n=r.trim();i={id:n,type:"na",children:[]},Jl.set(n,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),$7e=b((e,t)=>{let r=e.flat(),i=[],a=r.find(s=>s?.type==="column-setting")?.columns??-1;for(let s of r){if(typeof a=="number"&&a>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>a&&ee.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=Akt(s.label)),s.type==="classDef"){_kt(s.id,s.css);continue}if(s.type==="applyClass"){Rkt(s.id,s?.styleClass??"");continue}if(s.type==="applyStyles"){s?.stylesStr&&Lkt(s.id,s?.stylesStr);continue}if(s.type==="column-setting")t.columns=s.columns??-1;else if(s.type==="edge"){let o=(PV.get(s.id)??0)+1;PV.set(s.id,o),s.id=o+"-"+s.id,zV.push(s)}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);let o=Jl.get(s.id);if(o===void 0?Jl.set(s.id,s):(s.type!=="na"&&(o.type=s.type),s.label!==s.id&&(o.label=s.label)),s.children&&$7e(s.children,s),s.type==="space"){let l=s.width??1;for(let u=0;u{ee.debug("Clear called"),fr(),Ow={id:"root",type:"composite",children:[],columns:-1},Jl=new Map([["root",Ow]]),qV=[],i7=new Map,zV=[],PV=new Map,GV=""},"clear");b(z7e,"typeStr2Type");b(G7e,"edgeTypeStr2Type");b(q7e,"edgeStrToEdgeData");b(V7e,"edgeStrToEdgeStartData");b(W7e,"edgeStrToThickness");b(U7e,"edgeStrToPattern");I7e=0,Dkt=b(()=>(I7e++,"id-"+Math.random().toString(36).substr(2,12)+"-"+I7e),"generateId"),Nkt=b(e=>{Ow.children=e,$7e(e,Ow),qV=Ow.children},"setHierarchy"),Mkt=b(e=>{let t=Jl.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Okt=b(()=>[...Jl.values()],"getBlocksFlat"),Pkt=b(()=>qV||[],"getBlocks"),Bkt=b(()=>zV,"getEdges"),Fkt=b(e=>Jl.get(e),"getBlock"),$kt=b(e=>{Jl.set(e.id,e)},"setBlock"),zkt=b(e=>{GV=e},"setDiagramId"),Gkt=b(()=>GV,"getDiagramId"),qkt=b(()=>ee,"getLogger"),Vkt=b(function(){return i7},"getClasses"),Wkt={getConfig:b(()=>It().block,"getConfig"),typeStr2Type:z7e,edgeTypeStr2Type:G7e,edgeStrToEdgeData:q7e,edgeStrToEdgeStartData:V7e,edgeStrToThickness:W7e,edgeStrToPattern:U7e,getLogger:qkt,getBlocksFlat:Okt,getBlocks:Pkt,getEdges:Bkt,setHierarchy:Nkt,getBlock:Fkt,setBlock:$kt,getColumns:Mkt,getClasses:Vkt,clear:Ikt,generateId:Dkt,setDiagramId:zkt,getDiagramId:Gkt},Ukt=Wkt,MV=b((e,t)=>{let r=yp,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return gn(i,n,a,t)},"fade"),Hkt=b(e=>`.label { + ${DAt(t,r)} + `},"styles"),PAt={parser:AAt,db:nk,renderer:MAt,styles:OAt}});var hNe={};cr(hNe,{diagram:()=>u_t});function JDe(e){switch(fe.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return fe.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function eNe(e){return fe.debug("typeStr2Type",e),e==="=="?"thick":"normal"}function tNe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function rNe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function nNe(e){return e.includes("==")?"thick":"normal"}function iNe(e){return e.includes(".-")?"dotted":"solid"}function eX(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let r=t%e,n=Math.floor(t/e);return{px:r,py:n}}function H7(e,t,r=0,n=0,i=8){fe.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:n,x:0,y:0});let a=0,s=0;if(e.children?.length>0){for(let g of e.children)H7(g,t,0,0,i);let o=s_t(e);a=o.width,s=o.height,fe.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",a,s);for(let g of e.children)g.size&&(fe.debug(`abc95 Setting size of children of ${e.id} id=${g.id} ${a} ${s} ${JSON.stringify(g.size)}`),g.size.width=a*(g.widthInColumns??1)+i*((g.widthInColumns??1)-1),g.size.height=s,g.size.x=0,g.size.y=0,fe.debug(`abc95 updating size of ${e.id} children child:${g.id} maxWidth:${a} maxHeight:${s}`));for(let g of e.children)H7(g,t,a,s,i);let l=e.columns??-1,u=0;for(let g of e.children)u+=g.widthInColumns??1;let h=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(g>0){let m=(d-g*i-i)/g;fe.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,m);for(let y of e.children)y.size&&(y.size.width=m)}}e.size={width:d,height:p,x:0,y:0}}fe.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function iX(e,t,r=8){fe.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let n=e.columns??-1;if(fe.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,a=e.children.length*i+(e.children.length-1)*r;fe.debug("widthOfChildren 88",a,"posX");let s=new Map;{let f=0;for(let d of e.children){if(!d.size)continue;let{py:p}=eX(n,f),g=s.get(p)??0;d.size.height>g&&s.set(p,d.size.height);let m=d?.widthInColumns??1;n>0&&(m=Math.min(m,n-f%n)),f+=m}}let o=new Map;{let f=0,d=[...s.keys()].sort((p,g)=>p-g);for(let p of d)o.set(p,f),f+=(s.get(p)??0)+r}let l=0;fe.debug("abc91 block?.size?.x",e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,h=0;for(let f of e.children){let d=e;if(!f.size)continue;let{width:p,height:g}=f.size,{px:m,py:y}=eX(n,l);if(y!=h&&(h=y,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,fe.debug("New row in layout for block",e.id," and child ",f.id,h)),fe.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${l} (px, py) ${m},${y} (${d?.size?.x},${d?.size?.y}) parent: ${d.id} width: ${p}${r}`),d.size){let b=p/2;f.size.x=u+r+b,fe.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${u} new startingPosX${f.size.x} ${b} padding=${r} width=${p} halfWidth=${b} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${p*(f?.widthInColumns??1)/2}`),u=f.size.x+b;let T=o.get(y)??0,k=s.get(y)??g;f.size.y=d.size.y-d.size.height/2+T+k/2+r,fe.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${u}${r}${b}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${p*(f?.widthInColumns??1)/2}`)}f.children&&iX(f,t,r);let x=f?.widthInColumns??1;n>0&&(x=Math.min(x,n-l%n)),l+=x,fe.debug("abc88 columnsPos",f,l)}}fe.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function aX(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:a,y:s,width:o,height:l}=e.size;a-o/2n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(e.children)for(let a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=aX(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}function aNe(e){let t=e.getBlock("root");if(!t)return;let r=ze()?.block?.padding??8;H7(t,e,0,0,r),iX(t,e,r),fe.debug("getBlocks",JSON.stringify(t,null,2));let{minX:n,minY:i,maxX:a,maxY:s}=aX(t),o=s-i,l=a-n;return{x:n,y:i,width:l,height:o}}function sX(e,t,r=!1){let n=e,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=(n?.classes??[]).flatMap(g=>t.getClasses().get(g)?.styles??[]),s=0,o="rect",l;switch(n.type){case"round":s=5,o="rect";break;case"composite":s=0,o="composite",l=0;break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}let u=pE(n?.styles??[]),h=n.label,f=n.size??{width:0,height:0,x:0,y:0},d=t.getDiagramId();return{labelStyle:u.labelStyle,shape:o,label:h,labelText:h,rx:s,ry:s,class:i,cssClasses:i,cssStyles:n?.styles??[],cssCompiledStyles:a,style:u.style,id:n.id,domId:d?`${d}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:f.width||void 0,height:f.height||void 0,wrappingWidth:f.width||Number.POSITIVE_INFINITY,x:f.x,y:f.y,positioned:r,intersect:void 0,padding:l??It()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}async function sNe(e,t,r){let n=sX(t,r,!1);if(t.type==="group")return;let i=It(),a=await mu(e,n,{config:i}),s=a.node()?.getBBox()??{width:0,height:0},o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function oNe(e,t,r){let n=sX(t,r,!0);if(r.getBlock(n.id).type!=="space"){let a=It();await mu(e,n,{config:a}),t.intersect=n?.intersect,yu(n)}}async function Y7(e,t,r,n){for(let i of t)await n(e,i,r),i.children&&await Y7(e,i.children,r,n)}async function lNe(e,t,r){await Y7(e,t,r,sNe)}async function cNe(e,t,r){await Y7(e,t,r,oNe)}async function uNe(e,t,r,n,i){let a=new Rn({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of t)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}],d=i?`${i}-${s.id}`:s.id,p=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",g=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",m=`${p} ${g} flowchart-link LS-a1 LE-b1`;Cd(e,{...s,id:d,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:m},{},"block",a.node(s.start),a.node(s.end),i),s.label&&(await vu(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:m}),e1({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var QY,BAt,Mc,tX,JY,XDe,jDe,$At,ZDe,U7,rX,FAt,zAt,GAt,qAt,QDe,nX,ik,VAt,KDe,WAt,UAt,HAt,YAt,XAt,jAt,KAt,ZAt,QAt,JAt,e_t,t_t,r_t,n_t,ZY,i_t,a_t,s_t,o_t,l_t,c_t,u_t,fNe=X(()=>{qu();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();hE();Qi();zr();rl();QY=(function(){var e=v(function(T,k,w,C){for(w=w||{},C=T.length;C--;w[T[C]]=k);return w},"o"),t=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],d=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],y={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:v(function(k,w,C,S,E,L,N){var O=L.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",L[O-1]),S.setHierarchy(L[O-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",L[O]),typeof L[O].length=="number"?this.$=L[O]:this.$=[L[O]];break;case 13:S.getLogger().debug("Rule: statement #2: ",L[O-1]),this.$=[L[O-1]].concat(L[O]);break;case 14:S.getLogger().debug("Rule: link: ",L[O],k),this.$={edgeTypeStr:L[O],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",L[O-3],L[O-1],L[O]),this.$={edgeTypeStr:L[O],label:L[O-1]};break;case 18:let R=parseInt(L[O]),_=S.generateId();this.$={id:_,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",L[O-2],L[O-1],L[O]," typestr: ",L[O-1].edgeTypeStr);let D=S.edgeStrToEdgeData(L[O-1].edgeTypeStr),I=S.edgeStrToEdgeStartData(L[O-1].edgeTypeStr),M=S.edgeStrToThickness(L[O-1].edgeTypeStr),B=S.edgeStrToPattern(L[O-1].edgeTypeStr);this.$=[{id:L[O-2].id,label:L[O-2].label,type:L[O-2].type,directions:L[O-2].directions},{id:L[O-2].id+"-"+L[O].id,start:L[O-2].id,end:L[O].id,label:L[O-1].label,type:"edge",thickness:M,pattern:B,directions:L[O].directions,arrowTypeEnd:D,arrowTypeStart:I},{id:L[O].id,label:L[O].label,type:S.typeStr2Type(L[O].typeStr),directions:L[O].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",L[O-1],L[O]),this.$={id:L[O-1].id,label:L[O-1].label,type:S.typeStr2Type(L[O-1].typeStr),directions:L[O-1].directions,widthInColumns:parseInt(L[O],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",L[O]),this.$={id:L[O].id,label:L[O].label,type:S.typeStr2Type(L[O].typeStr),directions:L[O].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",L[O]),this.$={type:"column-setting",columns:L[O]==="auto"?-1:parseInt(L[O])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",L[O-2],L[O-1]);let P=S.generateId();this.$={...L[O-2],type:"composite",children:L[O-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",L[O-2],L[O-1],L[O]);let $=S.generateId();this.$={id:$,type:"composite",label:"",children:L[O-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",L[O]),this.$={id:L[O]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",L[O-1],L[O]),this.$={id:L[O-1],label:L[O].label,typeStr:L[O].typeStr,directions:L[O].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",L[O]),this.$=[L[O]];break;case 32:S.getLogger().debug("Rule: dirList: ",L[O-1],L[O]),this.$=[L[O-1]].concat(L[O]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",L[O-2],L[O-1],L[O]),this.$={typeStr:L[O-2]+L[O],label:L[O-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",L[O-3],L[O-2]," #3:",L[O-1],L[O]),this.$={typeStr:L[O-3]+L[O],label:L[O-2],directions:L[O-1]};break;case 35:case 36:this.$={type:"classDef",id:L[O-1].trim(),css:L[O].trim()};break;case 37:this.$={type:"applyClass",id:L[O-1].trim(),styleClass:L[O].trim()};break;case 38:this.$={type:"applyStyles",id:L[O-1].trim(),stylesStr:L[O].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:n,29:i,31:a,39:s,43:o,46:l}),e(h,[2,16],{14:22,15:f,16:d}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(p,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(p,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(g,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},e(h,[2,27]),e(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},e(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:v(function(k,w){if(w.recoverable)this.trace(k);else{var C=new Error(k);throw C.hash=w,C}},"parseError"),parse:v(function(k){var w=this,C=[0],S=[],E=[null],L=[],N=this.table,O="",R=0,_=0,D=0,I=2,M=1,B=L.slice.call(arguments,1),P=Object.create(this.lexer),$={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&($.yy[G]=this.yy[G]);P.setInput(k,$.yy),$.yy.lexer=P,$.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var q=P.yylloc;L.push(q);var z=P.options&&P.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(Ue){C.length=C.length-2*Ue,E.length=E.length-Ue,L.length=L.length-Ue}v(V,"popStack");function j(){var Ue;return Ue=S.pop()||P.lex()||M,typeof Ue!="number"&&(Ue instanceof Array&&(S=Ue,Ue=S.pop()),Ue=w.symbols_[Ue]||Ue),Ue}v(j,"lex");for(var ee,ne,Q,pe,te,de,ce={},ue,Re,ve,Ge;;){if(Q=C[C.length-1],this.defaultActions[Q]?pe=this.defaultActions[Q]:((ee===null||typeof ee>"u")&&(ee=j()),pe=N[Q]&&N[Q][ee]),typeof pe>"u"||!pe.length||!pe[0]){var He="";Ge=[];for(ue in N[Q])this.terminals_[ue]&&ue>I&&Ge.push("'"+this.terminals_[ue]+"'");P.showPosition?He="Parse error on line "+(R+1)+`: +`+P.showPosition()+` +Expecting `+Ge.join(", ")+", got '"+(this.terminals_[ee]||ee)+"'":He="Parse error on line "+(R+1)+": Unexpected "+(ee==M?"end of input":"'"+(this.terminals_[ee]||ee)+"'"),this.parseError(He,{text:P.match,token:this.terminals_[ee]||ee,line:P.yylineno,loc:q,expected:Ge})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+ee);switch(pe[0]){case 1:C.push(ee),E.push(P.yytext),L.push(P.yylloc),C.push(pe[1]),ee=null,ne?(ee=ne,ne=null):(_=P.yyleng,O=P.yytext,R=P.yylineno,q=P.yylloc,D>0&&D--);break;case 2:if(Re=this.productions_[pe[1]][1],ce.$=E[E.length-Re],ce._$={first_line:L[L.length-(Re||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Re||1)].first_column,last_column:L[L.length-1].last_column},z&&(ce._$.range=[L[L.length-(Re||1)].range[0],L[L.length-1].range[1]]),de=this.performAction.apply(ce,[O,_,R,$.yy,pe[1],E,L].concat(B)),typeof de<"u")return de;Re&&(C=C.slice(0,-1*Re*2),E=E.slice(0,-1*Re),L=L.slice(0,-1*Re)),C.push(this.productions_[pe[1]][0]),E.push(ce.$),L.push(ce._$),ve=N[C[C.length-2]][C[C.length-1]],C.push(ve);break;case 3:return!0}}return!0},"parse")},x=(function(){var T={EOF:1,parseError:v(function(w,C){if(this.yy.parser)this.yy.parser.parseError(w,C);else throw new Error(w)},"parseError"),setInput:v(function(k,w){return this.yy=w||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var w=k.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:v(function(k){var w=k.length,C=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var S=this.match.split(/(?:\r\n?|\n)/g);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);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===S.length?this.yylloc.first_column:0)+S[S.length-C.length].length-C[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(k){this.unput(this.match.slice(k))},"less"),pastInput:v(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var k=this.pastInput(),w=new Array(k.length+1).join("-");return k+this.upcomingInput()+` +`+w+"^"},"showPosition"),test_match:v(function(k,w){var C,S,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),S=k[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,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(k[0].length),this.matched+=k[0],C=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var L in E)this[L]=E[L];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,w,C,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),L=0;Lw[0].length)){if(w=C,S=L,this.options.backtrack_lexer){if(k=this.test_match(C,E[L]),k!==!1)return k;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(k=this.test_match(w,E[S]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var w=this.next();return w||this.lex()},"lex"),begin:v(function(w){this.conditionStack.push(w)},"begin"),popState:v(function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},"topState"),pushState:v(function(w){this.begin(w)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(w,C,S,E){var L=E;switch(S){case 0:return w.getLogger().debug("Found block-beta"),10;break;case 1:return w.getLogger().debug("Found id-block"),29;break;case 2:return w.getLogger().debug("Found block"),10;break;case 3:w.getLogger().debug(".",C.yytext);break;case 4:w.getLogger().debug("_",C.yytext);break;case 5:return 5;case 6:return C.yytext=-1,28;break;case 7:return C.yytext=C.yytext.replace(/columns\s+/,""),w.getLogger().debug("COLUMNS (LEX)",C.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:w.getLogger().debug("LEX: POPPING STR:",C.yytext),this.popState();break;case 13:return w.getLogger().debug("LEX: STR end:",C.yytext),"STR";break;case 14:return C.yytext=C.yytext.replace(/space\:/,""),w.getLogger().debug("SPACE NUM (LEX)",C.yytext),21;break;case 15:return C.yytext="1",w.getLogger().debug("COLUMNS (LEX)",C.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),w.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),w.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),w.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),w.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),w.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),w.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),w.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),w.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),w.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),w.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return w.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return w.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return w.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return w.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return w.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return w.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return w.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),w.getLogger().debug("LEX ARR START"),37;break;case 74:return w.getLogger().debug("Lex: NODE_ID",C.yytext),31;break;case 75:return w.getLogger().debug("Lex: EOF",C.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:w.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:w.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return w.getLogger().debug("LEX: NODE_DESCR:",C.yytext),"NODE_DESCR";break;case 83:w.getLogger().debug("LEX POPPING"),this.popState();break;case 84:w.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return C.yytext=C.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (right): dir:",C.yytext),"DIR";break;case 86:return C.yytext=C.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (left):",C.yytext),"DIR";break;case 87:return C.yytext=C.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (x):",C.yytext),"DIR";break;case 88:return C.yytext=C.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (y):",C.yytext),"DIR";break;case 89:return C.yytext=C.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (up):",C.yytext),"DIR";break;case 90:return C.yytext=C.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (down):",C.yytext),"DIR";break;case 91:return C.yytext="]>",w.getLogger().debug("Lex (ARROW_DIR end):",C.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return w.getLogger().debug("Lex: LINK","#"+C.yytext+"#"),15;break;case 93:return w.getLogger().debug("Lex: LINK",C.yytext),15;break;case 94:return w.getLogger().debug("Lex: LINK",C.yytext),15;break;case 95:return w.getLogger().debug("Lex: LINK",C.yytext),15;break;case 96:return w.getLogger().debug("Lex: START_LINK",C.yytext),this.pushState("LLABEL"),16;break;case 97:return w.getLogger().debug("Lex: START_LINK",C.yytext),this.pushState("LLABEL"),16;break;case 98:return w.getLogger().debug("Lex: START_LINK",C.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return w.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),w.getLogger().debug("Lex: LINK","#"+C.yytext+"#"),15;break;case 102:return this.popState(),w.getLogger().debug("Lex: LINK",C.yytext),15;break;case 103:return this.popState(),w.getLogger().debug("Lex: LINK",C.yytext),15;break;case 104:return w.getLogger().debug("Lex: COLON",C.yytext),C.yytext=C.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T})();y.lexer=x;function b(){this.yy={}}return v(b,"Parser"),b.prototype=y,y.Parser=b,new b})();QY.parser=QY;BAt=QY,Mc=new Map,tX=[],JY=new Map,XDe="color",jDe="fill",$At="bgFill",ZDe=",",U7=new Map,rX="",FAt=v(e=>vt.sanitizeText(e,ze()),"sanitizeText"),zAt=v(function(e,t=""){let r=U7.get(e);r||(r={id:e,styles:[],textStyles:[]},U7.set(e,r)),t?.split(ZDe).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(XDe).exec(n)){let s=i.replace(jDe,$At).replace(XDe,jDe);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),GAt=v(function(e,t=""){let r=Mc.get(e);t!=null&&(r.styles=t.split(ZDe))},"addStyle2Node"),qAt=v(function(e,t){e.split(",").forEach(function(r){let n=Mc.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Mc.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),QDe=v((e,t)=>{let r=e.flat(),n=[],a=r.find(s=>s?.type==="column-setting")?.columns??-1;for(let s of r){if(typeof a=="number"&&a>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>a&&fe.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=FAt(s.label)),s.type==="classDef"){zAt(s.id,s.css);continue}if(s.type==="applyClass"){qAt(s.id,s?.styleClass??"");continue}if(s.type==="applyStyles"){s?.stylesStr&&GAt(s.id,s?.stylesStr);continue}if(s.type==="column-setting")t.columns=s.columns??-1;else if(s.type==="edge"){let o=(JY.get(s.id)??0)+1;JY.set(s.id,o),s.id=o+"-"+s.id,tX.push(s)}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);let o=Mc.get(s.id);if(o===void 0?Mc.set(s.id,s):(s.type!=="na"&&(o.type=s.type),s.label!==s.id&&(o.label=s.label)),s.children&&QDe(s.children,s),s.type==="space"){let l=s.width??1;for(let u=0;u{fe.debug("Clear called"),pr(),ik={id:"root",type:"composite",children:[],columns:-1},Mc=new Map([["root",ik]]),nX=[],U7=new Map,tX=[],JY=new Map,rX=""},"clear");v(JDe,"typeStr2Type");v(eNe,"edgeTypeStr2Type");v(tNe,"edgeStrToEdgeData");v(rNe,"edgeStrToEdgeStartData");v(nNe,"edgeStrToThickness");v(iNe,"edgeStrToPattern");KDe=0,WAt=v(()=>(KDe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+KDe),"generateId"),UAt=v(e=>{ik.children=e,QDe(e,ik),nX=ik.children},"setHierarchy"),HAt=v(e=>{let t=Mc.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),YAt=v(()=>[...Mc.values()],"getBlocksFlat"),XAt=v(()=>nX||[],"getBlocks"),jAt=v(()=>tX,"getEdges"),KAt=v(e=>Mc.get(e),"getBlock"),ZAt=v(e=>{Mc.set(e.id,e)},"setBlock"),QAt=v(e=>{rX=e},"setDiagramId"),JAt=v(()=>rX,"getDiagramId"),e_t=v(()=>fe,"getLogger"),t_t=v(function(){return U7},"getClasses"),r_t={getConfig:v(()=>It().block,"getConfig"),typeStr2Type:JDe,edgeTypeStr2Type:eNe,edgeStrToEdgeData:tNe,edgeStrToEdgeStartData:rNe,edgeStrToThickness:nNe,edgeStrToPattern:iNe,getLogger:e_t,getBlocksFlat:YAt,getBlocks:XAt,getEdges:jAt,setHierarchy:UAt,getBlock:KAt,setBlock:ZAt,getColumns:HAt,getClasses:t_t,clear:VAt,generateId:WAt,setDiagramId:QAt,getDiagramId:JAt},n_t=r_t,ZY=v((e,t)=>{let r=d0,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return Gi(n,i,a,t)},"fade"),i_t=v(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } - .cluster-label span,p { + .cluster-label span { color: ${e.titleColor}; } - .label text,span,p { + .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } @@ -3014,7 +3086,7 @@ Expecting `+Se.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Me="Parse error fill: ${e.arrowheadColor}; } - .edgePath .path { + .edgePaths .path { stroke: ${e.lineColor}; stroke-width: 2.0px; } @@ -3051,9 +3123,9 @@ Expecting `+Se.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Me="Parse error } .node .cluster { - // fill: ${MV(e.mainBkg,.5)}; - fill: ${MV(e.clusterBkg,.5)}; - stroke: ${MV(e.clusterBorder,.2)}; + // fill: ${ZY(e.mainBkg,.5)}; + fill: ${ZY(e.clusterBkg,.5)}; + stroke: ${ZY(e.clusterBorder,.2)}; box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; stroke-width: 1px; } @@ -3062,7 +3134,7 @@ Expecting `+Se.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Me="Parse error fill: ${e.titleColor}; } - .cluster span,p { + .cluster span { color: ${e.titleColor}; } /* .cluster div { @@ -3088,20 +3160,37 @@ Expecting `+Se.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Me="Parse error font-size: 18px; fill: ${e.textColor}; } - ${nu()} -`,"getStyles"),Ykt=Hkt,jkt=b((e,t,r,i)=>{t.forEach(n=>{n4t[n](e,r,i)})},"insertMarkers"),Xkt=b((e,t,r)=>{ee.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Kkt=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Zkt=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Qkt=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Jkt=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),e4t=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),t4t=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),r4t=b((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),i4t=b((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),n4t={extension:Xkt,composition:Kkt,aggregation:Zkt,dependency:Qkt,lollipop:Jkt,point:e4t,circle:t4t,cross:r4t,barb:i4t},a4t=jkt,Tn=we()?.block?.padding??8;b(BV,"calculateBlockPosition");s4t=b(e=>{let t=0,r=0;for(let i of e.children){let{width:n,height:a,x:s,y:o}=i.size??{width:0,height:0,x:0,y:0};if(ee.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",o,i.type),i.type==="space")continue;let l=n/(i.widthInColumns??1);l>t&&(t=l),a>r&&(r=a)}return{width:t,height:r}},"getMaxChildSize");b(n7,"setBlockSizes");b(VV,"layoutBlocks");b(WV,"findBounds");b(H7e,"layout");o4t=b(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let s=we(),o=Hr(s);return await zn(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},s)},"createLabel"),Ql=o4t,l4t=b((e,t,r,i,n)=>{t.arrowTypeStart&&D7e(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&D7e(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),c4t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},D7e=b((e,t,r,i,n,a)=>{let s=c4t[r];if(!s){ee.warn(`Unknown arrow type: ${r}`);return}let o=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${n}_${a}-${s}${o})`)},"addEdgeMarker"),FV={},za={},u4t=b(async(e,t)=>{let r=we(),i=Hr(r),n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label"),s=t.labelType==="markdown",o=await zn(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:s,isNode:!1,markdown:s,width:s?void 0:Number.POSITIVE_INFINITY},r);a.node().appendChild(o);let l=o.getBBox(),u=l;if(i){let f=o.children[0],d=Qe(o);l=f.getBoundingClientRect(),u=l,d.attr("width",l.width),d.attr("height",l.height)}else{let f=Qe(o).select("text").node();f&&typeof f.getBBox=="function"&&(u=f.getBBox())}a.attr("transform",Po(u,i)),FV[t.id]=n,t.width=l.width,t.height=l.height;let h;if(t.startLabelLeft){let f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner"),p=await Ql(d,t.startLabelLeft,t.labelStyle);h=p;let g=p.getBBox();if(i){let m=p.children[0],y=Qe(p);g=m.getBoundingClientRect(),y.attr("width",g.width),y.attr("height",g.height)}d.attr("transform",Po(g,i)),za[t.id]||(za[t.id]={}),za[t.id].startLeft=f,Mw(h,t.startLabelLeft)}if(t.startLabelRight){let f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner"),p=await Ql(d,t.startLabelRight,t.labelStyle);h=p;let g=p.getBBox();if(i){let m=p.children[0],y=Qe(p);g=m.getBoundingClientRect(),y.attr("width",g.width),y.attr("height",g.height)}d.attr("transform",Po(g,i)),za[t.id]||(za[t.id]={}),za[t.id].startRight=f,Mw(h,t.startLabelRight)}if(t.endLabelLeft){let f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner"),p=await Ql(f,t.endLabelLeft,t.labelStyle);h=p;let g=p.getBBox();if(i){let m=p.children[0],y=Qe(p);g=m.getBoundingClientRect(),y.attr("width",g.width),y.attr("height",g.height)}d.attr("transform",Po(g,i)),za[t.id]||(za[t.id]={}),za[t.id].endLeft=f,Mw(h,t.endLabelLeft)}if(t.endLabelRight){let f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner"),p=await Ql(f,t.endLabelRight,t.labelStyle);h=p;let g=p.getBBox();if(i){let m=p.children[0],y=Qe(p);g=m.getBoundingClientRect(),y.attr("width",g.width),y.attr("height",g.height)}d.attr("transform",Po(g,i)),za[t.id]||(za[t.id]={}),za[t.id].endRight=f,Mw(h,t.endLabelRight)}return o},"insertEdgeLabel");b(Mw,"setTerminalWidth");h4t=b((e,t)=>{ee.debug("Moving label abc88 ",e.id,e.label,FV[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=we(),{subGraphTitleTotalMargin:n}=rh(i);if(e.label){let a=FV[e.id],s=e.x,o=e.y;if(r){let l=jt.calcLabelPosition(r);ee.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){let a=za[e.id].startLeft,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){let a=za[e.id].startRight,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){let a=za[e.id].endLeft,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){let a=za[e.id].endRight,s=e.x,o=e.y;if(r){let l=jt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),f4t=b((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),d4t=b((e,t,r)=>{ee.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(t)} - insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2,o=r.xMath.abs(i-t.x)*l){let f=r.y{ee.debug("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(!f4t(t,a)&&!n){let s=d4t(t,i,a),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),n=!0}else i=a,n||r.push(a)}),r},"cutPathAtIntersect"),p4t=b(function(e,t,r,i,n,a,s){let o=r.points;ee.debug("abc88 InsertEdge: edge=",r,"e=",t);let l=!1,u=a.node(t.v);var h=a.node(t.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(ee.debug("to cluster abc88",i[r.toCluster]),o=N7e(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(ee.debug("from cluster abc88",i[r.fromCluster]),o=N7e(o.reverse(),i[r.fromCluster].node).reverse(),l=!0);let f=o.filter(C=>!Number.isNaN(C.y)),d=Dc;r.curve&&(n==="graph"||n==="flowchart")&&(d=r.curve);let{x:p,y:g}=RC(r),m=Ic().x(p).y(g).curve(d),y;switch(r.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-thick";break;default:y=""}switch(r.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break}let v=e.append("path").attr("d",m(f)).attr("id",r.id).attr("class"," "+y+(r.classes?" "+r.classes:"")).attr("style",r.style),x="";(we().flowchart.arrowMarkerAbsolute||we().state.arrowMarkerAbsolute)&&(x=Tp(!0)),l4t(v,r,x,s,n);let T={};return l&&(T.updatedPath=o),T.originalPath=r.points,T},"insertEdge"),g4t=b(e=>{let t=new Set;for(let r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),m4t=b((e,t,r,i)=>{let n=g4t(e),a=2,s=t.height+2*r.padding,o=s/a,l=i??t.width+2*o+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:l/2,y:2*u},{x:l-o,y:0},{x:l,y:0},{x:l,y:-s/3},{x:l+2*u,y:-s/2},{x:l,y:-2*s/3},{x:l,y:-s},{x:l-o,y:-s},{x:l/2,y:-s-2*u},{x:o,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*u,y:-s/2},{x:0,y:-s/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:l-o,y:-s},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-o},{x:l,y:-s+o},{x:0,y:-s}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-o},{x:0,y:-s+o},{x:l,y:-s}]:n.has("right")&&n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:l-o,y:-s+u},{x:o,y:-s+u},{x:o,y:-s},{x:0,y:-s/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-s+u},{x:0,y:-s+u},{x:l/2,y:-s},{x:l,y:-s+u},{x:l-o,y:-s+u},{x:l-o,y:-u},{x:l,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-o},{x:0,y:-s}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-s}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-o},{x:l,y:-s}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-s}]:n.has("right")?[{x:o,y:-u},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:l-o,y:-s+u},{x:o,y:-s+u},{x:o,y:-s+u}]:n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:-s+u},{x:o,y:-s+u},{x:o,y:-s},{x:0,y:-s/2}]:n.has("up")?[{x:o,y:-u},{x:o,y:-s+u},{x:0,y:-s+u},{x:l/2,y:-s},{x:l,y:-s+u},{x:l-o,y:-s+u},{x:l-o,y:-u}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-s+u},{x:l-o,y:-s+u},{x:l-o,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints");b(Y7e,"intersectNode");y4t=Y7e;b(j7e,"intersectEllipse");X7e=j7e;b(K7e,"intersectCircle");v4t=K7e;b(Z7e,"intersectLine");b($V,"sameSign");b4t=Z7e,x4t=Q7e;b(Q7e,"intersectPolygon");T4t=b((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,u;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,u=o):(n<0&&(s=-s),l=s,u=n===0?0:s*a/n),{x:r+l,y:i+u}},"intersectRect"),w4t=T4t,Ui={node:y4t,circle:v4t,ellipse:X7e,polygon:x4t,rect:w4t},ca=b(async(e,t,r,i)=>{let n=we(),a,s=t.useHtmlLabels||Hr(n);r?a=r:a="node default";let o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=o.insert("g").attr("class","label").attr("style",t.labelStyle),u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];let h;t.labelType==="markdown"?h=zn(l,mr(lo(u),n),{useHtmlLabels:s,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):h=await Ql(l,mr(lo(u),n),t.labelStyle,!1,i);let f=h.getBBox(),d=t.padding/2;if(Hr(n)){let p=h.children[0],g=Qe(h);await fb(p,u),f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return s?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:f,halfPadding:d,label:l}},"labelHelper"),dn=b((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");b(ec,"insertPolygonShape");k4t=b(async(e,t)=>{t.useHtmlLabels||Hr(we())||(t.centerLabel=!0);let{shapeSvg:i,bbox:n,halfPadding:a}=await ca(e,t,"node "+t.classes,!0);ee.info("Classes = ",t.classes);let s=i.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-a).attr("y",-n.height/2-a).attr("width",n.width+t.padding).attr("height",n.height+t.padding),dn(t,s),t.intersect=function(o){return Ui.rect(t,o)},i},"note"),C4t=k4t,M7e=b(e=>e?" "+e:"","formatClass"),Eo=b((e,t)=>`${t||"node default"}${M7e(e.classes)} ${M7e(e.class)}`,"getClassesFromNode"),O7e=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=n+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];ee.info("Question main (Circle)");let l=ec(r,s,s,o);return l.attr("style",t.style),dn(t,l),t.intersect=function(u){return ee.warn("Intersect called"),Ui.polygon(t,o,u)},r},"question"),S4t=b((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return Ui.circle(t,14,s)},r},"choice"),E4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=4,a=t.positioned?t.height:i.height+t.padding,s=a/n,o=t.positioned?t.width:i.width+2*s+t.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=ec(r,o,a,l);return u.attr("style",t.style),dn(t,u),t.intersect=function(h){return Ui.polygon(t,l,h)},r},"hexagon"),A4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,void 0,!0),n=2,a=i.height+2*t.padding,s=a/n,o=i.width+2*s+t.padding,u=t.positioned&&(t.widthInColumns??1)>1&&t.width>o?t.width:o,h=m4t(t.directions,i,t,u),f=ec(r,u,a,h);return f.attr("style",t.style),dn(t,f),t.intersect=function(d){return Ui.polygon(t,h,d)},r},"block_arrow"),_4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return ec(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(l){return Ui.polygon(t,s,l)},r},"rect_left_inv_arrow"),L4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],o=ec(r,n,a,s);return o.attr("style",t.style),dn(t,o),t.intersect=function(l){return Ui.polygon(t,s,l)},r},"lean_right"),R4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],o=ec(r,n,a,s);return o.attr("style",t.style),dn(t,o),t.intersect=function(l){return Ui.polygon(t,s,l)},r},"lean_left"),I4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],o=ec(r,n,a,s);return o.attr("style",t.style),dn(t,o),t.intersect=function(l){return Ui.polygon(t,s,l)},r},"trapezoid"),D4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=ec(r,n,a,s);return o.attr("style",t.style),dn(t,o),t.intersect=function(l){return Ui.polygon(t,s,l)},r},"inv_trapezoid"),N4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],o=ec(r,n,a,s);return o.attr("style",t.style),dn(t,o),t.intersect=function(l){return Ui.polygon(t,s,l)},r},"rect_right_inv_arrow"),M4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=n/2,s=a/(2.5+n/50),o=i.height+s+t.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return dn(t,u),t.intersect=function(h){let f=Ui.rect(t,h),d=f.x-t.x;if(a!=0&&(Math.abs(d)t.height/2-s)){let p=s*s*(1-d*d/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-t.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),O4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ca(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,o=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-n,u=t.positioned?-o/2:-i.height/2-n;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),t.props){let h=new Set(Object.keys(t.props));t.props.borders&&(a7(a,t.props.borders,s,o),h.delete("borders")),h.forEach(f=>{ee.warn(`Unknown node property ${f}`)})}return dn(t,a),t.intersect=function(h){return Ui.rect(t,h)},r},"rect"),P4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ca(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,o=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-n,u=t.positioned?-o/2:-i.height/2-n;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),t.props){let h=new Set(Object.keys(t.props));t.props.borders&&(a7(a,t.props.borders,s,o),h.delete("borders")),h.forEach(f=>{ee.warn(`Unknown node property ${f}`)})}return dn(t,a),t.intersect=function(h){return Ui.rect(t,h)},r},"composite"),B4t=b(async(e,t)=>{let{shapeSvg:r}=await ca(e,t,"label",!0);ee.trace("Classes = ",t.class);let i=r.insert("rect",":first-child"),n=0,a=0;if(i.attr("width",n).attr("height",a),r.attr("class","label edgeLabel"),t.props){let s=new Set(Object.keys(t.props));t.props.borders&&(a7(i,t.props.borders,n,a),s.delete("borders")),s.forEach(o=>{ee.warn(`Unknown node property ${o}`)})}return dn(t,i),t.intersect=function(s){return Ui.rect(t,s)},r},"labelRect");b(a7,"applyNodePropertyBorders");F4t=b(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";let i=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText,l="";typeof o=="object"?l=o[0]:l=o,ee.info("Label text abc79",l,o,typeof o=="object");let u=await Ql(s,l,t.labelStyle,!0,!0),h={width:0,height:0};if(Hr(we())){let m=u.children[0],y=Qe(u);h=m.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}ee.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=await Ql(s,f.join?f.join("
    "):f,t.labelStyle,!0,!0);if(Hr(we())){let m=p.children[0],y=Qe(p);h=m.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}let g=t.padding/2;return Qe(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+g+5)+")"),Qe(u).attr("transform","translate( "+(h.width{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.height+t.padding,a=i.width+n/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return dn(t,s),t.intersect=function(o){return Ui.rect(t,o)},r},"stadium"),z4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ca(e,t,Eo(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),ee.info("Circle main"),dn(t,a),t.intersect=function(s){return ee.info("Circle intersect",t,i.width/2+n,s),Ui.circle(t,i.width/2+n,s)},r},"circle"),G4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ca(e,t,Eo(t,void 0),!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",t.class),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n+a).attr("width",i.width+t.padding+a*2).attr("height",i.height+t.padding+a*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),ee.info("DoubleCircle main"),dn(t,o),t.intersect=function(u){return ee.info("DoubleCircle intersect",t,i.width/2+n+a,u),Ui.circle(t,i.width/2+n+a,u)},r},"doublecircle"),q4t=b(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ca(e,t,Eo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=ec(r,n,a,s);return o.attr("style",t.style),dn(t,o),t.intersect=function(l){return Ui.polygon(t,s,l)},r},"subroutine"),V4t=b((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),dn(t,i),t.intersect=function(n){return Ui.circle(t,7,n)},r},"start"),P7e=b((e,t,r)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=70,a=10;r==="LR"&&(n=10,a=70);let s=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join");return dn(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(o){return Ui.rect(t,o)},i},"forkJoin"),W4t=b((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),dn(t,n),t.intersect=function(a){return Ui.circle(t,7,a)},r},"end"),U4t=b(async(e,t)=>{let r=t.padding/2,i=4,n=8,a;t.classes?a="node "+t.classes:a="node default";let s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=i,d=s.insert("g").attr("class","label"),p=0,g=t.classData.annotations?.[0],m=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",y=await Ql(d,m,t.labelStyle,!0,!0),v=y.getBBox();if(Hr(we())){let A=y.children[0],N=Qe(y);v=A.getBoundingClientRect(),N.attr("width",v.width),N.attr("height",v.height)}t.classData.annotations[0]&&(f+=v.height+i,h+=v.width);let x=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(Hr(we())?x+="<"+t.classData.type+">":x+="<"+t.classData.type+">");let T=await Ql(d,x,t.labelStyle,!0,!0);Qe(T).attr("class","classTitle");let C=T.getBBox();if(Hr(we())){let A=T.children[0],N=Qe(T);C=A.getBoundingClientRect(),N.attr("width",C.width),N.attr("height",C.height)}f+=C.height+i,C.width>h&&(h=C.width);let w=[];t.classData.members.forEach(async A=>{let N=A.getDisplayDetails(),P=N.displayText;Hr(we())&&(P=P.replace(//g,">"));let O=await Ql(d,P,N.cssStyle?N.cssStyle:t.labelStyle,!0,!0),L=O.getBBox();if(Hr(we())){let _=O.children[0],R=Qe(O);L=_.getBoundingClientRect(),R.attr("width",L.width),R.attr("height",L.height)}L.width>h&&(h=L.width),f+=L.height+i,w.push(O)}),f+=n;let k=[];if(t.classData.methods.forEach(async A=>{let N=A.getDisplayDetails(),P=N.displayText;Hr(we())&&(P=P.replace(//g,">"));let O=await Ql(d,P,N.cssStyle?N.cssStyle:t.labelStyle,!0,!0),L=O.getBBox();if(Hr(we())){let _=O.children[0],R=Qe(O);L=_.getBoundingClientRect(),R.attr("width",L.width),R.attr("height",L.height)}L.width>h&&(h=L.width),f+=L.height+i,k.push(O)}),f+=n,g){let A=(h-v.width)/2;Qe(y).attr("transform","translate( "+(-1*h/2+A)+", "+-1*f/2+")"),p=v.height+i}let E=(h-C.width)/2;return Qe(T).attr("transform","translate( "+(-1*h/2+E)+", "+(-1*f/2+p)+")"),p+=C.height+i,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+n+p).attr("y2",-f/2-r+n+p),p+=n,w.forEach(A=>{Qe(A).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+n/2)+")");let N=A?.getBBox();p+=(N?.height??0)+i}),p+=n,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+n+p).attr("y2",-f/2-r+n+p),p+=n,k.forEach(A=>{Qe(A).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let N=A?.getBBox();p+=(N?.height??0)+i}),o.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+t.padding).attr("height",f+t.padding),dn(t,o),t.intersect=function(A){return Ui.rect(t,A)},s},"class_box"),B7e={rhombus:O7e,composite:P4t,question:O7e,rect:O4t,labelRect:B4t,rectWithTitle:F4t,choice:S4t,circle:z4t,doublecircle:G4t,stadium:$4t,hexagon:E4t,block_arrow:A4t,rect_left_inv_arrow:_4t,lean_right:L4t,lean_left:R4t,trapezoid:I4t,inv_trapezoid:D4t,rect_right_inv_arrow:N4t,cylinder:M4t,start:V4t,end:W4t,note:C4t,subroutine:q4t,fork:P7e,join:P7e,class_box:U4t},r7={},J7e=b(async(e,t,r)=>{let i,n;if(t.link){let a;we().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),n=await B7e[t.shape](i,t,r)}else n=await B7e[t.shape](e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),t.class&&n.attr("class","node default "+t.class),r7[t.id]=i,t.haveCallback&&r7[t.id].attr("class",r7[t.id].attr("class")+" clickable"),i},"insertNode"),H4t=b(e=>{let t=r7[e.id];ee.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");b(UV,"getNodeFromBlock");b(e8e,"calculateBlockSize");b(t8e,"insertBlockPositioned");b(s7,"performOperations");b(r8e,"calculateBlockSizes");b(i8e,"insertBlocks");b(n8e,"insertEdges");Y4t=b(function(e,t){return t.db.getClasses()},"getClasses"),j4t=b(async function(e,t,r,i){let{securityLevel:n,block:a}=It(),s=i.db;s.setDiagramId(t);let o;n==="sandbox"&&(o=Qe("#i"+t));let l=n==="sandbox"?Qe(o.nodes()[0].contentDocument.body):Qe("body"),u=n==="sandbox"?l.select(`[id="${t}"]`):Qe(`[id="${t}"]`);a4t(u,["point","circle","cross"],i.type,t);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),g=u.insert("g").attr("class","block");await r8e(g,f,s);let m=H7e(s);if(await i8e(g,f,s),await n8e(g,p,d,s,t),m){let y=m,v=Math.max(1,Math.round(.125*(y.width/y.height))),x=y.height+v+10,T=y.width+10,{useMaxWidth:C}=a;Mr(u,x,T,!!C),ee.debug("Here Bounds",m,y),u.attr("viewBox",`${y.x-5} ${y.y-5} ${y.width+10} ${y.height+10}`)}},"draw"),X4t={draw:j4t,getClasses:Y4t},K4t={parser:Ckt,db:Ukt,renderer:X4t,styles:Ykt}});var l8e={};Lr(l8e,{diagram:()=>pCt});var Su,Z4t,Q4t,J4t,eCt,tCt,rCt,iCt,HV,nCt,aCt,sCt,o8e,oCt,lCt,cCt,uCt,hCt,fCt,dCt,pCt,c8e=q(()=>{Ja();au();fE();$r();Er();er();fl();Su=new ny(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),Z4t=b(()=>{Su.reset(),fr()},"clear"),Q4t=b(()=>Su.records.stack[0],"getRoot"),J4t=b(()=>Su.records.cnt,"getCount"),eCt=rr.treeView,tCt=b(()=>Yr(eCt,It().treeView),"getConfig"),rCt=b((e,t)=>{for(;e<=Su.records.stack[Su.records.stack.length-1].level;)Su.records.stack.pop();let r={id:Su.records.cnt++,level:e,name:t,children:[]};Su.records.stack[Su.records.stack.length-1].children.push(r),Su.records.stack.push(r)},"addNode"),iCt={clear:Z4t,addNode:rCt,getRoot:Q4t,getCount:J4t,getConfig:tCt,getAccTitle:vr,getAccDescription:xr,getDiagramTitle:Tr,setAccDescription:br,setAccTitle:yr,setDiagramTitle:kr},HV=iCt,nCt=b(e=>{Un(e,HV),e.nodes.map(t=>HV.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),aCt={parse:b(async e=>{let t=await xn("treeView",e);ee.debug(t),nCt(t)},"parse")},sCt=b((e,t,r,i,n)=>{let a=i.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:s,width:o}=a.node().getBBox(),l=s+n.paddingY*2,u=o+n.paddingX*2;a.attr("x",e+n.paddingX),a.attr("y",t+l/2),r.BBox={x:e,y:t,width:u,height:l}},"positionLabel"),o8e=b((e,t,r,i,n,a)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),oCt=b((e,t,r)=>{let i=0,n=0,a=b((o,l,u,h)=>{let f=h*(u.rowIndent+u.paddingX);sCt(f,i,l,o,u);let{height:d,width:p}=l.BBox;o8e(o,f-u.rowIndent,i+d/2,f,i+d/2,u.lineThickness),n=Math.max(n,f+p),i+=d},"drawNode"),s=b((o,l=0)=>{a(e,o,r,l),o.children.forEach(d=>{s(d,l+1)});let{x:u,y:h,height:f}=o.BBox;if(o.children.length){let{y:d,height:p}=o.children[o.children.length-1].BBox;o8e(e,u+r.paddingX,h+f,u+r.paddingX,d+p/2+r.lineThickness/2,r.lineThickness)}},"processNode");return s(t),{totalHeight:i,totalWidth:n}},"drawTree"),lCt=b((e,t,r,i)=>{ee.debug(`Rendering treeView diagram -`+e);let n=i.db,a=n.getRoot(),s=n.getConfig(),o=yi(t),l=o.append("g");l.attr("class","tree-view");let{totalHeight:u,totalWidth:h}=oCt(l,a,s);o.attr("viewBox",`-${s.lineThickness/2} 0 ${h} ${u}`),Mr(o,u,h,s.useMaxWidth)},"draw"),cCt={draw:lCt},uCt=cCt,hCt={labelFontSize:"16px",labelColor:"black",lineColor:"black"},fCt=b(({treeView:e})=>{let{labelFontSize:t,labelColor:r,lineColor:i}=Yr(hCt,e);return` + ${Gu()} +`,"getStyles"),a_t=i_t;v(eX,"calculateBlockPosition");s_t=v(e=>{let t=0,r=0;for(let n of e.children){let{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};if(fe.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),n.type==="space")continue;let l=i/(n.widthInColumns??1);l>t&&(t=l),a>r&&(r=a)}return{width:t,height:r}},"getMaxChildSize");v(H7,"setBlockSizes");v(iX,"layoutBlocks");v(aX,"findBounds");v(aNe,"layout");v(sX,"getNodeFromBlock");v(sNe,"calculateBlockSize");v(oNe,"insertBlockPositioned");v(Y7,"performOperations");v(lNe,"calculateBlockSizes");v(cNe,"insertBlocks");v(uNe,"insertEdges");o_t=v(function(e,t){return t.db.getClasses()},"getClasses"),l_t=v(async function(e,t,r,n){let{securityLevel:i,block:a}=It(),s=n.db;s.setDiagramId(t);let o;i==="sandbox"&&(o=ct("#i"+t));let l=i==="sandbox"?ct(o.nodes()[0].contentDocument.body):ct("body"),u=i==="sandbox"?l.select(`[id="${t}"]`):ct(`[id="${t}"]`);t1(u,["point","circle","cross"],n.type,t);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),g=u.insert("g").attr("class","block");await lNe(g,f,s);let m=aNe(s);await cNe(g,f,s),await uNe(g,p,d,s,t);let y=g.node()?.getBBox(),x=y&&Number.isFinite(y.width)&&Number.isFinite(y.height)?y:m;if(x){let b=Math.max(1,Math.round(.125*(x.width/x.height))),T=x.height+b+10,k=x.width+10,{useMaxWidth:w}=a;Vr(u,T,k,!!w),fe.debug("Here Bounds",m,x),u.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),c_t={draw:l_t,getClasses:o_t},u_t={parser:BAt,db:n_t,renderer:c_t,styles:a_t}});var kNe={};cr(kNe,{diagram:()=>D_t});function xNe(e){return e.some(t=>yNe.test(t))}function bNe(e){for(let t of e){let r=vNe.exec(t);if(r?.index&&r.index>0)return r.index}return 4}function TNe(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(r,n)=>{let i=parseInt(n,10),a=t.get(i);return a?`line ${a}`:r})}function wNe(e){let t=e.split(` +`),r=new Map,n=-1;for(let[l,u]of t.entries())if(u.trim()==="treeView-beta"){n=l;break}if(n===-1)return{text:e,lineMap:r};let i=[];for(let l=n+1;l0){let i=e.substring(n).toLowerCase(),a=t?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}function lX(e,t){return e.includes(":")?e:e in ak.icons||!t?`${ak.prefix}:${e}`:`${t}:${e}`}function uX(e,t){if(e.icon!=="none"){if(e.icon)return lX(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType==="file"){let r=CNe(e.name,t);if(r==="none")return;if(r)return lX(r,t.defaultIconPack)}return`${ak.prefix}:${e.nodeType==="directory"?"folder":"file"}`}}}var yNe,vNe,h_t,dNe,pNe,gNe,f_t,ch,d_t,p_t,g_t,m_t,y_t,v_t,x_t,oX,b_t,T_t,ak,cX,w_t,C_t,k_t,S_t,mNe,E_t,A_t,__t,R_t,L_t,I_t,M_t,D_t,SNe=X(()=>{FA();Us();qi();Vi();Ur();hr();ur();Yt();ss();yNe=/[─━│┃└┗├┣]/,vNe=/[└┗├┣]/,h_t=/[─━]/,dNe=/^[\s│┃]+$/,pNe=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,gNe=/^\s*%%/,f_t=" ";v(xNe,"isBoxDrawingFormat");v(bNe,"inferSegmentWidth");v(TNe,"remapErrorLines");v(wNe,"preprocessBoxDrawing");ch=new pv(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),d_t=v(()=>{ch.reset(),pr()},"clear"),p_t=v(()=>ch.records.stack[0],"getRoot"),g_t=v(()=>ch.records.cnt,"getCount"),m_t=dr.treeView,y_t=v(()=>Qr(m_t,It().treeView),"getConfig"),v_t=v((e,t,r,n,i,a)=>{for(;e<=ch.records.stack[ch.records.stack.length-1].level;)ch.records.stack.pop();let s={id:ch.records.cnt++,level:e,name:t,nodeType:r,icon:i,cssClass:n,description:a,children:[]};ch.records.stack[ch.records.stack.length-1].children.push(s),ch.records.stack.push(s)},"addNode"),x_t={clear:d_t,addNode:v_t,getRoot:p_t,getCount:g_t,getConfig:y_t,getAccTitle:Lr,getAccDescription:Mr,getDiagramTitle:Dr,setAccDescription:Ir,setAccTitle:Ar,setDiagramTitle:$r},oX=x_t,b_t=v(e=>{Fn(e,oX);for(let t of e.nodes){let r=typeof t.indent=="number"?t.indent:0,n=t.name,i=n.endsWith("/");i&&(n=n.slice(0,-1));let a=i?"directory":"file",s=t.classAnnotation||void 0,o=t.iconAnnotation,l=o!==void 0?o||"none":void 0,u=t.descAnnotation||void 0,h=u?Cr(u,It()):void 0;oX.addNode(r,n,a,s,l,h)}},"populate"),T_t={parse:v(async e=>{let{text:t,lineMap:r}=wNe(e);try{let n=await Ei("treeView",t);fe.debug(n),b_t(n)}catch(n){throw r.size>0&&n instanceof Error&&(n.message=TNe(n.message,r)),n}},"parse")},ak={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};v(CNe,"detectIcon");v(lX,"qualifyIcon");v(uX,"getNodeIcon");qy([{name:ak.prefix,icons:ak}]);cX=14,w_t=4,C_t=16,k_t=v(async(e,t)=>{let r=[],n=v(a=>{let s=uX(a,t);s&&r.push({icon:s,node:a}),a.children.forEach(n)},"collect");n(e);let i=await Promise.all(r.map(async({icon:a,node:s})=>({id:s.id,svg:await Ko(a,{height:cX,width:cX})})));return new Map(i.map(({id:a,svg:s})=>[a,s]))},"resolveNodeIcons"),S_t=v((e,t,r,n,i,a)=>{let s=n.append("g"),o="treeView-node-label";r.nodeType==="directory"&&(o+=" treeView-node-dir"),r.cssClass&&(o+=` ${r.cssClass}`);let l=cX+w_t,u=uX(r,i),h=u!==void 0;u&&s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(r.id)??"");let f=s.append("text").text(r.name).attr("dominant-baseline","middle").attr("class",o),{height:d,width:p}=f.node().getBBox(),g=d+i.paddingY*2,m=e+i.paddingX+(h?l:0);f.attr("x",m),f.attr("y",t+g/2);let y=m+p,x=p+i.paddingX*2+(h?l:0);return r.BBox={x:e,y:t,width:x,height:g},r.cssClass?.split(/\s+/).includes("highlight")&&s.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:r,nodeGroup:s,labelRightEdge:y,centerY:t+g/2}},"positionLabel"),mNe=v((e,t,r,n,i,a)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),E_t=v((e,t,r,n)=>{let i=0,a=0,s=[],o=v((h,f,d,p)=>{let g=p*(d.rowIndent+d.paddingX),m=S_t(g,i,f,h,d,n);s.push(m);let{height:y,width:x}=f.BBox;mNe(h,g-d.rowIndent,i+y/2,g,i+y/2,d.lineThickness),a=Math.max(a,g+x),i+=y},"drawNode"),l=v((h,f=0)=>{o(e,h,r,f),h.children.forEach(m=>{l(m,f+1)});let{x:d,y:p,height:g}=h.BBox;if(h.children.length){let{y:m,height:y}=h.children[h.children.length-1].BBox;mNe(e,d+r.paddingX,p+g,d+r.paddingX,m+y/2+r.lineThickness/2,r.lineThickness)}},"processNode");l(t);let u=s.filter(h=>h.node.description);if(u.length>0){let f=Math.max(...s.map(d=>d.labelRightEdge))+C_t;for(let d of u){let g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",d.centerY).node().getBBox();a=Math.max(a,f+g.width+r.paddingX)}}for(let h of s)if(h.node.cssClass?.split(/\s+/).includes("highlight")){let f=h.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let d=a-h.node.BBox.x+8;f.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),A_t=v(async(e,t,r,n)=>{fe.debug(`Rendering treeView diagram +`+e);let i=n.db,a=i.getRoot(),s=i.getConfig(),o=xn(t),l=o.append("g");l.attr("class","tree-view");let u=await k_t(a,s),{totalHeight:h,totalWidth:f}=E_t(l,a,s,u);o.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${h}`),Vr(o,h,f,s.useMaxWidth)},"draw"),__t={draw:A_t},R_t=__t,L_t={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},I_t=v(({treeView:e})=>{let{labelFontSize:t,labelColor:r,lineColor:n,iconColor:i,descriptionColor:a,highlightBg:s,highlightStroke:o}=Qr(L_t,e);return` .treeView-node-label { font-size: ${t}; fill: ${r}; + white-space: pre; + } + .treeView-node-dir { + font-weight: bold; } .treeView-node-line { - stroke: ${i}; + stroke: ${n}; + } + .treeView-node-icon { + color: ${i}; + } + .treeView-node-description { + font-size: ${t}; + fill: ${a}; + font-style: italic; + white-space: pre; + } + .treeView-highlight-bg { + fill: ${s}; + stroke: ${o}; + stroke-width: 1; } - `},"styles"),dCt=fCt,pCt={db:HV,renderer:uCt,parser:aCt,styles:dCt}});var jV=eo((Pw,YV)=>{(function(t,r){typeof Pw=="object"&&typeof YV=="object"?YV.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Pw=="object"?Pw.layoutBase=r():t.layoutBase=r()})(Pw,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.i=function(i){return i},r.d=function(i,n,a){r.o(i,n)||Object.defineProperty(i,n,{configurable:!1,enumerable:!0,get:a})},r.n=function(i){var n=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(n,"a",n),n},r.o=function(i,n){return Object.prototype.hasOwnProperty.call(i,n)},r.p="",r(r.s=28)})([(function(e,t,r){"use strict";function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i}),(function(e,t,r){"use strict";var i=r(2),n=r(8),a=r(9);function s(l,u,h){i.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=s}),(function(e,t,r){"use strict";function i(n){this.vGraphObject=n}e.exports=i}),(function(e,t,r){"use strict";var i=r(2),n=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,g){p==null&&g==null&&(g=d),i.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(i.prototype);for(var h in i)u[h]=i[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,r){"use strict";var i=r(0);function n(){}for(var a in i)n[a]=i[a];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=n.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=n}),(function(e,t,r){"use strict";function i(n,a){n==null&&a==null?(this.x=0,this.y=0):(this.x=n,this.y=a)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(n){this.x=n},i.prototype.setY=function(n){this.y=n},i.prototype.getDifference=function(n){return new DimensionD(this.x-n.x,this.y-n.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(n){return this.x+=n.width,this.y+=n.height,this},e.exports=i}),(function(e,t,r){"use strict";var i=r(2),n=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,y){i.call(this,y),this.estimatedSize=n.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(i.prototype);for(var p in i)d[p]=i[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,y){if(m==null&&y==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var x=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(x.source=m,x.target=y,x.isInterGraph=!1,this.getEdges().push(x),m.edges.push(x),y!=m&&y.edges.push(x),x)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),v,x=y.length,T=0;T-1&&k>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(w,1),v.target!=v.source&&v.target.edges.splice(k,1);var C=v.source.owner.getEdges().indexOf(v);if(C==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(C,1)}},d.prototype.updateLeftTop=function(){for(var g=n.MAX_VALUE,m=n.MAX_VALUE,y,v,x,T=this.getNodes(),C=T.length,w=0;wy&&(g=y),m>v&&(m=v)}return g==n.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?x=T[0].getParent().paddingLeft:x=this.margin,this.left=m-x,this.top=g-x,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=n.MAX_VALUE,y=-n.MAX_VALUE,v=n.MAX_VALUE,x=-n.MAX_VALUE,T,C,w,k,E,A=this.nodes,N=A.length,P=0;PT&&(m=T),yw&&(v=w),xT&&(m=T),yw&&(v=w),x=this.nodes.length){var N=0;y.forEach(function(P){P.owner==g&&N++}),N==this.nodes.length&&(this.isConnected=!0)}},e.exports=d}),(function(e,t,r){"use strict";var i,n=r(1);function a(s){i=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof i){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=A,!1;if(uh)return o[0]=d,o[1]=u,o[2]=k,o[3]=f,!1;if(lh?(o[0]=m,o[1]=y,L=!0):(o[0]=g,o[1]=p,L=!0):R===I&&(l>h?(o[0]=d,o[1]=p,L=!0):(o[0]=v,o[1]=y,L=!0)),-D===I?h>l?(o[2]=E,o[3]=A,_=!0):(o[2]=k,o[3]=w,_=!0):D===I&&(h>l?(o[2]=C,o[3]=w,_=!0):(o[2]=N,o[3]=A,_=!0)),L&&_)return!1;if(l>h?u>f?(B=this.getCardinalDirection(R,I,4),M=this.getCardinalDirection(D,I,2)):(B=this.getCardinalDirection(-R,I,3),M=this.getCardinalDirection(-D,I,1)):u>f?(B=this.getCardinalDirection(-R,I,1),M=this.getCardinalDirection(-D,I,3)):(B=this.getCardinalDirection(R,I,2),M=this.getCardinalDirection(D,I,4)),!L)switch(B){case 1:z=p,F=l+-T/I,o[0]=F,o[1]=z;break;case 2:F=v,z=u+x*I,o[0]=F,o[1]=z;break;case 3:z=y,F=l+T/I,o[0]=F,o[1]=z;break;case 4:F=m,z=u+-x*I,o[0]=F,o[1]=z;break}if(!_)switch(M){case 1:G=w,$=h+-O/I,o[2]=$,o[3]=G;break;case 2:$=N,G=f+P*I,o[2]=$,o[3]=G;break;case 3:G=A,$=h+O/I,o[2]=$,o[3]=G;break;case 4:$=E,G=f+-P*I,o[2]=$,o[3]=G;break}}return!1},n.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},n.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,y=l.y,v=void 0,x=void 0,T=void 0,C=void 0,w=void 0,k=void 0,E=void 0,A=void 0,N=void 0;return T=d-h,w=u-f,E=f*h-u*d,C=y-g,k=p-m,A=m*g-p*y,N=T*k-C*w,N===0?null:(v=(w*A-k*E)/N,x=(C*E-T*A)/N,new i(v,x))},n.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o=0){var y=(-p+Math.sqrt(p*p-4*d*g))/(2*d),v=(-p-Math.sqrt(p*p-4*d*g))/(2*d),x=null;return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:x}else return null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,e.exports=n}),(function(e,t,r){"use strict";function i(){}i.sign=function(n){return n>0?1:n<0?-1:0},i.floor=function(n){return n<0?Math.ceil(n):Math.floor(n)},i.ceil=function(n){return n<0?Math.floor(n):Math.ceil(n)},e.exports=i}),(function(e,t,r){"use strict";function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i}),(function(e,t,r){"use strict";var i=(function(){function u(h,f){for(var d=0;d"u"?"undefined":i(a);return a==null||s!="object"&&s!="function"},e.exports=n}),(function(e,t,r){"use strict";function i(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(T.push(w[0]);T.length>0&&g;){var k=T[0];T.splice(0,1),x.add(k);for(var E=k.getEdges(),v=0;v-1&&w.splice(O,1)}x=new Set,C=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),v=0;v0){for(var y=this.edgeToDummyNodes.get(m),v=0;v=0&&g.splice(A,1);var N=C.getNeighborsList();N.forEach(function(L){if(m.indexOf(L)<0){var _=y.get(L),R=_-1;R==1&&k.push(L),y.set(L,R)}})}m=m.concat(k),(g.length==1||g.length==2)&&(v=!0,x=g[0])}return x},d.prototype.setGraphManager=function(p){this.graphManager=p},e.exports=d}),(function(e,t,r){"use strict";function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},e.exports=i}),(function(e,t,r){"use strict";var i=r(5);function n(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(a){this.lworldExtX=a},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(a){this.lworldExtY=a},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},n.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},n.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},n.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},n.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},n.prototype.inverseTransformPoint=function(a){var s=new i(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},e.exports=n}),(function(e,t,r){"use strict";function i(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,y,v=this.getAllNodes(),x;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),x=new Set,p=0;pT||x>T)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*y)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(v>T||x>T)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=v.length||T>=v[0].length)){for(var C=0;Cu}}]),o})();e.exports=s}),(function(e,t,r){"use strict";function i(){}i.svd=function(n){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=n.length,this.n=n[0].length;var a=Math.min(this.m,this.n);this.s=(function(vt){for(var ut=[];vt-- >0;)ut.push(0);return ut})(Math.min(this.m+1,this.n)),this.U=(function(vt){var ut=function oe(ot){if(ot.length==0)return 0;for(var ct=[],et=0;et0;)ut.push(0);return ut})(this.n),o=(function(vt){for(var ut=[];vt-- >0;)ut.push(0);return ut})(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;I--)if(this.s[I]!==0){for(var B=I+1;B=0;j--){if((function(vt,ut){return vt&&ut})(j0;){var fe=void 0,Se=void 0;for(fe=_-2;fe>=-1&&fe!==-1;fe--)if(Math.abs(s[fe])<=xe+te*(Math.abs(this.s[fe])+Math.abs(this.s[fe+1]))){s[fe]=0;break}if(fe===_-2)Se=4;else{var Me=void 0;for(Me=_-1;Me>=fe&&Me!==fe;Me--){var ke=(Me!==_?Math.abs(s[Me]):0)+(Me!==fe+1?Math.abs(s[Me-1]):0);if(Math.abs(this.s[Me])<=xe+te*ke){this.s[Me]=0;break}}Me===fe?Se=3:Me===_-1?Se=1:(Se=2,fe=Me)}switch(fe++,Se){case 1:{var Ce=s[_-2];s[_-2]=0;for(var Ie=_-2;Ie>=fe;Ie--){var Pe=i.hypot(this.s[Ie],Ce),pe=this.s[Ie]/Pe,Je=Ce/Pe;if(this.s[Ie]=Pe,Ie!==fe&&(Ce=-Je*s[Ie-1],s[Ie-1]=pe*s[Ie-1]),u)for(var Te=0;Te=this.s[fe+1]);){var it=this.s[fe];if(this.s[fe]=this.s[fe+1],this.s[fe+1]=it,u&&feMath.abs(a)?(s=a/n,s=Math.abs(n)*Math.sqrt(1+s*s)):a!=0?(s=n/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},e.exports=i}),(function(e,t,r){"use strict";var i=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;n(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},n.emit=function(a,s){for(var o=0;o{(function(t,r){typeof Bw=="object"&&typeof XV=="object"?XV.exports=r(jV()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Bw=="object"?Bw.coseBase=r(jV()):t.coseBase=r(t.layoutBase)})(Bw,function(e){return(()=>{"use strict";var t={45:((a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l}),806:((a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u}),767:((a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),880:((a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),578:((a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),765:((a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),g=o(902),m=o(551).FDLayoutConstants,y=o(551).LayoutConstants,v=o(551).Point,x=o(551).PointD,T=o(551).DimensionD,C=o(551).Layout,w=o(551).Integer,k=o(551).IGeometry,E=o(551).LGraph,A=o(551).Transform,N=o(551).LinkedList;function P(){l.call(this),this.toBeTiled={},this.constraints={}}P.prototype=Object.create(l.prototype);for(var O in l)P[O]=l[O];P.prototype.newGraphManager=function(){var L=new u(this);return this.graphManager=L,L},P.prototype.newGraph=function(L){return new h(null,this.graphManager,L)},P.prototype.newNode=function(L){return new f(this.graphManager,L)},P.prototype.newEdge=function(L){return new d(null,null,L)},P.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},P.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},P.prototype.layout=function(){var L=y.DEFAULT_CREATE_BENDS_AS_NEEDED;return L&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},P.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var _=new Set(this.getAllNodes()),R=this.nodesWithGravity.filter(function(B){return _.has(B)});this.graphManager.setAllNodesToApplyGravitation(R)}}else{var L=this.getFlatForest();if(L.length>0)this.positionNodesRadially(L);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var _=new Set(this.getAllNodes()),R=this.nodesWithGravity.filter(function(D){return _.has(D)});this.graphManager.setAllNodesToApplyGravitation(R),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},P.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var L=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(I){return L.has(I)});this.graphManager.setAllNodesToApplyGravitation(_),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var R=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(R,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},P.prototype.getPositionsData=function(){for(var L=this.graphManager.getAllNodes(),_={},R=0;R0&&this.updateDisplacements();for(var R=0;R0&&(D.fixedNodeWeight=B)}}if(this.constraints.relativePlacementConstraint){var M=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(Y){L.fixedNodesOnHorizontal.add(Y),L.fixedNodesOnVertical.add(Y)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var z=this.constraints.alignmentConstraint.vertical,R=0;R=2*Y.length/3;re--)se=Math.floor(Math.random()*(re+1)),J=Y[re],Y[re]=Y[se],Y[se]=J;return Y},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(Y){if(Y.left){var se=M.has(Y.left)?M.get(Y.left):Y.left,J=M.has(Y.right)?M.get(Y.right):Y.right;L.nodesInRelativeHorizontal.includes(se)||(L.nodesInRelativeHorizontal.push(se),L.nodeToRelativeConstraintMapHorizontal.set(se,[]),L.dummyToNodeForVerticalAlignment.has(se)?L.nodeToTempPositionMapHorizontal.set(se,L.idToNodeMap.get(L.dummyToNodeForVerticalAlignment.get(se)[0]).getCenterX()):L.nodeToTempPositionMapHorizontal.set(se,L.idToNodeMap.get(se).getCenterX())),L.nodesInRelativeHorizontal.includes(J)||(L.nodesInRelativeHorizontal.push(J),L.nodeToRelativeConstraintMapHorizontal.set(J,[]),L.dummyToNodeForVerticalAlignment.has(J)?L.nodeToTempPositionMapHorizontal.set(J,L.idToNodeMap.get(L.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):L.nodeToTempPositionMapHorizontal.set(J,L.idToNodeMap.get(J).getCenterX())),L.nodeToRelativeConstraintMapHorizontal.get(se).push({right:J,gap:Y.gap}),L.nodeToRelativeConstraintMapHorizontal.get(J).push({left:se,gap:Y.gap})}else{var re=F.has(Y.top)?F.get(Y.top):Y.top,ie=F.has(Y.bottom)?F.get(Y.bottom):Y.bottom;L.nodesInRelativeVertical.includes(re)||(L.nodesInRelativeVertical.push(re),L.nodeToRelativeConstraintMapVertical.set(re,[]),L.dummyToNodeForHorizontalAlignment.has(re)?L.nodeToTempPositionMapVertical.set(re,L.idToNodeMap.get(L.dummyToNodeForHorizontalAlignment.get(re)[0]).getCenterY()):L.nodeToTempPositionMapVertical.set(re,L.idToNodeMap.get(re).getCenterY())),L.nodesInRelativeVertical.includes(ie)||(L.nodesInRelativeVertical.push(ie),L.nodeToRelativeConstraintMapVertical.set(ie,[]),L.dummyToNodeForHorizontalAlignment.has(ie)?L.nodeToTempPositionMapVertical.set(ie,L.idToNodeMap.get(L.dummyToNodeForHorizontalAlignment.get(ie)[0]).getCenterY()):L.nodeToTempPositionMapVertical.set(ie,L.idToNodeMap.get(ie).getCenterY())),L.nodeToRelativeConstraintMapVertical.get(re).push({bottom:ie,gap:Y.gap}),L.nodeToRelativeConstraintMapVertical.get(ie).push({top:re,gap:Y.gap})}});else{var G=new Map,U=new Map;this.constraints.relativePlacementConstraint.forEach(function(Y){if(Y.left){var se=M.has(Y.left)?M.get(Y.left):Y.left,J=M.has(Y.right)?M.get(Y.right):Y.right;G.has(se)?G.get(se).push(J):G.set(se,[J]),G.has(J)?G.get(J).push(se):G.set(J,[se])}else{var re=F.has(Y.top)?F.get(Y.top):Y.top,ie=F.has(Y.bottom)?F.get(Y.bottom):Y.bottom;U.has(re)?U.get(re).push(ie):U.set(re,[ie]),U.has(ie)?U.get(ie).push(re):U.set(ie,[re])}});var j=function(se,J){var re=[],ie=[],te=new N,xe=new Set,fe=0;return se.forEach(function(Se,Me){if(!xe.has(Me)){re[fe]=[],ie[fe]=!1;var ke=Me;for(te.push(ke),xe.add(ke),re[fe].push(ke);te.length!=0;){ke=te.shift(),J.has(ke)&&(ie[fe]=!0);var Ce=se.get(ke);Ce.forEach(function(Ie){xe.has(Ie)||(te.push(Ie),xe.add(Ie),re[fe].push(Ie))})}fe++}}),{components:re,isFixed:ie}},H=j(G,L.fixedNodesOnHorizontal);this.componentsOnHorizontal=H.components,this.fixedComponentsOnHorizontal=H.isFixed;var Q=j(U,L.fixedNodesOnVertical);this.componentsOnVertical=Q.components,this.fixedComponentsOnVertical=Q.isFixed}}},P.prototype.updateDisplacements=function(){var L=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(Q){var Y=L.idToNodeMap.get(Q.nodeId);Y.displacementX=0,Y.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var _=this.constraints.alignmentConstraint.vertical,R=0;R<_.length;R++){for(var D=0,I=0;I<_[R].length;I++){if(this.fixedNodeSet.has(_[R][I])){D=0;break}D+=this.idToNodeMap.get(_[R][I]).displacementX}for(var B=D/_[R].length,I=0;I<_[R].length;I++)this.idToNodeMap.get(_[R][I]).displacementX=B}if(this.constraints.alignmentConstraint.horizontal)for(var M=this.constraints.alignmentConstraint.horizontal,R=0;R1){var F;for(F=0;FD&&(D=Math.floor(M.y)),B=Math.floor(M.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new x(y.WORLD_CENTER_X-M.x/2,y.WORLD_CENTER_Y-M.y/2))},P.radialLayout=function(L,_,R){var D=Math.max(this.maxDiagonalInTree(L),p.DEFAULT_RADIAL_SEPARATION);P.branchRadialLayout(_,null,0,359,0,D);var I=E.calculateBounds(L),B=new A;B.setDeviceOrgX(I.getMinX()),B.setDeviceOrgY(I.getMinY()),B.setWorldOrgX(R.x),B.setWorldOrgY(R.y);for(var M=0;M1;){var re=J[0];J.splice(0,1);var ie=j.indexOf(re);ie>=0&&j.splice(ie,1),Y--,H--}_!=null?se=(j.indexOf(J[0])+1)%Y:se=0;for(var te=Math.abs(D-R)/H,xe=se;Q!=H;xe=++xe%Y){var fe=j[xe].getOtherEnd(L);if(fe!=_){var Se=(R+Q*te)%360,Me=(Se+te)%360;P.branchRadialLayout(fe,L,Se,Me,I+B,B),Q++}}},P.maxDiagonalInTree=function(L){for(var _=w.MIN_VALUE,R=0;R_&&(_=I)}return _},P.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},P.prototype.groupZeroDegreeMembers=function(){var L=this,_={};this.memberGroups={},this.idToDummyNode={};for(var R=[],D=this.graphManager.getAllNodes(),I=0;I"u"&&(_[F]=[]),_[F]=_[F].concat(B)}Object.keys(_).forEach(function(z){if(_[z].length>1){var $="DummyCompound_"+z;L.memberGroups[$]=_[z];var G=_[z][0].getParent(),U=new f(L.graphManager);U.id=$,U.paddingLeft=G.paddingLeft||0,U.paddingRight=G.paddingRight||0,U.paddingBottom=G.paddingBottom||0,U.paddingTop=G.paddingTop||0,L.idToDummyNode[$]=U;var j=L.getGraphManager().add(L.newGraph(),U),H=G.getChild();H.add(U);for(var Q=0;Q<_[z].length;Q++){var Y=_[z][Q];H.remove(Y),j.add(Y)}}})},P.prototype.clearCompounds=function(){var L={},_={};this.performDFSOnCompounds();for(var R=0;RI?(D.rect.x-=(D.labelWidth-I)/2,D.setWidth(D.labelWidth),D.labelMarginLeft=(D.labelWidth-I)/2):D.labelPosHorizontal=="right"&&D.setWidth(I+D.labelWidth)),D.labelHeight&&(D.labelPosVertical=="top"?(D.rect.y-=D.labelHeight,D.setHeight(B+D.labelHeight),D.labelMarginTop=D.labelHeight):D.labelPosVertical=="center"&&D.labelHeight>B?(D.rect.y-=(D.labelHeight-B)/2,D.setHeight(D.labelHeight),D.labelMarginTop=(D.labelHeight-B)/2):D.labelPosVertical=="bottom"&&D.setHeight(B+D.labelHeight))}})},P.prototype.repopulateCompounds=function(){for(var L=this.compoundOrder.length-1;L>=0;L--){var _=this.compoundOrder[L],R=_.id,D=_.paddingLeft,I=_.paddingTop,B=_.labelMarginLeft,M=_.labelMarginTop;this.adjustLocations(this.tiledMemberPack[R],_.rect.x,_.rect.y,D,I,B,M)}},P.prototype.repopulateZeroDegreeMembers=function(){var L=this,_=this.tiledZeroDegreePack;Object.keys(_).forEach(function(R){var D=L.idToDummyNode[R],I=D.paddingLeft,B=D.paddingTop,M=D.labelMarginLeft,F=D.labelMarginTop;L.adjustLocations(_[R],D.rect.x,D.rect.y,I,B,M,F)})},P.prototype.getToBeTiled=function(L){var _=L.id;if(this.toBeTiled[_]!=null)return this.toBeTiled[_];var R=L.getChild();if(R==null)return this.toBeTiled[_]=!1,!1;for(var D=R.getNodes(),I=0;I0)return this.toBeTiled[_]=!1,!1;if(B.getChild()==null){this.toBeTiled[B.id]=!1;continue}if(!this.getToBeTiled(B))return this.toBeTiled[_]=!1,!1}return this.toBeTiled[_]=!0,!0},P.prototype.getNodeDegree=function(L){for(var _=L.id,R=L.getEdges(),D=0,I=0;IG&&(G=j.rect.height)}R+=G+L.verticalPadding}},P.prototype.tileCompoundMembers=function(L,_){var R=this;this.tiledMemberPack=[],Object.keys(L).forEach(function(D){var I=_[D];if(R.tiledMemberPack[D]=R.tileNodes(L[D],I.paddingLeft+I.paddingRight),I.rect.width=R.tiledMemberPack[D].width,I.rect.height=R.tiledMemberPack[D].height,I.setCenter(R.tiledMemberPack[D].centerX,R.tiledMemberPack[D].centerY),I.labelMarginLeft=0,I.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var B=I.rect.width,M=I.rect.height;I.labelWidth&&(I.labelPosHorizontal=="left"?(I.rect.x-=I.labelWidth,I.setWidth(B+I.labelWidth),I.labelMarginLeft=I.labelWidth):I.labelPosHorizontal=="center"&&I.labelWidth>B?(I.rect.x-=(I.labelWidth-B)/2,I.setWidth(I.labelWidth),I.labelMarginLeft=(I.labelWidth-B)/2):I.labelPosHorizontal=="right"&&I.setWidth(B+I.labelWidth)),I.labelHeight&&(I.labelPosVertical=="top"?(I.rect.y-=I.labelHeight,I.setHeight(M+I.labelHeight),I.labelMarginTop=I.labelHeight):I.labelPosVertical=="center"&&I.labelHeight>M?(I.rect.y-=(I.labelHeight-M)/2,I.setHeight(I.labelHeight),I.labelMarginTop=(I.labelHeight-M)/2):I.labelPosVertical=="bottom"&&I.setHeight(M+I.labelHeight))}})},P.prototype.tileNodes=function(L,_){var R=this.tileNodesByFavoringDim(L,_,!0),D=this.tileNodesByFavoringDim(L,_,!1),I=this.getOrgRatio(R),B=this.getOrgRatio(D),M;return BF&&(F=Q.getWidth())});var z=B/I,$=M/I,G=Math.pow(R-D,2)+4*(z+D)*($+R)*I,U=(D-R+Math.sqrt(G))/(2*(z+D)),j;_?(j=Math.ceil(U),j==U&&j++):j=Math.floor(U);var H=j*(z+D)-D;return F>H&&(H=F),H+=D*2,H},P.prototype.tileNodesByFavoringDim=function(L,_,R){var D=p.TILING_PADDING_VERTICAL,I=p.TILING_PADDING_HORIZONTAL,B=p.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:_,verticalPadding:D,horizontalPadding:I,centerX:0,centerY:0};B&&(M.idealRowWidth=this.calcIdealRowWidth(L,R));var F=function(Y){return Y.rect.width*Y.rect.height},z=function(Y,se){return F(se)-F(Y)};L.sort(function(Q,Y){var se=z;return M.idealRowWidth?(se=B,se(Q.id,Y.id)):se(Q,Y)});for(var $=0,G=0,U=0;U0&&(M+=L.horizontalPadding),L.rowWidth[R]=M,L.width0&&(F+=L.verticalPadding);var z=0;F>L.rowHeight[R]&&(z=L.rowHeight[R],L.rowHeight[R]=F,z=L.rowHeight[R]-z),L.height+=z,L.rows[R].push(_)},P.prototype.getShortestRowIndex=function(L){for(var _=-1,R=Number.MAX_VALUE,D=0;DR&&(_=D,R=L.rowWidth[D]);return _},P.prototype.canAddHorizontal=function(L,_,R){if(L.idealRowWidth){var D=L.rows.length-1,I=L.rowWidth[D];return I+_+L.horizontalPadding<=L.idealRowWidth}var B=this.getShortestRowIndex(L);if(B<0)return!0;var M=L.rowWidth[B];if(M+L.horizontalPadding+_<=L.width)return!0;var F=0;L.rowHeight[B]0&&(F=R+L.verticalPadding-L.rowHeight[B]);var z;L.width-M>=_+L.horizontalPadding?z=(L.height+F)/(M+_+L.horizontalPadding):z=(L.height+F)/L.width,F=R+L.verticalPadding;var $;return L.width<_?$=(L.height+F)/_:$=(L.height+F)/L.width,$<1&&($=1/$),z<1&&(z=1/z),z<$},P.prototype.shiftToLastRow=function(L){var _=this.getLongestRowIndex(L),R=L.rowWidth.length-1,D=L.rows[_],I=D[D.length-1],B=I.width+L.horizontalPadding;if(L.width-L.rowWidth[R]>B&&_!=R){D.splice(-1,1),L.rows[R].push(I),L.rowWidth[_]=L.rowWidth[_]-B,L.rowWidth[R]=L.rowWidth[R]+B,L.width=L.rowWidth[instance.getLongestRowIndex(L)];for(var M=Number.MIN_VALUE,F=0;FM&&(M=D[F].height);_>0&&(M+=L.verticalPadding);var z=L.rowHeight[_]+L.rowHeight[R];L.rowHeight[_]=M,L.rowHeight[R]0)for(var H=I;H<=B;H++)j[0]+=this.grid[H][M-1].length+this.grid[H][M].length-1;if(B0)for(var H=M;H<=F;H++)j[3]+=this.grid[I-1][H].length+this.grid[I][H].length-1;for(var Q=w.MAX_VALUE,Y,se,J=0;J{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,g,m){l.call(this,d,p,g,m)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var g=this.getChild().getNodes(),m,y=0;y{function l(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);m0){var Tt=0;ue.forEach(function(it){le=="horizontal"?(Oe.set(it,v.has(it)?x[v.get(it)]:he.get(it)),Tt+=Oe.get(it)):(Oe.set(it,v.has(it)?T[v.get(it)]:he.get(it)),Tt+=Oe.get(it))}),Tt=Tt/ue.length,Ye.forEach(function(it){X.has(it)||Oe.set(it,Tt)})}else{var be=0;Ye.forEach(function(it){le=="horizontal"?be+=v.has(it)?x[v.get(it)]:he.get(it):be+=v.has(it)?T[v.get(it)]:he.get(it)}),be=be/Ye.length,Ye.forEach(function(it){Oe.set(it,be)})}});for(var Re=function(){var ue=Fe.shift(),Tt=V.get(ue);Tt.forEach(function(be){if(Oe.get(be.id)it&&(it=ct),etft&&(ft=et)}}catch(ur){mt=!0,vt=ur}finally{try{!Dt&&ut.return&&ut.return()}finally{if(mt)throw vt}}var me=(Tt+it)/2-(be+ft)/2,Ze=!0,rt=!1,at=void 0;try{for(var _t=Ye[Symbol.iterator](),At;!(Ze=(At=_t.next()).done);Ze=!0){var Mt=At.value;Oe.set(Mt,Oe.get(Mt)+me)}}catch(ur){rt=!0,at=ur}finally{try{!Ze&&_t.return&&_t.return()}finally{if(rt)throw at}}})}return Oe},O=function(V){var le=0,X=0,he=0,Z=0;if(V.forEach(function(Ae){Ae.left?x[v.get(Ae.left)]-x[v.get(Ae.right)]>=0?le++:X++:T[v.get(Ae.top)]-T[v.get(Ae.bottom)]>=0?he++:Z++}),le>X&&he>Z)for(var Ve=0;VeX)for(var ve=0;veZ)for(var Oe=0;Oe1)m.fixedNodeConstraint.forEach(function(ce,V){D[V]=[ce.position.x,ce.position.y],I[V]=[x[v.get(ce.nodeId)],T[v.get(ce.nodeId)]]}),B=!0;else if(m.alignmentConstraint)(function(){var ce=0;if(m.alignmentConstraint.vertical){for(var V=m.alignmentConstraint.vertical,le=function(Oe){var Ae=new Set;V[Oe].forEach(function(We){Ae.add(We)});var Fe=new Set([].concat(l(Ae)).filter(function(We){return F.has(We)})),Re=void 0;Fe.size>0?Re=x[v.get(Fe.values().next().value)]:Re=N(Ae).x,V[Oe].forEach(function(We){D[ce]=[Re,T[v.get(We)]],I[ce]=[x[v.get(We)],T[v.get(We)]],ce++})},X=0;X0?Re=x[v.get(Fe.values().next().value)]:Re=N(Ae).y,he[Oe].forEach(function(We){D[ce]=[x[v.get(We)],Re],I[ce]=[x[v.get(We)],T[v.get(We)]],ce++})},Ve=0;VeU&&(U=G[H].length,j=H);if(U<$.size/2)O(m.relativePlacementConstraint),B=!1,M=!1;else{var Q=new Map,Y=new Map,se=[];G[j].forEach(function(ce){z.get(ce).forEach(function(V){V.direction=="horizontal"?(Q.has(ce)?Q.get(ce).push(V):Q.set(ce,[V]),Q.has(V.id)||Q.set(V.id,[]),se.push({left:ce,right:V.id})):(Y.has(ce)?Y.get(ce).push(V):Y.set(ce,[V]),Y.has(V.id)||Y.set(V.id,[]),se.push({top:ce,bottom:V.id}))})}),O(se),M=!1;var J=P(Q,"horizontal"),re=P(Y,"vertical");G[j].forEach(function(ce,V){I[V]=[x[v.get(ce)],T[v.get(ce)]],D[V]=[],J.has(ce)?D[V][0]=J.get(ce):D[V][0]=x[v.get(ce)],re.has(ce)?D[V][1]=re.get(ce):D[V][1]=T[v.get(ce)]}),B=!0}}if(B){for(var ie=void 0,te=f.transpose(D),xe=f.transpose(I),fe=0;fe0){var pe={x:0,y:0};m.fixedNodeConstraint.forEach(function(ce,V){var le={x:x[v.get(ce.nodeId)],y:T[v.get(ce.nodeId)]},X=ce.position,he=A(X,le);pe.x+=he.x,pe.y+=he.y}),pe.x/=m.fixedNodeConstraint.length,pe.y/=m.fixedNodeConstraint.length,x.forEach(function(ce,V){x[V]+=pe.x}),T.forEach(function(ce,V){T[V]+=pe.y}),m.fixedNodeConstraint.forEach(function(ce){x[v.get(ce.nodeId)]=ce.position.x,T[v.get(ce.nodeId)]=ce.position.y})}if(m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var Je=m.alignmentConstraint.vertical,Te=function(V){var le=new Set;Je[V].forEach(function(Z){le.add(Z)});var X=new Set([].concat(l(le)).filter(function(Z){return F.has(Z)})),he=void 0;X.size>0?he=x[v.get(X.values().next().value)]:he=N(le).x,le.forEach(function(Z){F.has(Z)||(x[v.get(Z)]=he)})},Be=0;Be0?he=T[v.get(X.values().next().value)]:he=N(le).y,le.forEach(function(Z){F.has(Z)||(T[v.get(Z)]=he)})},qe=0;qe{a.exports=e})},r={};function i(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return t[a](o,o.exports,i),o.exports}var n=i(45);return n})()})});var u8e=eo((Fw,ZV)=>{(function(t,r){typeof Fw=="object"&&typeof ZV=="object"?ZV.exports=r(KV()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof Fw=="object"?Fw.cytoscapeFcose=r(KV()):t.cytoscapeFcose=r(t.coseBase)})(Fw,function(e){return(()=>{"use strict";var t={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=(function(){function f(d,p){var g=[],m=!0,y=!1,v=void 0;try{for(var x=d[Symbol.iterator](),T;!(m=(T=x.next()).done)&&(g.push(T.value),!(p&&g.length===p));m=!0);}catch(C){y=!0,v=C}finally{try{!m&&x.return&&x.return()}finally{if(y)throw v}}return g}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&B.merge($)});for(var M=0;M1){T=v[0],C=T.connectedEdges().length,v.forEach(function(I){I.connectedEdges().length0&&g.set("dummy"+(g.size+1),E),A},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var x=!0,T=!1,C=void 0;try{for(var w=d.nodeIndexes[Symbol.iterator](),k;!(x=(k=w.next()).done);x=!0){var E=k.value,A=l(E,2),N=A[0],P=A[1],O=p.cy.getElementById(N);if(O){var L=O.boundingBox(),_=d.xCoords[P]-L.w/2,R=d.xCoords[P]+L.w/2,D=d.yCoords[P]-L.h/2,I=d.yCoords[P]+L.h/2;_m&&(m=R),Dv&&(v=I)}}}catch($){T=!0,C=$}finally{try{!x&&w.return&&w.return()}finally{if(T)throw C}}var B=f.x-(m+g)/2,M=f.y-(v+y)/2;d.xCoords=d.xCoords.map(function($){return $+B}),d.yCoords=d.yCoords.map(function($){return $+M})}else{Object.keys(d).forEach(function($){var G=d[$],U=G.getRect().x,j=G.getRect().x+G.getRect().width,H=G.getRect().y,Q=G.getRect().y+G.getRect().height;Um&&(m=j),Hv&&(v=Q)});var F=f.x-(m+g)/2,z=f.y-(v+y)/2;Object.keys(d).forEach(function($){var G=d[$];G.setCenter(G.getCenterX()+F,G.getCenterY()+z)})}}},h.calcBoundingBox=function(f,d,p,g){for(var m=Number.MAX_SAFE_INTEGER,y=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,x=Number.MIN_SAFE_INTEGER,T=void 0,C=void 0,w=void 0,k=void 0,E=f.descendants().not(":parent"),A=E.length,N=0;NT&&(m=T),yw&&(v=w),x{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,g=o(140).layoutBase.FDLayoutConstants,m=o(140).CoSEConstants,y=function(x,T){var C=x.cy,w=x.eles,k=w.nodes(),E=w.edges(),A=void 0,N=void 0,P=void 0,O={};x.randomize&&(A=T.nodeIndexes,N=T.xCoords,P=T.yCoords);var L=function($){return typeof $=="function"},_=function($,G){return L($)?$(G):$},R=l.calcParentsWithoutChildren(C,w),D=function z($,G,U,j){for(var H=G.length,Q=0;Q0){var te=void 0;te=U.getGraphManager().add(U.newGraph(),J),z(te,se,U,j)}}},I=function($,G,U){for(var j=0,H=0,Q=0;Q0?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=j/H:L(x.idealEdgeLength)?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=x.idealEdgeLength,m.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,m.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},B=function($,G){G.fixedNodeConstraint&&($.constraints.fixedNodeConstraint=G.fixedNodeConstraint),G.alignmentConstraint&&($.constraints.alignmentConstraint=G.alignmentConstraint),G.relativePlacementConstraint&&($.constraints.relativePlacementConstraint=G.relativePlacementConstraint)};x.nestingFactor!=null&&(m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(m.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(m.MAX_ITERATIONS=g.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(m.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(m.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.tilingCompareBy!=null&&(m.TILING_COMPARE_BY=x.tilingCompareBy),x.quality=="proof"?p.QUALITY=2:p.QUALITY=0,m.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!x.randomize,m.ANIMATE=g.ANIMATE=p.ANIMATE=x.animate,m.TILE=x.tile,m.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,m.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,m.PURE_INCREMENTAL=!x.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=x.uniformNodeDimensions,x.step=="transformed"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!1),x.step=="enforced"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!1),x.step=="cose"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!0),x.step=="all"&&(x.randomize?m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!0),x.fixedNodeConstraint||x.alignmentConstraint||x.relativePlacementConstraint?m.TREE_REDUCTION_ON_INCREMENTAL=!1:m.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new u,F=M.newGraphManager();return D(F.addRoot(),l.getTopMostNodes(k),M,x),I(M,F,E),B(M,x),M.runLayout(),O};a.exports={coseLayout:y}}),212:((a,s,o)=>{var l=(function(){function x(T,C){for(var w=0;w0)if(I){var F=f.getTopMostNodes(w.eles.nodes());if(L=f.connectComponents(k,w.eles,F),L.forEach(function(ke){var Ce=ke.boundingBox();_.push({x:Ce.x1+Ce.w/2,y:Ce.y1+Ce.h/2})}),w.randomize&&L.forEach(function(ke){w.eles=ke,A.push(p(w))}),w.quality=="default"||w.quality=="proof"){var z=k.collection();if(w.tile){var $=new Map,G=[],U=[],j=0,H={nodeIndexes:$,xCoords:G,yCoords:U},Q=[];if(L.forEach(function(ke,Ce){ke.edges().length==0&&(ke.nodes().forEach(function(Ie,Pe){z.merge(ke.nodes()[Pe]),Ie.isParent()||(H.nodeIndexes.set(ke.nodes()[Pe].id(),j++),H.xCoords.push(ke.nodes()[0].position().x),H.yCoords.push(ke.nodes()[0].position().y))}),Q.push(Ce))}),z.length>1){var Y=z.boundingBox();_.push({x:Y.x1+Y.w/2,y:Y.y1+Y.h/2}),L.push(z),A.push(H);for(var se=Q.length-1;se>=0;se--)L.splice(Q[se],1),A.splice(Q[se],1),_.splice(Q[se],1)}}L.forEach(function(ke,Ce){w.eles=ke,O.push(m(w,A[Ce])),f.relocateComponent(_[Ce],O[Ce],w)})}else L.forEach(function(ke,Ce){f.relocateComponent(_[Ce],A[Ce],w)});var J=new Set;if(L.length>1){var re=[],ie=E.filter(function(ke){return ke.css("display")=="none"});L.forEach(function(ke,Ce){var Ie=void 0;if(w.quality=="draft"&&(Ie=A[Ce].nodeIndexes),ke.nodes().not(ie).length>0){var Pe={};Pe.edges=[],Pe.nodes=[];var pe=void 0;ke.nodes().not(ie).forEach(function(Je){if(w.quality=="draft")if(!Je.isParent())pe=Ie.get(Je.id()),Pe.nodes.push({x:A[Ce].xCoords[pe]-Je.boundingbox().w/2,y:A[Ce].yCoords[pe]-Je.boundingbox().h/2,width:Je.boundingbox().w,height:Je.boundingbox().h});else{var Te=f.calcBoundingBox(Je,A[Ce].xCoords,A[Ce].yCoords,Ie);Pe.nodes.push({x:Te.topLeftX,y:Te.topLeftY,width:Te.width,height:Te.height})}else O[Ce][Je.id()]&&Pe.nodes.push({x:O[Ce][Je.id()].getLeft(),y:O[Ce][Je.id()].getTop(),width:O[Ce][Je.id()].getWidth(),height:O[Ce][Je.id()].getHeight()})}),ke.edges().forEach(function(Je){var Te=Je.source(),Be=Je.target();if(Te.css("display")!="none"&&Be.css("display")!="none")if(w.quality=="draft"){var He=Ie.get(Te.id()),nt=Ie.get(Be.id()),qe=[],Ue=[];if(Te.isParent()){var ge=f.calcBoundingBox(Te,A[Ce].xCoords,A[Ce].yCoords,Ie);qe.push(ge.topLeftX+ge.width/2),qe.push(ge.topLeftY+ge.height/2)}else qe.push(A[Ce].xCoords[He]),qe.push(A[Ce].yCoords[He]);if(Be.isParent()){var ce=f.calcBoundingBox(Be,A[Ce].xCoords,A[Ce].yCoords,Ie);Ue.push(ce.topLeftX+ce.width/2),Ue.push(ce.topLeftY+ce.height/2)}else Ue.push(A[Ce].xCoords[nt]),Ue.push(A[Ce].yCoords[nt]);Pe.edges.push({startX:qe[0],startY:qe[1],endX:Ue[0],endY:Ue[1]})}else O[Ce][Te.id()]&&O[Ce][Be.id()]&&Pe.edges.push({startX:O[Ce][Te.id()].getCenterX(),startY:O[Ce][Te.id()].getCenterY(),endX:O[Ce][Be.id()].getCenterX(),endY:O[Ce][Be.id()].getCenterY()})}),Pe.nodes.length>0&&(re.push(Pe),J.add(Ce))}});var te=D.packComponents(re,w.randomize).shifts;if(w.quality=="draft")A.forEach(function(ke,Ce){var Ie=ke.xCoords.map(function(pe){return pe+te[Ce].dx}),Pe=ke.yCoords.map(function(pe){return pe+te[Ce].dy});ke.xCoords=Ie,ke.yCoords=Pe});else{var xe=0;J.forEach(function(ke){Object.keys(O[ke]).forEach(function(Ce){var Ie=O[ke][Ce];Ie.setCenter(Ie.getCenterX()+te[xe].dx,Ie.getCenterY()+te[xe].dy)}),xe++})}}}else{var B=w.eles.boundingBox();if(_.push({x:B.x1+B.w/2,y:B.y1+B.h/2}),w.randomize){var M=p(w);A.push(M)}w.quality=="default"||w.quality=="proof"?(O.push(m(w,A[0])),f.relocateComponent(_[0],O[0],w)):f.relocateComponent(_[0],A[0],w)}var fe=function(Ce,Ie){if(w.quality=="default"||w.quality=="proof"){typeof Ce=="number"&&(Ce=Ie);var Pe=void 0,pe=void 0,Je=Ce.data("id");return O.forEach(function(Be){Je in Be&&(Pe={x:Be[Je].getRect().getCenterX(),y:Be[Je].getRect().getCenterY()},pe=Be[Je])}),w.nodeDimensionsIncludeLabels&&(pe.labelWidth&&(pe.labelPosHorizontal=="left"?Pe.x+=pe.labelWidth/2:pe.labelPosHorizontal=="right"&&(Pe.x-=pe.labelWidth/2)),pe.labelHeight&&(pe.labelPosVertical=="top"?Pe.y+=pe.labelHeight/2:pe.labelPosVertical=="bottom"&&(Pe.y-=pe.labelHeight/2))),Pe==null&&(Pe={x:Ce.position("x"),y:Ce.position("y")}),{x:Pe.x,y:Pe.y}}else{var Te=void 0;return A.forEach(function(Be){var He=Be.nodeIndexes.get(Ce.id());He!=null&&(Te={x:Be.xCoords[He],y:Be.yCoords[He]})}),Te==null&&(Te={x:Ce.position("x"),y:Ce.position("y")}),{x:Te.x,y:Te.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var Se=f.calcParentsWithoutChildren(k,E),Me=E.filter(function(ke){return ke.css("display")=="none"});w.eles=E.not(Me),E.nodes().not(":parent").not(Me).layoutPositions(C,w,fe),Se.length>0&&Se.forEach(function(ke){ke.position(fe(ke))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),x})();a.exports=v}),657:((a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var g=p.cy,m=p.eles,y=m.nodes(),v=m.nodes(":parent"),x=new Map,T=new Map,C=new Map,w=[],k=[],E=[],A=[],N=[],P=[],O=[],L=[],_=void 0,R=void 0,D=1e8,I=1e-9,B=p.piTol,M=p.samplingType,F=p.nodeSeparation,z=void 0,$=function(){for(var le=0,X=0,he=!1;X=Ve;){Oe=Z[Ve++];for(var Ye=w[Oe],ue=0;ueRe&&(Re=N[be],We=be)}return We},U=function(le){var X=void 0;if(le){X=Math.floor(Math.random()*R),_=X;for(var Z=0;Z=1)break;Re=Fe}for(var Ye=0;Ye=1)break;Re=Fe}for(var Tt=0;Tt0&&(X.isParent()?w[le].push(C.get(X.id())):w[le].push(X.id()))})});var Se=function(le){var X=T.get(le),he=void 0;x.get(le).forEach(function(Z){g.getElementById(Z).isParent()?he=C.get(Z):he=Z,w[X].push(he),w[T.get(he)].push(le)})},Me=!0,ke=!1,Ce=void 0;try{for(var Ie=x.keys()[Symbol.iterator](),Pe;!(Me=(Pe=Ie.next()).done);Me=!0){var pe=Pe.value;Se(pe)}}catch(V){ke=!0,Ce=V}finally{try{!Me&&Ie.return&&Ie.return()}finally{if(ke)throw Ce}}R=T.size;var Je=void 0;if(R>2){z=R{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u}),140:(a=>{a.exports=e})},r={};function i(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return t[a](o,o.exports,i),o.exports}var n=i(579);return n})()})});var E8e={};Lr(E8e,{diagram:()=>NCt});function v8e(e,t,r){e.forEach(i=>{t.add({group:"nodes",data:{type:"service",id:i.id,icon:i.icon,label:i.title,parent:i.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function b8e(e,t,r){e.forEach(i=>{t.add({group:"nodes",data:{type:"junction",id:i.id,parent:i.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function x8e(e,t){t.nodes().map(r=>{let i=fv(r);if(i.type==="group")return;i.x=r.position().x,i.y=r.position().y,e.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")})}function T8e(e,t){e.forEach(r=>{t.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function w8e(e,t){e.forEach(r=>{let{lhsId:i,rhsId:n,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=JV(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${i}-${n}`,label:f,source:i,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:n,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};t.add({group:"edges",data:p,classes:d})})}function k8e(e,t,r){let i=b((o,l)=>Object.entries(o).reduce((u,[h,f])=>{let d=0,p=Object.entries(f);if(p.length===1)return u[h]=p[0][1],u;for(let g=0;g{let l={},u={};return Object.entries(o).forEach(([h,[f,d]])=>{let p=e.getNode(h)?.in??"default";l[d]??={},l[d][p]??=[],l[d][p].push(h),u[f]??={},u[f][p]??=[],u[f][p].push(h)}),{horiz:Object.values(i(l,"horizontal")).filter(h=>h.length>1),vert:Object.values(i(u,"vertical")).filter(h=>h.length>1)}}),[a,s]=n.reduce(([o,l],{horiz:u,vert:h})=>[[...o,...u],[...l,...h]],[[],[]]);return{horizontal:a,vertical:s}}function C8e(e,t){let r=[],i=b(a=>`${a[0]},${a[1]}`,"posToStr"),n=b(a=>a.split(",").map(s=>parseInt(s)),"strToPos");return e.forEach(a=>{let s=Object.fromEntries(Object.entries(a).map(([h,f])=>[i(f),h])),o=[i([0,0])],l={},u={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){let h=o.shift();if(h){l[h]=1;let f=s[h];if(f){let d=n(h);Object.entries(u).forEach(([p,g])=>{let m=i([d[0]+g[0],d[1]+g[1]]),y=s[m];y&&!l[m]&&(o.push(m),r.push({[h8e[p]]:y,[h8e[gCt(p)]]:f,gap:1.5*t.getConfigField("iconSize")}))})}}}}),r}function S8e(e,t,r,i,n,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{let l=Qe("body").append("div").attr("id","cy").attr("style","display:none"),u=Xo({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${n.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${n.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),T8e(r,u),v8e(e,u,n),b8e(t,u,n),w8e(i,u);let h=k8e(n,a,s),f=C8e(a,n),d=n.getConfigField("iconSize"),p=n.getConfigField("idealEdgeLengthMultiplier")*d,g=.5*d,m=n.getConfigField("edgeElasticity"),y=u.layout({name:"fcose",quality:"proof",randomize:n.getConfigField("randomize"),nodeSeparation:n.getConfigField("nodeSeparation"),numIter:n.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(v){let[x,T]=v.connectedNodes(),{parent:C}=fv(x),{parent:w}=fv(T);return C===w?p:g},edgeElasticity(v){let[x,T]=v.connectedNodes(),{parent:C}=fv(x),{parent:w}=fv(T);return C===w?m:.001},alignmentConstraint:h,relativePlacementConstraint:f});y.one("layoutstop",()=>{function v(x,T,C,w){let k,E,{x:A,y:N}=x,{x:P,y:O}=T;E=(w-N+(A-C)*(N-O)/(A-P))/Math.sqrt(1+Math.pow((N-O)/(A-P),2)),k=Math.sqrt(Math.pow(w-N,2)+Math.pow(C-A,2)-Math.pow(E,2));let L=Math.sqrt(Math.pow(P-A,2)+Math.pow(O-N,2));k=k/L;let _=(P-A)*(w-N)-(O-N)*(C-A);switch(!0){case _>=0:_=1;break;case _<0:_=-1;break}let R=(P-A)*(C-A)+(O-N)*(w-N);switch(!0){case R>=0:R=1;break;case R<0:R=-1;break}return E=Math.abs(E)*_,k=k*R,{distances:E,weights:k}}b(v,"getSegmentWeights"),u.startBatch();for(let x of Object.values(u.edges()))if(x.data?.()){let{x:T,y:C}=x.source().position(),{x:w,y:k}=x.target().position();if(T!==w&&C!==k){let E=x.sourceEndpoint(),A=x.targetEndpoint(),{sourceDir:N}=p8e(x),[P,O]=rp(N)?[E.x,A.y]:[A.x,E.y],{weights:L,distances:_}=v(E,A,P,O);x.style("segment-distances",_),x.style("segment-weights",L)}}u.endBatch(),y.run()}),y.run(),u.ready(v=>{ee.info("Ready",v),o(u)})})}var y8e,h8e,f8e,o7,gCt,d8e,Ts,rp,JV,mCt,yCt,QV,vCt,bCt,xCt,TCt,wCt,p8e,fv,kCt,g8e,CCt,m8e,SCt,ECt,hv,$w,ACt,_Ct,LCt,RCt,ICt,DCt,NCt,A8e=q(()=>{Ja();ya();au();$r();Er();er();fl();cP();y8e=ks(u8e(),1);Ar();h8e={L:"left",R:"right",T:"top",B:"bottom"},f8e={L:b(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:b(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:b(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:b(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},o7={L:b((e,t)=>e-t+2,"L"),R:b((e,t)=>e-2,"R"),T:b((e,t)=>e-t+2,"T"),B:b((e,t)=>e-2,"B")},gCt=b(function(e){return Ts(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),d8e=b(function(e){let t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),Ts=b(function(e){let t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),rp=b(function(e){let t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),JV=b(function(e,t){let r=Ts(e)&&rp(t),i=rp(e)&&Ts(t);return r||i},"isArchitectureDirectionXY"),mCt=b(function(e){let t=e[0],r=e[1],i=Ts(t)&&rp(r),n=rp(t)&&Ts(r);return i||n},"isArchitecturePairXY"),yCt=b(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),QV=b(function(e,t){let r=`${e}${t}`;return yCt(r)?r:void 0},"getArchitectureDirectionPair"),vCt=b(function([e,t],r){let i=r[0],n=r[1];return Ts(i)?rp(n)?[e+(i==="L"?-1:1),t+(n==="T"?1:-1)]:[e+(i==="L"?-1:1),t]:Ts(n)?[e+(n==="L"?1:-1),t+(i==="T"?1:-1)]:[e,t+(i==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),bCt=b(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),xCt=b(function(e,t){return JV(e,t)?"bend":Ts(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),TCt=b(function(e){return e.type==="service"},"isArchitectureService"),wCt=b(function(e){return e.type==="junction"},"isArchitectureJunction"),p8e=b(e=>e.data(),"edgeData"),fv=b(e=>e.data(),"nodeData"),kCt=rr.architecture,g8e=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=yr,this.getAccTitle=vr,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,this.getAccDescription=xr,this.setAccDescription=br,this.clear()}static{b(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",fr()}addService({id:e,icon:t,in:r,title:i,iconText:n}){if(this.registeredIds[e]!==void 0)throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:n,title:i,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(TCt)}addJunction({id:e,in:t}){if(this.registeredIds[e]!==void 0)throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(this.registeredIds[t]===void 0)throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[t]==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(wCt)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:r,title:i}){if(this.registeredIds?.[e]!==void 0)throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(this.registeredIds?.[r]===void 0)throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[r]==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:i,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:i,lhsInto:n,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!d8e(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!d8e(i))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(i)}`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=this.nodes[e].in,h=this.nodes[t].in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:e,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:t,rhsDir:i,rhsInto:a,rhsGroup:o,title:l};this.edges.push(f),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let e={},t=Object.entries(this.nodes).reduce((o,[l,u])=>(o[l]=u.edges.reduce((h,f)=>{let d=this.getNode(f.lhsId)?.in,p=this.getNode(f.rhsId)?.in;if(d&&p&&d!==p){let g=xCt(f.lhsDir,f.rhsDir);g!=="bend"&&(e[d]??={},e[d][p]=g,e[p]??={},e[p][d]=g)}if(f.lhsId===l){let g=QV(f.lhsDir,f.rhsDir);g&&(h[g]=f.rhsId)}else{let g=QV(f.rhsDir,f.lhsDir);g&&(h[g]=f.lhsId)}return h},{}),o),{}),r=Object.keys(t)[0],i={[r]:1},n=Object.keys(t).reduce((o,l)=>l===r?o:{...o,[l]:1},{}),a=b(o=>{let l={[o]:[0,0]},u=[o];for(;u.length>0;){let h=u.shift();if(h){i[h]=1,delete n[h];let f=t[h],[d,p]=l[h];Object.entries(f).forEach(([g,m])=>{i[m]||(l[m]=vCt([d,p],g),u.push(m))})}}return l},"BFS"),s=[a(r)];for(;Object.keys(n).length>0;)s.push(a(Object.keys(n)[0]));this.dataStructures={adjList:t,spatialMaps:s,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return Yr({...kCt,...It().architecture})}getConfigField(e){return this.getConfig()[e]}},CCt=b((e,t)=>{Un(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r))},"populateDb"),m8e={parser:{yy:void 0},parse:b(async e=>{let t=await xn("architecture",e);ee.debug(t);let r=m8e.parser?.yy;if(!(r instanceof g8e))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");CCt(t,r)},"parse")},SCt=b(e=>` + `},"styles"),M_t=I_t,D_t={db:oX,renderer:R_t,parser:T_t,styles:M_t}});var fX=Rs((sk,hX)=>{(function(t,r){typeof sk=="object"&&typeof hX=="object"?hX.exports=r():typeof define=="function"&&define.amd?define([],r):typeof sk=="object"?sk.layoutBase=r():t.layoutBase=r()})(sk,function(){return(function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)})([(function(e,t,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=s}),(function(e,t,r){"use strict";function n(i){this.vGraphObject=i}e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;md?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,y){n.call(this,y),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,y){if(m==null&&y==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(b.source=m,b.target=y,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),y!=m&&y.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),x,b=y.length,T=0;T-1&&C>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(C,1);var k=x.source.owner.getEdges().indexOf(x);if(k==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(k,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,y,x,b,T=this.getNodes(),k=T.length,w=0;wy&&(g=y),m>x&&(m=x)}return g==i.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?b=T[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,y=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,k,w,C,S,E=this.nodes,L=E.length,N=0;NT&&(m=T),yw&&(x=w),bT&&(m=T),yw&&(x=w),b=this.nodes.length){var L=0;y.forEach(function(N){N.owner==g&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},e.exports=d}),(function(e,t,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=E,!1;if(uh)return o[0]=d,o[1]=u,o[2]=C,o[3]=f,!1;if(lh?(o[0]=m,o[1]=y,R=!0):(o[0]=g,o[1]=p,R=!0):D===M&&(l>h?(o[0]=d,o[1]=p,R=!0):(o[0]=x,o[1]=y,R=!0)),-I===M?h>l?(o[2]=S,o[3]=E,_=!0):(o[2]=C,o[3]=w,_=!0):I===M&&(h>l?(o[2]=k,o[3]=w,_=!0):(o[2]=L,o[3]=E,_=!0)),R&&_)return!1;if(l>h?u>f?(B=this.getCardinalDirection(D,M,4),P=this.getCardinalDirection(I,M,2)):(B=this.getCardinalDirection(-D,M,3),P=this.getCardinalDirection(-I,M,1)):u>f?(B=this.getCardinalDirection(-D,M,1),P=this.getCardinalDirection(-I,M,3)):(B=this.getCardinalDirection(D,M,2),P=this.getCardinalDirection(I,M,4)),!R)switch(B){case 1:G=p,$=l+-T/M,o[0]=$,o[1]=G;break;case 2:$=x,G=u+b*M,o[0]=$,o[1]=G;break;case 3:G=y,$=l+T/M,o[0]=$,o[1]=G;break;case 4:$=m,G=u+-b*M,o[0]=$,o[1]=G;break}if(!_)switch(P){case 1:z=w,q=h+-O/M,o[2]=q,o[3]=z;break;case 2:q=L,z=f+N*M,o[2]=q,o[3]=z;break;case 3:z=E,q=h+O/M,o[2]=q,o[3]=z;break;case 4:q=S,z=f+-N*M,o[2]=q,o[3]=z;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,y=l.y,x=void 0,b=void 0,T=void 0,k=void 0,w=void 0,C=void 0,S=void 0,E=void 0,L=void 0;return T=d-h,w=u-f,S=f*h-u*d,k=y-g,C=p-m,E=m*g-p*y,L=T*C-k*w,L===0?null:(x=(w*E-C*S)/L,b=(k*S-T*E)/L,new n(x,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o=0){var y=(-p+Math.sqrt(p*p-4*d*g))/(2*d),x=(-p-Math.sqrt(p*p-4*d*g))/(2*d),b=null;return y>=0&&y<=1?[y]:x>=0&&x<=1?[x]:b}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},e.exports=n}),(function(e,t,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n}),(function(e,t,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},e.exports=i}),(function(e,t,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g0&&g;){for(T.push(w[0]);T.length>0&&g;){var C=T[0];T.splice(0,1),b.add(C);for(var S=C.getEdges(),x=0;x-1&&w.splice(O,1)}b=new Set,k=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),x=0;x0){for(var y=this.edgeToDummyNodes.get(m),x=0;x=0&&g.splice(E,1);var L=k.getNeighborsList();L.forEach(function(R){if(m.indexOf(R)<0){var _=y.get(R),D=_-1;D==1&&C.push(R),y.set(R,D)}})}m=m.concat(C),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},e.exports=d}),(function(e,t,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},e.exports=n}),(function(e,t,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},e.exports=i}),(function(e,t,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,y,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pT||b>T)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*y)):(T=d.getEstimatedSize()*this.compoundGravityRangeFactor,(x>T||b>T)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=x.length||T>=x[0].length)){for(var k=0;ku}}]),o})();e.exports=s}),(function(e,t,r){"use strict";function n(){}n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=(function(Ct){for(var ht=[];Ct-- >0;)ht.push(0);return ht})(Math.min(this.m+1,this.n)),this.U=(function(Ct){var ht=function Te(ot){if(ot.length==0)return 0;for(var gt=[],Qe=0;Qe0;)ht.push(0);return ht})(this.n),o=(function(Ct){for(var ht=[];Ct-- >0;)ht.push(0);return ht})(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;M--)if(this.s[M]!==0){for(var B=M+1;B=0;j--){if((function(Ct,ht){return Ct&&ht})(j0;){var ve=void 0,Ge=void 0;for(ve=_-2;ve>=-1&&ve!==-1;ve--)if(Math.abs(s[ve])<=Re+ue*(Math.abs(this.s[ve])+Math.abs(this.s[ve+1]))){s[ve]=0;break}if(ve===_-2)Ge=4;else{var He=void 0;for(He=_-1;He>=ve&&He!==ve;He--){var Ue=(He!==_?Math.abs(s[He]):0)+(He!==ve+1?Math.abs(s[He-1]):0);if(Math.abs(this.s[He])<=Re+ue*Ue){this.s[He]=0;break}}He===ve?Ge=3:He===_-1?Ge=1:(Ge=2,ve=He)}switch(ve++,Ge){case 1:{var me=s[_-2];s[_-2]=0;for(var De=_-2;De>=ve;De--){var Ie=n.hypot(this.s[De],me),Me=this.s[De]/Ie,re=me/Ie;if(this.s[De]=Ie,De!==ve&&(me=-re*s[De-1],s[De-1]=Me*s[De-1]),u)for(var le=0;le=this.s[ve+1]);){var at=this.s[ve];if(this.s[ve]=this.s[ve+1],this.s[ve+1]=at,u&&veMath.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},e.exports=n}),(function(e,t,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(t,r){typeof ok=="object"&&typeof dX=="object"?dX.exports=r(fX()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof ok=="object"?ok.coseBase=r(fX()):t.coseBase=r(t.layoutBase)})(ok,function(e){return(()=>{"use strict";var t={45:((a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l}),806:((a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u}),767:((a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),880:((a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),578:((a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),765:((a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),g=o(902),m=o(551).FDLayoutConstants,y=o(551).LayoutConstants,x=o(551).Point,b=o(551).PointD,T=o(551).DimensionD,k=o(551).Layout,w=o(551).Integer,C=o(551).IGeometry,S=o(551).LGraph,E=o(551).Transform,L=o(551).LinkedList;function N(){l.call(this),this.toBeTiled={},this.constraints={}}N.prototype=Object.create(l.prototype);for(var O in l)N[O]=l[O];N.prototype.newGraphManager=function(){var R=new u(this);return this.graphManager=R,R},N.prototype.newGraph=function(R){return new h(null,this.graphManager,R)},N.prototype.newNode=function(R){return new f(this.graphManager,R)},N.prototype.newEdge=function(R){return new d(null,null,R)},N.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},N.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},N.prototype.layout=function(){var R=y.DEFAULT_CREATE_BENDS_AS_NEEDED;return R&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},N.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var _=new Set(this.getAllNodes()),D=this.nodesWithGravity.filter(function(B){return _.has(B)});this.graphManager.setAllNodesToApplyGravitation(D)}}else{var R=this.getFlatForest();if(R.length>0)this.positionNodesRadially(R);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var _=new Set(this.getAllNodes()),D=this.nodesWithGravity.filter(function(I){return _.has(I)});this.graphManager.setAllNodesToApplyGravitation(D),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},N.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var R=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(M){return R.has(M)});this.graphManager.setAllNodesToApplyGravitation(_),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var D=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(D,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},N.prototype.getPositionsData=function(){for(var R=this.graphManager.getAllNodes(),_={},D=0;D0&&this.updateDisplacements();for(var D=0;D0&&(I.fixedNodeWeight=B)}}if(this.constraints.relativePlacementConstraint){var P=new Map,$=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(Q){R.fixedNodesOnHorizontal.add(Q),R.fixedNodesOnVertical.add(Q)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,D=0;D=2*Q.length/3;de--)pe=Math.floor(Math.random()*(de+1)),te=Q[de],Q[de]=Q[pe],Q[pe]=te;return Q},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var pe=P.has(Q.left)?P.get(Q.left):Q.left,te=P.has(Q.right)?P.get(Q.right):Q.right;R.nodesInRelativeHorizontal.includes(pe)||(R.nodesInRelativeHorizontal.push(pe),R.nodeToRelativeConstraintMapHorizontal.set(pe,[]),R.dummyToNodeForVerticalAlignment.has(pe)?R.nodeToTempPositionMapHorizontal.set(pe,R.idToNodeMap.get(R.dummyToNodeForVerticalAlignment.get(pe)[0]).getCenterX()):R.nodeToTempPositionMapHorizontal.set(pe,R.idToNodeMap.get(pe).getCenterX())),R.nodesInRelativeHorizontal.includes(te)||(R.nodesInRelativeHorizontal.push(te),R.nodeToRelativeConstraintMapHorizontal.set(te,[]),R.dummyToNodeForVerticalAlignment.has(te)?R.nodeToTempPositionMapHorizontal.set(te,R.idToNodeMap.get(R.dummyToNodeForVerticalAlignment.get(te)[0]).getCenterX()):R.nodeToTempPositionMapHorizontal.set(te,R.idToNodeMap.get(te).getCenterX())),R.nodeToRelativeConstraintMapHorizontal.get(pe).push({right:te,gap:Q.gap}),R.nodeToRelativeConstraintMapHorizontal.get(te).push({left:pe,gap:Q.gap})}else{var de=$.has(Q.top)?$.get(Q.top):Q.top,ce=$.has(Q.bottom)?$.get(Q.bottom):Q.bottom;R.nodesInRelativeVertical.includes(de)||(R.nodesInRelativeVertical.push(de),R.nodeToRelativeConstraintMapVertical.set(de,[]),R.dummyToNodeForHorizontalAlignment.has(de)?R.nodeToTempPositionMapVertical.set(de,R.idToNodeMap.get(R.dummyToNodeForHorizontalAlignment.get(de)[0]).getCenterY()):R.nodeToTempPositionMapVertical.set(de,R.idToNodeMap.get(de).getCenterY())),R.nodesInRelativeVertical.includes(ce)||(R.nodesInRelativeVertical.push(ce),R.nodeToRelativeConstraintMapVertical.set(ce,[]),R.dummyToNodeForHorizontalAlignment.has(ce)?R.nodeToTempPositionMapVertical.set(ce,R.idToNodeMap.get(R.dummyToNodeForHorizontalAlignment.get(ce)[0]).getCenterY()):R.nodeToTempPositionMapVertical.set(ce,R.idToNodeMap.get(ce).getCenterY())),R.nodeToRelativeConstraintMapVertical.get(de).push({bottom:ce,gap:Q.gap}),R.nodeToRelativeConstraintMapVertical.get(ce).push({top:de,gap:Q.gap})}});else{var z=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var pe=P.has(Q.left)?P.get(Q.left):Q.left,te=P.has(Q.right)?P.get(Q.right):Q.right;z.has(pe)?z.get(pe).push(te):z.set(pe,[te]),z.has(te)?z.get(te).push(pe):z.set(te,[pe])}else{var de=$.has(Q.top)?$.get(Q.top):Q.top,ce=$.has(Q.bottom)?$.get(Q.bottom):Q.bottom;V.has(de)?V.get(de).push(ce):V.set(de,[ce]),V.has(ce)?V.get(ce).push(de):V.set(ce,[de])}});var j=function(pe,te){var de=[],ce=[],ue=new L,Re=new Set,ve=0;return pe.forEach(function(Ge,He){if(!Re.has(He)){de[ve]=[],ce[ve]=!1;var Ue=He;for(ue.push(Ue),Re.add(Ue),de[ve].push(Ue);ue.length!=0;){Ue=ue.shift(),te.has(Ue)&&(ce[ve]=!0);var me=pe.get(Ue);me.forEach(function(De){Re.has(De)||(ue.push(De),Re.add(De),de[ve].push(De))})}ve++}}),{components:de,isFixed:ce}},ee=j(z,R.fixedNodesOnHorizontal);this.componentsOnHorizontal=ee.components,this.fixedComponentsOnHorizontal=ee.isFixed;var ne=j(V,R.fixedNodesOnVertical);this.componentsOnVertical=ne.components,this.fixedComponentsOnVertical=ne.isFixed}}},N.prototype.updateDisplacements=function(){var R=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(ne){var Q=R.idToNodeMap.get(ne.nodeId);Q.displacementX=0,Q.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var _=this.constraints.alignmentConstraint.vertical,D=0;D<_.length;D++){for(var I=0,M=0;M<_[D].length;M++){if(this.fixedNodeSet.has(_[D][M])){I=0;break}I+=this.idToNodeMap.get(_[D][M]).displacementX}for(var B=I/_[D].length,M=0;M<_[D].length;M++)this.idToNodeMap.get(_[D][M]).displacementX=B}if(this.constraints.alignmentConstraint.horizontal)for(var P=this.constraints.alignmentConstraint.horizontal,D=0;D1){var $;for($=0;$I&&(I=Math.floor(P.y)),B=Math.floor(P.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(y.WORLD_CENTER_X-P.x/2,y.WORLD_CENTER_Y-P.y/2))},N.radialLayout=function(R,_,D){var I=Math.max(this.maxDiagonalInTree(R),p.DEFAULT_RADIAL_SEPARATION);N.branchRadialLayout(_,null,0,359,0,I);var M=S.calculateBounds(R),B=new E;B.setDeviceOrgX(M.getMinX()),B.setDeviceOrgY(M.getMinY()),B.setWorldOrgX(D.x),B.setWorldOrgY(D.y);for(var P=0;P1;){var de=te[0];te.splice(0,1);var ce=j.indexOf(de);ce>=0&&j.splice(ce,1),Q--,ee--}_!=null?pe=(j.indexOf(te[0])+1)%Q:pe=0;for(var ue=Math.abs(I-D)/ee,Re=pe;ne!=ee;Re=++Re%Q){var ve=j[Re].getOtherEnd(R);if(ve!=_){var Ge=(D+ne*ue)%360,He=(Ge+ue)%360;N.branchRadialLayout(ve,R,Ge,He,M+B,B),ne++}}},N.maxDiagonalInTree=function(R){for(var _=w.MIN_VALUE,D=0;D_&&(_=M)}return _},N.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},N.prototype.groupZeroDegreeMembers=function(){var R=this,_={};this.memberGroups={},this.idToDummyNode={};for(var D=[],I=this.graphManager.getAllNodes(),M=0;M"u"&&(_[$]=[]),_[$]=_[$].concat(B)}Object.keys(_).forEach(function(G){if(_[G].length>1){var q="DummyCompound_"+G;R.memberGroups[q]=_[G];var z=_[G][0].getParent(),V=new f(R.graphManager);V.id=q,V.paddingLeft=z.paddingLeft||0,V.paddingRight=z.paddingRight||0,V.paddingBottom=z.paddingBottom||0,V.paddingTop=z.paddingTop||0,R.idToDummyNode[q]=V;var j=R.getGraphManager().add(R.newGraph(),V),ee=z.getChild();ee.add(V);for(var ne=0;ne<_[G].length;ne++){var Q=_[G][ne];ee.remove(Q),j.add(Q)}}})},N.prototype.clearCompounds=function(){var R={},_={};this.performDFSOnCompounds();for(var D=0;DM?(I.rect.x-=(I.labelWidth-M)/2,I.setWidth(I.labelWidth),I.labelMarginLeft=(I.labelWidth-M)/2):I.labelPosHorizontal=="right"&&I.setWidth(M+I.labelWidth)),I.labelHeight&&(I.labelPosVertical=="top"?(I.rect.y-=I.labelHeight,I.setHeight(B+I.labelHeight),I.labelMarginTop=I.labelHeight):I.labelPosVertical=="center"&&I.labelHeight>B?(I.rect.y-=(I.labelHeight-B)/2,I.setHeight(I.labelHeight),I.labelMarginTop=(I.labelHeight-B)/2):I.labelPosVertical=="bottom"&&I.setHeight(B+I.labelHeight))}})},N.prototype.repopulateCompounds=function(){for(var R=this.compoundOrder.length-1;R>=0;R--){var _=this.compoundOrder[R],D=_.id,I=_.paddingLeft,M=_.paddingTop,B=_.labelMarginLeft,P=_.labelMarginTop;this.adjustLocations(this.tiledMemberPack[D],_.rect.x,_.rect.y,I,M,B,P)}},N.prototype.repopulateZeroDegreeMembers=function(){var R=this,_=this.tiledZeroDegreePack;Object.keys(_).forEach(function(D){var I=R.idToDummyNode[D],M=I.paddingLeft,B=I.paddingTop,P=I.labelMarginLeft,$=I.labelMarginTop;R.adjustLocations(_[D],I.rect.x,I.rect.y,M,B,P,$)})},N.prototype.getToBeTiled=function(R){var _=R.id;if(this.toBeTiled[_]!=null)return this.toBeTiled[_];var D=R.getChild();if(D==null)return this.toBeTiled[_]=!1,!1;for(var I=D.getNodes(),M=0;M0)return this.toBeTiled[_]=!1,!1;if(B.getChild()==null){this.toBeTiled[B.id]=!1;continue}if(!this.getToBeTiled(B))return this.toBeTiled[_]=!1,!1}return this.toBeTiled[_]=!0,!0},N.prototype.getNodeDegree=function(R){for(var _=R.id,D=R.getEdges(),I=0,M=0;Mz&&(z=j.rect.height)}D+=z+R.verticalPadding}},N.prototype.tileCompoundMembers=function(R,_){var D=this;this.tiledMemberPack=[],Object.keys(R).forEach(function(I){var M=_[I];if(D.tiledMemberPack[I]=D.tileNodes(R[I],M.paddingLeft+M.paddingRight),M.rect.width=D.tiledMemberPack[I].width,M.rect.height=D.tiledMemberPack[I].height,M.setCenter(D.tiledMemberPack[I].centerX,D.tiledMemberPack[I].centerY),M.labelMarginLeft=0,M.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var B=M.rect.width,P=M.rect.height;M.labelWidth&&(M.labelPosHorizontal=="left"?(M.rect.x-=M.labelWidth,M.setWidth(B+M.labelWidth),M.labelMarginLeft=M.labelWidth):M.labelPosHorizontal=="center"&&M.labelWidth>B?(M.rect.x-=(M.labelWidth-B)/2,M.setWidth(M.labelWidth),M.labelMarginLeft=(M.labelWidth-B)/2):M.labelPosHorizontal=="right"&&M.setWidth(B+M.labelWidth)),M.labelHeight&&(M.labelPosVertical=="top"?(M.rect.y-=M.labelHeight,M.setHeight(P+M.labelHeight),M.labelMarginTop=M.labelHeight):M.labelPosVertical=="center"&&M.labelHeight>P?(M.rect.y-=(M.labelHeight-P)/2,M.setHeight(M.labelHeight),M.labelMarginTop=(M.labelHeight-P)/2):M.labelPosVertical=="bottom"&&M.setHeight(P+M.labelHeight))}})},N.prototype.tileNodes=function(R,_){var D=this.tileNodesByFavoringDim(R,_,!0),I=this.tileNodesByFavoringDim(R,_,!1),M=this.getOrgRatio(D),B=this.getOrgRatio(I),P;return B$&&($=ne.getWidth())});var G=B/M,q=P/M,z=Math.pow(D-I,2)+4*(G+I)*(q+D)*M,V=(I-D+Math.sqrt(z))/(2*(G+I)),j;_?(j=Math.ceil(V),j==V&&j++):j=Math.floor(V);var ee=j*(G+I)-I;return $>ee&&(ee=$),ee+=I*2,ee},N.prototype.tileNodesByFavoringDim=function(R,_,D){var I=p.TILING_PADDING_VERTICAL,M=p.TILING_PADDING_HORIZONTAL,B=p.TILING_COMPARE_BY,P={rows:[],rowWidth:[],rowHeight:[],width:0,height:_,verticalPadding:I,horizontalPadding:M,centerX:0,centerY:0};B&&(P.idealRowWidth=this.calcIdealRowWidth(R,D));var $=function(Q){return Q.rect.width*Q.rect.height},G=function(Q,pe){return $(pe)-$(Q)};R.sort(function(ne,Q){var pe=G;return P.idealRowWidth?(pe=B,pe(ne.id,Q.id)):pe(ne,Q)});for(var q=0,z=0,V=0;V0&&(P+=R.horizontalPadding),R.rowWidth[D]=P,R.width0&&($+=R.verticalPadding);var G=0;$>R.rowHeight[D]&&(G=R.rowHeight[D],R.rowHeight[D]=$,G=R.rowHeight[D]-G),R.height+=G,R.rows[D].push(_)},N.prototype.getShortestRowIndex=function(R){for(var _=-1,D=Number.MAX_VALUE,I=0;ID&&(_=I,D=R.rowWidth[I]);return _},N.prototype.canAddHorizontal=function(R,_,D){if(R.idealRowWidth){var I=R.rows.length-1,M=R.rowWidth[I];return M+_+R.horizontalPadding<=R.idealRowWidth}var B=this.getShortestRowIndex(R);if(B<0)return!0;var P=R.rowWidth[B];if(P+R.horizontalPadding+_<=R.width)return!0;var $=0;R.rowHeight[B]0&&($=D+R.verticalPadding-R.rowHeight[B]);var G;R.width-P>=_+R.horizontalPadding?G=(R.height+$)/(P+_+R.horizontalPadding):G=(R.height+$)/R.width,$=D+R.verticalPadding;var q;return R.width<_?q=(R.height+$)/_:q=(R.height+$)/R.width,q<1&&(q=1/q),G<1&&(G=1/G),GB&&_!=D){I.splice(-1,1),R.rows[D].push(M),R.rowWidth[_]=R.rowWidth[_]-B,R.rowWidth[D]=R.rowWidth[D]+B,R.width=R.rowWidth[instance.getLongestRowIndex(R)];for(var P=Number.MIN_VALUE,$=0;$P&&(P=I[$].height);_>0&&(P+=R.verticalPadding);var G=R.rowHeight[_]+R.rowHeight[D];R.rowHeight[_]=P,R.rowHeight[D]0)for(var ee=M;ee<=B;ee++)j[0]+=this.grid[ee][P-1].length+this.grid[ee][P].length-1;if(B0)for(var ee=P;ee<=$;ee++)j[3]+=this.grid[M-1][ee].length+this.grid[M][ee].length-1;for(var ne=w.MAX_VALUE,Q,pe,te=0;te{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,g,m){l.call(this,d,p,g,m)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var g=this.getChild().getNodes(),m,y=0;y{function l(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);m0){var lt=0;be.forEach(function(at){ae=="horizontal"?(ke.set(at,x.has(at)?b[x.get(at)]:Y.get(at)),lt+=ke.get(at)):(ke.set(at,x.has(at)?T[x.get(at)]:Y.get(at)),lt+=ke.get(at))}),lt=lt/be.length,We.forEach(function(at){K.has(at)||ke.set(at,lt)})}else{var $e=0;We.forEach(function(at){ae=="horizontal"?$e+=x.has(at)?b[x.get(at)]:Y.get(at):$e+=x.has(at)?T[x.get(at)]:Y.get(at)}),$e=$e/We.length,We.forEach(function(at){ke.set(at,$e)})}});for(var Ae=function(){var be=Ne.shift(),lt=U.get(be);lt.forEach(function($e){if(ke.get($e.id)at&&(at=gt),Qe<$e&&($e=Qe),Qe>bt&&(bt=Qe)}}catch(Er){pt=!0,Ct=Er}finally{try{!Et&&ht.return&&ht.return()}finally{if(pt)throw Ct}}var _e=(lt+at)/2-($e+bt)/2,Ze=!0,nt=!1,ft=void 0;try{for(var jt=We[Symbol.iterator](),yt;!(Ze=(yt=jt.next()).done);Ze=!0){var Ht=yt.value;ke.set(Ht,ke.get(Ht)+_e)}}catch(Er){nt=!0,ft=Er}finally{try{!Ze&&jt.return&&jt.return()}finally{if(nt)throw ft}}})}return ke},O=function(U){var ae=0,K=0,Y=0,Z=0;if(U.forEach(function(Se){Se.left?b[x.get(Se.left)]-b[x.get(Se.right)]>=0?ae++:K++:T[x.get(Se.top)]-T[x.get(Se.bottom)]>=0?Y++:Z++}),ae>K&&Y>Z)for(var Ce=0;CeK)for(var we=0;weZ)for(var ke=0;ke1)m.fixedNodeConstraint.forEach(function(W,U){I[U]=[W.position.x,W.position.y],M[U]=[b[x.get(W.nodeId)],T[x.get(W.nodeId)]]}),B=!0;else if(m.alignmentConstraint)(function(){var W=0;if(m.alignmentConstraint.vertical){for(var U=m.alignmentConstraint.vertical,ae=function(ke){var Se=new Set;U[ke].forEach(function(Fe){Se.add(Fe)});var Ne=new Set([].concat(l(Se)).filter(function(Fe){return $.has(Fe)})),Ae=void 0;Ne.size>0?Ae=b[x.get(Ne.values().next().value)]:Ae=L(Se).x,U[ke].forEach(function(Fe){I[W]=[Ae,T[x.get(Fe)]],M[W]=[b[x.get(Fe)],T[x.get(Fe)]],W++})},K=0;K0?Ae=b[x.get(Ne.values().next().value)]:Ae=L(Se).y,Y[ke].forEach(function(Fe){I[W]=[b[x.get(Fe)],Ae],M[W]=[b[x.get(Fe)],T[x.get(Fe)]],W++})},Ce=0;CeV&&(V=z[ee].length,j=ee);if(V0){var Me={x:0,y:0};m.fixedNodeConstraint.forEach(function(W,U){var ae={x:b[x.get(W.nodeId)],y:T[x.get(W.nodeId)]},K=W.position,Y=E(K,ae);Me.x+=Y.x,Me.y+=Y.y}),Me.x/=m.fixedNodeConstraint.length,Me.y/=m.fixedNodeConstraint.length,b.forEach(function(W,U){b[U]+=Me.x}),T.forEach(function(W,U){T[U]+=Me.y}),m.fixedNodeConstraint.forEach(function(W){b[x.get(W.nodeId)]=W.position.x,T[x.get(W.nodeId)]=W.position.y})}if(m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var re=m.alignmentConstraint.vertical,le=function(U){var ae=new Set;re[U].forEach(function(Z){ae.add(Z)});var K=new Set([].concat(l(ae)).filter(function(Z){return $.has(Z)})),Y=void 0;K.size>0?Y=b[x.get(K.values().next().value)]:Y=L(ae).x,ae.forEach(function(Z){$.has(Z)||(b[x.get(Z)]=Y)})},oe=0;oe0?Y=T[x.get(K.values().next().value)]:Y=L(ae).y,ae.forEach(function(Z){$.has(Z)||(T[x.get(Z)]=Y)})},se=0;se{a.exports=e})},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return t[a](o,o.exports,n),o.exports}var i=n(45);return i})()})});var ENe=Rs((lk,gX)=>{(function(t,r){typeof lk=="object"&&typeof gX=="object"?gX.exports=r(pX()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof lk=="object"?lk.cytoscapeFcose=r(pX()):t.cytoscapeFcose=r(t.coseBase)})(lk,function(e){return(()=>{"use strict";var t={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=(function(){function f(d,p){var g=[],m=!0,y=!1,x=void 0;try{for(var b=d[Symbol.iterator](),T;!(m=(T=b.next()).done)&&(g.push(T.value),!(p&&g.length===p));m=!0);}catch(k){y=!0,x=k}finally{try{!m&&b.return&&b.return()}finally{if(y)throw x}}return g}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&B.merge(q)});for(var P=0;P1){T=x[0],k=T.connectedEdges().length,x.forEach(function(M){M.connectedEdges().length0&&g.set("dummy"+(g.size+1),S),E},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var b=!0,T=!1,k=void 0;try{for(var w=d.nodeIndexes[Symbol.iterator](),C;!(b=(C=w.next()).done);b=!0){var S=C.value,E=l(S,2),L=E[0],N=E[1],O=p.cy.getElementById(L);if(O){var R=O.boundingBox(),_=d.xCoords[N]-R.w/2,D=d.xCoords[N]+R.w/2,I=d.yCoords[N]-R.h/2,M=d.yCoords[N]+R.h/2;_m&&(m=D),Ix&&(x=M)}}}catch(q){T=!0,k=q}finally{try{!b&&w.return&&w.return()}finally{if(T)throw k}}var B=f.x-(m+g)/2,P=f.y-(x+y)/2;d.xCoords=d.xCoords.map(function(q){return q+B}),d.yCoords=d.yCoords.map(function(q){return q+P})}else{Object.keys(d).forEach(function(q){var z=d[q],V=z.getRect().x,j=z.getRect().x+z.getRect().width,ee=z.getRect().y,ne=z.getRect().y+z.getRect().height;Vm&&(m=j),eex&&(x=ne)});var $=f.x-(m+g)/2,G=f.y-(x+y)/2;Object.keys(d).forEach(function(q){var z=d[q];z.setCenter(z.getCenterX()+$,z.getCenterY()+G)})}}},h.calcBoundingBox=function(f,d,p,g){for(var m=Number.MAX_SAFE_INTEGER,y=Number.MIN_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,T=void 0,k=void 0,w=void 0,C=void 0,S=f.descendants().not(":parent"),E=S.length,L=0;LT&&(m=T),yw&&(x=w),b{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,g=o(140).layoutBase.FDLayoutConstants,m=o(140).CoSEConstants,y=function(b,T){var k=b.cy,w=b.eles,C=w.nodes(),S=w.edges(),E=void 0,L=void 0,N=void 0,O={};b.randomize&&(E=T.nodeIndexes,L=T.xCoords,N=T.yCoords);var R=function(q){return typeof q=="function"},_=function(q,z){return R(q)?q(z):q},D=l.calcParentsWithoutChildren(k,w),I=function G(q,z,V,j){for(var ee=z.length,ne=0;ne0){var ue=void 0;ue=V.getGraphManager().add(V.newGraph(),te),G(ue,pe,V,j)}}},M=function(q,z,V){for(var j=0,ee=0,ne=0;ne0?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=j/ee:R(b.idealEdgeLength)?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,m.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,m.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},B=function(q,z){z.fixedNodeConstraint&&(q.constraints.fixedNodeConstraint=z.fixedNodeConstraint),z.alignmentConstraint&&(q.constraints.alignmentConstraint=z.alignmentConstraint),z.relativePlacementConstraint&&(q.constraints.relativePlacementConstraint=z.relativePlacementConstraint)};b.nestingFactor!=null&&(m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(m.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(m.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(m.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(m.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(m.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?p.QUALITY=2:p.QUALITY=0,m.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!b.randomize,m.ANIMATE=g.ANIMATE=p.ANIMATE=b.animate,m.TILE=b.tile,m.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,m.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,m.PURE_INCREMENTAL=!b.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!1),b.step=="enforced"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!1),b.step=="cose"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?m.TREE_REDUCTION_ON_INCREMENTAL=!1:m.TREE_REDUCTION_ON_INCREMENTAL=!0;var P=new u,$=P.newGraphManager();return I($.addRoot(),l.getTopMostNodes(C),P,b),M(P,$,S),B(P,b),P.runLayout(),O};a.exports={coseLayout:y}}),212:((a,s,o)=>{var l=(function(){function b(T,k){for(var w=0;w0)if(M){var $=f.getTopMostNodes(w.eles.nodes());if(R=f.connectComponents(C,w.eles,$),R.forEach(function(Ue){var me=Ue.boundingBox();_.push({x:me.x1+me.w/2,y:me.y1+me.h/2})}),w.randomize&&R.forEach(function(Ue){w.eles=Ue,E.push(p(w))}),w.quality=="default"||w.quality=="proof"){var G=C.collection();if(w.tile){var q=new Map,z=[],V=[],j=0,ee={nodeIndexes:q,xCoords:z,yCoords:V},ne=[];if(R.forEach(function(Ue,me){Ue.edges().length==0&&(Ue.nodes().forEach(function(De,Ie){G.merge(Ue.nodes()[Ie]),De.isParent()||(ee.nodeIndexes.set(Ue.nodes()[Ie].id(),j++),ee.xCoords.push(Ue.nodes()[0].position().x),ee.yCoords.push(Ue.nodes()[0].position().y))}),ne.push(me))}),G.length>1){var Q=G.boundingBox();_.push({x:Q.x1+Q.w/2,y:Q.y1+Q.h/2}),R.push(G),E.push(ee);for(var pe=ne.length-1;pe>=0;pe--)R.splice(ne[pe],1),E.splice(ne[pe],1),_.splice(ne[pe],1)}}R.forEach(function(Ue,me){w.eles=Ue,O.push(m(w,E[me])),f.relocateComponent(_[me],O[me],w)})}else R.forEach(function(Ue,me){f.relocateComponent(_[me],E[me],w)});var te=new Set;if(R.length>1){var de=[],ce=S.filter(function(Ue){return Ue.css("display")=="none"});R.forEach(function(Ue,me){var De=void 0;if(w.quality=="draft"&&(De=E[me].nodeIndexes),Ue.nodes().not(ce).length>0){var Ie={};Ie.edges=[],Ie.nodes=[];var Me=void 0;Ue.nodes().not(ce).forEach(function(re){if(w.quality=="draft")if(!re.isParent())Me=De.get(re.id()),Ie.nodes.push({x:E[me].xCoords[Me]-re.boundingbox().w/2,y:E[me].yCoords[Me]-re.boundingbox().h/2,width:re.boundingbox().w,height:re.boundingbox().h});else{var le=f.calcBoundingBox(re,E[me].xCoords,E[me].yCoords,De);Ie.nodes.push({x:le.topLeftX,y:le.topLeftY,width:le.width,height:le.height})}else O[me][re.id()]&&Ie.nodes.push({x:O[me][re.id()].getLeft(),y:O[me][re.id()].getTop(),width:O[me][re.id()].getWidth(),height:O[me][re.id()].getHeight()})}),Ue.edges().forEach(function(re){var le=re.source(),oe=re.target();if(le.css("display")!="none"&&oe.css("display")!="none")if(w.quality=="draft"){var he=De.get(le.id()),xe=De.get(oe.id()),se=[],F=[];if(le.isParent()){var H=f.calcBoundingBox(le,E[me].xCoords,E[me].yCoords,De);se.push(H.topLeftX+H.width/2),se.push(H.topLeftY+H.height/2)}else se.push(E[me].xCoords[he]),se.push(E[me].yCoords[he]);if(oe.isParent()){var W=f.calcBoundingBox(oe,E[me].xCoords,E[me].yCoords,De);F.push(W.topLeftX+W.width/2),F.push(W.topLeftY+W.height/2)}else F.push(E[me].xCoords[xe]),F.push(E[me].yCoords[xe]);Ie.edges.push({startX:se[0],startY:se[1],endX:F[0],endY:F[1]})}else O[me][le.id()]&&O[me][oe.id()]&&Ie.edges.push({startX:O[me][le.id()].getCenterX(),startY:O[me][le.id()].getCenterY(),endX:O[me][oe.id()].getCenterX(),endY:O[me][oe.id()].getCenterY()})}),Ie.nodes.length>0&&(de.push(Ie),te.add(me))}});var ue=I.packComponents(de,w.randomize).shifts;if(w.quality=="draft")E.forEach(function(Ue,me){var De=Ue.xCoords.map(function(Me){return Me+ue[me].dx}),Ie=Ue.yCoords.map(function(Me){return Me+ue[me].dy});Ue.xCoords=De,Ue.yCoords=Ie});else{var Re=0;te.forEach(function(Ue){Object.keys(O[Ue]).forEach(function(me){var De=O[Ue][me];De.setCenter(De.getCenterX()+ue[Re].dx,De.getCenterY()+ue[Re].dy)}),Re++})}}}else{var B=w.eles.boundingBox();if(_.push({x:B.x1+B.w/2,y:B.y1+B.h/2}),w.randomize){var P=p(w);E.push(P)}w.quality=="default"||w.quality=="proof"?(O.push(m(w,E[0])),f.relocateComponent(_[0],O[0],w)):f.relocateComponent(_[0],E[0],w)}var ve=function(me,De){if(w.quality=="default"||w.quality=="proof"){typeof me=="number"&&(me=De);var Ie=void 0,Me=void 0,re=me.data("id");return O.forEach(function(oe){re in oe&&(Ie={x:oe[re].getRect().getCenterX(),y:oe[re].getRect().getCenterY()},Me=oe[re])}),w.nodeDimensionsIncludeLabels&&(Me.labelWidth&&(Me.labelPosHorizontal=="left"?Ie.x+=Me.labelWidth/2:Me.labelPosHorizontal=="right"&&(Ie.x-=Me.labelWidth/2)),Me.labelHeight&&(Me.labelPosVertical=="top"?Ie.y+=Me.labelHeight/2:Me.labelPosVertical=="bottom"&&(Ie.y-=Me.labelHeight/2))),Ie==null&&(Ie={x:me.position("x"),y:me.position("y")}),{x:Ie.x,y:Ie.y}}else{var le=void 0;return E.forEach(function(oe){var he=oe.nodeIndexes.get(me.id());he!=null&&(le={x:oe.xCoords[he],y:oe.yCoords[he]})}),le==null&&(le={x:me.position("x"),y:me.position("y")}),{x:le.x,y:le.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var Ge=f.calcParentsWithoutChildren(C,S),He=S.filter(function(Ue){return Ue.css("display")=="none"});w.eles=S.not(He),S.nodes().not(":parent").not(He).layoutPositions(k,w,ve),Ge.length>0&&Ge.forEach(function(Ue){Ue.position(ve(Ue))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),b})();a.exports=x}),657:((a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var g=p.cy,m=p.eles,y=m.nodes(),x=m.nodes(":parent"),b=new Map,T=new Map,k=new Map,w=[],C=[],S=[],E=[],L=[],N=[],O=[],R=[],_=void 0,D=void 0,I=1e8,M=1e-9,B=p.piTol,P=p.samplingType,$=p.nodeSeparation,G=void 0,q=function(){for(var ae=0,K=0,Y=!1;K=Ce;){ke=Z[Ce++];for(var We=w[ke],be=0;beAe&&(Ae=L[$e],Fe=$e)}return Fe},V=function(ae){var K=void 0;if(ae){K=Math.floor(Math.random()*D),_=K;for(var Z=0;Z=1)break;Ae=Ne}for(var We=0;We=1)break;Ae=Ne}for(var lt=0;lt0&&(K.isParent()?w[ae].push(k.get(K.id())):w[ae].push(K.id()))})});var Ge=function(ae){var K=T.get(ae),Y=void 0;b.get(ae).forEach(function(Z){g.getElementById(Z).isParent()?Y=k.get(Z):Y=Z,w[K].push(Y),w[T.get(Y)].push(ae)})},He=!0,Ue=!1,me=void 0;try{for(var De=b.keys()[Symbol.iterator](),Ie;!(He=(Ie=De.next()).done);He=!0){var Me=Ie.value;Ge(Me)}}catch(U){Ue=!0,me=U}finally{try{!He&&De.return&&De.return()}finally{if(Ue)throw me}}D=T.size;var re=void 0;if(D>2){G=D{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u}),140:(a=>{a.exports=e})},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return t[a](o,o.exports,n),o.exports}var i=n(579);return i})()})});var VNe={};cr(VNe,{diagram:()=>Q_t});function yX(e,t){if(e===0)return t();let r=Math.random,n=e>>>0;Math.random=function(){n=n+1831565813>>>0;let i=n;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=r}}function ONe(e,t,r){e.forEach(n=>{t.add({group:"nodes",data:{type:"service",id:n.id,icon:n.icon,label:n.title,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function PNe(e,t,r){e.forEach(n=>{t.add({group:"nodes",data:{type:"junction",id:n.id,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function BNe(e,t){t.nodes().map(r=>{let n=Lx(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,e.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function $Ne(e,t){e.forEach(r=>{t.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function FNe(e,t){e.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=vX(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${i}`,label:f,source:n,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:i,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};t.add({group:"edges",data:p,classes:d})})}function zNe(e,t,r,n=[]){let i=v((d,p)=>{let g=new Map;for(let[m,y]of d.entries()){let x=`${m}`,b=0,T=[...y.entries()];if(T.length===1){g.set(x,T[0][1]);continue}for(let k=0;k{let p=new Map,g=new Map;return d.forEach(([m,y],x)=>{let b=e.getNode(x)?.in??"default",T=p.get(y)??new Map;p.has(y)||p.set(y,T);let k=g.get(m)??new Map;g.has(m)||g.set(m,k);for(let w of[T,k]){let C=w.get(b)??[];w.has(b)||w.set(b,C),C.push(x)}}),{horiz:[...i(p,"horizontal").values()].filter(m=>m.length>1),vert:[...i(g,"vertical").values()].filter(m=>m.length>1)}}),[s,o]=a.reduce(([d,p],{horiz:g,vert:m})=>[[...d,...g],[...p,...m]],[[],[]]),l=new Set;n.forEach(d=>d.members.forEach(p=>l.add(p)));let u=v(d=>d.filter(p=>!p.some(g=>l.has(g))),"dropOverlapping"),h=u(s),f=u(o);return n.forEach(d=>{d.members.length<2||(d.direction==="row"?h.push([...d.members]):f.push([...d.members]))}),{horizontal:h,vertical:f}}function GNe(e,t,r=[]){let n=[],i=t.getConfigField("iconSize"),a=t.getConfigField("idealEdgeLengthMultiplier"),s=a*i,o=new Set;r.forEach(h=>{for(let f=0;f`${h[0]},${h[1]}`,"posToStr"),u=v(h=>h.split(",").map(f=>parseInt(f)),"strToPos");return e.forEach(h=>{let f=new Map([...h.entries()].map(([m,y])=>[l(y),m])),d=[l([0,0])],p={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;d.length>0;){let m=d.shift();if(m){p[m]=1;let y=f.get(m);if(y){let x=u(m);Object.entries(g).forEach(([b,T])=>{let k=l([x[0]+T[0],x[1]+T[1]]),w=f.get(k);if(w&&!p[k]){if(d.push(k),o.has(`${y}|${w}`))return;n.push({[ANe[b]]:w,[ANe[N_t(b)]]:y,gap:a*i})}})}}}}),n}function qNe(e,t,r,n,i,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{let l=ct("body").append("div").attr("id","cy").attr("style","display:none"),u=Nl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),$Ne(r,u),ONe(e,u,i),PNe(t,u,i),FNe(n,u);let h=i.getLayoutHints(),f=zNe(i,a,s,h),d=GNe(a,i,h),p=i.getConfigField("iconSize"),g=i.getConfigField("idealEdgeLengthMultiplier")*p,m=.5*p,y=i.getConfigField("edgeElasticity"),x=i.getConfigField("seed"),b=u.layout({name:"fcose",quality:"proof",randomize:i.getConfigField("randomize"),nodeSeparation:i.getConfigField("nodeSeparation"),numIter:i.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(T){let[k,w]=T.connectedNodes(),{parent:C}=Lx(k),{parent:S}=Lx(w);return C===S?g:m},edgeElasticity(T){let[k,w]=T.connectedNodes(),{parent:C}=Lx(k),{parent:S}=Lx(w);return C===S?y:.001},alignmentConstraint:f,relativePlacementConstraint:d});b.one("layoutstop",()=>{function T(k,w,C,S){let E,L,{x:N,y:O}=k,{x:R,y:_}=w;L=(S-O+(N-C)*(O-_)/(N-R))/Math.sqrt(1+Math.pow((O-_)/(N-R),2)),E=Math.sqrt(Math.pow(S-O,2)+Math.pow(C-N,2)-Math.pow(L,2));let D=Math.sqrt(Math.pow(R-N,2)+Math.pow(_-O,2));E=E/D;let I=(R-N)*(S-O)-(_-O)*(C-N);switch(!0){case I>=0:I=1;break;case I<0:I=-1;break}let M=(R-N)*(C-N)+(_-O)*(S-O);switch(!0){case M>=0:M=1;break;case M<0:M=-1;break}return L=Math.abs(L)*I,E=E*M,{distances:L,weights:E}}v(T,"getSegmentWeights"),u.startBatch();for(let k of Object.values(u.edges()))if(k.data?.()){let{x:w,y:C}=k.source().position(),{x:S,y:E}=k.target().position();if(w!==S&&C!==E){let L=k.sourceEndpoint(),N=k.targetEndpoint(),{sourceDir:O}=INe(k),[R,_]=jp(O)?[L.x,N.y]:[N.x,L.y],{weights:D,distances:I}=T(L,N,R,_);k.style("segment-distances",I),k.style("segment-weights",D)}}u.endBatch(),yX(x,()=>b.run())});try{yX(x,()=>b.run())}catch(T){throw T instanceof RangeError&&T.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):T}u.ready(T=>{fe.info("Ready",T),o(u)})})}var NNe,ANe,_Ne,X7,N_t,RNe,no,jp,vX,O_t,P_t,mX,B_t,$_t,F_t,z_t,G_t,LNe,INe,Lx,q_t,MNe,V_t,DNe,W_t,U_t,Rx,ck,H_t,Y_t,X_t,j_t,K_t,Z_t,Q_t,WNe=X(()=>{Us();qi();Wi();Vi();Ur();hr();ur();Yt();ss();LF();NNe=Ls(ENe(),1);zr();ANe={L:"left",R:"right",T:"top",B:"bottom"},_Ne={L:v(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:v(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:v(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:v(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},X7={L:v((e,t)=>e-t+2,"L"),R:v((e,t)=>e-2,"R"),T:v((e,t)=>e-t+2,"T"),B:v((e,t)=>e-2,"B")},N_t=v(function(e){return no(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),RNe=v(function(e){let t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),no=v(function(e){let t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),jp=v(function(e){let t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),vX=v(function(e,t){let r=no(e)&&jp(t),n=jp(e)&&no(t);return r||n},"isArchitectureDirectionXY"),O_t=v(function(e){let t=e[0],r=e[1],n=no(t)&&jp(r),i=jp(t)&&no(r);return n||i},"isArchitecturePairXY"),P_t=v(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),mX=v(function(e,t){let r=`${e}${t}`;return P_t(r)?r:void 0},"getArchitectureDirectionPair"),B_t=v(function([e,t],r){let n=r[0],i=r[1];return no(n)?jp(i)?[e+(n==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(n==="L"?-1:1),t]:no(i)?[e+(i==="L"?1:-1),t+(n==="T"?1:-1)]:[e,t+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),$_t=v(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),F_t=v(function(e,t){return vX(e,t)?"bend":no(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),z_t=v(function(e){return e.type==="service"},"isArchitectureService"),G_t=v(function(e){return e.type==="junction"},"isArchitectureJunction"),LNe=v((e,t)=>{let[r,n]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(n)}`},"architectureGroupAlignmentKey"),INe=v(e=>e.data(),"edgeData"),Lx=v(e=>e.data(),"nodeData"),q_t=dr.architecture,MNe=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ar,this.getAccTitle=Lr,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,this.getAccDescription=Mr,this.setAccDescription=Ir,this.clear()}static{v(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",pr()}addService({id:e,icon:t,in:r,title:n,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:n,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(z_t)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(G_t)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:n}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:n,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!RNe(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!RNe(n))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=this.nodes.get(e).in,h=this.nodes.get(t).in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:t,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};this.edges.push(f);let d=this.nodes.get(e),p=this.nodes.get(t);d&&p&&(d.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[s,o]of this.nodes.entries()){let l=new Map;for(let u of o.edges){let h=this.getNode(u.lhsId)?.in,f=this.getNode(u.rhsId)?.in;if(h&&f&&h!==f){let d=F_t(u.lhsDir,u.rhsDir);d!=="bend"&&e.set(LNe(h,f),d)}if(u.lhsId===s){let d=mX(u.lhsDir,u.rhsDir);d&&l.set(d,u.rhsId)}else{let d=mX(u.rhsDir,u.lhsDir);d&&l.set(d,u.lhsId)}}t.set(s,l)}let r=new Set,n=new Set(t.keys()),i=v(s=>{let o=new Map([[s,[0,0]]]),l=[s];for(;l.length>0;){let u=l.shift();if(u){r.add(u),n.delete(u);let h=t.get(u);if(!h)throw new Error(`BFS error: adjacency list for id ${u} not found. Please report this as a bug.`);let f=o.get(u);if(!f)throw new Error(`BFS error: position for id ${u} not found in spatial map. Please report this as a bug.`);let[d,p]=f;h.forEach((g,m)=>{r.has(g)||(o.set(g,B_t([d,p],m)),l.push(g))})}}return o},"BFS"),a=[];for(;n.size>0;){let s=n.values().next().value;a.push(i(s))}this.dataStructures={adjList:t,spatialMaps:a,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return Qr({...q_t,...It().architecture})}getConfigField(e){return this.getConfig()[e]}},V_t=v((e,t)=>{Fn(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),DNe={parser:{yy:void 0},parse:v(async e=>{let t=await Ei("architecture",e);fe.debug(t);let r=DNe.parser?.yy;if(!(r instanceof MNe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");V_t(t,r)},"parse")},W_t=v(e=>` .edge { stroke-width: ${e.archEdgeWidth}; stroke: ${e.archEdgeColor}; @@ -3132,19 +3221,19 @@ Expecting `+Se.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Me="Parse error display: -webkit-box; -webkit-box-orient: vertical; } -`,"getStyles"),ECt=SCt,hv=b(e=>`${e}`,"wrapIcon"),$w={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:hv('')},server:{body:hv('')},disk:{body:hv('')},internet:{body:hv('')},cloud:{body:hv('')},unknown:$D,blank:{body:hv("")}}},ACt=b(async function(e,t,r,i){let n=r.getConfigField("padding"),a=r.getConfigField("iconSize"),s=a/2,o=a/6,l=o/2;await Promise.all(t.edges().map(async u=>{let{source:h,sourceDir:f,sourceArrow:d,sourceGroup:p,target:g,targetDir:m,targetArrow:y,targetGroup:v,label:x}=p8e(u),{x:T,y:C}=u[0].sourceEndpoint(),{x:w,y:k}=u[0].midpoint(),{x:E,y:A}=u[0].targetEndpoint(),N=n+4;if(p&&(Ts(f)?T+=f==="L"?-N:N:C+=f==="T"?-N:N+18),v&&(Ts(m)?E+=m==="L"?-N:N:A+=m==="T"?-N:N+18),!p&&r.getNode(h)?.type==="junction"&&(Ts(f)?T+=f==="L"?s:-s:C+=f==="T"?s:-s),!v&&r.getNode(g)?.type==="junction"&&(Ts(m)?E+=m==="L"?s:-s:A+=m==="T"?s:-s),u[0]._private.rscratch){let P=e.insert("g");if(P.insert("path").attr("d",`M ${T},${C} L ${w},${k} L${E},${A} `).attr("class","edge").attr("id",`${i}-${Mc(h,g,{prefix:"L"})}`),d){let O=Ts(f)?o7[f](T,o):T-l,L=rp(f)?o7[f](C,o):C-l;P.insert("polygon").attr("points",f8e[f](o)).attr("transform",`translate(${O},${L})`).attr("class","arrow")}if(y){let O=Ts(m)?o7[m](E,o):E-l,L=rp(m)?o7[m](A,o):A-l;P.insert("polygon").attr("points",f8e[m](o)).attr("transform",`translate(${O},${L})`).attr("class","arrow")}if(x){let O=JV(f,m)?"XY":Ts(f)?"X":"Y",L=0;O==="X"?L=Math.abs(T-E):O==="Y"?L=Math.abs(C-A)/1.5:L=Math.abs(T-E)/2;let _=P.append("g");if(await zn(_,x,{useHtmlLabels:!1,width:L,classes:"architecture-service-label"},we()),_.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),O==="X")_.attr("transform","translate("+w+", "+k+")");else if(O==="Y")_.attr("transform","translate("+w+", "+k+") rotate(-90)");else if(O==="XY"){let R=QV(f,m);if(R&&mCt(R)){let D=_.node().getBoundingClientRect(),[I,B]=bCt(R);_.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*I*B*45})`);let M=_.node().getBoundingClientRect();_.attr("transform",` - translate(${w}, ${k-D.height/2}) - translate(${I*M.width/2}, ${B*M.height/2}) - rotate(${-1*I*B*45}, 0, ${D.height/2}) - `)}}}}}))},"drawEdges"),_Ct=b(async function(e,t,r,i){let a=r.getConfigField("padding")*.75,s=r.getConfigField("fontSize"),l=r.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async u=>{let h=fv(u);if(h.type==="group"){let{h:f,w:d,x1:p,y1:g}=u.boundingBox(),m=e.append("rect");m.attr("id",`${i}-group-${h.id}`).attr("x",p+l).attr("y",g+l).attr("width",d).attr("height",f).attr("class","node-bkg");let y=e.append("g"),v=p,x=g;if(h.icon){let T=y.append("g");T.html(`${await Pc(h.icon,{height:a,width:a,fallbackPrefix:$w.prefix})}`),T.attr("transform","translate("+(v+l+1)+", "+(x+l+1)+")"),v+=a,x+=s/2-1-2}if(h.label){let T=y.append("g");await zn(T,h.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},we()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(v+l+4)+", "+(x+l+2)+")")}r.setElementForId(h.id,m)}}))},"drawGroups"),LCt=b(async function(e,t,r,i){let n=we();for(let a of r){let s=t.append("g"),o=e.getConfigField("iconSize");if(a.title){let f=s.append("g");await zn(f,a.title,{useHtmlLabels:!1,width:o*1.5,classes:"architecture-service-label"},n),f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),f.attr("transform","translate("+o/2+", "+o+")")}let l=s.append("g");if(a.icon)l.html(`${await Pc(a.icon,{height:o,width:o,fallbackPrefix:$w.prefix})}`);else if(a.iconText){l.html(`${await Pc("blank",{height:o,width:o,fallbackPrefix:$w.prefix})}`);let p=l.append("g").append("foreignObject").attr("width",o).attr("height",o).append("div").attr("class","node-icon-text").attr("style",`height: ${o}px;`).append("div").html(mr(a.iconText,n)),g=parseInt(window.getComputedStyle(p.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;p.attr("style",`-webkit-line-clamp: ${Math.floor((o-2)/g)};`)}else l.append("path").attr("class","node-bkg").attr("id",`${i}-node-${a.id}`).attr("d",`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);s.attr("id",`${i}-service-${a.id}`).attr("class","architecture-service");let{width:u,height:h}=s.node().getBBox();a.width=u,a.height=h,e.setElementForId(a.id,s)}return 0},"drawServices"),RCt=b(function(e,t,r,i){r.forEach(n=>{let a=t.append("g"),s=e.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${i}-node-${n.id}`).attr("fill-opacity","0").attr("width",s).attr("height",s),a.attr("class","architecture-junction");let{width:l,height:u}=a._groups[0][0].getBBox();a.width=l,a.height=u,e.setElementForId(n.id,a)})},"drawJunctions");h5([{name:$w.prefix,icons:$w}]);Xo.use(y8e.default);b(v8e,"addServices");b(b8e,"addJunctions");b(x8e,"positionNodes");b(T8e,"addGroups");b(w8e,"addEdges");b(k8e,"getAlignments");b(C8e,"getRelativeConstraints");b(S8e,"layoutArchitecture");ICt=b(async(e,t,r,i)=>{let n=i.db;n.setDiagramId(t);let a=n.getServices(),s=n.getJunctions(),o=n.getGroups(),l=n.getEdges(),u=n.getDataStructures(),h=yi(t),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await LCt(n,d,a,t),RCt(n,d,s,t);let g=await S8e(a,s,o,l,n,u);await ACt(f,g,n,t),await _Ct(p,g,n,t),x8e(n,g),wc(void 0,h,n.getConfigField("padding"),n.getConfigField("useMaxWidth"))},"draw"),DCt={draw:ICt},NCt={parser:m8e,get db(){return new g8e},renderer:DCt,styles:ECt}});var tLe={};Lr(tLe,{diagram:()=>XCt});function I8e(){iW={}}function D8e(){let e=$Ct,{ast:t}=iW,r=nW();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((i,n)=>{let a=$8e(i,t.dataEntities,r);e=c7(e,{$kind:_8e,index:n,frame:i,textProps:a});let s;U8e(i)?(ee.debug("source frame",i.sourceFrames),s=t.frames.filter(o=>i.sourceFrames.some(l=>l.$refText===o.name)),s.forEach(o=>{e=c7(e,{$kind:eW,index:n,frame:i,sourceFrame:o})})):e=c7(e,{$kind:eW,index:n,frame:i})}),e={...e,sortedSwimlanesArray:aW(e.swimlanes)},e}function N8e(e){iW.ast=e}function nW(){return ri}function M8e(e){let t=e.split(".");if(t.length===2)return t[0]}function O8e(e){let t=e.split(".");return t.length===2?t[1]:e}function P8e(e,t){if(!(!t||t.length===0))return Object.values(e).find(r=>r.namespace===t)}function l7(e,t,r){return Math.max(t,...Object.keys(e).filter(i=>{let n=Number.parseInt(i);return n>t&&nNumber.parseInt(i)))+1}function B8e(e,t){let r=M8e(e.entityIdentifier),i=P8e(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||ri.labelUiAutomation}:r?{index:l7(t,0,100),label:ri.labelUiAutomationPrefix+r}:{index:0,label:ri.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||ri.labelCommandReadModel}:r?{index:l7(t,100,200),label:ri.labelCommandReadModelPrefix+r}:{index:100,label:ri.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||ri.labelEvents}:r?{index:l7(t,200,300),label:ri.labelEventsPrefix+r}:{index:200,label:ri.labelEvents}}}function F8e(e){let{themeVariables:t}=It();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function $8e(e,t,r){let i=It(),n=mr(O8e(e.entityIdentifier)??"",i),a,s={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
    "},l=`${Kp(n,r.textMaxWidth,s)}`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=mr(a,i),a=Kp(a,r.textMaxWidth,s),a=a.replaceAll(" "," ")),e.dataReference){let g=t.find(m=>m.name===e.dataReference?.$refText);g&&(a=g.dataBlockValue,a=a.substring(a.indexOf(`{ -`)+2),a=a.substring(0,a.lastIndexOf("}")-1),a=mr(a,i),a=Kp(a,r.textMaxWidth,s),a=a.replaceAll(" "," "),a+="
    ")}let u=a!==void 0;u&&(l+=`

    ${a}`);let h={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=hb(l,h),d=u?f.width/3:f.width,p={content:l,width:d,height:f.height};return ee.debug(`[${e.name}] ${e.entityIdentifier} text`,p),p}function z8e(e,t){let r=t,i=F8e(r.frame),n={width:r.textProps.width+2*ri.boxTextPadding,height:r.textProps.height+2*ri.boxTextPadding};return[{$kind:L8e,frame:r.frame,index:r.index,visual:i,dimension:n,textProps:r.textProps}]}function G8e(e,t,r){return t===void 0?ri.contentStartX:t.index===e.index&&e.r?e.r+ri.boxPadding:r===void 0?ri.contentStartX:r.r-ri.boxOverlap+ri.boxPadding}function q8e(e,t){let r=[...e.map(i=>i.r),t];return Math.max(...r)}function aW(e){return Object.values(e).sort((t,r)=>t.index-r.index)}function V8e(e,t){let r=t,i=B8e(r.frame,e.swimlanes),n;i.index in e.swimlanes?n=e.swimlanes[i.index]:n={index:i.index,label:i.label,r:0,y:i.index*ri.swimlaneMinHeight+ri.swimlaneGap,height:ri.swimlaneMinHeight,maxHeight:ri.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,s=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,o={width:Math.max(ri.boxMinWidth,Math.min(ri.boxMaxWidth,r.dimension.width))+2*ri.boxPadding,height:Math.max(ri.boxMinHeight,Math.min(ri.boxMaxHeight,r.dimension.height))+2*ri.boxPadding},l=G8e(n,s,a),u=l+o.width+ri.boxPadding,h=q8e(Object.values(e.swimlanes),u);n.r=l+o.width,n.maxHeight=Math.max(n.maxHeight,o.height),n.height=Math.max(ri.swimlaneMinHeight,n.maxHeight)+2*ri.swimlanePadding;let f={x:l,y:ri.swimlanePadding+n.y,r:u,dimension:o,leftSibling:!1,swimlane:n,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},d={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${n.index}`]:n},previousSwimlaneNumber:i.index,previousFrame:r.frame,maxR:h},p=aW(d.swimlanes);p.length>0&&(p[0].y=0);for(let g=1;g0}function tW(e,t){if(t!=null)return e.find(r=>r.frame.name===t.name)}function H8e(e,t,r){if(!(r<0))for(let i=r;i>=0;i--){let n=e[i];if(n.swimlane.index!==t)return n}}function Y8e(e,t){let r=t;if(ZA(r.frame)||W8e(r.index,r.frame))return[];let i=tW(e.boxes,r.frame);if(i===void 0)throw new Error(`Target box not found for frame ${r.frame.name}`);let n;return r.sourceFrame?n=tW(e.boxes,r.sourceFrame):n=H8e(e.boxes,i.swimlane.index,r.index-1),n===void 0?[]:[{$kind:R8e,frame:r.frame,index:r.index,sourceBox:n,targetBox:i}]}function j8e(e,t){let r=t,i={visual:{fill:"none",stroke:"#000"},source:{x:r.sourceBox.x,y:r.sourceBox.y},target:{x:r.targetBox.x,y:r.targetBox.y},sourceBox:r.sourceBox,targetBox:r.targetBox};return{...e,relations:[...e.relations,i]}}function X8e(e,t){let r=zCt[t.$kind];if(r==null)return[];let i=r(e,t);return ee.debug("decided events",i),i}function K8e(e,t){let r=t.reduce((i,n)=>{let a=GCt[n.$kind];return a==null?i:a(i,n)},e);return ee.debug("evolve events",{state:e,newState:r,events:t}),r}function c7(e,t){let r=X8e(e,t);return K8e(e,r)}function Z8e(e,t){return r=>{let i=r.swimlane.y+t.swimlanePadding,n=e.append("g").attr("class","em-box");n.append("rect").attr("x",r.x).attr("y",i).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill),n.append("foreignObject").attr("x",r.x+t.boxPadding).attr("y",i+10).attr("width",r.dimension.width-2*t.boxPadding).attr("height",r.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(r.text)}}function Q8e(e,t){return e>t}function J8e(e,t,r,i){return n=>{let a=n.sourceBox.swimlane.y+t.swimlanePadding,s=n.targetBox.swimlane.y+t.swimlanePadding,o=Q8e(a,s),l=n.sourceBox.x+n.sourceBox.dimension.width*2/3,u=n.targetBox.x+n.targetBox.dimension.width/3,h,f;ee.debug(`rendering relation up=${o} for `,{sourceBox:n.sourceBox,targetBox:n.targetBox}),o?(h=a,f=s+n.targetBox.dimension.height):(h=a+n.sourceBox.dimension.height,f=s);let d=i.emRelationStroke??n.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",n.visual.fill).attr("stroke",d).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${l} ${h} L${u} ${f}`)}}function eLe(e,t,r,i){return n=>{let a=e.append("g").attr("class","em-swimlane"),s=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",o=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",n.y).attr("rx","3").attr("width",t+r.swimlanePadding).attr("height",n.height).attr("fill",s).attr("stroke",o),a.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",n.y+30).text(n.label)}}var _8e,L8e,eW,R8e,MCt,OCt,PCt,BCt,FCt,iW,ri,$Ct,zCt,GCt,rW,qCt,VCt,WCt,UCt,HCt,YCt,jCt,XCt,rLe=q(()=>{au();$r();Er();er();fl();fl();Ar();_8e="position frame",L8e="frame positioned",eW="position relation",R8e="relation positioned",MCt=b(function(e){ee.debug("options str",e)},"setOptions"),OCt=b(function(){return{}},"getOptions"),PCt=b(function(){I8e(),fr()},"clear");b(I8e,"reset");BCt=rr.eventmodeling,FCt=b(()=>Yr({...BCt,...It().eventmodeling}),"getConfig"),iW={};b(D8e,"getState");b(N8e,"setAst");ri={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};b(nW,"getDiagramProps");$Ct={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};b(M8e,"extractNamespace");b(O8e,"extractName");b(P8e,"findSwimlaneByNamespace");b(l7,"findNextAvailableIndex");b(B8e,"calculateSwimlaneProps");b(F8e,"calculateEntityVisualProps");b($8e,"calculateTextProps");b(z8e,"decidePositionFrame");b(G8e,"calculateX");b(q8e,"calculateMaxRight");b(aW,"sortedSwimlanesArray");b(V8e,"evolveFramePositioned");b(W8e,"isFirstFrame");b(U8e,"hasSourceFrame");b(tW,"findBoxByFrame");b(H8e,"findBoxByLineIndex");b(Y8e,"decidePositionRelation");b(j8e,"evolveRelationPositioned");zCt={[_8e]:z8e,[eW]:Y8e},GCt={[L8e]:V8e,[R8e]:j8e};b(X8e,"decide");b(K8e,"evolve");b(c7,"dispatch");rW={getConfig:FCt,setOptions:MCt,getOptions:OCt,clear:PCt,setAccTitle:yr,getAccTitle:vr,getAccDescription:xr,setAccDescription:br,setDiagramTitle:kr,getDiagramTitle:Tr,setAst:N8e,getDiagramProps:nW,getState:D8e},qCt={parse:b(async e=>{let t=await xn("eventmodeling",e);ee.debug(t),rW.setAst(t),Un(t,rW)},"parse")},VCt=we(),WCt=VCt?.eventmodeling;b(Z8e,"renderD3Box");b(Q8e,"dirUpwards");b(J8e,"renderD3Relation");b(eLe,"renderD3Swimlane");UCt=b(function(e,t,r,i){if(ee.debug("in eventmodeling renderer",e+` -`,"id:",t,r),!WCt)throw new Error("EventModeling config not found");let n=i.db,{themeVariables:a,eventmodeling:s}=we(),o=Qe(`[id="${t}"]`),l=n.getDiagramProps(),u=n.getState(),h=`em-arrowhead-${t}`,f=a.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(eLe(o,u.maxR,l,a)),u.boxes.forEach(Z8e(o,l)),u.relations.forEach(J8e(o,l,h,a)),o.append("defs").append("marker").attr("id",h).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),Qv(void 0,o,s?.padding??30,s?.useMaxWidth)},"draw"),HCt={draw:UCt},YCt=b(e=>"","getStyles"),jCt=YCt,XCt={parser:qCt,db:rW,renderer:HCt,styles:jCt}});var uLe={};Lr(uLe,{diagram:()=>h5t});var oW,KCt,ZCt,QCt,dv,JCt,e5t,t5t,lLe,iLe,nLe,aLe,r5t,sLe,i5t,n5t,a5t,sW,s5t,o5t,cLe,u7,oLe,pv,l5t,c5t,u5t,h5t,hLe=q(()=>{Ja();$r();Er();er();qt();oW=(function(){var e=b(function(v,x,T,C){for(T=T||{},C=v.length;C--;T[v[C]]=x);return T},"o"),t=[1,4],r=[1,14],i=[1,12],n=[1,13],a=[6,7,8],s=[1,20],o=[1,18],l=[1,19],u=[6,7,11],h=[1,6,13,14],f=[1,23],d=[1,24],p=[1,6,7,11,13,14],g={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:b(function(x,T,C,w,k,E,A){var N=E.length-1;switch(k){case 6:case 7:return w;case 15:w.addNode(E[N-1].length,E[N].trim());break;case 16:w.addNode(0,E[N].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:i,14:n},e(a,[2,3]),{1:[2,2]},e(a,[2,4]),e(a,[2,5]),{1:[2,6],6:r,12:15,13:i,14:n},{6:r,9:16,12:11,13:i,14:n},{6:s,7:o,10:17,11:l},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:s,7:o,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:n},e(h,[2,14],{7:f,11:d}),e(p,[2,8]),e(p,[2,9]),e(p,[2,10]),e(u,[2,15]),e(h,[2,13],{7:f,11:d}),e(p,[2,11]),e(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:b(function(x,T){if(T.recoverable)this.trace(x);else{var C=new Error(x);throw C.hash=T,C}},"parseError"),parse:b(function(x){var T=this,C=[0],w=[],k=[null],E=[],A=this.table,N="",P=0,O=0,L=0,_=2,R=1,D=E.slice.call(arguments,1),I=Object.create(this.lexer),B={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(B.yy[M]=this.yy[M]);I.setInput(x,B.yy),B.yy.lexer=I,B.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var F=I.yylloc;E.push(F);var z=I.options&&I.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $(Se){C.length=C.length-2*Se,k.length=k.length-Se,E.length=E.length-Se}b($,"popStack");function G(){var Se;return Se=w.pop()||I.lex()||R,typeof Se!="number"&&(Se instanceof Array&&(w=Se,Se=w.pop()),Se=T.symbols_[Se]||Se),Se}b(G,"lex");for(var U,j,H,Q,Y,se,J={},re,ie,te,xe;;){if(H=C[C.length-1],this.defaultActions[H]?Q=this.defaultActions[H]:((U===null||typeof U>"u")&&(U=G()),Q=A[H]&&A[H][U]),typeof Q>"u"||!Q.length||!Q[0]){var fe="";xe=[];for(re in A[H])this.terminals_[re]&&re>_&&xe.push("'"+this.terminals_[re]+"'");I.showPosition?fe="Parse error on line "+(P+1)+`: -`+I.showPosition()+` -Expecting `+xe.join(", ")+", got '"+(this.terminals_[U]||U)+"'":fe="Parse error on line "+(P+1)+": Unexpected "+(U==R?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(fe,{text:I.match,token:this.terminals_[U]||U,line:I.yylineno,loc:F,expected:xe})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+U);switch(Q[0]){case 1:C.push(U),k.push(I.yytext),E.push(I.yylloc),C.push(Q[1]),U=null,j?(U=j,j=null):(O=I.yyleng,N=I.yytext,P=I.yylineno,F=I.yylloc,L>0&&L--);break;case 2:if(ie=this.productions_[Q[1]][1],J.$=k[k.length-ie],J._$={first_line:E[E.length-(ie||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(ie||1)].first_column,last_column:E[E.length-1].last_column},z&&(J._$.range=[E[E.length-(ie||1)].range[0],E[E.length-1].range[1]]),se=this.performAction.apply(J,[N,O,P,B.yy,Q[1],k,E].concat(D)),typeof se<"u")return se;ie&&(C=C.slice(0,-1*ie*2),k=k.slice(0,-1*ie),E=E.slice(0,-1*ie)),C.push(this.productions_[Q[1]][0]),k.push(J.$),E.push(J._$),te=A[C[C.length-2]][C[C.length-1]],C.push(te);break;case 3:return!0}}return!0},"parse")},m=(function(){var v={EOF:1,parseError:b(function(T,C){if(this.yy.parser)this.yy.parser.parseError(T,C);else throw new Error(T)},"parseError"),setInput:b(function(x,T){return this.yy=T||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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var T=x.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:b(function(x){var T=x.length,C=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var w=this.match.split(/(?:\r\n?|\n)/g);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);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===w.length?this.yylloc.first_column:0)+w[w.length-C.length].length-C[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(x){this.unput(this.match.slice(x))},"less"),pastInput:b(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var x=this.pastInput(),T=new Array(x.length+1).join("-");return x+this.upcomingInput()+` -`+T+"^"},"showPosition"),test_match:b(function(x,T){var C,w,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},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],C=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var E in k)this[E]=k[E];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,T,C,w;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),E=0;ET[0].length)){if(T=C,w=E,this.options.backtrack_lexer){if(x=this.test_match(C,k[E]),x!==!1)return x;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(x=this.test_match(T,k[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var T=this.next();return T||this.lex()},"lex"),begin:b(function(T){this.conditionStack.push(T)},"begin"),popState:b(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:b(function(T){this.begin(T)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(T,C,w,k){var E=k;switch(w){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return v})();g.lexer=m;function y(){this.yy={}}return b(y,"Parser"),y.prototype=g,g.Parser=y,new y})();oW.parser=oW;KCt=oW,ZCt=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{b(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,fr()}getRoot(){return this.root}addNode(e,t){let r=ht.sanitizeText(t,we());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],kr(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let n=this.stack[this.stack.length-1].node,a={text:r,children:[]};n.children.push(a),this.stack.push({level:i,node:a})}getAccTitle(){return vr()}setAccTitle(e){yr(e)}getAccDescription(){return xr()}setAccDescription(e){br(e)}getDiagramTitle(){return Tr()}setDiagramTitle(e){kr(e)}},QCt=14,dv=250,JCt=30,e5t=60,t5t=5,lLe=82*Math.PI/180,iLe=Math.cos(lLe),nLe=Math.sin(lLe),aLe=b((e,t,r)=>{let i=e.node().getBBox(),n=i.width+t*2,a=i.height+t*2;Mr(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} ${a}`)},"applyPaddedViewBox"),r5t=b((e,t,r,i)=>{let a=i.db.getRoot();if(!a)return;let s=we(),{look:o,handDrawnSeed:l,themeVariables:u}=s,h=Ls(s.fontSize)[0]??QCt,f=o==="handDrawn",d=a.children??[],p=s.ishikawa?.diagramPadding??20,g=s.ishikawa?.useMaxWidth??!1,m=yi(t),y=m.append("g").attr("class","ishikawa"),v=f?st.svg(m.node()):void 0,x=v?{roughSvg:v,seed:l??0,lineColor:u?.lineColor??"#333",fillColor:u?.mainBkg??"#fff"}:void 0,T=`ishikawa-arrow-${t}`;f||y.append("defs").append("marker").attr("id",T).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let C=0,w=dv,k=f?void 0:pv(y,C,w,C,w,"ishikawa-spine");if(i5t(y,C,w,a.text,h,x),!d.length){f&&pv(y,C,w,C,w,"ishikawa-spine",x),aLe(m,p,g);return}C-=20;let E=d.filter((I,B)=>B%2===0),A=d.filter((I,B)=>B%2===1),N=sLe(E),P=sLe(A),O=N.total+P.total,L=dv,_=dv;if(O>0){let I=dv*2,B=dv*.3;L=Math.max(B,I*(N.total/O)),_=Math.max(B,I*(P.total/O))}let R=h*2;L=Math.max(L,N.max*R),_=Math.max(_,P.max*R),w=Math.max(L,dv),k&&k.attr("y1",w).attr("y2",w),y.select(".ishikawa-head-group").attr("transform",`translate(0,${w})`);let D=Math.ceil(d.length/2);for(let I=0;IMath.min(M,F.getBBox().x),1/0)}if(f)pv(y,C,w,0,w,"ishikawa-spine",x);else{k.attr("x1",C);let I=`url(#${T})`;y.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",I)}aLe(m,p,g)},"draw"),sLe=b(e=>{let t=b(r=>r.children.reduce((i,n)=>i+1+t(n),0),"countDescendants");return e.reduce((r,i)=>{let n=t(i);return r.total+=n,r.max=Math.max(r.max,n),r},{total:0,max:0})},"sideStats"),i5t=b((e,t,r,i,n,a)=>{let s=Math.max(6,Math.floor(110/(n*.6))),o=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${t},${r})`),l=u7(o,cLe(i,s),0,0,"ishikawa-head-label","start",n),u=l.node().getBBox(),h=Math.max(60,u.width+6),f=Math.max(40,u.height*2+40),d=`M 0 ${-f/2} L 0 ${f/2} Q ${h*2.4} 0 0 ${-f/2} Z`;if(a){let p=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>p,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);l.attr("transform",`translate(${(h-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),n5t=b((e,t)=>{let r=[],i=[],n=b((a,s,o)=>{let l=t===-1?[...a].reverse():a;for(let u of l){let h=r.length,f=u.children??[];r.push({depth:o,text:cLe(u.text,15),parentIndex:s,childCount:f.length}),o%2===0?(i.push(h),f.length&&n(f,h,o+1)):(f.length&&n(f,h,o+1),i.push(h))}},"walk");return n(e,-1,2),{entries:r,yOrder:i}},"flattenTree"),a5t=b((e,t,r,i,n,a,s)=>{let o=e.append("g").attr("class","ishikawa-label-group"),u=u7(o,t,r,i+11*n,"ishikawa-label cause","middle",a).node().getBBox();if(s){let h=s.roughSvg.rectangle(u.x-20,u.y-2,u.width+40,u.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});o.insert(()=>h,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",u.x-20).attr("y",u.y-2).attr("width",u.width+40).attr("height",u.height+4)},"drawCauseLabel"),sW=b((e,t,r,i,n,a)=>{let s=Math.sqrt(i*i+n*n);if(s===0)return;let o=i/s,l=n/s,u=6,h=-l*u,f=o*u,d=t,p=r,g=`M ${d} ${p} L ${d-o*u*2+h} ${p-l*u*2+f} L ${d-o*u*2-h} ${p-l*u*2-f} Z`,m=a.roughSvg.path(g,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},"drawArrowMarker"),s5t=b((e,t,r,i,n,a,s,o)=>{let l=t.children??[],u=a*(l.length?1:.2),h=-iLe*u,f=nLe*u*n,d=r+h,p=i+f;if(pv(e,r,i,d,p,"ishikawa-branch",o),o&&sW(e,r,i,r-d,i-p,o),a5t(e,t.text,d,p,n,s,o),!l.length)return;let{entries:g,yOrder:m}=n5t(l,n),y=g.length,v=new Array(y);for(let[k,E]of m.entries())v[E]=i+f*((k+1)/(y+1));let x=new Map;x.set(-1,{x0:r,y0:i,x1:d,y1:p,childCount:l.length,childrenDrawn:0});let T=-iLe,C=nLe*n,w=n<0?"ishikawa-label up":"ishikawa-label down";for(let[k,E]of g.entries()){let A=v[k],N=x.get(E.parentIndex),P=e.append("g").attr("class","ishikawa-sub-group"),O=0,L=0,_=0;if(E.depth%2===0){let R=N.y1-N.y0;O=oLe(N.x0,N.x1,R?(A-N.y0)/R:.5),L=A,_=O-(E.childCount>0?e5t+E.childCount*t5t:JCt),pv(P,O,A,_,A,"ishikawa-sub-branch",o),o&&sW(P,O,A,1,0,o),u7(P,E.text,_,A,"ishikawa-label align","end",s)}else{let R=N.childrenDrawn++;O=oLe(N.x0,N.x1,(N.childCount-R)/(N.childCount+1)),L=N.y0,_=O+T*((A-L)/C),pv(P,O,L,_,A,"ishikawa-sub-branch",o),o&&sW(P,O,L,O-_,L-A,o),u7(P,E.text,_,A,w,"end",s)}E.childCount>0&&x.set(k,{x0:O,y0:L,x1:_,y1:A,childCount:E.childCount,childrenDrawn:0})}},"drawBranch"),o5t=b(e=>e.split(/|\n/),"splitLines"),cLe=b((e,t)=>{if(e.length<=t)return e;let r=[];for(let i of e.split(/\s+/)){let n=r.length-1;n>=0&&r[n].length+1+i.length<=t?r[n]+=" "+i:r.push(i)}return r.join(` -`)},"wrapText"),u7=b((e,t,r,i,n,a,s)=>{let o=o5t(t),l=s*1.05,u=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(o.length-1)*l/2);for(let[h,f]of o.entries())u.append("tspan").attr("x",r).attr("dy",h===0?0:l).text(f);return u},"drawMultilineText"),oLe=b((e,t,r)=>e+(t-e)*r,"lerp"),pv=b((e,t,r,i,n,a,s)=>{if(s){let o=s.roughSvg.line(t,r,i,n,{roughness:1.5,seed:s.seed,stroke:s.lineColor,strokeWidth:2});e.append(()=>o).attr("class",a);return}return e.append("line").attr("class",a).attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n)},"drawLine"),l5t={draw:r5t},c5t=b(e=>` +`,"getStyles"),U_t=W_t;v(yX,"withSeededRandom");Rx=v(e=>`${e}`,"wrapIcon"),ck={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Rx('')},server:{body:Rx('')},disk:{body:Rx('')},internet:{body:Rx('')},cloud:{body:Rx('')},unknown:SD,blank:{body:Rx("")}}},H_t=v(async function(e,t,r,n){let i=r.getConfigField("padding"),a=r.getConfigField("iconSize"),s=a/2,o=a/6,l=o/2;await Promise.all(t.edges().map(async u=>{let{source:h,sourceDir:f,sourceArrow:d,sourceGroup:p,target:g,targetDir:m,targetArrow:y,targetGroup:x,label:b}=INe(u),{x:T,y:k}=u[0].sourceEndpoint(),{x:w,y:C}=u[0].midpoint(),{x:S,y:E}=u[0].targetEndpoint(),L=i+4;if(p&&(no(f)?T+=f==="L"?-L:L:k+=f==="T"?-L:L+18),x&&(no(m)?S+=m==="L"?-L:L:E+=m==="T"?-L:L+18),!p&&r.getNode(h)?.type==="junction"&&(no(f)?T+=f==="L"?s:-s:k+=f==="T"?s:-s),!x&&r.getNode(g)?.type==="junction"&&(no(m)?S+=m==="L"?s:-s:E+=m==="T"?s:-s),u[0]._private.rscratch){let N=e.insert("g");if(N.insert("path").attr("d",`M ${T},${k} L ${w},${C} L${S},${E} `).attr("class","edge").attr("id",`${n}-${uu(h,g,{prefix:"L"})}`),d){let O=no(f)?X7[f](T,o):T-l,R=jp(f)?X7[f](k,o):k-l;N.insert("polygon").attr("points",_Ne[f](o)).attr("transform",`translate(${O},${R})`).attr("class","arrow")}if(y){let O=no(m)?X7[m](S,o):S-l,R=jp(m)?X7[m](E,o):E-l;N.insert("polygon").attr("points",_Ne[m](o)).attr("transform",`translate(${O},${R})`).attr("class","arrow")}if(b){let O=vX(f,m)?"XY":no(f)?"X":"Y",R=0;O==="X"?R=Math.abs(T-S):O==="Y"?R=Math.abs(k-E)/1.5:R=Math.abs(T-S)/2;let _=N.append("g");if(await Ra(_,b,{useHtmlLabels:!1,width:R,classes:"architecture-service-label"},ze()),_.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),O==="X")_.attr("transform","translate("+w+", "+C+")");else if(O==="Y")_.attr("transform","translate("+w+", "+C+") rotate(-90)");else if(O==="XY"){let D=mX(f,m);if(D&&O_t(D)){let I=_.node().getBoundingClientRect(),[M,B]=$_t(D);_.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*M*B*45})`);let P=_.node().getBoundingClientRect();_.attr("transform",` + translate(${w}, ${C-I.height/2}) + translate(${M*P.width/2}, ${B*P.height/2}) + rotate(${-1*M*B*45}, 0, ${I.height/2}) + `)}}}}}))},"drawEdges"),Y_t=v(async function(e,t,r,n){let a=r.getConfigField("padding")*.75,s=r.getConfigField("fontSize"),l=r.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async u=>{let h=Lx(u);if(h.type==="group"){let{h:f,w:d,x1:p,y1:g}=u.boundingBox(),m=e.append("rect");m.attr("id",`${n}-group-${h.id}`).attr("x",p+l).attr("y",g+l).attr("width",d).attr("height",f).attr("class","node-bkg");let y=e.append("g"),x=p,b=g;if(h.icon){let T=y.append("g");T.html(`${await Ko(h.icon,{height:a,width:a,fallbackPrefix:ck.prefix})}`),T.attr("transform","translate("+(x+l+1)+", "+(b+l+1)+")"),x+=a,b+=s/2-1-2}if(h.label){let T=y.append("g");await Ra(T,h.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},ze()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(x+l+4)+", "+(b+l+2)+")")}r.setElementForId(h.id,m)}}))},"drawGroups"),X_t=v(async function(e,t,r,n){let i=ze();for(let a of r){let s=t.append("g"),o=e.getConfigField("iconSize");if(a.title){let f=s.append("g");await Ra(f,a.title,{useHtmlLabels:!1,width:o*1.5,classes:"architecture-service-label"},i),f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),f.attr("transform","translate("+o/2+", "+o+")")}let l=s.append("g");if(a.icon)l.html(`${await Ko(a.icon,{height:o,width:o,fallbackPrefix:ck.prefix})}`);else if(a.iconText){l.html(`${await Ko("blank",{height:o,width:o,fallbackPrefix:ck.prefix})}`);let p=l.append("g").append("foreignObject").attr("width",o).attr("height",o).append("div").attr("class","node-icon-text").attr("style",`height: ${o}px;`).append("div").html(Cr(a.iconText,i)),g=parseInt(window.getComputedStyle(p.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;p.attr("style",`-webkit-line-clamp: ${Math.floor((o-2)/g)};`)}else l.append("path").attr("class","node-bkg").attr("id",`${n}-node-${a.id}`).attr("d",`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);s.attr("id",`${n}-service-${a.id}`).attr("class","architecture-service");let{width:u,height:h}=s.node().getBBox();a.width=u,a.height=h,e.setElementForId(a.id,s)}return 0},"drawServices"),j_t=v(function(e,t,r,n){r.forEach(i=>{let a=t.append("g"),s=e.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${n}-node-${i.id}`).attr("fill-opacity","0").attr("width",s).attr("height",s),a.attr("class","architecture-junction");let{width:l,height:u}=a._groups[0][0].getBBox();a.width=l,a.height=u,e.setElementForId(i.id,a)})},"drawJunctions");qy([{name:ck.prefix,icons:ck}]);Nl.use(NNe.default);v(ONe,"addServices");v(PNe,"addJunctions");v(BNe,"positionNodes");v($Ne,"addGroups");v(FNe,"addEdges");v(zNe,"getAlignments");v(GNe,"getRelativeConstraints");v(qNe,"layoutArchitecture");K_t=v(async(e,t,r,n)=>{let i=n.db;i.setDiagramId(t);let a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),h=xn(t),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await X_t(i,d,a,t),j_t(i,d,s,t);let g=await qNe(a,s,o,l,i,u);await H_t(f,g,i,t),await Y_t(p,g,i,t),BNe(i,g),tu(void 0,h,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),Z_t={draw:K_t},Q_t={parser:DNe,get db(){return new MNe},renderer:Z_t,styles:U_t}});var vOe={};cr(vOe,{diagram:()=>p6t});function XNe(){wX={}}function jNe(){let e=i6t,{ast:t}=wX,r=CX();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((n,i)=>{let a=rOe(n,t.dataEntities,r);e=K7(e,{$kind:UNe,index:i,frame:n,textProps:a});let s;lOe(n)?(fe.debug("source frame",n.sourceFrames),s=t.frames.filter(o=>n.sourceFrames.some(l=>l.$refText===o.name)),s.forEach(o=>{e=K7(e,{$kind:xX,index:i,frame:n,sourceFrame:o})})):e=K7(e,{$kind:xX,index:i,frame:n})}),e={...e,sortedSwimlanesArray:kX(e.swimlanes)},e}function KNe(e){wX.ast=e}function CX(){return kn}function ZNe(e){let t=e.split(".");if(t.length===2)return t[0]}function QNe(e){let t=e.split(".");return t.length===2?t[1]:e}function JNe(e,t){if(!(!t||t.length===0))return Object.values(e).find(r=>r.namespace===t)}function j7(e,t,r){return Math.max(t,...Object.keys(e).filter(n=>{let i=Number.parseInt(n);return i>t&&iNumber.parseInt(n)))+1}function eOe(e,t){let r=ZNe(e.entityIdentifier),n=JNe(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return n?{index:n.index,label:n.namespace||kn.labelUiAutomation}:r?{index:j7(t,0,100),label:kn.labelUiAutomationPrefix+r}:{index:0,label:kn.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return n?{index:n.index,label:n.namespace||kn.labelCommandReadModel}:r?{index:j7(t,100,200),label:kn.labelCommandReadModelPrefix+r}:{index:100,label:kn.labelCommandReadModel};default:return n?{index:n.index,label:n.namespace||kn.labelEvents}:r?{index:j7(t,200,300),label:kn.labelEventsPrefix+r}:{index:200,label:kn.labelEvents}}}function tOe(e){let{themeVariables:t}=It();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function rOe(e,t,r){let n=It(),i=Cr(QNe(e.entityIdentifier)??"",n),a,s={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
    "},l=`${W0(i,r.textMaxWidth,s)}`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=Cr(a,n),a=W0(a,r.textMaxWidth,s),a=a.replaceAll(" "," ")),e.dataReference){let g=t.find(m=>m.name===e.dataReference?.$refText);g&&(a=g.dataBlockValue,a=a.substring(a.indexOf(`{ +`)+2),a=a.substring(0,a.lastIndexOf("}")-1),a=Cr(a,n),a=W0(a,r.textMaxWidth,s),a=a.replaceAll(" "," "),a+="
    ")}let u=a!==void 0;u&&(l+=`

    ${a}`);let h={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=L2(l,h),d=u?f.width/3:f.width,p={content:l,width:d,height:f.height};return fe.debug(`[${e.name}] ${e.entityIdentifier} text`,p),p}function nOe(e,t){let r=t,n=tOe(r.frame),i={width:r.textProps.width+2*kn.boxTextPadding,height:r.textProps.height+2*kn.boxTextPadding};return[{$kind:HNe,frame:r.frame,index:r.index,visual:n,dimension:i,textProps:r.textProps}]}function iOe(e,t,r){return t===void 0?kn.contentStartX:t.index===e.index&&e.r?e.r+kn.boxPadding:r===void 0?kn.contentStartX:r.r-kn.boxOverlap+kn.boxPadding}function aOe(e,t){let r=[...e.map(n=>n.r),t];return Math.max(...r)}function kX(e){return Object.values(e).sort((t,r)=>t.index-r.index)}function sOe(e,t){let r=t,n=eOe(r.frame,e.swimlanes),i;n.index in e.swimlanes?i=e.swimlanes[n.index]:i={index:n.index,label:n.label,r:0,y:n.index*kn.swimlaneMinHeight+kn.swimlaneGap,height:kn.swimlaneMinHeight,maxHeight:kn.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,s=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,o={width:Math.max(kn.boxMinWidth,Math.min(kn.boxMaxWidth,r.dimension.width))+2*kn.boxPadding,height:Math.max(kn.boxMinHeight,Math.min(kn.boxMaxHeight,r.dimension.height))+2*kn.boxPadding},l=iOe(i,s,a),u=l+o.width+kn.boxPadding,h=aOe(Object.values(e.swimlanes),u);i.r=l+o.width,i.maxHeight=Math.max(i.maxHeight,o.height),i.height=Math.max(kn.swimlaneMinHeight,i.maxHeight)+2*kn.swimlanePadding;let f={x:l,y:kn.swimlanePadding+i.y,r:u,dimension:o,leftSibling:!1,swimlane:i,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},d={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:n.index,previousFrame:r.frame,maxR:h},p=kX(d.swimlanes);p.length>0&&(p[0].y=0);for(let g=1;g0}function bX(e,t){if(t!=null)return e.find(r=>r.frame.name===t.name)}function cOe(e,t,r){if(!(r<0))for(let n=r;n>=0;n--){let i=e[n];if(i.swimlane.index!==t)return i}}function uOe(e,t){let r=t;if(MR(r.frame)||oOe(r.index,r.frame))return[];let n=bX(e.boxes,r.frame);if(n===void 0)throw new Error(`Target box not found for frame ${r.frame.name}`);let i;return r.sourceFrame?i=bX(e.boxes,r.sourceFrame):i=cOe(e.boxes,n.swimlane.index,r.index-1),i===void 0?[]:[{$kind:YNe,frame:r.frame,index:r.index,sourceBox:i,targetBox:n}]}function hOe(e,t){let r=t,n={visual:{fill:"none",stroke:"#000"},source:{x:r.sourceBox.x,y:r.sourceBox.y},target:{x:r.targetBox.x,y:r.targetBox.y},sourceBox:r.sourceBox,targetBox:r.targetBox};return{...e,relations:[...e.relations,n]}}function fOe(e,t){let r=a6t[t.$kind];if(r==null)return[];let n=r(e,t);return fe.debug("decided events",n),n}function dOe(e,t){let r=t.reduce((n,i)=>{let a=s6t[i.$kind];return a==null?n:a(n,i)},e);return fe.debug("evolve events",{state:e,newState:r,events:t}),r}function K7(e,t){let r=fOe(e,t);return dOe(e,r)}function pOe(e,t){return r=>{let n=r.swimlane.y+t.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",r.x).attr("y",n).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill),i.append("foreignObject").attr("x",r.x+t.boxPadding).attr("y",n+10).attr("width",r.dimension.width-2*t.boxPadding).attr("height",r.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(r.text)}}function gOe(e,t){return e>t}function mOe(e,t,r,n){return i=>{let a=i.sourceBox.swimlane.y+t.swimlanePadding,s=i.targetBox.swimlane.y+t.swimlanePadding,o=gOe(a,s),l=i.sourceBox.x+i.sourceBox.dimension.width*2/3,u=i.targetBox.x+i.targetBox.dimension.width/3,h,f;fe.debug(`rendering relation up=${o} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),o?(h=a,f=s+i.targetBox.dimension.height):(h=a+i.sourceBox.dimension.height,f=s);let d=n.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",d).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${l} ${h} L${u} ${f}`)}}function yOe(e,t,r,n){return i=>{let a=e.append("g").attr("class","em-swimlane"),s=n.emSwimlaneBackgroundOdd??"rgb(250,250,250)",o=n.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",t+r.swimlanePadding).attr("height",i.height).attr("fill",s).attr("stroke",o),a.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}var UNe,HNe,xX,YNe,J_t,e6t,t6t,r6t,n6t,wX,kn,i6t,a6t,s6t,TX,o6t,l6t,c6t,u6t,h6t,f6t,d6t,p6t,xOe=X(()=>{Us();Ur();hr();ur();Yt();ss();ss();zr();UNe="position frame",HNe="frame positioned",xX="position relation",YNe="relation positioned",J_t=v(function(e){fe.debug("options str",e)},"setOptions"),e6t=v(function(){return{}},"getOptions"),t6t=v(function(){XNe(),pr()},"clear");v(XNe,"reset");r6t=dr.eventmodeling,n6t=v(()=>Qr({...r6t,...It().eventmodeling}),"getConfig"),wX={};v(jNe,"getState");v(KNe,"setAst");kn={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};v(CX,"getDiagramProps");i6t={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};v(ZNe,"extractNamespace");v(QNe,"extractName");v(JNe,"findSwimlaneByNamespace");v(j7,"findNextAvailableIndex");v(eOe,"calculateSwimlaneProps");v(tOe,"calculateEntityVisualProps");v(rOe,"calculateTextProps");v(nOe,"decidePositionFrame");v(iOe,"calculateX");v(aOe,"calculateMaxRight");v(kX,"sortedSwimlanesArray");v(sOe,"evolveFramePositioned");v(oOe,"isFirstFrame");v(lOe,"hasSourceFrame");v(bX,"findBoxByFrame");v(cOe,"findBoxByLineIndex");v(uOe,"decidePositionRelation");v(hOe,"evolveRelationPositioned");a6t={[UNe]:nOe,[xX]:uOe},s6t={[HNe]:sOe,[YNe]:hOe};v(fOe,"decide");v(dOe,"evolve");v(K7,"dispatch");TX={getConfig:n6t,setOptions:J_t,getOptions:e6t,clear:t6t,setAccTitle:Ar,getAccTitle:Lr,getAccDescription:Mr,setAccDescription:Ir,setDiagramTitle:$r,getDiagramTitle:Dr,setAst:KNe,getDiagramProps:CX,getState:jNe},o6t={parse:v(async e=>{let t=await Ei("eventmodeling",e);fe.debug(t),TX.setAst(t),Fn(t,TX)},"parse")},l6t=ze(),c6t=l6t?.eventmodeling;v(pOe,"renderD3Box");v(gOe,"dirUpwards");v(mOe,"renderD3Relation");v(yOe,"renderD3Swimlane");u6t=v(function(e,t,r,n){if(fe.debug("in eventmodeling renderer",e+` +`,"id:",t,r),!c6t)throw new Error("EventModeling config not found");let i=n.db,{themeVariables:a,eventmodeling:s}=ze(),o=ct(`[id="${t}"]`),l=i.getDiagramProps(),u=i.getState(),h=`em-arrowhead-${t}`,f=a.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(yOe(o,u.maxR,l,a)),u.boxes.forEach(pOe(o,l)),u.relations.forEach(mOe(o,l,h,a)),o.append("defs").append("marker").attr("id",h).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),wb(void 0,o,s?.padding??30,s?.useMaxWidth)},"draw"),h6t={draw:u6t},f6t=v(e=>"","getStyles"),d6t=f6t,p6t={parser:o6t,db:TX,renderer:h6t,styles:d6t}});var AOe={};cr(AOe,{diagram:()=>L6t});var EX,g6t,m6t,y6t,Ix,v6t,x6t,b6t,SOe,bOe,TOe,wOe,T6t,COe,w6t,C6t,k6t,SX,S6t,E6t,EOe,Z7,kOe,Mx,A6t,_6t,R6t,L6t,_Oe=X(()=>{qi();Ur();hr();ur();Yt();Wt();EX=(function(){var e=v(function(x,b,T,k){for(T=T||{},k=x.length;k--;T[x[k]]=b);return T},"o"),t=[1,4],r=[1,14],n=[1,12],i=[1,13],a=[6,7,8],s=[1,20],o=[1,18],l=[1,19],u=[6,7,11],h=[1,6,13,14],f=[1,23],d=[1,24],p=[1,6,7,11,13,14],g={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:v(function(b,T,k,w,C,S,E){var L=S.length-1;switch(C){case 6:case 7:return w;case 15:w.addNode(S[L-1].length,S[L].trim());break;case 16:w.addNode(0,S[L].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:i},e(a,[2,3]),{1:[2,2]},e(a,[2,4]),e(a,[2,5]),{1:[2,6],6:r,12:15,13:n,14:i},{6:r,9:16,12:11,13:n,14:i},{6:s,7:o,10:17,11:l},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:s,7:o,10:22,11:l},{1:[2,7],6:r,12:15,13:n,14:i},e(h,[2,14],{7:f,11:d}),e(p,[2,8]),e(p,[2,9]),e(p,[2,10]),e(u,[2,15]),e(h,[2,13],{7:f,11:d}),e(p,[2,11]),e(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:v(function(b,T){if(T.recoverable)this.trace(b);else{var k=new Error(b);throw k.hash=T,k}},"parseError"),parse:v(function(b){var T=this,k=[0],w=[],C=[null],S=[],E=this.table,L="",N=0,O=0,R=0,_=2,D=1,I=S.slice.call(arguments,1),M=Object.create(this.lexer),B={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(B.yy[P]=this.yy[P]);M.setInput(b,B.yy),B.yy.lexer=M,B.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var $=M.yylloc;S.push($);var G=M.options&&M.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(Ge){k.length=k.length-2*Ge,C.length=C.length-Ge,S.length=S.length-Ge}v(q,"popStack");function z(){var Ge;return Ge=w.pop()||M.lex()||D,typeof Ge!="number"&&(Ge instanceof Array&&(w=Ge,Ge=w.pop()),Ge=T.symbols_[Ge]||Ge),Ge}v(z,"lex");for(var V,j,ee,ne,Q,pe,te={},de,ce,ue,Re;;){if(ee=k[k.length-1],this.defaultActions[ee]?ne=this.defaultActions[ee]:((V===null||typeof V>"u")&&(V=z()),ne=E[ee]&&E[ee][V]),typeof ne>"u"||!ne.length||!ne[0]){var ve="";Re=[];for(de in E[ee])this.terminals_[de]&&de>_&&Re.push("'"+this.terminals_[de]+"'");M.showPosition?ve="Parse error on line "+(N+1)+`: +`+M.showPosition()+` +Expecting `+Re.join(", ")+", got '"+(this.terminals_[V]||V)+"'":ve="Parse error on line "+(N+1)+": Unexpected "+(V==D?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(ve,{text:M.match,token:this.terminals_[V]||V,line:M.yylineno,loc:$,expected:Re})}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+V);switch(ne[0]){case 1:k.push(V),C.push(M.yytext),S.push(M.yylloc),k.push(ne[1]),V=null,j?(V=j,j=null):(O=M.yyleng,L=M.yytext,N=M.yylineno,$=M.yylloc,R>0&&R--);break;case 2:if(ce=this.productions_[ne[1]][1],te.$=C[C.length-ce],te._$={first_line:S[S.length-(ce||1)].first_line,last_line:S[S.length-1].last_line,first_column:S[S.length-(ce||1)].first_column,last_column:S[S.length-1].last_column},G&&(te._$.range=[S[S.length-(ce||1)].range[0],S[S.length-1].range[1]]),pe=this.performAction.apply(te,[L,O,N,B.yy,ne[1],C,S].concat(I)),typeof pe<"u")return pe;ce&&(k=k.slice(0,-1*ce*2),C=C.slice(0,-1*ce),S=S.slice(0,-1*ce)),k.push(this.productions_[ne[1]][0]),C.push(te.$),S.push(te._$),ue=E[k[k.length-2]][k[k.length-1]],k.push(ue);break;case 3:return!0}}return!0},"parse")},m=(function(){var x={EOF:1,parseError:v(function(T,k){if(this.yy.parser)this.yy.parser.parseError(T,k);else throw new Error(T)},"parseError"),setInput:v(function(b,T){return this.yy=T||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var T=b.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},"input"),unput:v(function(b){var T=b.length,k=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===w.length?this.yylloc.first_column:0)+w[w.length-k.length].length-k[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(b){this.unput(this.match.slice(b))},"less"),pastInput:v(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var b=this.pastInput(),T=new Array(b.length+1).join("-");return b+this.upcomingInput()+` +`+T+"^"},"showPosition"),test_match:v(function(b,T){var k,w,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),w=b[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,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(b[0].length),this.matched+=b[0],k=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var S in C)this[S]=C[S];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,T,k,w;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),S=0;ST[0].length)){if(T=k,w=S,this.options.backtrack_lexer){if(b=this.test_match(k,C[S]),b!==!1)return b;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(b=this.test_match(T,C[w]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var T=this.next();return T||this.lex()},"lex"),begin:v(function(T){this.conditionStack.push(T)},"begin"),popState:v(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:v(function(T){this.begin(T)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(T,k,w,C){var S=C;switch(w){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return x})();g.lexer=m;function y(){this.yy={}}return v(y,"Parser"),y.prototype=g,g.Parser=y,new y})();EX.parser=EX;g6t=EX,m6t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{v(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,pr()}getRoot(){return this.root}addNode(e,t){let r=vt.sanitizeText(t,ze());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],$r(r);return}this.baseLevel??=e;let n=e-this.baseLevel+1;for(n<=0&&(n=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=n;)this.stack.pop();let i=this.stack[this.stack.length-1].node,a={text:r,children:[]};i.children.push(a),this.stack.push({level:n,node:a})}getAccTitle(){return Lr()}setAccTitle(e){Ar(e)}getAccDescription(){return Mr()}setAccDescription(e){Ir(e)}getDiagramTitle(){return Dr()}setDiagramTitle(e){$r(e)}},y6t=14,Ix=250,v6t=30,x6t=60,b6t=5,SOe=82*Math.PI/180,bOe=Math.cos(SOe),TOe=Math.sin(SOe),wOe=v((e,t,r)=>{let n=e.node().getBBox(),i=n.width+t*2,a=n.height+t*2;Vr(e,a,i,r),e.attr("viewBox",`${n.x-t} ${n.y-t} ${i} ${a}`)},"applyPaddedViewBox"),T6t=v((e,t,r,n)=>{let a=n.db.getRoot();if(!a)return;let s=ze(),{look:o,handDrawnSeed:l,themeVariables:u}=s,h=fo(s.fontSize)[0]??y6t,f=o==="handDrawn",d=a.children??[],p=s.ishikawa?.diagramPadding??20,g=s.ishikawa?.useMaxWidth??!1,m=xn(t),y=m.append("g").attr("class","ishikawa"),x=f?st.svg(m.node()):void 0,b=x?{roughSvg:x,seed:l??0,lineColor:u?.lineColor??"#333",fillColor:u?.mainBkg??"#fff"}:void 0,T=`ishikawa-arrow-${t}`;f||y.append("defs").append("marker").attr("id",T).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let k=0,w=Ix,C=f?void 0:Mx(y,k,w,k,w,"ishikawa-spine");if(w6t(y,k,w,a.text,h,b),!d.length){f&&Mx(y,k,w,k,w,"ishikawa-spine",b),wOe(m,p,g);return}k-=20;let S=d.filter((M,B)=>B%2===0),E=d.filter((M,B)=>B%2===1),L=COe(S),N=COe(E),O=L.total+N.total,R=Ix,_=Ix;if(O>0){let M=Ix*2,B=Ix*.3;R=Math.max(B,M*(L.total/O)),_=Math.max(B,M*(N.total/O))}let D=h*2;R=Math.max(R,L.max*D),_=Math.max(_,N.max*D),w=Math.max(R,Ix),C&&C.attr("y1",w).attr("y2",w),y.select(".ishikawa-head-group").attr("transform",`translate(0,${w})`);let I=Math.ceil(d.length/2);for(let M=0;MMath.min(P,$.getBBox().x),1/0)}if(f)Mx(y,k,w,0,w,"ishikawa-spine",b);else{C.attr("x1",k);let M=`url(#${T})`;y.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",M)}wOe(m,p,g)},"draw"),COe=v(e=>{let t=v(r=>r.children.reduce((n,i)=>n+1+t(i),0),"countDescendants");return e.reduce((r,n)=>{let i=t(n);return r.total+=i,r.max=Math.max(r.max,i),r},{total:0,max:0})},"sideStats"),w6t=v((e,t,r,n,i,a)=>{let s=Math.max(6,Math.floor(110/(i*.6))),o=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${t},${r})`),l=Z7(o,EOe(n,s),0,0,"ishikawa-head-label","start",i),u=l.node().getBBox(),h=Math.max(60,u.width+6),f=Math.max(40,u.height*2+40),d=`M 0 ${-f/2} L 0 ${f/2} Q ${h*2.4} 0 0 ${-f/2} Z`;if(a){let p=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>p,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);l.attr("transform",`translate(${(h-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),C6t=v((e,t)=>{let r=[],n=[],i=v((a,s,o)=>{let l=t===-1?[...a].reverse():a;for(let u of l){let h=r.length,f=u.children??[];r.push({depth:o,text:EOe(u.text,15),parentIndex:s,childCount:f.length}),o%2===0?(n.push(h),f.length&&i(f,h,o+1)):(f.length&&i(f,h,o+1),n.push(h))}},"walk");return i(e,-1,2),{entries:r,yOrder:n}},"flattenTree"),k6t=v((e,t,r,n,i,a,s)=>{let o=e.append("g").attr("class","ishikawa-label-group"),u=Z7(o,t,r,n+11*i,"ishikawa-label cause","middle",a).node().getBBox();if(s){let h=s.roughSvg.rectangle(u.x-20,u.y-2,u.width+40,u.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});o.insert(()=>h,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",u.x-20).attr("y",u.y-2).attr("width",u.width+40).attr("height",u.height+4)},"drawCauseLabel"),SX=v((e,t,r,n,i,a)=>{let s=Math.sqrt(n*n+i*i);if(s===0)return;let o=n/s,l=i/s,u=6,h=-l*u,f=o*u,d=t,p=r,g=`M ${d} ${p} L ${d-o*u*2+h} ${p-l*u*2+f} L ${d-o*u*2-h} ${p-l*u*2-f} Z`,m=a.roughSvg.path(g,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},"drawArrowMarker"),S6t=v((e,t,r,n,i,a,s,o)=>{let l=t.children??[],u=a*(l.length?1:.2),h=-bOe*u,f=TOe*u*i,d=r+h,p=n+f;if(Mx(e,r,n,d,p,"ishikawa-branch",o),o&&SX(e,r,n,r-d,n-p,o),k6t(e,t.text,d,p,i,s,o),!l.length)return;let{entries:g,yOrder:m}=C6t(l,i),y=g.length,x=new Array(y);for(let[C,S]of m.entries())x[S]=n+f*((C+1)/(y+1));let b=new Map;b.set(-1,{x0:r,y0:n,x1:d,y1:p,childCount:l.length,childrenDrawn:0});let T=-bOe,k=TOe*i,w=i<0?"ishikawa-label up":"ishikawa-label down";for(let[C,S]of g.entries()){let E=x[C],L=b.get(S.parentIndex),N=e.append("g").attr("class","ishikawa-sub-group"),O=0,R=0,_=0;if(S.depth%2===0){let D=L.y1-L.y0;O=kOe(L.x0,L.x1,D?(E-L.y0)/D:.5),R=E,_=O-(S.childCount>0?x6t+S.childCount*b6t:v6t),Mx(N,O,E,_,E,"ishikawa-sub-branch",o),o&&SX(N,O,E,1,0,o),Z7(N,S.text,_,E,"ishikawa-label align","end",s)}else{let D=L.childrenDrawn++;O=kOe(L.x0,L.x1,(L.childCount-D)/(L.childCount+1)),R=L.y0,_=O+T*((E-R)/k),Mx(N,O,R,_,E,"ishikawa-sub-branch",o),o&&SX(N,O,R,O-_,R-E,o),Z7(N,S.text,_,E,w,"end",s)}S.childCount>0&&b.set(C,{x0:O,y0:R,x1:_,y1:E,childCount:S.childCount,childrenDrawn:0})}},"drawBranch"),E6t=v(e=>e.split(/|\n/),"splitLines"),EOe=v((e,t)=>{if(e.length<=t)return e;let r=[];for(let n of e.split(/\s+/)){let i=r.length-1;i>=0&&r[i].length+1+n.length<=t?r[i]+=" "+n:r.push(n)}return r.join(` +`)},"wrapText"),Z7=v((e,t,r,n,i,a,s)=>{let o=E6t(t),l=s*1.05,u=e.append("text").attr("class",i).attr("text-anchor",a).attr("x",r).attr("y",n-(o.length-1)*l/2);for(let[h,f]of o.entries())u.append("tspan").attr("x",r).attr("dy",h===0?0:l).text(f);return u},"drawMultilineText"),kOe=v((e,t,r)=>e+(t-e)*r,"lerp"),Mx=v((e,t,r,n,i,a,s)=>{if(s){let o=s.roughSvg.line(t,r,n,i,{roughness:1.5,seed:s.seed,stroke:s.lineColor,strokeWidth:2});e.append(()=>o).attr("class",a);return}return e.append("line").attr("class",a).attr("x1",t).attr("y1",r).attr("x2",n).attr("y2",i)},"drawLine"),A6t={draw:T6t},_6t=v(e=>` .ishikawa .ishikawa-spine, .ishikawa .ishikawa-branch, .ishikawa .ishikawa-sub-branch { @@ -3207,18 +3296,18 @@ Expecting `+xe.join(", ")+", got '"+(this.terminals_[U]||U)+"'":fe="Parse error .ishikawa .ishikawa-label.down { dominant-baseline: hanging; } -`,"getStyles"),u5t=c5t,h5t={parser:KCt,get db(){return new ZCt},renderer:l5t,styles:u5t}});function h7(e,t){let r=d5t(e),i=r.filter(o=>f5t(o,e)),n=0,a=0,s=[];if(i.length>1){let o=gLe(i);for(let u=0;uh.angle-u.angle);let l=i[i.length-1];for(let u=0;ug.radius*2&&(T=g.radius*2),(d==null||d.width>T)&&(d={circle:g,width:T,p1:h,p2:l,large:T>g.radius,sweep:!0})}d!=null&&(s.push(d),n+=uW(d.circle.radius,d.width),l=h)}}else{let o=e[0];for(let u=1;uMath.abs(o.radius-e[u].radius)){l=!0;break}l?n=a=0:(n=o.radius*o.radius*Math.PI,s.push({circle:o,p1:{x:o.x,y:o.y+o.radius},p2:{x:o.x-1e-10,y:o.y+o.radius},width:o.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=n+a,t.arcArea=n,t.polygonArea=a,t.arcs=s,t.innerPoints=i,t.intersectionPoints=r),n+a}function f5t(e,t){return t.every(r=>Zs(e,r)=e+t)return 0;if(r<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let i=e-(r*r-t*t+e*e)/(2*r),n=t-(r*r-e*e+t*t)/(2*r);return uW(e,i)+uW(t,n)}function pLe(e,t){let r=Zs(e,t),i=e.radius,n=t.radius;if(r>=i+n||r<=Math.abs(i-n))return[];let a=(i*i-n*n+r*r)/(2*r),s=Math.sqrt(i*i-a*a),o=e.x+a*(t.x-e.x)/r,l=e.y+a*(t.y-e.y)/r,u=-(t.y-e.y)*(s/r),h=-(t.x-e.x)*(s/r);return[{x:o+u,y:l-h},{x:o-u,y:l+h}]}function gLe(e){let t={x:0,y:0};for(let r of e)t.x+=r.x,t.y+=r.y;return t.x/=e.length,t.y/=e.length,t}function p5t(e,t,r,i){i=i||{};let n=i.maxIterations||100,a=i.tolerance||1e-10,s=e(t),o=e(r),l=r-t;if(s*o>0)throw"Initial bisect points must have opposite signs";if(s===0)return t;if(o===0)return r;for(let u=0;u=0&&(t=h),Math.abs(l)hW(t))}function gv(e,t){let r=0;for(let i=0;iw.fx-k.fx,v=t.slice(),x=t.slice(),T=t.slice(),C=t.slice();for(let w=0;w{let N=A.slice();return N.fx=A.fx,N.id=A.id,N});E.sort((A,N)=>A.id-N.id),r.history.push({x:g[0].slice(),fx:g[0].fx,simplex:E})}d=0;for(let E=0;E=g[p-1].fx){let E=!1;if(x.fx>k.fx?(ef(T,1+h,v,-h,k),T.fx=e(T),T.fx=1)break;for(let A=1;Ao+a*n*l||u>=y)m=n;else{if(Math.abs(f)<=-s*l)return n;f*(m-g)>=0&&(m=g),g=n,y=u}return 0}for(let g=0;g<10;++g){if(ef(i.x,1,r.x,n,t),u=i.fx=e(i.x,i.fxprime),f=gv(i.fxprime,t),u>o+a*n*l||g&&u>=h)return p(d,n,h);if(Math.abs(f)<=-s*l)return n;if(f>=0)return p(n,d,u);h=u,d=n,n*=2}return n}function m5t(e,t,r){let i={x:t.slice(),fx:0,fxprime:t.slice()},n={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),s,o,l=1,u;r=r||{},u=r.maxIterations||t.length*20,i.fx=e(i.x,i.fxprime),s=i.fxprime.slice(),dW(s,i.fxprime,-1);for(let h=0;h{let f={};for(let d=0;dmW(e,t,i)-r,0,e+t)}function y5t(e,t={}){let r=t.distinct,i=e.map(o=>Object.assign({},o));function n(o){return o.join(";")}if(r){let o=new Map;for(let l of i)for(let u=0;uo===l?0:oa.sets.length===2).forEach(a=>{let s=r[a.sets[0]],o=r[a.sets[1]],l=Math.sqrt(t[s].size/Math.PI),u=Math.sqrt(t[o].size/Math.PI),h=pW(l,u,a.size);i[s][o]=i[o][s]=h;let f=0;a.size+1e-10>=Math.min(t[s].size,t[o].size)?f=1:a.size<=1e-10&&(f=-1),n[s][o]=n[o][s]=f}),{distances:i,constraints:n}}function b5t(e,t,r,i){for(let a=0;a0&&g<=f||d<0&&g>=f||(n+=2*m*m,t[2*a]+=4*m*(s-u),t[2*a+1]+=4*m*(o-h),t[2*l]+=4*m*(u-s),t[2*l+1]+=4*m*(h-o))}}return n}function x5t(e,t={}){let r=w5t(e,t),i=t.lossFunction||mv;if(e.length>=8){let n=T5t(e,t),a=i(n,e),s=i(r,e);a+1e-8d.map(p=>p/o));let l=(d,p)=>b5t(d,p,a,s),u=null;for(let d=0;df.sets.length===2);for(let f of e){let d=f.weight!=null?f.weight:1,p=f.sets[0],g=f.sets[1];f.size+vLe>=Math.min(i[p].size,i[g].size)&&(d=0),n[p].push({set:g,size:f.size,weight:d}),n[g].push({set:p,size:f.size,weight:d})}let a=[];Object.keys(n).forEach(f=>{let d=0;for(let p=0;pe[s]));let a=i.weight!=null?i.weight:1;r+=a*(n-i.size)*(n-i.size)}return r}function bLe(e,t){let r=0;for(let i of t){if(i.sets.length===1)continue;let n;if(i.sets.length===2){let o=e[i.sets[0]],l=e[i.sets[1]];n=mW(o.radius,l.radius,Zs(o,l))}else n=h7(i.sets.map(o=>e[o]));let a=i.weight!=null?i.weight:1,s=Math.log((n+1)/(i.size+1));r+=a*s*s}return r}function k5t(e,t,r){if(r==null?e.sort((n,a)=>a.radius-n.radius):e.sort(r),e.length>0){let n=e[0].x,a=e[0].y;for(let s of e)s.x-=n,s.y-=a}if(e.length===2&&Zs(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,a=Math.cos(n),s=Math.sin(n);for(let o of e){let l=o.x,u=o.y;o.x=a*l-s*u,o.y=s*l+a*u}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let a=e[1].y/(1e-10+e[1].x);for(let s of e){var i=(s.x+a*s.y)/(1+a*a);s.x=2*i-s.x,s.y=2*i*a-s.y}}}}function C5t(e){e.forEach(n=>{n.parent=n});function t(n){return n.parent!==n&&(n.parent=t(n.parent)),n.parent}function r(n,a){let s=t(n),o=t(a);s.parent=o}for(let n=0;n{delete n.parent}),Array.from(i.values())}function gW(e){let t=r=>{let i=e.reduce((a,s)=>Math.max(a,s[r]+s.radius),Number.NEGATIVE_INFINITY),n=e.reduce((a,s)=>Math.min(a,s[r]-s.radius),Number.POSITIVE_INFINITY);return{max:i,min:n}};return{xRange:t("x"),yRange:t("y")}}function xLe(e,t,r){t==null&&(t=Math.PI/2);let i=kLe(e).map(u=>Object.assign({},u)),n=C5t(i);for(let u of n){k5t(u,t,r);let h=gW(u);u.size=(h.xRange.max-h.xRange.min)*(h.yRange.max-h.yRange.min),u.bounds=h}n.sort((u,h)=>h.size-u.size),i=n[0];let a=i.bounds,s=(a.xRange.max-a.xRange.min)/50;function o(u,h,f){if(!u)return;let d=u.bounds,p,g;if(h)p=a.xRange.max-d.xRange.min+s;else{p=a.xRange.max-d.xRange.max;let m=(d.xRange.max-d.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;m<0&&(p+=m)}if(f)g=a.yRange.max-d.yRange.min+s;else{g=a.yRange.max-d.yRange.max;let m=(d.yRange.max-d.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;m<0&&(g+=m)}for(let m of u)m.x+=p,m.y+=g,i.push(m)}let l=1;for(;l({radius:h*p.radius,x:i+f+(p.x-s.min)*h,y:i+d+(p.y-o.min)*h,setid:p.setid})))}function wLe(e){let t={};for(let r of e)t[r.setid]=r;return t}function kLe(e){return Object.keys(e).map(r=>Object.assign(e[r],{setid:r}))}function CLe(e={}){let t=!1,r=600,i=350,n=15,a=1e3,s=Math.PI/2,o=!0,l=null,u=!0,h=!0,f=null,d=null,p=!1,g=null,m=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,y={},v=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],x=0,T=function(E){if(E in y)return y[E];var A=y[E]=v[x];return x+=1,x>=v.length&&(x=0),A},C=yLe,w=mv;function k(E){let A=E.datum(),N=new Set;A.forEach(Y=>{Y.size==0&&Y.sets.length==1&&N.add(Y.sets[0])}),A=A.filter(Y=>!Y.sets.some(se=>N.has(se)));let P={},O={};if(A.length>0){let Y=C(A,{lossFunction:w,distinct:p});o&&(Y=xLe(Y,s,d)),P=TLe(Y,r,i,n,l),O=ELe(P,A,m)}let L={};A.forEach(Y=>{Y.label&&(L[Y.sets]=Y.label)});function _(Y){if(Y.sets in L)return L[Y.sets];if(Y.sets.length==1)return""+Y.sets[0]}E.selectAll("svg").data([P]).enter().append("svg");let R=E.select("svg");t?R.attr("viewBox",`0 0 ${r} ${i}`):R.attr("width",r).attr("height",i);let D={},I=!1;R.selectAll(".venn-area path").each(function(Y){let se=this.getAttribute("d");Y.sets.length==1&&se&&!p&&(I=!0,D[Y.sets[0]]=A5t(se))});function B(Y){return se=>{let J=Y.sets.map(re=>{let ie=D[re],te=P[re];return ie||(ie={x:r/2,y:i/2,radius:1}),te||(te={x:r/2,y:i/2,radius:1}),{x:ie.x*(1-se)+te.x*se,y:ie.y*(1-se)+te.y*se,radius:ie.radius*(1-se)+te.radius*se}});return dLe(J,g)}}let M=R.selectAll(".venn-area").data(A,Y=>Y.sets),F=M.enter().append("g").attr("class",Y=>`venn-area venn-${Y.sets.length==1?"circle":"intersection"}${Y.colour||Y.color?" venn-coloured":""}`).attr("data-venn-sets",Y=>Y.sets.join("_")),z=F.append("path"),$=F.append("text").attr("class","label").text(Y=>_(Y)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",i/2);h&&(z.style("fill-opacity","0").filter(Y=>Y.sets.length==1).style("fill",Y=>Y.colour?Y.colour:Y.color?Y.color:T(Y.sets)).style("fill-opacity",".25"),$.style("fill",Y=>Y.colour||Y.color?"#FFF":e.textFill?e.textFill:Y.sets.length==1?T(Y.sets):"#444"));function G(Y){return typeof Y.transition=="function"?Y.transition("venn").duration(a):Y}let U=E;I&&typeof U.transition=="function"?(U=G(E),U.selectAll("path").attrTween("d",B)):U.selectAll("path").attr("d",Y=>dLe(Y.sets.map(se=>P[se])),g);let j=U.selectAll("text").filter(Y=>Y.sets in O).text(Y=>_(Y)).attr("x",Y=>Math.floor(O[Y.sets].x)).attr("y",Y=>Math.floor(O[Y.sets].y));u&&(I?"on"in j?j.on("end",lW(P,_)):j.each("end",lW(P,_)):j.each(lW(P,_)));let H=G(M.exit()).remove();typeof M.transition=="function"&&H.selectAll("path").attrTween("d",B);let Q=H.selectAll("text").attr("x",r/2).attr("y",i/2);return f!==null&&($.style("font-size","0px"),j.style("font-size",f),Q.style("font-size","0px")),{circles:P,textCentres:O,nodes:M,enter:F,update:U,exit:H}}return k.wrap=function(E){return arguments.length?(u=E,k):u},k.useViewBox=function(){return t=!0,k},k.width=function(E){return arguments.length?(r=E,k):r},k.height=function(E){return arguments.length?(i=E,k):i},k.padding=function(E){return arguments.length?(n=E,k):n},k.distinct=function(E){return arguments.length?(p=E,k):p},k.colours=function(E){return arguments.length?(T=E,k):T},k.colors=function(E){return arguments.length?(T=E,k):T},k.fontSize=function(E){return arguments.length?(f=E,k):f},k.round=function(E){return arguments.length?(g=E,k):g},k.duration=function(E){return arguments.length?(a=E,k):a},k.layoutFunction=function(E){return arguments.length?(C=E,k):C},k.normalize=function(E){return arguments.length?(o=E,k):o},k.scaleToFit=function(E){return arguments.length?(l=E,k):l},k.styled=function(E){return arguments.length?(h=E,k):h},k.orientation=function(E){return arguments.length?(s=E,k):s},k.orientationOrder=function(E){return arguments.length?(d=E,k):d},k.lossFunction=function(E){return arguments.length?(w=E==="default"?mv:E==="logRatio"?bLe:E,k):w},k}function lW(e,t){return function(r){let i=this,n=e[r.sets[0]].radius||50,a=t(r)||"",s=a.split(/\s+/).reverse(),l=(a.length+s.length)/3,u=s.pop(),h=[u],f=0,d=1.1;i.textContent=null;let p=[];function g(T){let C=i.ownerDocument.createElementNS(i.namespaceURI,"tspan");return C.textContent=T,p.push(C),i.append(C),C}let m=g(u);for(;u=s.pop(),!!u;){h.push(u);let T=h.join(" ");m.textContent=T,T.length>l&&m.getComputedTextLength()>n&&(h.pop(),m.textContent=h.join(" "),h=[u],m=g(u),f++)}let y=.35-f*d/2,v=i.getAttribute("x"),x=i.getAttribute("y");p.forEach((T,C)=>{T.setAttribute("x",v),T.setAttribute("y",x),T.setAttribute("dy",`${y+C*d}em`)})}}function cW(e,t,r){let i=t[0].radius-Zs(t[0],e);for(let n=1;n=a&&(n=i[h],a=f)}let s=mLe(h=>-1*cW({x:h[0],y:h[1]},e,t),[n.x,n.y],{maxIterations:500,minErrorDelta:1e-10}).x,o={x:r?0:s[0],y:s[1]},l=!0;for(let h of e)if(Zs(o,h)>h.radius){l=!1;break}for(let h of t)if(Zs(o,h)h.p1))}function S5t(e){let t={},r=Object.keys(e);for(let i of r)t[i]=[];for(let i=0;i0&&console.log("WARNING: area "+s+" not represented on screen")}return i}function E5t(e,t,r){let i=[];return i.push(` -M`,e,t),i.push(` -m`,-r,0),i.push(` -a`,r,r,0,1,0,r*2,0),i.push(` -a`,r,r,0,1,0,-r*2,0),i.join(" ")}function A5t(e){let t=e.split(" ");return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function ALe(e){if(e.length===0)return[];let t={};return h7(e,t),t.arcs}function _Le(e,t){if(e.length===0)return"M 0 0";let r=Math.pow(10,t||0),i=t!=null?a=>Math.round(a*r)/r:a=>a;if(e.length==1){let a=e[0].circle;return E5t(i(a.x),i(a.y),i(a.radius))}let n=[` -M`,i(e[0].p2.x),i(e[0].p2.y)];for(let a of e){let s=i(a.circle.radius);n.push(` -A`,s,s,0,a.large?1:0,a.sweep?1:0,i(a.p1.x),i(a.p1.y))}return n.join(" ")}function dLe(e,t){return _Le(ALe(e),t)}function LLe(e,t={}){let{lossFunction:r,layoutFunction:i=yLe,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:u=15,scaleToFit:h=!1,symmetricalTextCentre:f=!1,distinct:d,round:p=2}=t,g=i(e,{lossFunction:r==="default"||!r?mv:r==="logRatio"?bLe:r,distinct:d});n&&(g=xLe(g,a,s));let m=TLe(g,o,l,u,h),y=ELe(m,e,f),v=new Map(Object.keys(m).map(C=>[C,{set:C,x:m[C].x,y:m[C].y,radius:m[C].radius}])),x=e.map(C=>{let w=C.sets.map(A=>v.get(A)),k=ALe(w),E=_Le(k,p);return{circles:w,arcs:k,path:E,area:C,has:new Set(C.sets)}});function T(C){let w="";for(let k of x)k.has.size>C.length&&C.every(E=>k.has.has(E))&&(w+=" "+k.path);return w}return x.map(({circles:C,arcs:w,path:k,area:E})=>({data:E,text:y[E.sets],circles:C,arcs:w,path:k,distinctPath:k+T(E.sets)}))}var vLe,RLe=q(()=>{vLe=1e-10});var MLe={};Lr(MLe,{diagram:()=>j5t});function ILe(){return Yr(G5t,It().venn)}function DLe(e){let t=new Map;for(let r of e){let i=r.targets.join("|"),n=t.get(i);n?Object.assign(n,r.styles):t.set(i,{...r.styles})}return t}function ip(e){return e.join("|")}function NLe(e,t,r,i,n,a){let s=e?.useDebugLayout??!1,l=r.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(let h of i){let f=ip(h.sets),d=u.get(f);d?d.push(h):u.set(f,[h])}for(let[h,f]of u.entries()){let d=t.get(h);if(!d?.text)continue;let p=d.text.x,g=d.text.y,m=Math.min(...d.circles.map(R=>R.radius)),y=Math.min(...d.circles.map(R=>R.radius-Math.hypot(p-R.x,g-R.y))),v=Number.isFinite(y)?Math.max(0,y):0;v===0&&Number.isFinite(m)&&(v=m*.6);let x=l.append("g").attr("class","venn-text-area").attr("font-size",`${40*n}px`);s&&x.append("circle").attr("class","venn-text-debug-circle").attr("cx",p).attr("cy",g).attr("r",v).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*n).attr("stroke-dasharray",`${6*n} ${4*n}`);let T=Math.max(80*n,v*2*.95),C=Math.max(60*n,v*2*.95),E=(d.data.label&&d.data.label.length>0?Math.min(32*n,v*.25):0)+(f.length<=2?30*n:0),A=p-T/2,N=g-C/2+E,P=Math.max(1,Math.ceil(Math.sqrt(f.length))),O=Math.max(1,Math.ceil(f.length/P)),L=T/P,_=C/O;for(let[R,D]of f.entries()){let I=R%P,B=Math.floor(R/P),M=A+L*(I+.5),F=N+_*(B+.5);s&&x.append("rect").attr("class","venn-text-debug-cell").attr("x",A+L*I).attr("y",N+_*B).attr("width",L).attr("height",_).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*n).attr("stroke-dasharray",`${4*n} ${3*n}`);let z=L*.9,$=_*.9,G=x.append("foreignObject").attr("class","venn-text-node-fo").attr("width",z).attr("height",$).attr("x",M-z/2).attr("y",F-$/2).attr("overflow","visible"),U=a.get(D.id)?.color,j=G.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(D.label??D.id);U&&j.style("color",U)}}}var yW,L5t,vW,bW,xW,TW,wW,kW,R5t,I5t,zw,D5t,N5t,M5t,O5t,f7,P5t,B5t,F5t,$5t,z5t,G5t,q5t,V5t,W5t,U5t,H5t,Y5t,j5t,OLe=q(()=>{Ja();$r();Er();er();Ar();Sn();RLe();qt();yW=(function(){var e=b(function(x,T,C,w){for(C=C||{},w=x.length;w--;C[x[w]]=T);return C},"o"),t=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],n=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],o=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],h=[1,56],f=[1,58],d=[1,59],p=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],m={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:b(function(T,C,w,k,E,A,N){var P=A.length-1;switch(E){case 1:return A[P-1];case 2:case 3:case 4:this.$=[];break;case 5:A[P-1].push(A[P]),this.$=A[P-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=A[P];break;case 8:k.setDiagramTitle(A[P].substr(6)),this.$=A[P].substr(6);break;case 9:k.addSubsetData([A[P]],void 0,void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 10:k.addSubsetData([A[P-1]],A[P],void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 11:k.addSubsetData([A[P-2]],void 0,parseFloat(A[P])),k.setIndentMode&&k.setIndentMode(!0);break;case 12:k.addSubsetData([A[P-3]],A[P-2],parseFloat(A[P])),k.setIndentMode&&k.setIndentMode(!0);break;case 13:if(A[P].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[P]),k.addSubsetData(A[P],void 0,void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 14:if(A[P-1].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[P-1]),k.addSubsetData(A[P-1],A[P],void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 15:if(A[P-2].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[P-2]),k.addSubsetData(A[P-2],void 0,parseFloat(A[P])),k.setIndentMode&&k.setIndentMode(!0);break;case 16:if(A[P-3].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[P-3]),k.addSubsetData(A[P-3],A[P-2],parseFloat(A[P])),k.setIndentMode&&k.setIndentMode(!0);break;case 17:case 18:case 19:k.addTextData(A[P-1],A[P],void 0);break;case 20:case 21:k.addTextData(A[P-2],A[P-1],A[P]);break;case 23:k.addStyleData(A[P-1],A[P]);break;case 24:case 25:case 26:var O=k.getCurrentSets();if(!O)throw new Error("text requires set");k.addTextData(O,A[P],void 0);break;case 27:case 28:var O=k.getCurrentSets();if(!O)throw new Error("text requires set");k.addTextData(O,A[P-1],A[P]);break;case 29:case 41:this.$=[A[P]];break;case 30:case 42:this.$=[...A[P-2],A[P]];break;case 31:this.$=[A[P-2],A[P]];break;case 33:this.$=A[P].join(" ");break;case 34:this.$=[A[P]];break;case 35:A[P-1].push(A[P]),this.$=A[P-1];break;case 43:case 44:this.$=A[P];break}},"anonymous"),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(r,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),e(r,[2,8]),{13:16,20:i,21:n},{13:20,18:19,20:i,21:n},{13:20,18:21,20:i,21:n},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:n},e(r,[2,9],{14:[1,27],15:[1,28]}),e(a,[2,43]),e(a,[2,44]),e(r,[2,13],{14:[1,29],15:[1,30],27:s}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},e(r,[2,22]),e(r,[2,24],{14:[1,35]}),e(r,[2,25],{14:[1,36]}),e(r,[2,26]),{20:o,25:37,26:38,27:s},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:n},e(r,[2,17],{14:[1,45]}),e(r,[2,18],{14:[1,46]}),e(r,[2,19]),e(r,[2,27]),e(r,[2,28]),e(r,[2,23],{27:[1,47]}),e(l,[2,29]),{15:[1,48]},{16:[1,49]},e(r,[2,11]),{16:[1,50]},e(r,[2,15]),e(a,[2,42]),e(r,[2,20]),e(r,[2,21]),{20:o,26:51},{16:u,20:h,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:p},e(r,[2,12]),e(r,[2,16]),e(l,[2,30]),e(l,[2,31]),e(l,[2,32]),e(l,[2,33],{30:61,16:u,20:h,31:f,32:d,33:p}),e(g,[2,34]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),e(g,[2,39]),e(g,[2,40]),e(g,[2,35])],defaultActions:{6:[2,1]},parseError:b(function(T,C){if(C.recoverable)this.trace(T);else{var w=new Error(T);throw w.hash=C,w}},"parseError"),parse:b(function(T){var C=this,w=[0],k=[],E=[null],A=[],N=this.table,P="",O=0,L=0,_=0,R=2,D=1,I=A.slice.call(arguments,1),B=Object.create(this.lexer),M={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(M.yy[F]=this.yy[F]);B.setInput(T,M.yy),M.yy.lexer=B,M.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var z=B.yylloc;A.push(z);var $=B.options&&B.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function G(Me){w.length=w.length-2*Me,E.length=E.length-Me,A.length=A.length-Me}b(G,"popStack");function U(){var Me;return Me=k.pop()||B.lex()||D,typeof Me!="number"&&(Me instanceof Array&&(k=Me,Me=k.pop()),Me=C.symbols_[Me]||Me),Me}b(U,"lex");for(var j,H,Q,Y,se,J,re={},ie,te,xe,fe;;){if(Q=w[w.length-1],this.defaultActions[Q]?Y=this.defaultActions[Q]:((j===null||typeof j>"u")&&(j=U()),Y=N[Q]&&N[Q][j]),typeof Y>"u"||!Y.length||!Y[0]){var Se="";fe=[];for(ie in N[Q])this.terminals_[ie]&&ie>R&&fe.push("'"+this.terminals_[ie]+"'");B.showPosition?Se="Parse error on line "+(O+1)+`: +`,"getStyles"),R6t=_6t,L6t={parser:g6t,get db(){return new m6t},renderer:A6t,styles:R6t}});function Q7(e,t){let r=M6t(e),n=r.filter(o=>I6t(o,e)),i=0,a=0,s=[];if(n.length>1){let o=MOe(n);for(let u=0;uh.angle-u.angle);let l=n[n.length-1];for(let u=0;ug.radius*2&&(T=g.radius*2),(d==null||d.width>T)&&(d={circle:g,width:T,p1:h,p2:l,large:T>g.radius,sweep:!0})}d!=null&&(s.push(d),i+=RX(d.circle.radius,d.width),l=h)}}else{let o=e[0];for(let u=1;uMath.abs(o.radius-e[u].radius)){l=!0;break}l?i=a=0:(i=o.radius*o.radius*Math.PI,s.push({circle:o,p1:{x:o.x,y:o.y+o.radius},p2:{x:o.x-1e-10,y:o.y+o.radius},width:o.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=s,t.innerPoints=n,t.intersectionPoints=r),i+a}function I6t(e,t){return t.every(r=>$o(e,r)=e+t)return 0;if(r<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let n=e-(r*r-t*t+e*e)/(2*r),i=t-(r*r-e*e+t*t)/(2*r);return RX(e,n)+RX(t,i)}function IOe(e,t){let r=$o(e,t),n=e.radius,i=t.radius;if(r>=n+i||r<=Math.abs(n-i))return[];let a=(n*n-i*i+r*r)/(2*r),s=Math.sqrt(n*n-a*a),o=e.x+a*(t.x-e.x)/r,l=e.y+a*(t.y-e.y)/r,u=-(t.y-e.y)*(s/r),h=-(t.x-e.x)*(s/r);return[{x:o+u,y:l-h},{x:o-u,y:l+h}]}function MOe(e){let t={x:0,y:0};for(let r of e)t.x+=r.x,t.y+=r.y;return t.x/=e.length,t.y/=e.length,t}function D6t(e,t,r,n){n=n||{};let i=n.maxIterations||100,a=n.tolerance||1e-10,s=e(t),o=e(r),l=r-t;if(s*o>0)throw"Initial bisect points must have opposite signs";if(s===0)return t;if(o===0)return r;for(let u=0;u=0&&(t=h),Math.abs(l)LX(t))}function Dx(e,t){let r=0;for(let n=0;nw.fx-C.fx,x=t.slice(),b=t.slice(),T=t.slice(),k=t.slice();for(let w=0;w{let L=E.slice();return L.fx=E.fx,L.id=E.id,L});S.sort((E,L)=>E.id-L.id),r.history.push({x:g[0].slice(),fx:g[0].fx,simplex:S})}d=0;for(let S=0;S=g[p-1].fx){let S=!1;if(b.fx>C.fx?($f(T,1+h,x,-h,C),T.fx=e(T),T.fx=1)break;for(let E=1;Eo+a*i*l||u>=y)m=i;else{if(Math.abs(f)<=-s*l)return i;f*(m-g)>=0&&(m=g),g=i,y=u}return 0}for(let g=0;g<10;++g){if($f(n.x,1,r.x,i,t),u=n.fx=e(n.x,n.fxprime),f=Dx(n.fxprime,t),u>o+a*i*l||g&&u>=h)return p(d,i,h);if(Math.abs(f)<=-s*l)return i;if(f>=0)return p(i,d,u);h=u,d=i,i*=2}return i}function O6t(e,t,r){let n={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),s,o,l=1,u;r=r||{},u=r.maxIterations||t.length*20,n.fx=e(n.x,n.fxprime),s=n.fxprime.slice(),MX(s,n.fxprime,-1);for(let h=0;h{let f={};for(let d=0;dOX(e,t,n)-r,0,e+t)}function P6t(e,t={}){let r=t.distinct,n=e.map(o=>Object.assign({},o));function i(o){return o.join(";")}if(r){let o=new Map;for(let l of n)for(let u=0;uo===l?0:oa.sets.length===2).forEach(a=>{let s=r[a.sets[0]],o=r[a.sets[1]],l=Math.sqrt(t[s].size/Math.PI),u=Math.sqrt(t[o].size/Math.PI),h=DX(l,u,a.size);n[s][o]=n[o][s]=h;let f=0;a.size+1e-10>=Math.min(t[s].size,t[o].size)?f=1:a.size<=1e-10&&(f=-1),i[s][o]=i[o][s]=f}),{distances:n,constraints:i}}function $6t(e,t,r,n){for(let a=0;a0&&g<=f||d<0&&g>=f||(i+=2*m*m,t[2*a]+=4*m*(s-u),t[2*a+1]+=4*m*(o-h),t[2*l]+=4*m*(u-s),t[2*l+1]+=4*m*(h-o))}}return i}function F6t(e,t={}){let r=G6t(e,t),n=t.lossFunction||Nx;if(e.length>=8){let i=z6t(e,t),a=n(i,e),s=n(r,e);a+1e-8d.map(p=>p/o));let l=(d,p)=>$6t(d,p,a,s),u=null;for(let d=0;df.sets.length===2);for(let f of e){let d=f.weight!=null?f.weight:1,p=f.sets[0],g=f.sets[1];f.size+OOe>=Math.min(n[p].size,n[g].size)&&(d=0),i[p].push({set:g,size:f.size,weight:d}),i[g].push({set:p,size:f.size,weight:d})}let a=[];Object.keys(i).forEach(f=>{let d=0;for(let p=0;pe[s]));let a=n.weight!=null?n.weight:1;r+=a*(i-n.size)*(i-n.size)}return r}function POe(e,t){let r=0;for(let n of t){if(n.sets.length===1)continue;let i;if(n.sets.length===2){let o=e[n.sets[0]],l=e[n.sets[1]];i=OX(o.radius,l.radius,$o(o,l))}else i=Q7(n.sets.map(o=>e[o]));let a=n.weight!=null?n.weight:1,s=Math.log((i+1)/(n.size+1));r+=a*s*s}return r}function q6t(e,t,r){if(r==null?e.sort((i,a)=>a.radius-i.radius):e.sort(r),e.length>0){let i=e[0].x,a=e[0].y;for(let s of e)s.x-=i,s.y-=a}if(e.length===2&&$o(e[0],e[1])1){let i=Math.atan2(e[1].x,e[1].y)-t,a=Math.cos(i),s=Math.sin(i);for(let o of e){let l=o.x,u=o.y;o.x=a*l-s*u,o.y=s*l+a*u}}if(e.length>2){let i=Math.atan2(e[2].x,e[2].y)-t;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){let a=e[1].y/(1e-10+e[1].x);for(let s of e){var n=(s.x+a*s.y)/(1+a*a);s.x=2*n-s.x,s.y=2*n*a-s.y}}}}function V6t(e){e.forEach(i=>{i.parent=i});function t(i){return i.parent!==i&&(i.parent=t(i.parent)),i.parent}function r(i,a){let s=t(i),o=t(a);s.parent=o}for(let i=0;i{delete i.parent}),Array.from(n.values())}function NX(e){let t=r=>{let n=e.reduce((a,s)=>Math.max(a,s[r]+s.radius),Number.NEGATIVE_INFINITY),i=e.reduce((a,s)=>Math.min(a,s[r]-s.radius),Number.POSITIVE_INFINITY);return{max:n,min:i}};return{xRange:t("x"),yRange:t("y")}}function BOe(e,t,r){t==null&&(t=Math.PI/2);let n=zOe(e).map(u=>Object.assign({},u)),i=V6t(n);for(let u of i){q6t(u,t,r);let h=NX(u);u.size=(h.xRange.max-h.xRange.min)*(h.yRange.max-h.yRange.min),u.bounds=h}i.sort((u,h)=>h.size-u.size),n=i[0];let a=n.bounds,s=(a.xRange.max-a.xRange.min)/50;function o(u,h,f){if(!u)return;let d=u.bounds,p,g;if(h)p=a.xRange.max-d.xRange.min+s;else{p=a.xRange.max-d.xRange.max;let m=(d.xRange.max-d.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;m<0&&(p+=m)}if(f)g=a.yRange.max-d.yRange.min+s;else{g=a.yRange.max-d.yRange.max;let m=(d.yRange.max-d.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;m<0&&(g+=m)}for(let m of u)m.x+=p,m.y+=g,n.push(m)}let l=1;for(;l({radius:h*p.radius,x:n+f+(p.x-s.min)*h,y:n+d+(p.y-o.min)*h,setid:p.setid})))}function FOe(e){let t={};for(let r of e)t[r.setid]=r;return t}function zOe(e){return Object.keys(e).map(r=>Object.assign(e[r],{setid:r}))}function GOe(e={}){let t=!1,r=600,n=350,i=15,a=1e3,s=Math.PI/2,o=!0,l=null,u=!0,h=!0,f=null,d=null,p=!1,g=null,m=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,y={},x=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],b=0,T=function(S){if(S in y)return y[S];var E=y[S]=x[b];return b+=1,b>=x.length&&(b=0),E},k=NOe,w=Nx;function C(S){let E=S.datum(),L=new Set;E.forEach(Q=>{Q.size==0&&Q.sets.length==1&&L.add(Q.sets[0])}),E=E.filter(Q=>!Q.sets.some(pe=>L.has(pe)));let N={},O={};if(E.length>0){let Q=k(E,{lossFunction:w,distinct:p});o&&(Q=BOe(Q,s,d)),N=$Oe(Q,r,n,i,l),O=VOe(N,E,m)}let R={};E.forEach(Q=>{Q.label&&(R[Q.sets]=Q.label)});function _(Q){if(Q.sets in R)return R[Q.sets];if(Q.sets.length==1)return""+Q.sets[0]}S.selectAll("svg").data([N]).enter().append("svg");let D=S.select("svg");t?D.attr("viewBox",`0 0 ${r} ${n}`):D.attr("width",r).attr("height",n);let I={},M=!1;D.selectAll(".venn-area path").each(function(Q){let pe=this.getAttribute("d");Q.sets.length==1&&pe&&!p&&(M=!0,I[Q.sets[0]]=H6t(pe))});function B(Q){return pe=>{let te=Q.sets.map(de=>{let ce=I[de],ue=N[de];return ce||(ce={x:r/2,y:n/2,radius:1}),ue||(ue={x:r/2,y:n/2,radius:1}),{x:ce.x*(1-pe)+ue.x*pe,y:ce.y*(1-pe)+ue.y*pe,radius:ce.radius*(1-pe)+ue.radius*pe}});return LOe(te,g)}}let P=D.selectAll(".venn-area").data(E,Q=>Q.sets),$=P.enter().append("g").attr("class",Q=>`venn-area venn-${Q.sets.length==1?"circle":"intersection"}${Q.colour||Q.color?" venn-coloured":""}`).attr("data-venn-sets",Q=>Q.sets.join("_")),G=$.append("path"),q=$.append("text").attr("class","label").text(Q=>_(Q)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",n/2);h&&(G.style("fill-opacity","0").filter(Q=>Q.sets.length==1).style("fill",Q=>Q.colour?Q.colour:Q.color?Q.color:T(Q.sets)).style("fill-opacity",".25"),q.style("fill",Q=>Q.colour||Q.color?"#FFF":e.textFill?e.textFill:Q.sets.length==1?T(Q.sets):"#444"));function z(Q){return typeof Q.transition=="function"?Q.transition("venn").duration(a):Q}let V=S;M&&typeof V.transition=="function"?(V=z(S),V.selectAll("path").attrTween("d",B)):V.selectAll("path").attr("d",Q=>LOe(Q.sets.map(pe=>N[pe])),g);let j=V.selectAll("text").filter(Q=>Q.sets in O).text(Q=>_(Q)).attr("x",Q=>Math.floor(O[Q.sets].x)).attr("y",Q=>Math.floor(O[Q.sets].y));u&&(M?"on"in j?j.on("end",AX(N,_)):j.each("end",AX(N,_)):j.each(AX(N,_)));let ee=z(P.exit()).remove();typeof P.transition=="function"&&ee.selectAll("path").attrTween("d",B);let ne=ee.selectAll("text").attr("x",r/2).attr("y",n/2);return f!==null&&(q.style("font-size","0px"),j.style("font-size",f),ne.style("font-size","0px")),{circles:N,textCentres:O,nodes:P,enter:$,update:V,exit:ee}}return C.wrap=function(S){return arguments.length?(u=S,C):u},C.useViewBox=function(){return t=!0,C},C.width=function(S){return arguments.length?(r=S,C):r},C.height=function(S){return arguments.length?(n=S,C):n},C.padding=function(S){return arguments.length?(i=S,C):i},C.distinct=function(S){return arguments.length?(p=S,C):p},C.colours=function(S){return arguments.length?(T=S,C):T},C.colors=function(S){return arguments.length?(T=S,C):T},C.fontSize=function(S){return arguments.length?(f=S,C):f},C.round=function(S){return arguments.length?(g=S,C):g},C.duration=function(S){return arguments.length?(a=S,C):a},C.layoutFunction=function(S){return arguments.length?(k=S,C):k},C.normalize=function(S){return arguments.length?(o=S,C):o},C.scaleToFit=function(S){return arguments.length?(l=S,C):l},C.styled=function(S){return arguments.length?(h=S,C):h},C.orientation=function(S){return arguments.length?(s=S,C):s},C.orientationOrder=function(S){return arguments.length?(d=S,C):d},C.lossFunction=function(S){return arguments.length?(w=S==="default"?Nx:S==="logRatio"?POe:S,C):w},C}function AX(e,t){return function(r){let n=this,i=e[r.sets[0]].radius||50,a=t(r)||"",s=a.split(/\s+/).reverse(),l=(a.length+s.length)/3,u=s.pop(),h=[u],f=0,d=1.1;n.textContent=null;let p=[];function g(T){let k=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return k.textContent=T,p.push(k),n.append(k),k}let m=g(u);for(;u=s.pop(),!!u;){h.push(u);let T=h.join(" ");m.textContent=T,T.length>l&&m.getComputedTextLength()>i&&(h.pop(),m.textContent=h.join(" "),h=[u],m=g(u),f++)}let y=.35-f*d/2,x=n.getAttribute("x"),b=n.getAttribute("y");p.forEach((T,k)=>{T.setAttribute("x",x),T.setAttribute("y",b),T.setAttribute("dy",`${y+k*d}em`)})}}function _X(e,t,r){let n=t[0].radius-$o(t[0],e);for(let i=1;i=a&&(i=n[h],a=f)}let s=DOe(h=>-1*_X({x:h[0],y:h[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,o={x:r?0:s[0],y:s[1]},l=!0;for(let h of e)if($o(o,h)>h.radius){l=!1;break}for(let h of t)if($o(o,h)h.p1))}function W6t(e){let t={},r=Object.keys(e);for(let n of r)t[n]=[];for(let n=0;n0&&console.log("WARNING: area "+s+" not represented on screen")}return n}function U6t(e,t,r){let n=[];return n.push(` +M`,e,t),n.push(` +m`,-r,0),n.push(` +a`,r,r,0,1,0,r*2,0),n.push(` +a`,r,r,0,1,0,-r*2,0),n.join(" ")}function H6t(e){let t=e.split(" ");return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function WOe(e){if(e.length===0)return[];let t={};return Q7(e,t),t.arcs}function UOe(e,t){if(e.length===0)return"M 0 0";let r=Math.pow(10,t||0),n=t!=null?a=>Math.round(a*r)/r:a=>a;if(e.length==1){let a=e[0].circle;return U6t(n(a.x),n(a.y),n(a.radius))}let i=[` +M`,n(e[0].p2.x),n(e[0].p2.y)];for(let a of e){let s=n(a.circle.radius);i.push(` +A`,s,s,0,a.large?1:0,a.sweep?1:0,n(a.p1.x),n(a.p1.y))}return i.join(" ")}function LOe(e,t){return UOe(WOe(e),t)}function HOe(e,t={}){let{lossFunction:r,layoutFunction:n=NOe,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:u=15,scaleToFit:h=!1,symmetricalTextCentre:f=!1,distinct:d,round:p=2}=t,g=n(e,{lossFunction:r==="default"||!r?Nx:r==="logRatio"?POe:r,distinct:d});i&&(g=BOe(g,a,s));let m=$Oe(g,o,l,u,h),y=VOe(m,e,f),x=new Map(Object.keys(m).map(k=>[k,{set:k,x:m[k].x,y:m[k].y,radius:m[k].radius}])),b=e.map(k=>{let w=k.sets.map(E=>x.get(E)),C=WOe(w),S=UOe(C,p);return{circles:w,arcs:C,path:S,area:k,has:new Set(k.sets)}});function T(k){let w="";for(let C of b)C.has.size>k.length&&k.every(S=>C.has.has(S))&&(w+=" "+C.path);return w}return b.map(({circles:k,arcs:w,path:C,area:S})=>({data:S,text:y[S.sets],circles:k,arcs:w,path:C,distinctPath:C+T(S.sets)}))}var OOe,YOe=X(()=>{OOe=1e-10});var QOe={};cr(QOe,{diagram:()=>dRt});function XOe(){return Qr(sRt,It().venn)}function jOe(e){let t=new Map;for(let r of e){let n=r.targets.join("|"),i=t.get(n);i?Object.assign(i,r.styles):t.set(n,{...r.styles})}return t}function Kp(e){return e.join("|")}function KOe(e,t,r,n,i,a){let s=e?.useDebugLayout??!1,l=r.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(let h of n){let f=Kp(h.sets),d=u.get(f);d?d.push(h):u.set(f,[h])}for(let[h,f]of u.entries()){let d=t.get(h);if(!d?.text)continue;let p=d.text.x,g=d.text.y,m=Math.min(...d.circles.map(D=>D.radius)),y=Math.min(...d.circles.map(D=>D.radius-Math.hypot(p-D.x,g-D.y))),x=Number.isFinite(y)?Math.max(0,y):0;x===0&&Number.isFinite(m)&&(x=m*.6);let b=l.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);s&&b.append("circle").attr("class","venn-text-debug-circle").attr("cx",p).attr("cy",g).attr("r",x).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let T=Math.max(80*i,x*2*.95),k=Math.max(60*i,x*2*.95),S=(d.data.label&&d.data.label.length>0?Math.min(32*i,x*.25):0)+(f.length<=2?30*i:0),E=p-T/2,L=g-k/2+S,N=Math.max(1,Math.ceil(Math.sqrt(f.length))),O=Math.max(1,Math.ceil(f.length/N)),R=T/N,_=k/O;for(let[D,I]of f.entries()){let M=D%N,B=Math.floor(D/N),P=E+R*(M+.5),$=L+_*(B+.5);s&&b.append("rect").attr("class","venn-text-debug-cell").attr("x",E+R*M).attr("y",L+_*B).attr("width",R).attr("height",_).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);let G=R*.9,q=_*.9,z=b.append("foreignObject").attr("class","venn-text-node-fo").attr("width",G).attr("height",q).attr("x",P-G/2).attr("y",$-q/2).attr("overflow","visible"),V=a.get(I.id)?.color,j=z.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(I.label??I.id);V&&j.style("color",V)}}}function ZOe(e){let t=new Set(e.map(i=>[...i.sets].sort().join("|"))),r=new Map(e.filter(i=>i.sets.length===1&&i.size!==void 0).map(i=>[i.sets[0],i.size])),n=[];for(let i of e){if(i.sets.length<3)continue;let a=[...i.sets].sort();for(let s=0;s0?[...e,...n]:e}var PX,X6t,BX,$X,FX,zX,GX,qX,j6t,K6t,uk,Z6t,Q6t,J6t,eRt,J7,tRt,rRt,nRt,iRt,aRt,sRt,oRt,lRt,cRt,uRt,hRt,fRt,dRt,JOe=X(()=>{qi();Ur();hr();ur();Yt();zr();Qi();YOe();Wt();PX=(function(){var e=v(function(b,T,k,w){for(k=k||{},w=b.length;w--;k[b[w]]=T);return k},"o"),t=[5,8],r=[7,8,11,12,17,19,22,24],n=[1,17],i=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],o=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],h=[1,56],f=[1,58],d=[1,59],p=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],m={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:v(function(T,k,w,C,S,E,L){var N=E.length-1;switch(S){case 1:return E[N-1];case 2:case 3:case 4:this.$=[];break;case 5:E[N-1].push(E[N]),this.$=E[N-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=E[N];break;case 8:C.setDiagramTitle(E[N].substr(6)),this.$=E[N].substr(6);break;case 9:C.addSubsetData([E[N]],void 0,void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 10:C.addSubsetData([E[N-1]],E[N],void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 11:C.addSubsetData([E[N-2]],void 0,parseFloat(E[N])),C.setIndentMode&&C.setIndentMode(!0);break;case 12:C.addSubsetData([E[N-3]],E[N-2],parseFloat(E[N])),C.setIndentMode&&C.setIndentMode(!0);break;case 13:if(E[N].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(E[N]),C.addSubsetData(E[N],void 0,void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 14:if(E[N-1].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(E[N-1]),C.addSubsetData(E[N-1],E[N],void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 15:if(E[N-2].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(E[N-2]),C.addSubsetData(E[N-2],void 0,parseFloat(E[N])),C.setIndentMode&&C.setIndentMode(!0);break;case 16:if(E[N-3].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(E[N-3]),C.addSubsetData(E[N-3],E[N-2],parseFloat(E[N])),C.setIndentMode&&C.setIndentMode(!0);break;case 17:case 18:case 19:C.addTextData(E[N-1],E[N],void 0);break;case 20:case 21:C.addTextData(E[N-2],E[N-1],E[N]);break;case 23:C.addStyleData(E[N-1],E[N]);break;case 24:case 25:case 26:var O=C.getCurrentSets();if(!O)throw new Error("text requires set");C.addTextData(O,E[N],void 0);break;case 27:case 28:var O=C.getCurrentSets();if(!O)throw new Error("text requires set");C.addTextData(O,E[N-1],E[N]);break;case 29:case 41:this.$=[E[N]];break;case 30:case 42:this.$=[...E[N-2],E[N]];break;case 31:this.$=[E[N-2],E[N]];break;case 33:this.$=E[N].join(" ");break;case 34:this.$=[E[N]];break;case 35:E[N-1].push(E[N]),this.$=E[N-1];break;case 43:case 44:this.$=E[N];break}},"anonymous"),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(r,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),e(r,[2,8]),{13:16,20:n,21:i},{13:20,18:19,20:n,21:i},{13:20,18:21,20:n,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:i},e(r,[2,9],{14:[1,27],15:[1,28]}),e(a,[2,43]),e(a,[2,44]),e(r,[2,13],{14:[1,29],15:[1,30],27:s}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},e(r,[2,22]),e(r,[2,24],{14:[1,35]}),e(r,[2,25],{14:[1,36]}),e(r,[2,26]),{20:o,25:37,26:38,27:s},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:i},e(r,[2,17],{14:[1,45]}),e(r,[2,18],{14:[1,46]}),e(r,[2,19]),e(r,[2,27]),e(r,[2,28]),e(r,[2,23],{27:[1,47]}),e(l,[2,29]),{15:[1,48]},{16:[1,49]},e(r,[2,11]),{16:[1,50]},e(r,[2,15]),e(a,[2,42]),e(r,[2,20]),e(r,[2,21]),{20:o,26:51},{16:u,20:h,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:p},e(r,[2,12]),e(r,[2,16]),e(l,[2,30]),e(l,[2,31]),e(l,[2,32]),e(l,[2,33],{30:61,16:u,20:h,31:f,32:d,33:p}),e(g,[2,34]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),e(g,[2,39]),e(g,[2,40]),e(g,[2,35])],defaultActions:{6:[2,1]},parseError:v(function(T,k){if(k.recoverable)this.trace(T);else{var w=new Error(T);throw w.hash=k,w}},"parseError"),parse:v(function(T){var k=this,w=[0],C=[],S=[null],E=[],L=this.table,N="",O=0,R=0,_=0,D=2,I=1,M=E.slice.call(arguments,1),B=Object.create(this.lexer),P={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(P.yy[$]=this.yy[$]);B.setInput(T,P.yy),P.yy.lexer=B,P.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var G=B.yylloc;E.push(G);var q=B.options&&B.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(He){w.length=w.length-2*He,S.length=S.length-He,E.length=E.length-He}v(z,"popStack");function V(){var He;return He=C.pop()||B.lex()||I,typeof He!="number"&&(He instanceof Array&&(C=He,He=C.pop()),He=k.symbols_[He]||He),He}v(V,"lex");for(var j,ee,ne,Q,pe,te,de={},ce,ue,Re,ve;;){if(ne=w[w.length-1],this.defaultActions[ne]?Q=this.defaultActions[ne]:((j===null||typeof j>"u")&&(j=V()),Q=L[ne]&&L[ne][j]),typeof Q>"u"||!Q.length||!Q[0]){var Ge="";ve=[];for(ce in L[ne])this.terminals_[ce]&&ce>D&&ve.push("'"+this.terminals_[ce]+"'");B.showPosition?Ge="Parse error on line "+(O+1)+`: `+B.showPosition()+` -Expecting `+fe.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Se="Parse error on line "+(O+1)+": Unexpected "+(j==D?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(Se,{text:B.match,token:this.terminals_[j]||j,line:B.yylineno,loc:z,expected:fe})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+j);switch(Y[0]){case 1:w.push(j),E.push(B.yytext),A.push(B.yylloc),w.push(Y[1]),j=null,H?(j=H,H=null):(L=B.yyleng,P=B.yytext,O=B.yylineno,z=B.yylloc,_>0&&_--);break;case 2:if(te=this.productions_[Y[1]][1],re.$=E[E.length-te],re._$={first_line:A[A.length-(te||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(te||1)].first_column,last_column:A[A.length-1].last_column},$&&(re._$.range=[A[A.length-(te||1)].range[0],A[A.length-1].range[1]]),J=this.performAction.apply(re,[P,L,O,M.yy,Y[1],E,A].concat(I)),typeof J<"u")return J;te&&(w=w.slice(0,-1*te*2),E=E.slice(0,-1*te),A=A.slice(0,-1*te)),w.push(this.productions_[Y[1]][0]),E.push(re.$),A.push(re._$),xe=N[w[w.length-2]][w[w.length-1]],w.push(xe);break;case 3:return!0}}return!0},"parse")},y=(function(){var x={EOF:1,parseError:b(function(C,w){if(this.yy.parser)this.yy.parser.parseError(C,w);else throw new Error(C)},"parseError"),setInput:b(function(T,C){return this.yy=C||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var C=T.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:b(function(T){var C=T.length,w=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1&&(this.yylineno-=w.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:w?(w.length===k.length?this.yylloc.first_column:0)+k[k.length-w.length].length-w[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(T){this.unput(this.match.slice(T))},"less"),pastInput:b(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var T=this.pastInput(),C=new Array(T.length+1).join("-");return T+this.upcomingInput()+` -`+C+"^"},"showPosition"),test_match:b(function(T,C){var w,k,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),k=T[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,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(T[0].length),this.matched+=T[0],w=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var A in E)this[A]=E[A];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,C,w,k;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),A=0;AC[0].length)){if(C=w,k=A,this.options.backtrack_lexer){if(T=this.test_match(w,E[A]),T!==!1)return T;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(T=this.test_match(C,E[k]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var C=this.next();return C||this.lex()},"lex"),begin:b(function(C){this.conditionStack.push(C)},"begin"),popState:b(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:b(function(C){this.begin(C)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(C,w,k,E){var A=E;switch(k){case 0:break;case 1:break;case 2:break;case 3:if(C.getIndentMode&&C.getIndentMode())return C.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:C.setIndentMode&&C.setIndentMode(!1),this.begin("INITIAL"),this.unput(w.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(C.consumeIndentText)C.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return w.yytext=w.yytext.slice(2,-2),14;break;case 17:return w.yytext=w.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return x})();m.lexer=y;function v(){this.yy={}}return b(v,"Parser"),v.prototype=m,m.Parser=v,new v})();yW.parser=yW;L5t=yW,vW=[],bW=[],xW=[],TW=new Set,kW=!1,R5t=b((e,t,r)=>{let i=f7(e).sort(),n=r??10/Math.pow(e.length,2);wW=i,i.length===1&&TW.add(i[0]),vW.push({sets:i,size:n,label:t?zw(t):void 0})},"addSubsetData"),I5t=b(()=>vW,"getSubsetData"),zw=b(e=>{let t=e.trim();return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t},"normalizeText"),D5t=b(e=>e&&zw(e),"normalizeStyleValue"),N5t=b((e,t,r)=>{let i=zw(t);bW.push({sets:f7(e).sort(),id:i,label:r?zw(r):void 0})},"addTextData"),M5t=b((e,t)=>{let r=f7(e).sort(),i={};for(let[n,a]of t)i[n]=D5t(a)??a;xW.push({targets:r,styles:i})},"addStyleData"),O5t=b(()=>xW,"getStyleData"),f7=b(e=>e.map(t=>zw(t)),"normalizeIdentifierList"),P5t=b(e=>{let r=f7(e).filter(i=>!TW.has(i));if(r.length>0)throw new Error(`unknown set identifier: ${r.join(", ")}`)},"validateUnionIdentifiers"),B5t=b(()=>bW,"getTextData"),F5t=b(()=>wW,"getCurrentSets"),$5t=b(()=>kW,"getIndentMode"),z5t=b(e=>{kW=e},"setIndentMode"),G5t=rr.venn;b(ILe,"getConfig");q5t=b(()=>{fr(),vW.length=0,bW.length=0,xW.length=0,TW.clear(),wW=void 0,kW=!1},"customClear"),V5t={getConfig:ILe,clear:q5t,setAccTitle:yr,getAccTitle:vr,setDiagramTitle:kr,getDiagramTitle:Tr,getAccDescription:xr,setAccDescription:br,addSubsetData:R5t,getSubsetData:I5t,addTextData:N5t,addStyleData:M5t,validateUnionIdentifiers:P5t,getTextData:B5t,getStyleData:O5t,getCurrentSets:F5t,getIndentMode:$5t,setIndentMode:z5t},W5t=b(e=>` +Expecting `+ve.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Ge="Parse error on line "+(O+1)+": Unexpected "+(j==I?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(Ge,{text:B.match,token:this.terminals_[j]||j,line:B.yylineno,loc:G,expected:ve})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+j);switch(Q[0]){case 1:w.push(j),S.push(B.yytext),E.push(B.yylloc),w.push(Q[1]),j=null,ee?(j=ee,ee=null):(R=B.yyleng,N=B.yytext,O=B.yylineno,G=B.yylloc,_>0&&_--);break;case 2:if(ue=this.productions_[Q[1]][1],de.$=S[S.length-ue],de._$={first_line:E[E.length-(ue||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(ue||1)].first_column,last_column:E[E.length-1].last_column},q&&(de._$.range=[E[E.length-(ue||1)].range[0],E[E.length-1].range[1]]),te=this.performAction.apply(de,[N,R,O,P.yy,Q[1],S,E].concat(M)),typeof te<"u")return te;ue&&(w=w.slice(0,-1*ue*2),S=S.slice(0,-1*ue),E=E.slice(0,-1*ue)),w.push(this.productions_[Q[1]][0]),S.push(de.$),E.push(de._$),Re=L[w[w.length-2]][w[w.length-1]],w.push(Re);break;case 3:return!0}}return!0},"parse")},y=(function(){var b={EOF:1,parseError:v(function(k,w){if(this.yy.parser)this.yy.parser.parseError(k,w);else throw new Error(k)},"parseError"),setInput:v(function(T,k){return this.yy=k||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var k=T.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:v(function(T){var k=T.length,w=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1&&(this.yylineno-=w.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:w?(w.length===C.length?this.yylloc.first_column:0)+C[C.length-w.length].length-w[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(T){this.unput(this.match.slice(T))},"less"),pastInput:v(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:v(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:v(function(){var T=this.pastInput(),k=new Array(T.length+1).join("-");return T+this.upcomingInput()+` +`+k+"^"},"showPosition"),test_match:v(function(T,k){var w,C,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),C=T[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,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(T[0].length),this.matched+=T[0],w=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var E in S)this[E]=S[E];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,k,w,C;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),E=0;Ek[0].length)){if(k=w,C=E,this.options.backtrack_lexer){if(T=this.test_match(w,S[E]),T!==!1)return T;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(T=this.test_match(k,S[C]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var k=this.next();return k||this.lex()},"lex"),begin:v(function(k){this.conditionStack.push(k)},"begin"),popState:v(function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:v(function(k){this.begin(k)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(k,w,C,S){var E=S;switch(C){case 0:break;case 1:break;case 2:break;case 3:if(k.getIndentMode&&k.getIndentMode())return k.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:k.setIndentMode&&k.setIndentMode(!1),this.begin("INITIAL"),this.unput(w.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(k.consumeIndentText)k.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return w.yytext=w.yytext.slice(2,-2),14;break;case 17:return w.yytext=w.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return b})();m.lexer=y;function x(){this.yy={}}return v(x,"Parser"),x.prototype=m,m.Parser=x,new x})();PX.parser=PX;X6t=PX,BX=[],$X=[],FX=[],zX=new Set,qX=!1,j6t=v((e,t,r)=>{let n=J7(e).sort(),i=r??10/Math.pow(e.length,2);GX=n,n.length===1&&zX.add(n[0]),BX.push({sets:n,size:i,label:t?uk(t):void 0})},"addSubsetData"),K6t=v(()=>BX,"getSubsetData"),uk=v(e=>{let t=e.trim();return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t},"normalizeText"),Z6t=v(e=>e&&uk(e),"normalizeStyleValue"),Q6t=v((e,t,r)=>{let n=uk(t);$X.push({sets:J7(e).sort(),id:n,label:r?uk(r):void 0})},"addTextData"),J6t=v((e,t)=>{let r=J7(e).sort(),n={};for(let[i,a]of t)n[i]=Z6t(a)??a;FX.push({targets:r,styles:n})},"addStyleData"),eRt=v(()=>FX,"getStyleData"),J7=v(e=>e.map(t=>uk(t)),"normalizeIdentifierList"),tRt=v(e=>{let r=J7(e).filter(n=>!zX.has(n));if(r.length>0)throw new Error(`unknown set identifier: ${r.join(", ")}`)},"validateUnionIdentifiers"),rRt=v(()=>$X,"getTextData"),nRt=v(()=>GX,"getCurrentSets"),iRt=v(()=>qX,"getIndentMode"),aRt=v(e=>{qX=e},"setIndentMode"),sRt=dr.venn;v(XOe,"getConfig");oRt=v(()=>{pr(),BX.length=0,$X.length=0,FX.length=0,zX.clear(),GX=void 0,qX=!1},"customClear"),lRt={getConfig:XOe,clear:oRt,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,getAccDescription:Mr,setAccDescription:Ir,addSubsetData:j6t,getSubsetData:K6t,addTextData:Q6t,addStyleData:J6t,validateUnionIdentifiers:tRt,getTextData:rRt,getStyleData:eRt,getCurrentSets:nRt,getIndentMode:iRt,setIndentMode:aRt},cRt=v(e=>` .venn-title { font-size: 32px; fill: ${e.vennTitleTextColor}; @@ -3240,255 +3329,398 @@ Expecting `+fe.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Se="Parse error font-family: ${e.fontFamily}; color: ${e.vennSetTextColor}; } -`,"getStyles"),U5t=W5t;b(DLe,"buildStyleByKey");H5t=b((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:s,look:o,handDrawnSeed:l}=It(),u=o==="handDrawn",h=[s.venn1,s.venn2,s.venn3,s.venn4,s.venn5,s.venn6,s.venn7,s.venn8].filter(Boolean),f=n.getDiagramTitle?.(),d=n.getSubsetData(),p=n.getTextData(),g=DLe(n.getStyleData()),m=a?.width??800,y=a?.height??450,x=m/1600,T=f?48*x:0,C=s.primaryTextColor??s.textColor,w=yi(t);w.attr("viewBox",`0 0 ${m} ${y}`),f&&w.append("text").text(f).attr("class","venn-title").attr("font-size",`${32*x}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*x).style("fill",s.vennTitleTextColor||s.titleColor);let k=Qe(document.createElement("div")),E=CLe().width(m).height(y-T);k.datum(d).call(E);let A=u?st.svg(k.select("svg").node()):void 0,N=LLe(d,{width:m,height:y-T,padding:a?.padding??15}),P=new Map;for(let R of N){let D=ip([...R.data.sets].sort());P.set(D,R)}p.length>0&&NLe(a,P,k,p,x,g);let O=ai(s.background||"#f4f4f4");k.selectAll(".venn-circle").each(function(R,D){let I=Qe(this),M=ip([...R.sets].sort()),F=g.get(M),z=F?.fill||h[D%h.length]||s.primaryColor;I.classed(`venn-set-${D%8}`,!0);let $=F?.["fill-opacity"]??.1,G=F?.stroke||z,U=F?.["stroke-width"]||`${5*x}`;if(u&&A){let H=P.get(M);if(H&&H.circles.length>0){let Q=H.circles[0],Y=A.circle(Q.x,Q.y,Q.radius*2,{roughness:.7,seed:l,fill:Xk(z,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+D*60,stroke:G,strokeWidth:parseFloat(String(U))});I.select("path").remove(),I.node()?.insertBefore(Y,I.select("text").node())}}else I.select("path").style("fill",z).style("fill-opacity",$).style("stroke",G).style("stroke-width",U).style("stroke-opacity",.95);let j=F?.color||(O?je(z,30):Xe(z,30));I.select("text").style("font-size",`${48*x}px`).style("fill",j)}),u&&A?k.selectAll(".venn-intersection").each(function(R){let D=Qe(this),B=ip([...R.sets].sort()),M=g.get(B),F=M?.fill;if(F){let z=D.select("path"),$=z.attr("d");if($){let G=A.path($,{roughness:.7,seed:l,fill:Xk(F,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),U=z.node();U?.parentNode?.insertBefore(G,U),z.remove()}}else D.select("path").style("fill-opacity",0);D.select("text").style("font-size",`${48*x}px`).style("fill",M?.color??s.vennSetTextColor??C)}):(k.selectAll(".venn-intersection text").style("font-size",`${48*x}px`).style("fill",R=>{let I=ip([...R.sets].sort());return g.get(I)?.color??s.vennSetTextColor??C}),k.selectAll(".venn-intersection path").style("fill-opacity",R=>{let I=ip([...R.sets].sort());return g.get(I)?.fill?1:0}).style("fill",R=>{let I=ip([...R.sets].sort());return g.get(I)?.fill??"transparent"}));let L=w.append("g").attr("transform",`translate(0, ${T})`),_=k.select("svg").node();if(_&&"childNodes"in _)for(let R of[..._.childNodes])L.node()?.appendChild(R);Mr(w,y,m,a?.useMaxWidth??!0)},"draw");b(ip,"stableSetsKey");b(NLe,"renderTextNodes");Y5t={draw:H5t},j5t={parser:L5t,db:V5t,renderer:Y5t,styles:U5t}});var $Le={};Lr($Le,{diagram:()=>n3t});function BLe(e){if(!e.length)return[];let t=[],r=[];return e.forEach(i=>{let n={name:i.name,children:i.type==="Leaf"?void 0:[]};for(n.classSelector=i?.classSelector,i?.cssCompiledStyles&&(n.cssCompiledStyles=i.cssCompiledStyles),i.type==="Leaf"&&i.value!==void 0&&(n.value=i.value);r.length>0&&r[r.length-1].level>=i.level;)r.pop();if(r.length===0)t.push(n);else{let a=r[r.length-1].node;a.children?a.children.push(n):a.children=[n]}i.type!=="Leaf"&&r.push({node:n,level:i.level})}),t}var PLe,X5t,K5t,FLe,Z5t,yv,Gw,Q5t,J5t,e3t,t3t,r3t,i3t,n3t,zLe=q(()=>{Ja();il();rs();au();$r();Er();er();fl();Ar();PLe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=yr,this.getAccTitle=vr,this.setDiagramTitle=kr,this.getDiagramTitle=Tr,this.getAccDescription=xr,this.setAccDescription=br}static{b(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=rr,t=It();return Yr({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let r=this.classes.get(e)??{id:e,styles:[],textStyles:[]},i=t.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(n=>{db(n)&&(r?.textStyles?r.textStyles.push(n):r.textStyles=[n]),r?.styles?r.styles.push(n):r.styles=[n]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){fr(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};b(BLe,"buildHierarchy");X5t=b((e,t)=>{Un(e,t);let r=[];for(let a of e.TreemapRows??[])a.$type==="ClassDefStatement"&&t.addClass(a.className??"",a.styleText??"");for(let a of e.TreemapRows??[]){let s=a.item;if(!s)continue;let o=a.indent?parseInt(a.indent):0,l=K5t(s),u=s.classSelector?t.getStylesForClass(s.classSelector):[],h=u.length>0?u:void 0,f={level:o,name:l,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:h};r.push(f)}let i=BLe(r),n=b((a,s)=>{for(let o of a)t.addNode(o,s),o.children&&o.children.length>0&&n(o.children,s+1)},"addNodesRecursively");n(i,0)},"populate"),K5t=b(e=>e.name?String(e.name):"","getItemName"),FLe={parser:{yy:void 0},parse:b(async e=>{try{let r=await xn("treemap",e);ee.debug("Treemap AST:",r);let i=FLe.parser?.yy;if(!(i instanceof PLe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");X5t(r,i)}catch(t){throw ee.error("Error parsing treemap:",t),t}},"parse")},Z5t=10,yv=10,Gw=25,Q5t=b((e,t,r,i)=>{let n=i.db,a=n.getConfig(),s=a.padding??Z5t,o=n.getDiagramTitle(),l=n.getRoot(),{themeVariables:u}=It();if(!l)return;let h=o?30:0,f=yi(t),d=a.nodeWidth?a.nodeWidth*yv:960,p=a.nodeHeight?a.nodeHeight*yv:500,g=d,m=p+h;f.attr("viewBox",`0 0 ${g} ${m}`),Mr(f,m,g,a.useMaxWidth);let y;try{let R=a.valueFormat||",";if(R==="$0,0")y=b(D=>"$"+Ec(",")(D),"valueFormat");else if(R.startsWith("$")&&R.includes(",")){let D=/\.\d+/.exec(R),I=D?D[0]:"";y=b(B=>"$"+Ec(","+I)(B),"valueFormat")}else if(R.startsWith("$")){let D=R.substring(1);y=b(I=>"$"+Ec(D||"")(I),"valueFormat")}else y=Ec(R)}catch(R){ee.error("Error creating format function:",R),y=Ec(",")}let v=no().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),x=no().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),T=no().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);o&&f.append("text").attr("x",g/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o);let C=f.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),w=_m(l).sum(R=>R.value??0).sort((R,D)=>(D.value??0)-(R.value??0)),E=PR().size([d,p]).paddingTop(R=>R.children&&R.children.length>0?Gw+yv:0).paddingInner(s).paddingLeft(R=>R.children&&R.children.length>0?yv:0).paddingRight(R=>R.children&&R.children.length>0?yv:0).paddingBottom(R=>R.children&&R.children.length>0?yv:0).round(!0)(w),A=E.descendants().filter(R=>R.children&&R.children.length>0),N=C.selectAll(".treemapSection").data(A).enter().append("g").attr("class","treemapSection").attr("transform",R=>`translate(${R.x0},${R.y0})`);N.append("rect").attr("width",R=>R.x1-R.x0).attr("height",Gw).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",R=>R.depth===0?"display: none;":""),N.append("clipPath").attr("id",(R,D)=>`clip-section-${t}-${D}`).append("rect").attr("width",R=>Math.max(0,R.x1-R.x0-12)).attr("height",Gw),N.append("rect").attr("width",R=>R.x1-R.x0).attr("height",R=>R.y1-R.y0).attr("class",(R,D)=>`treemapSection section${D}`).attr("fill",R=>v(R.data.name)).attr("fill-opacity",.6).attr("stroke",R=>x(R.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",R=>{if(R.depth===0)return"display: none;";let D=Ot({cssCompiledStyles:R.data.cssCompiledStyles});return D.nodeStyles+";"+D.borderStyles.join(";")}),N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",Gw/2).attr("dominant-baseline","middle").text(R=>R.depth===0?"":R.data.name).attr("font-weight","bold").attr("style",R=>{if(R.depth===0)return"display: none;";let D="dominant-baseline: middle; font-size: 12px; fill:"+T(R.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",I=Ot({cssCompiledStyles:R.data.cssCompiledStyles});return D+I.labelStyles.replace("color:","fill:")}).each(function(R){if(R.depth===0)return;let D=Qe(this),I=R.data.name;D.text(I);let B=R.x1-R.x0,M=6,F;a.showValues!==!1&&R.value?F=B-10-30-10-M:F=B-M-6;let $=Math.max(15,F),G=D.node();if(G.getComputedTextLength()>$){let H=I;for(;H.length>0;){if(H=I.substring(0,H.length-1),H.length===0){D.text("..."),G.getComputedTextLength()>$&&D.text("");break}if(D.text(H+"..."),G.getComputedTextLength()<=$)break}}}),a.showValues!==!1&&N.append("text").attr("class","treemapSectionValue").attr("x",R=>R.x1-R.x0-10).attr("y",Gw/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(R=>R.value?y(R.value):"").attr("font-style","italic").attr("style",R=>{if(R.depth===0)return"display: none;";let D="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(R.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",I=Ot({cssCompiledStyles:R.data.cssCompiledStyles});return D+I.labelStyles.replace("color:","fill:")});let P=E.leaves(),O=C.selectAll(".treemapLeafGroup").data(P).enter().append("g").attr("class",(R,D)=>`treemapNode treemapLeafGroup leaf${D}${R.data.classSelector?` ${R.data.classSelector}`:""}x`).attr("transform",R=>`translate(${R.x0},${R.y0})`);O.append("rect").attr("width",R=>R.x1-R.x0).attr("height",R=>R.y1-R.y0).attr("class","treemapLeaf").attr("fill",R=>R.parent?v(R.parent.data.name):v(R.data.name)).attr("style",R=>Ot({cssCompiledStyles:R.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",R=>R.parent?v(R.parent.data.name):v(R.data.name)).attr("stroke-width",3),O.append("clipPath").attr("id",(R,D)=>`clip-${t}-${D}`).append("rect").attr("width",R=>Math.max(0,R.x1-R.x0-4)).attr("height",R=>Math.max(0,R.y1-R.y0-4)),O.append("text").attr("class","treemapLabel").attr("x",R=>(R.x1-R.x0)/2).attr("y",R=>(R.y1-R.y0)/2).attr("style",R=>{let D="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+T(R.data.name)+";",I=Ot({cssCompiledStyles:R.data.cssCompiledStyles});return D+I.labelStyles.replace("color:","fill:")}).attr("clip-path",(R,D)=>`url(#clip-${t}-${D})`).text(R=>R.data.name).each(function(R){let D=Qe(this),I=R.x1-R.x0,B=R.y1-R.y0,M=D.node(),F=4,z=I-2*F,$=B-2*F;if(z<10||$<10){D.style("display","none");return}let G=parseInt(D.style("font-size"),10),U=8,j=28,H=.6,Q=6,Y=2;for(;M.getComputedTextLength()>z&&G>U;)G--,D.style("font-size",`${G}px`);let se=Math.max(Q,Math.min(j,Math.round(G*H))),J=G+Y+se;for(;J>$&&G>U&&(G--,se=Math.max(Q,Math.min(j,Math.round(G*H))),!(se$;D.style("font-size",`${G}px`),(M.getComputedTextLength()>z||G(D.x1-D.x0)/2).attr("y",function(D){return(D.y1-D.y0)/2}).attr("style",D=>{let I="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+T(D.data.name)+";",B=Ot({cssCompiledStyles:D.data.cssCompiledStyles});return I+B.labelStyles.replace("color:","fill:")}).attr("clip-path",(D,I)=>`url(#clip-${t}-${I})`).text(D=>D.value?y(D.value):"").each(function(D){let I=Qe(this),B=this.parentNode;if(!B){I.style("display","none");return}let M=Qe(B).select(".treemapLabel");if(M.empty()||M.style("display")==="none"){I.style("display","none");return}let F=parseFloat(M.style("font-size")),z=28,$=.6,G=6,U=2,j=Math.max(G,Math.min(z,Math.round(F*$)));I.style("font-size",`${j}px`);let Q=(D.y1-D.y0)/2+F/2+U;I.attr("y",Q);let Y=D.x1-D.x0,re=D.y1-D.y0-4,ie=Y-8;I.node().getComputedTextLength()>ie||Q+j>re||j{let t=yl(),r=It(),i=Yr(t,r.themeVariables),n=Yr(t3t,e),a=n.titleColor??i.titleColor,s=n.labelColor??i.textColor,o=n.valueColor??i.textColor;return` +`,"getStyles"),uRt=cRt;v(jOe,"buildStyleByKey");hRt=v((e,t,r,n)=>{let i=n.db,a=i.getConfig?.(),{themeVariables:s,look:o,handDrawnSeed:l}=It(),u=o==="handDrawn",h=[s.venn1,s.venn2,s.venn3,s.venn4,s.venn5,s.venn6,s.venn7,s.venn8].filter(Boolean),f=i.getDiagramTitle?.(),d=i.getSubsetData(),p=i.getTextData(),g=jOe(i.getStyleData()),m=ZOe(d),y=a?.width??800,x=a?.height??450,T=y/1600,k=f?48*T:0,w=s.primaryTextColor??s.textColor,C=xn(t);C.attr("viewBox",`0 0 ${y} ${x}`),f&&C.append("text").text(f).attr("class","venn-title").attr("font-size",`${32*T}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*T).style("fill",s.vennTitleTextColor||s.titleColor);let S=ct(document.createElement("div")),E=GOe().width(y).height(x-k);S.datum(m).call(E);let L=u?st.svg(S.select("svg").node()):void 0,N=HOe(m,{width:y,height:x-k,padding:a?.padding??15}),O=new Map;for(let I of N){let M=Kp([...I.data.sets].sort());O.set(M,I)}p.length>0&&KOe(a,O,S,p,T,g);let R=An(s.background||"#f4f4f4");S.selectAll(".venn-circle").each(function(I,M){let B=ct(this),$=Kp([...I.sets].sort()),G=g.get($),q=G?.fill||h[M%h.length]||s.primaryColor;B.classed(`venn-set-${M%8}`,!0);let z=G?.["fill-opacity"]??.1,V=G?.stroke||q,j=G?.["stroke-width"]||`${5*T}`;if(u&&L){let ne=O.get($);if(ne&&ne.circles.length>0){let Q=ne.circles[0],pe=L.circle(Q.x,Q.y,Q.radius*2,{roughness:.7,seed:l,fill:TS(q,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+M*60,stroke:V,strokeWidth:parseFloat(String(j))});B.select("path").remove(),B.node()?.insertBefore(pe,B.select("text").node())}}else B.select("path").style("fill",q).style("fill-opacity",z).style("stroke",V).style("stroke-width",j).style("stroke-opacity",.95);let ee=G?.color||(R?et(q,30):tt(q,30));B.select("text").style("font-size",`${48*T}px`).style("fill",ee)}),u&&L?S.selectAll(".venn-intersection").each(function(I){let M=ct(this),P=Kp([...I.sets].sort()),$=g.get(P),G=$?.fill;if(G){let q=M.select("path"),z=q.attr("d");if(z){let V=L.path(z,{roughness:.7,seed:l,fill:TS(G,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),j=q.node();j?.parentNode?.insertBefore(V,j),q.remove()}}else M.select("path").style("fill-opacity",0);M.select("text").style("font-size",`${48*T}px`).style("fill",$?.color??s.vennSetTextColor??w)}):(S.selectAll(".venn-intersection text").style("font-size",`${48*T}px`).style("fill",I=>{let B=Kp([...I.sets].sort());return g.get(B)?.color??s.vennSetTextColor??w}),S.selectAll(".venn-intersection path").style("fill-opacity",I=>{let B=Kp([...I.sets].sort());return g.get(B)?.fill?1:0}).style("fill",I=>{let B=Kp([...I.sets].sort());return g.get(B)?.fill??"transparent"}));let _=C.append("g").attr("transform",`translate(0, ${k})`),D=S.select("svg").node();if(D&&"childNodes"in D)for(let I of[...D.childNodes])_.node()?.appendChild(I);Vr(C,x,y,a?.useMaxWidth??!0)},"draw");v(Kp,"stableSetsKey");v(KOe,"renderTextNodes");v(ZOe,"ensurePairwiseSubsets");fRt={draw:hRt},dRt={parser:X6t,db:lRt,renderer:fRt,styles:uRt}});var n9e={};cr(n9e,{diagram:()=>CRt});function t9e(e){if(!e.length)return[];let t=[],r=[];return e.forEach(n=>{let i={name:n.name,children:n.type==="Leaf"?void 0:[]};for(i.classSelector=n?.classSelector,n?.cssCompiledStyles&&(i.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(i.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)t.push(i);else{let a=r[r.length-1].node;a.children?a.children.push(i):a.children=[i]}n.type!=="Leaf"&&r.push({node:i,level:n.level})}),t}var e9e,pRt,gRt,r9e,mRt,Ox,hk,yRt,vRt,xRt,bRt,TRt,wRt,CRt,i9e=X(()=>{Us();qi();_o();ta();Ur();hr();ur();Yt();ss();zr();e9e=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Ar,this.getAccTitle=Lr,this.setDiagramTitle=$r,this.getDiagramTitle=Dr,this.getAccDescription=Mr,this.setAccDescription=Ir}static{v(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=dr,t=It();return Qr({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let r=this.classes.get(e)??{id:e,styles:[],textStyles:[]},n=t.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(i=>{m2(i)&&(r?.textStyles?r.textStyles.push(i):r.textStyles=[i]),r?.styles?r.styles.push(i):r.styles=[i]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){pr(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};v(t9e,"buildHierarchy");pRt=v((e,t)=>{Fn(e,t);let r=[];for(let a of e.TreemapRows??[])a.$type==="ClassDefStatement"&&t.addClass(a.className??"",a.styleText??"");for(let a of e.TreemapRows??[]){let s=a.item;if(!s)continue;let o=a.indent?parseInt(a.indent):0,l=gRt(s),u=s.classSelector?t.getStylesForClass(s.classSelector):[],h=u.length>0?u:void 0,f={level:o,name:l,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:h};r.push(f)}let n=t9e(r),i=v((a,s)=>{for(let o of a)t.addNode(o,s),o.children&&o.children.length>0&&i(o.children,s+1)},"addNodesRecursively");i(n,0)},"populate"),gRt=v(e=>e.name?String(e.name):"","getItemName"),r9e={parser:{yy:void 0},parse:v(async e=>{try{let r=await Ei("treemap",e);fe.debug("Treemap AST:",r);let n=r9e.parser?.yy;if(!(n instanceof e9e))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");pRt(r,n)}catch(t){throw fe.error("Error parsing treemap:",t),t}},"parse")},mRt=10,Ox=10,hk=25,yRt=v((e,t,r,n)=>{let i=n.db,a=i.getConfig(),s=a.padding??mRt,o=i.getDiagramTitle(),l=i.getRoot(),{themeVariables:u}=It();if(!l)return;let h=o?30:0,f=xn(t),d=a.nodeWidth?a.nodeWidth*Ox:960,p=a.nodeHeight?a.nodeHeight*Ox:500,g=d,m=p+h;f.attr("viewBox",`0 0 ${g} ${m}`),Vr(f,m,g,a.useMaxWidth);let y;try{let z=a.valueFormat||",";if(z==="$0,0")y=v(V=>"$"+au(",")(V),"valueFormat");else if(z.startsWith("$")&&z.includes(",")){let V=/\.\d+/.exec(z),j=V?V[0]:"";y=v(ee=>"$"+au(","+j)(ee),"valueFormat")}else if(z.startsWith("$")){let V=z.substring(1);y=v(j=>"$"+au(V||"")(j),"valueFormat")}else y=au(z)}catch(z){fe.error("Error creating format function:",z),y=au(",")}let x=Yo().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),b=Yo().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),T=Yo().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);o&&f.append("text").attr("x",g/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o);let k=f.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),w=Ly(l).sum(z=>z.value??0).sort((z,V)=>(V.value??0)-(z.value??0)),S=CM().size([d,p]).paddingTop(z=>z.children&&z.children.length>0?hk+Ox:0).paddingInner(s).paddingLeft(z=>z.children&&z.children.length>0?Ox:0).paddingRight(z=>z.children&&z.children.length>0?Ox:0).paddingBottom(z=>z.children&&z.children.length>0?Ox:0).round(!0)(w),E=S.descendants().filter(z=>z.children&&z.children.length>0),L=k.selectAll(".treemapSection").data(E).enter().append("g").attr("class","treemapSection").attr("transform",z=>`translate(${z.x0},${z.y0})`);L.append("rect").attr("width",z=>z.x1-z.x0).attr("height",hk).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",z=>z.depth===0?"display: none;":""),L.append("clipPath").attr("id",(z,V)=>`clip-section-${t}-${V}`).append("rect").attr("width",z=>Math.max(0,z.x1-z.x0-12)).attr("height",hk),L.append("rect").attr("width",z=>z.x1-z.x0).attr("height",z=>z.y1-z.y0).attr("class",(z,V)=>`treemapSection section${V}`).attr("fill",z=>x(z.data.name)).attr("fill-opacity",.6).attr("stroke",z=>b(z.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",z=>{if(z.depth===0)return"display: none;";let V=Bt({cssCompiledStyles:z.data.cssCompiledStyles});return V.nodeStyles+";"+V.borderStyles.join(";")}),L.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",hk/2).attr("dominant-baseline","middle").text(z=>z.depth===0?"":z.data.name).attr("font-weight","bold").attr("clip-path",(z,V)=>`url(#clip-section-${t}-${V})`).attr("style",z=>{if(z.depth===0)return"display: none;";let V="dominant-baseline: middle; font-size: 12px; fill:"+T(z.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",j=Bt({cssCompiledStyles:z.data.cssCompiledStyles});return V+j.labelStyles.replace("color:","fill:")}).each(function(z){if(z.depth===0)return;let V=ct(this),j=z.data.name;V.text(j);let ee=z.x1-z.x0,ne=6,Q;a.showValues!==!1&&z.value?Q=ee-10-30-10-ne:Q=ee-ne-6;let te=Math.max(15,Q),de=V.node();if(de.getComputedTextLength()>te){let Re=j;for(;Re.length>0;){if(Re=j.substring(0,Re.length-1),Re.length===0){V.text("..."),de.getComputedTextLength()>te&&V.text("");break}if(V.text(Re+"..."),de.getComputedTextLength()<=te)break}}}),a.showValues!==!1&&L.append("text").attr("class","treemapSectionValue").attr("x",z=>z.x1-z.x0-10).attr("y",hk/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(z=>z.value?y(z.value):"").attr("font-style","italic").attr("style",z=>{if(z.depth===0)return"display: none;";let V="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(z.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",j=Bt({cssCompiledStyles:z.data.cssCompiledStyles});return V+j.labelStyles.replace("color:","fill:")});let N=S.leaves(),O=N.length>20,R=O?16:38,_=O?14:28,D=O?4:8,I=O?4:6,M=O?2:4,B=O?8:10,P=O?1:2,$=k.selectAll(".treemapLeafGroup").data(N).enter().append("g").attr("class",(z,V)=>`treemapNode treemapLeafGroup leaf${V}${z.data.classSelector?` ${z.data.classSelector}`:""}x`).attr("transform",z=>`translate(${z.x0},${z.y0})`);$.append("rect").attr("width",z=>z.x1-z.x0).attr("height",z=>z.y1-z.y0).attr("class","treemapLeaf").attr("fill",z=>z.parent?x(z.parent.data.name):x(z.data.name)).attr("style",z=>Bt({cssCompiledStyles:z.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",z=>z.parent?x(z.parent.data.name):x(z.data.name)).attr("stroke-width",3),$.append("clipPath").attr("id",(z,V)=>`clip-${t}-${V}`).append("rect").attr("width",z=>Math.max(0,z.x1-z.x0-4)).attr("height",z=>Math.max(0,z.y1-z.y0-4)),$.append("text").attr("class","treemapLabel").attr("x",z=>(z.x1-z.x0)/2).attr("y",z=>(z.y1-z.y0)/2).attr("style",z=>{let V=`text-anchor: middle; dominant-baseline: middle; font-size: ${R}px;fill:`+T(z.data.name)+";",j=Bt({cssCompiledStyles:z.data.cssCompiledStyles});return V+j.labelStyles.replace("color:","fill:")}).attr("clip-path",(z,V)=>`url(#clip-${t}-${V})`).text(z=>z.data.name).each(function(z){let V=ct(this),j=z.x1-z.x0,ee=z.y1-z.y0,ne=V.node(),Q=j-2*M,pe=ee-2*M;if(QQ&&te>D;)te--,V.style("font-size",`${te}px`);let ce=Math.max(I,Math.min(_,Math.round(te*de))),ue=te+P+ce;for(;ue>pe&&te>D&&(te--,ce=Math.max(I,Math.min(_,Math.round(te*de))),!(cepe;V.style("font-size",`${te}px`),O?(teQ||te(V.x1-V.x0)/2).attr("y",function(V){return(V.y1-V.y0)/2}).attr("style",V=>{let j=`text-anchor: middle; dominant-baseline: hanging; font-size: ${_}px;fill:`+T(V.data.name)+";",ee=Bt({cssCompiledStyles:V.data.cssCompiledStyles});return j+ee.labelStyles.replace("color:","fill:")}).attr("clip-path",(V,j)=>`url(#clip-${t}-${j})`).text(V=>V.value?y(V.value):"").each(function(V){let j=ct(this),ee=this.parentNode;if(!ee){j.style("display","none");return}let ne=ct(ee).select(".treemapLabel");if(ne.empty()||ne.style("display")==="none"){j.style("display","none");return}let Q=parseFloat(ne.style("font-size")),te=Math.max(I,Math.min(_,Math.round(Q*.6)));j.style("font-size",`${te}px`);let ce=(V.y1-V.y0)/2+Q/2+P;j.attr("y",ce);let ue=V.x1-V.x0,Ge=V.y1-V.y0-4,He=ue-2*M;j.node().getComputedTextLength()>He||ce+te>Ge||te{let t=ds(),r=It(),n=Qr(t,r.themeVariables),i=Qr(bRt,e),a=i.titleColor??n.titleColor,s=i.labelColor??n.textColor,o=i.valueColor??n.textColor;return` .treemapNode.section { - stroke: ${n.sectionStrokeColor}; - stroke-width: ${n.sectionStrokeWidth}; - fill: ${n.sectionFillColor}; + stroke: ${i.sectionStrokeColor}; + stroke-width: ${i.sectionStrokeWidth}; + fill: ${i.sectionFillColor}; } .treemapNode.leaf { - stroke: ${n.leafStrokeColor}; - stroke-width: ${n.leafStrokeWidth}; - fill: ${n.leafFillColor}; + stroke: ${i.leafStrokeColor}; + stroke-width: ${i.leafStrokeWidth}; + fill: ${i.leafFillColor}; } .treemapLabel { fill: ${s}; - font-size: ${n.labelFontSize}; + font-size: ${i.labelFontSize}; } .treemapValue { fill: ${o}; - font-size: ${n.valueFontSize}; + font-size: ${i.valueFontSize}; } .treemapTitle { fill: ${a}; - font-size: ${n.titleFontSize}; - } - `},"getStyles"),i3t=r3t,n3t={parser:FLe,get db(){return new PLe},renderer:e3t,styles:i3t}});var sRe={};Lr(sRe,{diagram:()=>g3t});function VLe(){return we()["wardley-beta"]}function WLe(e,t,r,i,n,a,s,o,l){Ga.addNode({id:e,label:t,x:r,y:i,className:n,labelOffsetX:a,labelOffsetY:s,inertia:o,sourceStrategy:l})}function ULe(e,t,r=!1,i,n){Ga.addLink({source:e,target:t,dashed:r,label:i,flow:n})}function HLe(e,t,r){Ga.addTrend({nodeId:e,targetX:t,targetY:r})}function YLe(e,t,r){Ga.addAnnotation({number:e,coordinates:t,text:r})}function jLe(e,t,r){Ga.addNote({text:e,x:t,y:r})}function XLe(e,t,r){Ga.addAccelerator({name:e,x:t,y:r})}function KLe(e,t,r){Ga.addDeaccelerator({name:e,x:t,y:r})}function ZLe(e,t){Ga.setAnnotationsBox(e,t)}function QLe(e,t){Ga.setSize(e,t)}function JLe(e){Ga.startPipeline(e)}function eRe(e,t){Ga.addPipelineComponent(e,t)}function tRe(e){Ga.setAxes(e)}function rRe(e){return Ga.getNode(e)}function iRe(e){return Ga.resolveNodeId(e)}function nRe(){return Ga.build()}function aRe(){Ga.clear(),fr()}var d7,Yg,GLe,a3t,s3t,qLe,o3t,Ga,l3t,c3t,u3t,h3t,f3t,d3t,p3t,g3t,oRe=q(()=>{Ja();au();$r();Er();er();fl();d7=b((e,t)=>{let r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),Yg=b((e,t,r)=>({x:d7(t,`${r} evolution`),y:d7(e,`${r} visibility`)}),"toCoordinates"),GLe=b(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),a3t=b(e=>{if(!e?.startsWith("+"))return{};let r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),s3t=b((e,t)=>{if(Un(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(n=>n.secondName?`${n.name.trim()} / ${n.secondName.trim()}`:n.name.trim()),i=e.evolution.stages.filter(n=>n.boundary!==void 0).map(n=>n.boundary);t.updateAxes({stages:r,stageBoundaries:i})}if(e.anchors.forEach(r=>{let i=Yg(r.visibility,r.evolution,`Anchor "${r.name}"`);t.addNode(r.name,r.name,i.x,i.y,"anchor")}),e.components.forEach(r=>{let i=Yg(r.visibility,r.evolution,`Component "${r.name}"`),n=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,a=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,s=r.decorator?.strategy;t.addNode(r.name,r.name,i.x,i.y,"component",n,a,r.inertia,s)}),e.notes.forEach(r=>{let i=Yg(r.visibility,r.evolution,`Note "${r.text}"`);t.addNote(r.text,i.x,i.y)}),e.pipelines.forEach(r=>{let i=t.getNode(r.parent);if(!i||typeof i.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let n=i.y;t.startPipeline(r.parent),r.components.forEach(a=>{let s=`${r.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,l=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,u=d7(a.evolution,`Pipeline component "${a.name}" evolution`);t.addNode(s,a.name,u,n,"pipeline-component",o,l),t.addPipelineComponent(r.parent,s)})}),e.links.forEach(r=>{let i=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),n=GLe(r.fromPort)??GLe(r.toPort),{flow:a,label:s}=a3t(r.arrow);!n&&a&&(n=a);let o=r.linkLabel,l=s??o;t.addLink(t.resolveNodeId(r.from),t.resolveNodeId(r.to),i,l,n)}),e.evolves.forEach(r=>{let i=t.getNode(r.component);if(i?.y!==void 0){let n=d7(r.target,`Evolve target for "${r.component}"`);t.addTrend(r.component,n,i.y)}}),e.annotations.length>0){let r=e.annotations[0],i=Yg(r.x,r.y,"Annotations box");t.setAnnotationsBox(i.x,i.y)}e.annotation.forEach(r=>{let i=Yg(r.x,r.y,`Annotation ${r.number}`);t.addAnnotation(r.number,[{x:i.x,y:i.y}],r.text)}),e.accelerators.forEach(r=>{let i=Yg(r.x,r.y,`Accelerator "${r.name}"`);t.addAccelerator(r.name,i.x,i.y)}),e.deaccelerators.forEach(r=>{let i=Yg(r.x,r.y,`Deaccelerator "${r.name}"`);t.addDeaccelerator(r.name,i.x,i.y)})},"populateDb"),qLe={parser:{yy:void 0},parse:b(async e=>{let t=await xn("wardley",e);ee.debug(t);let r=qLe.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");s3t(t,r)},"parse")},o3t=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{b(this,"WardleyBuilder")}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let r=this.pipelines.get(e);r&&r.componentIds.push(t);let i=this.nodes.get(t);i&&(i.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,r]of this.nodes)if(r.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!="number"||typeof t.y!="number")throw new Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},Ga=new o3t;b(VLe,"getConfig");b(WLe,"addNode");b(ULe,"addLink");b(HLe,"addTrend");b(YLe,"addAnnotation");b(jLe,"addNote");b(XLe,"addAccelerator");b(KLe,"addDeaccelerator");b(ZLe,"setAnnotationsBox");b(QLe,"setSize");b(JLe,"startPipeline");b(eRe,"addPipelineComponent");b(tRe,"updateAxes");b(rRe,"getNode");b(iRe,"resolveNodeId");b(nRe,"getWardleyData");b(aRe,"clear");l3t={getConfig:VLe,addNode:WLe,addLink:ULe,addTrend:HLe,addAnnotation:YLe,addNote:jLe,addAccelerator:XLe,addDeaccelerator:KLe,setAnnotationsBox:ZLe,setSize:QLe,startPipeline:JLe,addPipelineComponent:eRe,updateAxes:tRe,getNode:rRe,resolveNodeId:iRe,getWardleyData:nRe,clear:aRe,setAccTitle:yr,getAccTitle:vr,setDiagramTitle:kr,getDiagramTitle:Tr,getAccDescription:xr,setAccDescription:br},c3t=["Genesis","Custom Built","Product","Commodity"],u3t=b(()=>{let{themeVariables:e}=we();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),h3t=b(()=>{let e=we()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),f3t=b((e,t,r,i)=>{ee.debug(`Rendering Wardley map -`+e);let n=h3t(),a=u3t(),s=n.nodeRadius*1.6,o=i.db,l=o.getWardleyData(),u=o.getDiagramTitle(),h=l.size?.width??n.width,f=l.size?.height??n.height,d=yi(t);d.selectAll("*").remove(),Mr(d,f,h,n.useMaxWidth),d.attr("viewBox",`0 0 ${h} ${f}`);let p=d.append("g").attr("class","wardley-map"),g=d.append("defs");g.append("marker").attr("id",`arrow-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.evolutionStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-end-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.linkStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-start-${t}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",a.linkStroke).attr("stroke","none"),p.append("rect").attr("class","wardley-background").attr("width",h).attr("height",f).attr("fill",a.backgroundColor);let m=h-n.padding*2,y=f-n.padding*2;u&&p.append("text").attr("class","wardley-title").attr("x",h/2).attr("y",n.padding/2).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);let v=b(M=>n.padding+M/100*m,"projectX"),x=b(M=>f-n.padding-M/100*y,"projectY"),T=p.append("g").attr("class","wardley-axes");T.append("line").attr("x1",n.padding).attr("x2",h-n.padding).attr("y1",f-n.padding).attr("y2",f-n.padding).attr("stroke",a.axisColor).attr("stroke-width",1),T.append("line").attr("x1",n.padding).attr("x2",n.padding).attr("y1",n.padding).attr("y2",f-n.padding).attr("stroke",a.axisColor).attr("stroke-width",1);let C=l.axes.xLabel??"Evolution",w=l.axes.yLabel??"Visibility";T.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",n.padding+m/2).attr("y",f-n.padding/4).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(C),T.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",n.padding/3).attr("y",n.padding+y/2).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${n.padding/3} ${n.padding+y/2})`).text(w);let k=l.axes.stages&&l.axes.stages.length>0?l.axes.stages:c3t;if(k.length>0){let M=p.append("g").attr("class","wardley-stages"),F=l.axes.stageBoundaries,z=[];if(F&&F.length===k.length){let $=0;F.forEach(G=>{z.push({start:$,end:G}),$=G})}else{let $=1/k.length;k.forEach((G,U)=>{z.push({start:U*$,end:(U+1)*$})})}k.forEach(($,G)=>{let U=z[G],j=n.padding+U.start*m,H=n.padding+U.end*m,Q=(j+H)/2;G>0&&M.append("line").attr("x1",j).attr("x2",j).attr("y1",n.padding).attr("y2",f-n.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),M.append("text").attr("class","wardley-stage-label").attr("x",Q).attr("y",f-n.padding/1.5).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize-2).attr("text-anchor","middle").text($)})}if(n.showGrid){let M=p.append("g").attr("class","wardley-grid");for(let F=1;F<4;F++){let z=F/4,$=n.padding+m*z;M.append("line").attr("x1",$).attr("x2",$).attr("y1",n.padding).attr("y2",f-n.padding).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6"),M.append("line").attr("x1",n.padding).attr("x2",h-n.padding).attr("y1",f-n.padding-y*z).attr("y2",f-n.padding-y*z).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6")}}let E=new Map;if(l.nodes.forEach(M=>{E.set(M.id,{x:v(M.x),y:x(M.y),node:M})}),l.pipelines.length>0){let M=p.append("g").attr("class","wardley-pipelines"),F=p.append("g").attr("class","wardley-pipeline-links");l.pipelines.forEach(z=>{if(z.componentIds.length===0)return;let $=z.componentIds.map(H=>({id:H,pos:E.get(H),node:l.nodes.find(Q=>Q.id===H)})).filter(H=>H.pos&&H.node).sort((H,Q)=>H.node.x-Q.node.x);for(let H=0;H<$.length-1;H++){let Q=$[H],Y=$[H+1];F.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",Q.pos.x).attr("y1",Q.pos.y).attr("x2",Y.pos.x).attr("y2",Y.pos.y).attr("stroke",a.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let G=1/0,U=-1/0,j=0;if(z.componentIds.forEach(H=>{let Q=E.get(H);Q&&(G=Math.min(G,Q.x),U=Math.max(U,Q.x),j=Q.y)}),G!==1/0&&U!==-1/0){let Q=n.nodeRadius*4,Y=j-Q/2,se=E.get(z.nodeId);if(se){let J=(G+U)/2;se.x=J,se.y=Y-s/6}M.append("rect").attr("class","wardley-pipeline-box").attr("x",G-15).attr("y",Y).attr("width",U-G+30).attr("height",Q).attr("fill","none").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let A=p.append("g").attr("class","wardley-links"),N=new Map;l.pipelines.forEach(M=>{N.set(M.nodeId,new Set(M.componentIds))});let P=l.links.filter(M=>!(!E.has(M.source)||!E.has(M.target)||N.get(M.target)?.has(M.source)));A.selectAll("line").data(P).enter().append("line").attr("class",M=>`wardley-link${M.dashed?" wardley-link--dashed":""}`).attr("x1",M=>{let F=E.get(M.source),z=E.get(M.target),G=l.nodes.find(Q=>Q.id===M.source).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,U=z.x-F.x,j=z.y-F.y,H=Math.sqrt(U*U+j*j);return F.x+U/H*G}).attr("y1",M=>{let F=E.get(M.source),z=E.get(M.target),G=l.nodes.find(Q=>Q.id===M.source).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,U=z.x-F.x,j=z.y-F.y,H=Math.sqrt(U*U+j*j);return F.y+j/H*G}).attr("x2",M=>{let F=E.get(M.source),z=E.get(M.target),G=l.nodes.find(Q=>Q.id===M.target).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,U=F.x-z.x,j=F.y-z.y,H=Math.sqrt(U*U+j*j);return z.x+U/H*G}).attr("y2",M=>{let F=E.get(M.source),z=E.get(M.target),G=l.nodes.find(Q=>Q.id===M.target).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,U=F.x-z.x,j=F.y-z.y,H=Math.sqrt(U*U+j*j);return z.y+j/H*G}).attr("stroke",a.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",M=>M.dashed?"6 6":null).attr("marker-end",M=>M.flow==="forward"||M.flow==="bidirectional"?`url(#link-arrow-end-${t})`:null).attr("marker-start",M=>M.flow==="backward"||M.flow==="bidirectional"?`url(#link-arrow-start-${t})`:null),A.selectAll("text").data(P.filter(M=>M.label)).enter().append("text").attr("class","wardley-link-label").attr("x",M=>{let F=E.get(M.source),z=E.get(M.target),$=(F.x+z.x)/2,G=z.y-F.y,U=z.x-F.x,j=Math.sqrt(U*U+G*G),H=8,Q=G/j;return $+Q*H}).attr("y",M=>{let F=E.get(M.source),z=E.get(M.target),$=(F.y+z.y)/2,G=z.x-F.x,U=z.y-F.y,j=Math.sqrt(G*G+U*U),H=8,Q=-G/j;return $+Q*H}).attr("fill",a.axisTextColor).attr("font-size",n.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",M=>{let F=E.get(M.source),z=E.get(M.target),$=(F.x+z.x)/2,G=(F.y+z.y)/2,U=z.x-F.x,j=z.y-F.y,H=Math.sqrt(U*U+j*j),Q=8,Y=j/H,se=-U/H,J=$+Y*Q,re=G+se*Q,ie=Math.atan2(j,U)*180/Math.PI;return(ie>90||ie<-90)&&(ie+=180),`rotate(${ie} ${J} ${re})`}).text(M=>M.label);let O=p.append("g").attr("class","wardley-trends"),L=l.trends.map(M=>{let F=E.get(M.nodeId);if(!F)return null;let z=v(M.targetX),$=x(M.targetY),G=z-F.x,U=$-F.y,j=Math.sqrt(G*G+U*U),H=n.nodeRadius+2,Q=j>H?z-G/j*H:z,Y=j>H?$-U/j*H:$;return{origin:F,targetX:z,targetY:$,adjustedX2:Q,adjustedY2:Y}}).filter(M=>M!==null);O.selectAll("line").data(L).enter().append("line").attr("class","wardley-trend").attr("x1",M=>M.origin.x).attr("y1",M=>M.origin.y).attr("x2",M=>M.adjustedX2).attr("y2",M=>M.adjustedY2).attr("stroke",a.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${t})`);let R=p.append("g").attr("class","wardley-nodes").selectAll("g").data(l.nodes).enter().append("g").attr("class",M=>["wardley-node",M.className?`wardley-node--${M.className}`:""].filter(Boolean).join(" "));R.filter(M=>M.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",M=>E.get(M.id).x).attr("cy",M=>E.get(M.id).y).attr("r",n.nodeRadius*2).attr("fill","#666").attr("stroke",a.componentStroke).attr("stroke-width",1),R.filter(M=>M.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",M=>E.get(M.id).x).attr("cy",M=>E.get(M.id).y).attr("r",n.nodeRadius*2).attr("fill","#ccc").attr("stroke",a.componentStroke).attr("stroke-width",1),R.filter(M=>M.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",M=>E.get(M.id).x).attr("cy",M=>E.get(M.id).y).attr("r",n.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let D=R.filter(M=>M.sourceStrategy==="market");D.append("circle").attr("class","wardley-market-overlay").attr("cx",M=>E.get(M.id).x).attr("cy",M=>E.get(M.id).y).attr("r",n.nodeRadius*2).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),R.filter(M=>!M.isPipelineParent&&M.sourceStrategy!=="market"&&M.className!=="anchor").append("circle").attr("cx",M=>E.get(M.id).x).attr("cy",M=>E.get(M.id).y).attr("r",n.nodeRadius).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1);let I=n.nodeRadius*.7,B=n.nodeRadius*1.2;if(D.append("line").attr("class","wardley-market-line").attr("x1",M=>E.get(M.id).x).attr("y1",M=>E.get(M.id).y-B).attr("x2",M=>E.get(M.id).x-B*Math.cos(Math.PI/6)).attr("y2",M=>E.get(M.id).y+B*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),D.append("line").attr("class","wardley-market-line").attr("x1",M=>E.get(M.id).x-B*Math.cos(Math.PI/6)).attr("y1",M=>E.get(M.id).y+B*Math.sin(Math.PI/6)).attr("x2",M=>E.get(M.id).x+B*Math.cos(Math.PI/6)).attr("y2",M=>E.get(M.id).y+B*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),D.append("line").attr("class","wardley-market-line").attr("x1",M=>E.get(M.id).x+B*Math.cos(Math.PI/6)).attr("y1",M=>E.get(M.id).y+B*Math.sin(Math.PI/6)).attr("x2",M=>E.get(M.id).x).attr("y2",M=>E.get(M.id).y-B).attr("stroke",a.componentStroke).attr("stroke-width",1),D.append("circle").attr("class","wardley-market-dot").attr("cx",M=>E.get(M.id).x).attr("cy",M=>E.get(M.id).y-B).attr("r",I).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),D.append("circle").attr("class","wardley-market-dot").attr("cx",M=>E.get(M.id).x-B*Math.cos(Math.PI/6)).attr("cy",M=>E.get(M.id).y+B*Math.sin(Math.PI/6)).attr("r",I).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),D.append("circle").attr("class","wardley-market-dot").attr("cx",M=>E.get(M.id).x+B*Math.cos(Math.PI/6)).attr("cy",M=>E.get(M.id).y+B*Math.sin(Math.PI/6)).attr("r",I).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),R.filter(M=>M.isPipelineParent===!0).append("rect").attr("x",M=>E.get(M.id).x-s/2).attr("y",M=>E.get(M.id).y-s/2).attr("width",s).attr("height",s).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1),R.filter(M=>M.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",M=>{let F=E.get(M.id),z=M.isPipelineParent?s/2+15:n.nodeRadius+15;return M.sourceStrategy&&(z+=n.nodeRadius+10),F.x+z}).attr("y1",M=>{let F=E.get(M.id),z=M.isPipelineParent?s:n.nodeRadius*2;return F.y-z/2}).attr("x2",M=>{let F=E.get(M.id),z=M.isPipelineParent?s/2+15:n.nodeRadius+15;return M.sourceStrategy&&(z+=n.nodeRadius+10),F.x+z}).attr("y2",M=>{let F=E.get(M.id),z=M.isPipelineParent?s:n.nodeRadius*2;return F.y+z/2}).attr("stroke",a.componentStroke).attr("stroke-width",6),R.append("text").attr("x",M=>{let F=E.get(M.id);if(M.className==="anchor")return M.labelOffsetX!==void 0?F.x+M.labelOffsetX:F.x;let z=n.nodeLabelOffset;M.sourceStrategy&&M.labelOffsetX===void 0&&(z+=10);let $=M.labelOffsetX??z;return F.x+$}).attr("y",M=>{let F=E.get(M.id);if(M.className==="anchor")return M.labelOffsetY!==void 0?F.y+M.labelOffsetY:F.y-3;let z=-n.nodeLabelOffset;M.sourceStrategy&&M.labelOffsetY===void 0&&(z-=10);let $=M.labelOffsetY??z;return F.y+$}).attr("class","wardley-node-label").attr("fill",M=>M.className==="evolved"?a.evolutionStroke:M.className==="anchor"?"#000":a.componentLabelColor).attr("font-size",n.labelFontSize).attr("font-weight",M=>M.className==="anchor"?"bold":"normal").attr("text-anchor",M=>M.className==="anchor"?"middle":"start").attr("dominant-baseline",M=>M.className==="anchor"?"middle":"auto").text(M=>M.label),l.annotations.length>0){let M=p.append("g").attr("class","wardley-annotations");if(l.annotations.forEach(F=>{let z=F.coordinates.map($=>({x:v($.x),y:x($.y)}));if(z.length>1)for(let $=0;${let G=M.append("g").attr("class","wardley-annotation");G.append("circle").attr("cx",$.x).attr("cy",$.y).attr("r",10).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5),G.append("text").attr("x",$.x).attr("y",$.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text(F.number)})}),l.annotationsBox){let F=v(l.annotationsBox.x),z=x(l.annotationsBox.y),$=10,G=16,U=11,j=M.append("g").attr("class","wardley-annotations-box"),H=[...l.annotations].filter(Y=>Y.text).sort((Y,se)=>Y.number-se.number),Q=[];if(H.forEach((Y,se)=>{let J=j.append("text").attr("x",F+$).attr("y",z+$+(se+1)*G).attr("font-size",U).attr("fill",a.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${Y.number}. ${Y.text}`);Q.push(J)}),Q.length>0){let Y=0,se=0;Q.forEach(Se=>{let Me=Se.node(),ke=Me.getComputedTextLength();Y=Math.max(Y,ke);let Ce=Me.getBBox();se=Math.max(se,Ce.height)});let J=Y+$*2+105,re=H.length*G+$*2+se/2,ie=n.padding,te=h-n.padding-J,xe=n.padding,fe=f-n.padding-re;F=Math.max(ie,Math.min(F,te)),z=Math.max(xe,Math.min(z,fe)),Q.forEach((Se,Me)=>{Se.attr("x",F+$).attr("y",z+$+(Me+1)*G)}),j.insert("rect","text").attr("x",F).attr("y",z).attr("width",J).attr("height",re).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(l.notes.length>0){let M=p.append("g").attr("class","wardley-notes");l.notes.forEach(F=>{let z=v(F.x),$=x(F.y);M.append("text").attr("x",z).attr("y",$).attr("text-anchor","start").attr("font-size",11).attr("fill",a.axisTextColor).attr("font-weight","bold").text(F.text)})}if(l.accelerators.length>0){let M=p.append("g").attr("class","wardley-accelerators");l.accelerators.forEach(F=>{let z=v(F.x),$=x(F.y),G=60,U=30,j=20,H=` - M ${z} ${$-U/2} - L ${z+G-j} ${$-U/2} - L ${z+G-j} ${$-U/2-8} - L ${z+G} ${$} - L ${z+G-j} ${$+U/2+8} - L ${z+G-j} ${$+U/2} - L ${z} ${$+U/2} + font-size: ${i.titleFontSize}; + } + `},"getStyles"),wRt=TRt,CRt={parser:r9e,get db(){return new e9e},renderer:xRt,styles:wRt}});var k9e={};cr(k9e,{diagram:()=>NRt});function o9e(){return ze()["wardley-beta"]}function l9e(e,t,r,n,i,a,s,o,l){ks.addNode({id:e,label:t,x:r,y:n,className:i,labelOffsetX:a,labelOffsetY:s,inertia:o,sourceStrategy:l})}function c9e(e,t,r=!1,n,i){ks.addLink({source:e,target:t,dashed:r,label:n,flow:i})}function u9e(e,t,r){ks.addTrend({nodeId:e,targetX:t,targetY:r})}function h9e(e,t,r){ks.addAnnotation({number:e,coordinates:t,text:r})}function f9e(e,t,r){ks.addNote({text:e,x:t,y:r})}function d9e(e,t,r){ks.addAccelerator({name:e,x:t,y:r})}function p9e(e,t,r){ks.addDeaccelerator({name:e,x:t,y:r})}function g9e(e,t){ks.setAnnotationsBox(e,t)}function m9e(e,t){ks.setSize(e,t)}function y9e(e){ks.startPipeline(e)}function v9e(e,t){ks.addPipelineComponent(e,t)}function x9e(e){ks.setAxes(e)}function b9e(e){return ks.getNode(e)}function T9e(e){return ks.resolveNodeId(e)}function w9e(){return ks.build()}function C9e(){ks.clear(),pr()}var eL,Qm,a9e,kRt,SRt,s9e,ERt,ks,ARt,_Rt,RRt,LRt,IRt,MRt,DRt,NRt,S9e=X(()=>{Us();qi();Ur();hr();ur();Yt();ss();eL=v((e,t)=>{let r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),Qm=v((e,t,r)=>({x:eL(t,`${r} evolution`),y:eL(e,`${r} visibility`)}),"toCoordinates"),a9e=v(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),kRt=v(e=>{if(!e?.startsWith("+"))return{};let r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),SRt=v((e,t)=>{if(Fn(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(i=>i.secondName?`${i.name.trim()} / ${i.secondName.trim()}`:i.name.trim()),n=e.evolution.stages.filter(i=>i.boundary!==void 0).map(i=>i.boundary);t.updateAxes({stages:r,stageBoundaries:n})}if(e.anchors.forEach(r=>{let n=Qm(r.visibility,r.evolution,`Anchor "${r.name}"`);t.addNode(r.name,r.name,n.x,n.y,"anchor")}),e.components.forEach(r=>{let n=Qm(r.visibility,r.evolution,`Component "${r.name}"`),i=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,a=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,s=r.decorator?.strategy;t.addNode(r.name,r.name,n.x,n.y,"component",i,a,r.inertia,s)}),e.notes.forEach(r=>{let n=Qm(r.visibility,r.evolution,`Note "${r.text}"`);t.addNote(r.text,n.x,n.y)}),e.pipelines.forEach(r=>{let n=t.getNode(r.parent);if(!n||typeof n.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let i=n.y;t.startPipeline(r.parent),r.components.forEach(a=>{let s=`${r.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,l=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,u=eL(a.evolution,`Pipeline component "${a.name}" evolution`);t.addNode(s,a.name,u,i,"pipeline-component",o,l),t.addPipelineComponent(r.parent,s)})}),e.links.forEach(r=>{let n=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),i=a9e(r.fromPort)??a9e(r.toPort),{flow:a,label:s}=kRt(r.arrow);!i&&a&&(i=a);let o=r.linkLabel,l=s??o;t.addLink(t.resolveNodeId(r.from),t.resolveNodeId(r.to),n,l,i)}),e.evolves.forEach(r=>{let n=t.getNode(r.component);if(n?.y!==void 0){let i=eL(r.target,`Evolve target for "${r.component}"`);t.addTrend(r.component,i,n.y)}}),e.annotations.length>0){let r=e.annotations[0],n=Qm(r.x,r.y,"Annotations box");t.setAnnotationsBox(n.x,n.y)}e.annotation.forEach(r=>{let n=Qm(r.x,r.y,`Annotation ${r.number}`);t.addAnnotation(r.number,[{x:n.x,y:n.y}],r.text)}),e.accelerators.forEach(r=>{let n=Qm(r.x,r.y,`Accelerator "${r.name}"`);t.addAccelerator(r.name,n.x,n.y)}),e.deaccelerators.forEach(r=>{let n=Qm(r.x,r.y,`Deaccelerator "${r.name}"`);t.addDeaccelerator(r.name,n.x,n.y)})},"populateDb"),s9e={parser:{yy:void 0},parse:v(async e=>{let t=await Ei("wardley",e);fe.debug(t);let r=s9e.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");SRt(t,r)},"parse")},ERt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{v(this,"WardleyBuilder")}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let r=this.pipelines.get(e);r&&r.componentIds.push(t);let n=this.nodes.get(t);n&&(n.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,r]of this.nodes)if(r.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!="number"||typeof t.y!="number")throw new Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},ks=new ERt;v(o9e,"getConfig");v(l9e,"addNode");v(c9e,"addLink");v(u9e,"addTrend");v(h9e,"addAnnotation");v(f9e,"addNote");v(d9e,"addAccelerator");v(p9e,"addDeaccelerator");v(g9e,"setAnnotationsBox");v(m9e,"setSize");v(y9e,"startPipeline");v(v9e,"addPipelineComponent");v(x9e,"updateAxes");v(b9e,"getNode");v(T9e,"resolveNodeId");v(w9e,"getWardleyData");v(C9e,"clear");ARt={getConfig:o9e,addNode:l9e,addLink:c9e,addTrend:u9e,addAnnotation:h9e,addNote:f9e,addAccelerator:d9e,addDeaccelerator:p9e,setAnnotationsBox:g9e,setSize:m9e,startPipeline:y9e,addPipelineComponent:v9e,updateAxes:x9e,getNode:b9e,resolveNodeId:T9e,getWardleyData:w9e,clear:C9e,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,getAccDescription:Mr,setAccDescription:Ir},_Rt=["Genesis","Custom Built","Product","Commodity"],RRt=v(()=>{let{themeVariables:e}=ze();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),LRt=v(()=>{let e=ze()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),IRt=v((e,t,r,n)=>{fe.debug(`Rendering Wardley map +`+e);let i=LRt(),a=RRt(),s=i.nodeRadius*1.6,o=n.db,l=o.getWardleyData(),u=o.getDiagramTitle(),h=l.size?.width??i.width,f=l.size?.height??i.height,d=xn(t);d.selectAll("*").remove(),Vr(d,f,h,i.useMaxWidth),d.attr("viewBox",`0 0 ${h} ${f}`);let p=d.append("g").attr("class","wardley-map"),g=d.append("defs");g.append("marker").attr("id",`arrow-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.evolutionStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-end-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.linkStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-start-${t}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",a.linkStroke).attr("stroke","none"),p.append("rect").attr("class","wardley-background").attr("width",h).attr("height",f).attr("fill",a.backgroundColor);let m=h-i.padding*2,y=f-i.padding*2;u&&p.append("text").attr("class","wardley-title").attr("x",h/2).attr("y",i.padding/2).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);let x=v(P=>i.padding+P/100*m,"projectX"),b=v(P=>f-i.padding-P/100*y,"projectY"),T=p.append("g").attr("class","wardley-axes");T.append("line").attr("x1",i.padding).attr("x2",h-i.padding).attr("y1",f-i.padding).attr("y2",f-i.padding).attr("stroke",a.axisColor).attr("stroke-width",1),T.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke",a.axisColor).attr("stroke-width",1);let k=l.axes.xLabel??"Evolution",w=l.axes.yLabel??"Visibility";T.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+m/2).attr("y",f-i.padding/4).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(k),T.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+y/2).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+y/2})`).text(w);let C=l.axes.stages&&l.axes.stages.length>0?l.axes.stages:_Rt;if(C.length>0){let P=p.append("g").attr("class","wardley-stages"),$=l.axes.stageBoundaries,G=[];if($&&$.length===C.length){let q=0;$.forEach(z=>{G.push({start:q,end:z}),q=z})}else{let q=1/C.length;C.forEach((z,V)=>{G.push({start:V*q,end:(V+1)*q})})}C.forEach((q,z)=>{let V=G[z],j=i.padding+V.start*m,ee=i.padding+V.end*m,ne=(j+ee)/2;z>0&&P.append("line").attr("x1",j).attr("x2",j).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),P.append("text").attr("class","wardley-stage-label").attr("x",ne).attr("y",f-i.padding/1.5).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(q)})}if(i.showGrid){let P=p.append("g").attr("class","wardley-grid");for(let $=1;$<4;$++){let G=$/4,q=i.padding+m*G;P.append("line").attr("x1",q).attr("x2",q).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6"),P.append("line").attr("x1",i.padding).attr("x2",h-i.padding).attr("y1",f-i.padding-y*G).attr("y2",f-i.padding-y*G).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6")}}let S=new Map;if(l.nodes.forEach(P=>{S.set(P.id,{x:x(P.x),y:b(P.y),node:P})}),l.pipelines.length>0){let P=p.append("g").attr("class","wardley-pipelines"),$=p.append("g").attr("class","wardley-pipeline-links");l.pipelines.forEach(G=>{if(G.componentIds.length===0)return;let q=G.componentIds.map(ee=>({id:ee,pos:S.get(ee),node:l.nodes.find(ne=>ne.id===ee)})).filter(ee=>ee.pos&&ee.node).sort((ee,ne)=>ee.node.x-ne.node.x);for(let ee=0;ee{let ne=S.get(ee);ne&&(z=Math.min(z,ne.x),V=Math.max(V,ne.x),j=ne.y)}),z!==1/0&&V!==-1/0){let ne=i.nodeRadius*4,Q=j-ne/2,pe=S.get(G.nodeId);if(pe){let te=(z+V)/2;pe.x=te,pe.y=Q-s/6}P.append("rect").attr("class","wardley-pipeline-box").attr("x",z-15).attr("y",Q).attr("width",V-z+30).attr("height",ne).attr("fill","none").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let E=p.append("g").attr("class","wardley-links"),L=new Map;l.pipelines.forEach(P=>{L.set(P.nodeId,new Set(P.componentIds))});let N=l.links.filter(P=>!(!S.has(P.source)||!S.has(P.target)||L.get(P.target)?.has(P.source)));E.selectAll("line").data(N).enter().append("line").attr("class",P=>`wardley-link${P.dashed?" wardley-link--dashed":""}`).attr("x1",P=>{let $=S.get(P.source),G=S.get(P.target),z=l.nodes.find(ne=>ne.id===P.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,V=G.x-$.x,j=G.y-$.y,ee=Math.sqrt(V*V+j*j);return $.x+V/ee*z}).attr("y1",P=>{let $=S.get(P.source),G=S.get(P.target),z=l.nodes.find(ne=>ne.id===P.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,V=G.x-$.x,j=G.y-$.y,ee=Math.sqrt(V*V+j*j);return $.y+j/ee*z}).attr("x2",P=>{let $=S.get(P.source),G=S.get(P.target),z=l.nodes.find(ne=>ne.id===P.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,V=$.x-G.x,j=$.y-G.y,ee=Math.sqrt(V*V+j*j);return G.x+V/ee*z}).attr("y2",P=>{let $=S.get(P.source),G=S.get(P.target),z=l.nodes.find(ne=>ne.id===P.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,V=$.x-G.x,j=$.y-G.y,ee=Math.sqrt(V*V+j*j);return G.y+j/ee*z}).attr("stroke",a.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",P=>P.dashed?"6 6":null).attr("marker-end",P=>P.flow==="forward"||P.flow==="bidirectional"?`url(#link-arrow-end-${t})`:null).attr("marker-start",P=>P.flow==="backward"||P.flow==="bidirectional"?`url(#link-arrow-start-${t})`:null),E.selectAll("text").data(N.filter(P=>P.label)).enter().append("text").attr("class","wardley-link-label").attr("x",P=>{let $=S.get(P.source),G=S.get(P.target),q=($.x+G.x)/2,z=G.y-$.y,V=G.x-$.x,j=Math.sqrt(V*V+z*z),ee=8,ne=z/j;return q+ne*ee}).attr("y",P=>{let $=S.get(P.source),G=S.get(P.target),q=($.y+G.y)/2,z=G.x-$.x,V=G.y-$.y,j=Math.sqrt(z*z+V*V),ee=8,ne=-z/j;return q+ne*ee}).attr("fill",a.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",P=>{let $=S.get(P.source),G=S.get(P.target),q=($.x+G.x)/2,z=($.y+G.y)/2,V=G.x-$.x,j=G.y-$.y,ee=Math.sqrt(V*V+j*j),ne=8,Q=j/ee,pe=-V/ee,te=q+Q*ne,de=z+pe*ne,ce=Math.atan2(j,V)*180/Math.PI;return(ce>90||ce<-90)&&(ce+=180),`rotate(${ce} ${te} ${de})`}).text(P=>P.label);let O=p.append("g").attr("class","wardley-trends"),R=l.trends.map(P=>{let $=S.get(P.nodeId);if(!$)return null;let G=x(P.targetX),q=b(P.targetY),z=G-$.x,V=q-$.y,j=Math.sqrt(z*z+V*V),ee=i.nodeRadius+2,ne=j>ee?G-z/j*ee:G,Q=j>ee?q-V/j*ee:q;return{origin:$,targetX:G,targetY:q,adjustedX2:ne,adjustedY2:Q}}).filter(P=>P!==null);O.selectAll("line").data(R).enter().append("line").attr("class","wardley-trend").attr("x1",P=>P.origin.x).attr("y1",P=>P.origin.y).attr("x2",P=>P.adjustedX2).attr("y2",P=>P.adjustedY2).attr("stroke",a.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${t})`);let D=p.append("g").attr("class","wardley-nodes").selectAll("g").data(l.nodes).enter().append("g").attr("class",P=>["wardley-node",P.className?`wardley-node--${P.className}`:""].filter(Boolean).join(" "));D.filter(P=>P.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",P=>S.get(P.id).x).attr("cy",P=>S.get(P.id).y).attr("r",i.nodeRadius*2).attr("fill","#666").attr("stroke",a.componentStroke).attr("stroke-width",1),D.filter(P=>P.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",P=>S.get(P.id).x).attr("cy",P=>S.get(P.id).y).attr("r",i.nodeRadius*2).attr("fill","#ccc").attr("stroke",a.componentStroke).attr("stroke-width",1),D.filter(P=>P.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",P=>S.get(P.id).x).attr("cy",P=>S.get(P.id).y).attr("r",i.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let I=D.filter(P=>P.sourceStrategy==="market");I.append("circle").attr("class","wardley-market-overlay").attr("cx",P=>S.get(P.id).x).attr("cy",P=>S.get(P.id).y).attr("r",i.nodeRadius*2).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),D.filter(P=>!P.isPipelineParent&&P.sourceStrategy!=="market"&&P.className!=="anchor").append("circle").attr("cx",P=>S.get(P.id).x).attr("cy",P=>S.get(P.id).y).attr("r",i.nodeRadius).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1);let M=i.nodeRadius*.7,B=i.nodeRadius*1.2;if(I.append("line").attr("class","wardley-market-line").attr("x1",P=>S.get(P.id).x).attr("y1",P=>S.get(P.id).y-B).attr("x2",P=>S.get(P.id).x-B*Math.cos(Math.PI/6)).attr("y2",P=>S.get(P.id).y+B*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",P=>S.get(P.id).x-B*Math.cos(Math.PI/6)).attr("y1",P=>S.get(P.id).y+B*Math.sin(Math.PI/6)).attr("x2",P=>S.get(P.id).x+B*Math.cos(Math.PI/6)).attr("y2",P=>S.get(P.id).y+B*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",P=>S.get(P.id).x+B*Math.cos(Math.PI/6)).attr("y1",P=>S.get(P.id).y+B*Math.sin(Math.PI/6)).attr("x2",P=>S.get(P.id).x).attr("y2",P=>S.get(P.id).y-B).attr("stroke",a.componentStroke).attr("stroke-width",1),I.append("circle").attr("class","wardley-market-dot").attr("cx",P=>S.get(P.id).x).attr("cy",P=>S.get(P.id).y-B).attr("r",M).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",P=>S.get(P.id).x-B*Math.cos(Math.PI/6)).attr("cy",P=>S.get(P.id).y+B*Math.sin(Math.PI/6)).attr("r",M).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",P=>S.get(P.id).x+B*Math.cos(Math.PI/6)).attr("cy",P=>S.get(P.id).y+B*Math.sin(Math.PI/6)).attr("r",M).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),D.filter(P=>P.isPipelineParent===!0).append("rect").attr("x",P=>S.get(P.id).x-s/2).attr("y",P=>S.get(P.id).y-s/2).attr("width",s).attr("height",s).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1),D.filter(P=>P.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",P=>{let $=S.get(P.id),G=P.isPipelineParent?s/2+15:i.nodeRadius+15;return P.sourceStrategy&&(G+=i.nodeRadius+10),$.x+G}).attr("y1",P=>{let $=S.get(P.id),G=P.isPipelineParent?s:i.nodeRadius*2;return $.y-G/2}).attr("x2",P=>{let $=S.get(P.id),G=P.isPipelineParent?s/2+15:i.nodeRadius+15;return P.sourceStrategy&&(G+=i.nodeRadius+10),$.x+G}).attr("y2",P=>{let $=S.get(P.id),G=P.isPipelineParent?s:i.nodeRadius*2;return $.y+G/2}).attr("stroke",a.componentStroke).attr("stroke-width",6),D.append("text").attr("x",P=>{let $=S.get(P.id);if(P.className==="anchor")return P.labelOffsetX!==void 0?$.x+P.labelOffsetX:$.x;let G=i.nodeLabelOffset;P.sourceStrategy&&P.labelOffsetX===void 0&&(G+=10);let q=P.labelOffsetX??G;return $.x+q}).attr("y",P=>{let $=S.get(P.id);if(P.className==="anchor")return P.labelOffsetY!==void 0?$.y+P.labelOffsetY:$.y-3;let G=-i.nodeLabelOffset;P.sourceStrategy&&P.labelOffsetY===void 0&&(G-=10);let q=P.labelOffsetY??G;return $.y+q}).attr("class","wardley-node-label").attr("fill",P=>P.className==="evolved"?a.evolutionStroke:P.className==="anchor"?"#000":a.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",P=>P.className==="anchor"?"bold":"normal").attr("text-anchor",P=>P.className==="anchor"?"middle":"start").attr("dominant-baseline",P=>P.className==="anchor"?"middle":"auto").text(P=>P.label),l.annotations.length>0){let P=p.append("g").attr("class","wardley-annotations");if(l.annotations.forEach($=>{let G=$.coordinates.map(q=>({x:x(q.x),y:b(q.y)}));if(G.length>1)for(let q=0;q{let z=P.append("g").attr("class","wardley-annotation");z.append("circle").attr("cx",q.x).attr("cy",q.y).attr("r",10).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5),z.append("text").attr("x",q.x).attr("y",q.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.number)})}),l.annotationsBox){let $=x(l.annotationsBox.x),G=b(l.annotationsBox.y),q=10,z=16,V=11,j=P.append("g").attr("class","wardley-annotations-box"),ee=[...l.annotations].filter(Q=>Q.text).sort((Q,pe)=>Q.number-pe.number),ne=[];if(ee.forEach((Q,pe)=>{let te=j.append("text").attr("x",$+q).attr("y",G+q+(pe+1)*z).attr("font-size",V).attr("fill",a.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${Q.number}. ${Q.text}`);ne.push(te)}),ne.length>0){let Q=0,pe=0;ne.forEach(Ge=>{let He=Ge.node(),Ue=He.getComputedTextLength();Q=Math.max(Q,Ue);let me=He.getBBox();pe=Math.max(pe,me.height)});let te=Q+q*2+105,de=ee.length*z+q*2+pe/2,ce=i.padding,ue=h-i.padding-te,Re=i.padding,ve=f-i.padding-de;$=Math.max(ce,Math.min($,ue)),G=Math.max(Re,Math.min(G,ve)),ne.forEach((Ge,He)=>{Ge.attr("x",$+q).attr("y",G+q+(He+1)*z)}),j.insert("rect","text").attr("x",$).attr("y",G).attr("width",te).attr("height",de).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(l.notes.length>0){let P=p.append("g").attr("class","wardley-notes");l.notes.forEach($=>{let G=x($.x),q=b($.y);P.append("text").attr("x",G).attr("y",q).attr("text-anchor","start").attr("font-size",11).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.text)})}if(l.accelerators.length>0){let P=p.append("g").attr("class","wardley-accelerators");l.accelerators.forEach($=>{let G=x($.x),q=b($.y),z=60,V=30,j=20,ee=` + M ${G} ${q-V/2} + L ${G+z-j} ${q-V/2} + L ${G+z-j} ${q-V/2-8} + L ${G+z} ${q} + L ${G+z-j} ${q+V/2+8} + L ${G+z-j} ${q+V/2} + L ${G} ${q+V/2} Z - `;M.append("path").attr("d",H).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),M.append("text").attr("x",z+G/2).attr("y",$+U/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text(F.name)})}if(l.deaccelerators.length>0){let M=p.append("g").attr("class","wardley-deaccelerators");l.deaccelerators.forEach(F=>{let z=v(F.x),$=x(F.y),G=60,U=30,j=20,H=` - M ${z+G} ${$-U/2} - L ${z+j} ${$-U/2} - L ${z+j} ${$-U/2-8} - L ${z} ${$} - L ${z+j} ${$+U/2+8} - L ${z+j} ${$+U/2} - L ${z+G} ${$+U/2} + `;P.append("path").attr("d",ee).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),P.append("text").attr("x",G+z/2).attr("y",q+V/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.name)})}if(l.deaccelerators.length>0){let P=p.append("g").attr("class","wardley-deaccelerators");l.deaccelerators.forEach($=>{let G=x($.x),q=b($.y),z=60,V=30,j=20,ee=` + M ${G+z} ${q-V/2} + L ${G+j} ${q-V/2} + L ${G+j} ${q-V/2-8} + L ${G} ${q} + L ${G+j} ${q+V/2+8} + L ${G+j} ${q+V/2} + L ${G+z} ${q+V/2} Z - `;M.append("path").attr("d",H).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),M.append("text").attr("x",z+G/2).attr("y",$+U/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text(F.name)})}},"draw"),d3t={draw:f3t},p3t=b(({wardley:e}={})=>{let t=yl(),r=It(),i=Yr(t,r.themeVariables),n=Yr(i.wardley,e);return` + `;P.append("path").attr("d",ee).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),P.append("text").attr("x",G+z/2).attr("y",q+V/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.name)})}},"draw"),MRt={draw:IRt},DRt=v(({wardley:e}={})=>{let t=ds(),r=It(),n=Qr(t,r.themeVariables),i=Qr(n.wardley,e);return` .wardley-background { - fill: ${n.backgroundColor}; + fill: ${i.backgroundColor}; } .wardley-axes line, .wardley-axes path { - stroke: ${n.axisColor}; + stroke: ${i.axisColor}; } .wardley-axis-label { - fill: ${n.axisTextColor}; + fill: ${i.axisTextColor}; } .wardley-stage-label { - fill: ${n.axisTextColor}; + fill: ${i.axisTextColor}; } .wardley-grid line { - stroke: ${n.gridColor}; + stroke: ${i.gridColor}; } .wardley-node circle { - fill: ${n.componentFill}; - stroke: ${n.componentStroke}; + fill: ${i.componentFill}; + stroke: ${i.componentStroke}; } .wardley-node-label { - fill: ${n.componentLabelColor}; + fill: ${i.componentLabelColor}; } .wardley-link { - stroke: ${n.linkStroke}; + stroke: ${i.linkStroke}; } .wardley-link--dashed { stroke-dasharray: 4 4; } .wardley-link-label { - fill: ${n.axisTextColor}; + fill: ${i.axisTextColor}; } .wardley-trend line { - stroke: ${n.evolutionStroke}; + stroke: ${i.evolutionStroke}; } .wardley-annotation-line { - stroke: ${n.annotationStroke}; + stroke: ${i.annotationStroke}; } .wardley-annotation circle { - fill: ${n.annotationFill}; - stroke: ${n.annotationStroke}; + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; } .wardley-annotation text { - fill: ${n.annotationTextColor}; + fill: ${i.annotationTextColor}; } .wardley-annotations-box rect { - fill: ${n.annotationFill}; - stroke: ${n.annotationStroke}; + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; } .wardley-annotations-box text { - fill: ${n.annotationTextColor}; + fill: ${i.annotationTextColor}; } .wardley-pipeline-box { - stroke: ${n.componentStroke}; + stroke: ${i.componentStroke}; } .wardley-notes text { - fill: ${n.axisTextColor}; - } - `},"styles"),g3t={parser:qLe,db:l3t,renderer:d3t,styles:p3t}});eL();Ja();Z2();Zo();Fo();oo();Is();ts();rs();ya();$r();Er();er();OD();Ar();var J1="comm",GS="rule",qS="decl";var v1e="@media",b1e="@import";var x1e="@supports";var T1e="@namespace",qx="@keyframes";var VS="@layer",w1e="@scope";var k1e=Math.abs,I0=String.fromCharCode;function WS(e){return e.trim()}function Vx(e,t,r){return e.replace(t,r)}function Th(e,t){return e.charCodeAt(t)|0}function wh(e,t,r){return e.slice(t,r)}function zs(e){return e.length}function US(e){return e.length}function ey(e,t){return t.push(e),e}var HS=1,ty=1,C1e=0,Qo=0,In=0,iy="";function YS(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:HS,column:ty,length:s,return:"",siblings:o}}function S1e(){return In}function E1e(){return In=Qo>0?Th(iy,--Qo):0,ty--,In===10&&(ty=1,HS--),In}function Jo(){return In=Qo2||ry(In)>3?"":" "}function R1e(e,t){for(;--t&&Jo()&&!(In<48||In>102||In>57&&In<65||In>70&&In<97););return jS(e,Wx()+(t<6&&kh()==32&&Jo()==32))}function mP(e){for(;Jo();)switch(In){case e:return Qo;case 34:case 39:e!==34&&e!==39&&mP(In);break;case 40:e===41&&mP(e);break;case 92:Jo();break}return Qo}function I1e(e,t){for(;Jo()&&e+In!==57;)if(e+In===84&&kh()===47)break;return"/*"+jS(t,Qo-1)+"*"+I0(e===47?e:Jo())}function D1e(e){for(;!ry(kh());)Jo();return jS(e,Qo)}function O1e(e){return _1e(KS("",null,null,null,[""],e=A1e(e),0,[0],e))}function KS(e,t,r,i,n,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,g=0,m=1,y=1,v=1,x=0,T=0,C="",w=n,k=a,E=i,A=C;y;)switch(g=T,T=Jo()){case 40:g!=108&&Th(A,f-1)==58?(x++,A+="("):A+=XS(T);break;case 41:x--,A+=")";break;case 34:case 39:case 91:A+=XS(T);break;case 9:case 10:case 13:case 32:if(x>0){A+=I0(T);break}A+=L1e(g);break;case 92:A+=R1e(Wx()-1,7);continue;case 47:switch(kh()){case 42:case 47:ey(jnt(I1e(Jo(),Wx()),t,r,l),l),(ry(g||1)==5||ry(kh()||1)==5)&&zs(A)&&wh(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*m:o[u++]=zs(A)*v;case 125*m:case 59:case 0:if(x>0&&T){A+=I0(T);break}switch(T){case 0:case 125:y=0;case 59+h:v==-1&&(A=Vx(A,/\f/g,"")),p>0&&(zs(A)-f||m===0)&&ey(p>32?M1e(A+";",i,r,f-1,l):M1e(Vx(A," ","")+";",i,r,f-2,l),l);break;case 59:A+=";";default:if(ey(E=N1e(A,t,r,u,h,n,o,C,w=[],k=[],f,a),a),T===123)if(h===0)KS(A,t,E,E,w,a,f,o,k);else{switch(d){case 99:if(Th(A,3)===110)break;case 108:if(Th(A,2)===97)break;default:h=0;case 100:case 109:case 115:}h?KS(e,E,E,i&&ey(N1e(e,E,E,0,0,n,o,C,n,w=[],f,k),k),n,k,f,o,i?w:k):KS(A,E,E,E,[""],k,0,o,k)}}u=h=p=0,m=v=1,C=A="",f=s;break;case 58:f=1+zs(A),p=g;default:if(m<1){if(T==123)--m;else if(T==125&&m++==0&&E1e()==125)continue}switch(A+=I0(T),T*m){case 38:v=h>0?1:(A+="\f",-1);break;case 44:if(x>0)break;o[u++]=(zs(A)-1)*v,v=1;break;case 64:kh()===45&&(A+=XS(Jo())),d=kh(),h=f=zs(C=A+=D1e(Wx())),T++;break;case 45:g===45&&zs(A)==2&&(m=0)}}return a}function N1e(e,t,r,i,n,a,s,o,l,u,h,f){for(var d=n-1,p=n===0?a:[""],g=US(p),m=0,y=0,v=0;m0?p[x]+" "+T:Vx(T,/&\f/g,p[x])))&&(l[v++]=C);return YS(e,t,r,n===0?GS:o,l,u,h,f)}function jnt(e,t,r,i){return YS(e,t,r,J1,I0(S1e()),wh(e,2,-2),0,i)}function M1e(e,t,r,i,n){return YS(e,t,r,qS,wh(e,0,i),wh(e,i+1,-1),i,n)}function ZS(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),y3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Z1e(),K1e));return{id:fRe,diagram:e}},"loader"),v3t={id:fRe,detector:m3t,loader:y3t},b3t=v3t,dRe="flowchart",x3t=b((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),T3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uE(),cE));return{id:dRe,diagram:e}},"loader"),w3t={id:dRe,detector:x3t,loader:T3t},k3t=w3t,pRe="flowchart-v2",C3t=b((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),S3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uE(),cE));return{id:pRe,diagram:e}},"loader"),E3t={id:pRe,detector:C3t,loader:S3t},A3t=E3t,gRe="er",_3t=b(e=>/^\s*erDiagram/.test(e),"detector"),L3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(iye(),rye));return{id:gRe,diagram:e}},"loader"),R3t={id:gRe,detector:_3t,loader:L3t},I3t=R3t,mRe="gitGraph",D3t=b(e=>/^\s*gitGraph/.test(e),"detector"),N3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(qEe(),GEe));return{id:mRe,diagram:e}},"loader"),M3t={id:mRe,detector:D3t,loader:N3t},O3t=M3t,yRe="gantt",P3t=b(e=>/^\s*gantt/.test(e),"detector"),B3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(u6e(),c6e));return{id:yRe,diagram:e}},"loader"),F3t={id:yRe,detector:P3t,loader:B3t},$3t=F3t,vRe="info",z3t=b(e=>/^\s*info/.test(e),"detector"),G3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(f6e(),h6e));return{id:vRe,diagram:e}},"loader"),q3t={id:vRe,detector:z3t,loader:G3t},bRe="pie",V3t=b(e=>/^\s*pie/.test(e),"detector"),W3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(m6e(),g6e));return{id:bRe,diagram:e}},"loader"),U3t={id:bRe,detector:V3t,loader:W3t},xRe="quadrantChart",H3t=b(e=>/^\s*quadrantChart/.test(e),"detector"),Y3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(N6e(),D6e));return{id:xRe,diagram:e}},"loader"),j3t={id:xRe,detector:H3t,loader:Y3t},X3t=j3t,TRe="xychart",K3t=b(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Z3t=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(tAe(),eAe));return{id:TRe,diagram:e}},"loader"),Q3t={id:TRe,detector:K3t,loader:Z3t},J3t=Q3t,wRe="requirement",eSt=b(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),tSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(nAe(),iAe));return{id:wRe,diagram:e}},"loader"),rSt={id:wRe,detector:eSt,loader:tSt},iSt=rSt,kRe="sequence",nSt=b(e=>/^\s*sequenceDiagram/.test(e),"detector"),aSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bAe(),vAe));return{id:kRe,diagram:e}},"loader"),sSt={id:kRe,detector:nSt,loader:aSt},oSt=sSt,CRe="class",lSt=b((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),cSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CAe(),kAe));return{id:CRe,diagram:e}},"loader"),uSt={id:CRe,detector:lSt,loader:cSt},hSt=uSt,SRe="classDiagram",fSt=b((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),dSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(EAe(),SAe));return{id:SRe,diagram:e}},"loader"),pSt={id:SRe,detector:fSt,loader:dSt},gSt=pSt,ERe="state",mSt=b((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),ySt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(QAe(),ZAe));return{id:ERe,diagram:e}},"loader"),vSt={id:ERe,detector:mSt,loader:ySt},bSt=vSt,ARe="stateDiagram",xSt=b((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),TSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(e_e(),JAe));return{id:ARe,diagram:e}},"loader"),wSt={id:ARe,detector:xSt,loader:TSt},kSt=wSt,_Re="journey",CSt=b(e=>/^\s*journey/.test(e),"detector"),SSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(u_e(),c_e));return{id:_Re,diagram:e}},"loader"),ESt={id:_Re,detector:CSt,loader:SSt},ASt=ESt,_St=b((e,t,r)=>{ee.debug(`rendering svg for syntax error -`);let i=yi(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Mr(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),LRe={draw:_St},LSt=LRe,RSt={db:{},renderer:LRe,parser:{parse:b(()=>{},"parse")}},ISt=RSt,RRe="flowchart-elk",DSt=b((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),NSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uE(),cE));return{id:RRe,diagram:e}},"loader"),MSt={id:RRe,detector:DSt,loader:NSt},OSt=MSt,IRe="timeline",PSt=b(e=>/^\s*timeline/.test(e),"detector"),BSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(O_e(),M_e));return{id:IRe,diagram:e}},"loader"),FSt={id:IRe,detector:PSt,loader:BSt},$St=FSt,DRe="mindmap",zSt=b(e=>/^\s*mindmap/.test(e),"detector"),GSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(q_e(),G_e));return{id:DRe,diagram:e}},"loader"),qSt={id:DRe,detector:zSt,loader:GSt},VSt=qSt,NRe="kanban",WSt=b(e=>/^\s*kanban/.test(e),"detector"),USt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(U_e(),W_e));return{id:NRe,diagram:e}},"loader"),HSt={id:NRe,detector:WSt,loader:USt},YSt=HSt,MRe="sankey",jSt=b(e=>/^\s*sankey(-beta)?/.test(e),"detector"),XSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(m7e(),g7e));return{id:MRe,diagram:e}},"loader"),KSt={id:MRe,detector:jSt,loader:XSt},ZSt=KSt,ORe="packet",QSt=b(e=>/^\s*packet(-beta)?/.test(e),"detector"),JSt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(x7e(),b7e));return{id:ORe,diagram:e}},"loader"),eEt={id:ORe,detector:QSt,loader:JSt},PRe="radar",tEt=b(e=>/^\s*radar-beta/.test(e),"detector"),rEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_7e(),A7e));return{id:PRe,diagram:e}},"loader"),iEt={id:PRe,detector:tEt,loader:rEt},BRe="block",nEt=b(e=>/^\s*block(-beta)?/.test(e),"detector"),aEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(s8e(),a8e));return{id:BRe,diagram:e}},"loader"),sEt={id:BRe,detector:nEt,loader:aEt},oEt=sEt,FRe="treeView",lEt=b(e=>/^\s*treeView-beta/.test(e),"detector"),cEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(c8e(),l8e));return{id:FRe,diagram:e}},"loader"),uEt={id:FRe,detector:lEt,loader:cEt},hEt=uEt,$Re="architecture",fEt=b(e=>/^\s*architecture/.test(e),"detector"),dEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(A8e(),E8e));return{id:$Re,diagram:e}},"loader"),pEt={id:$Re,detector:fEt,loader:dEt},gEt=pEt,zRe="eventmodeling",mEt=b(e=>/^\s*eventmodeling/.test(e),"detector"),yEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(rLe(),tLe));return{id:zRe,diagram:e}},"loader"),vEt={id:zRe,detector:mEt,loader:yEt},bEt=vEt,GRe="ishikawa",xEt=b(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),TEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(hLe(),uLe));return{id:GRe,diagram:e}},"loader"),wEt={id:GRe,detector:xEt,loader:TEt},qRe="venn",kEt=b(e=>/^\s*venn-beta/.test(e),"detector"),CEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(OLe(),MLe));return{id:qRe,diagram:e}},"loader"),SEt={id:qRe,detector:kEt,loader:CEt},EEt=SEt,VRe="treemap",AEt=b(e=>/^\s*treemap/.test(e),"detector"),_Et=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zLe(),$Le));return{id:VRe,diagram:e}},"loader"),LEt={id:VRe,detector:AEt,loader:_Et},WRe="wardley-beta",REt=b(e=>/^\s*wardley-beta/i.test(e),"detector"),IEt=b(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(oRe(),sRe));return{id:WRe,diagram:e}},"loader"),DEt={id:WRe,detector:REt,loader:IEt},NEt=DEt,lRe=!1,g7=b(()=>{lRe||(lRe=!0,Jv("error",ISt,e=>e.toLowerCase().trim()==="error"),Jv("---",{db:{clear:b(()=>{},"clear")},styles:{},renderer:{draw:b(()=>{},"draw")},parser:{parse:b(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:b(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),r4(OSt,VSt,gEt),r4(b3t,YSt,gSt,hSt,I3t,$3t,q3t,U3t,iSt,oSt,A3t,k3t,$St,O3t,kSt,bSt,ASt,X3t,ZSt,eEt,J3t,oEt,bEt,hEt,iEt,wEt,LEt,EEt,NEt))},"addDiagrams"),MEt=b(async()=>{ee.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(yf).map(async([r,{detector:i,loader:n}])=>{if(n)try{l4(r)}catch{try{let{diagram:a,id:s}=await n();Jv(s,a,i)}catch(a){throw ee.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete yf[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){ee.error(`Failed to load ${t.length} external diagrams`);for(let r of t)ee.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),OEt="graphics-document document";function URe(e,t){e.attr("role",OEt),t!==""&&e.attr("aria-roledescription",t)}b(URe,"setA11yDiagramInfo");function HRe(e,t,r,i){if(e.insert!==void 0){if(r){let n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){let n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}b(HRe,"addSVGa11yTitleDescription");var SW=class YRe{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static{b(this,"Diagram")}static async fromText(t,r={}){let i=It(),n=Xv(t,i);t=bie(t)+` -`;try{l4(n)}catch{let u=UY(n);if(!u)throw new xL(`Diagram ${n} not found.`);let{id:h,diagram:f}=await u();Jv(h,f)}let{db:a,parser:s,renderer:o,init:l}=l4(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new YRe(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},cRe=[],PEt=b(()=>{cRe.forEach(e=>{e()}),cRe=[]},"attachFunctions"),BEt=b(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function jRe(e){let t=e.match(bL);if(!t)return{text:e,metadata:{}};let r=If(t[1],{schema:Rf})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}b(jRe,"extractFrontMatter");var FEt=b(e=>e.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),$Et=b(e=>{let{text:t,metadata:r}=jRe(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),zEt=b(e=>{let t=jt.detectInit(e)??{},r=jt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:die(e),directive:t}},"processDirectives");function AW(e){let t=FEt(e),r=$Et(t),i=zEt(r.text),n=Yr(r.config,i.directive);return e=BEt(i.text),{code:e,title:r.title,config:n}}b(AW,"preprocessDiagram");function XRe(e){let t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}b(XRe,"toBase64");var GEt=5e4,qEt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",VEt="sandbox",WEt="loose",UEt="http://www.w3.org/2000/svg",HEt="http://www.w3.org/1999/xlink",YEt="http://www.w3.org/1999/xhtml",jEt="100%",XEt="100%",KEt="border:0;margin:0;",ZEt="margin:0",QEt="allow-top-navigation-by-user-activation allow-popups",JEt='The "iframe" tag is not supported by your browser.',e6t=["foreignobject"],t6t=["dominant-baseline"];function _W(e){let t=AW(e);return Kv(),QY(t.config??{}),t}b(_W,"processAndSetConfigs");async function KRe(e,t){g7();try{let{code:r,config:i}=_W(e);return{diagramType:(await QRe(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}b(KRe,"parse");var uRe=b((e,t,r=[])=>{let i=TL(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),r6t=b((e,t=new Map)=>{let r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){let o=Hr(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{XC(l.styles)||o.forEach(u=>{r.insertRule(uRe(l.id,u,l.styles),r.cssRules.length)}),XC(l.textStyles)||r.insertRule(uRe(l.id,"tspan",(l?.textStyles||[]).map(u=>u.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){let n=new CSSStyleSheet;n.replaceSync(e.themeCSS),i=n4(n)+` -`}else i+=`${e.themeCSS} -`;return i+n4(r)},"createCssStyles"),i6t=b((e,t)=>ZS(O1e(`${e}{${t}}`),B1e([b(function(i,n,a,s){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===qx)return;i.props=i.props.map(o=>o.startsWith(e)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[v1e,x1e,VS,w1e,"@container","@starting-style"],qx].includes(i.type)||(ee.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=J1))},"addNamespace"),P1e])),"compileCSS"),n6t=b((e,t,r,i)=>{let n=r6t(e,r),a=aj(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return i6t(i,a)},"createUserStyles"),a6t=b((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=lo(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),s6t=b((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":XEt,i=XRe(`${e}`);return``},"putIntoIFrame"),hRe=b((e,t,r,i,n)=>{let a=e.append("div");a.attr("id",r),i&&a.attr("style",i);let s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",UEt);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function EW(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}b(EW,"sandboxedIframe");var o6t=b((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),l6t=b(async function(e,t,r){g7();let i=_W(t);t=i.code;let n=It();ee.debug(n),t.length>(n?.maxTextSize??GEt)&&(t=qEt);let a=`#${e}`,s="i"+e,o="#"+s,l="d"+e,u="#"+l,h=b(()=>{let _=Qe(d?o:u).node();_&&"remove"in _&&_.remove()},"removeTempElements"),f=Qe(document.body),d=n.securityLevel===VEt,p=n.securityLevel===WEt,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let L=EW(Qe(r),s);f=Qe(L.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Qe(r);hRe(f,e,l,`font-family: ${g}`,HEt)}else{if(o6t(document,e,l,s),d){let L=EW(Qe(document.body),s);f=Qe(L.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Qe("body");hRe(f,e,l)}let m,y;try{m=await SW.fromText(t,{title:i.title})}catch(L){if(n.suppressErrorRendering)throw h(),L;m=await SW.fromText("error"),y=L}let v=f.select(u).node(),x=m.type,T=v.firstChild,C=T.firstChild,w=m.renderer.getClasses?.(t,m),k=n6t(n,x,w,a),E=document.createElement("style");E.innerHTML=k,T.insertBefore(E,C);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(L){throw n.suppressErrorRendering?h():LSt.draw(t,e,"11.15.0"),L}let A=f.select(`${u} svg`),N=m.db.getAccTitle?.(),P=m.db.getAccDescription?.();JRe(x,A,N,P),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",YEt);let O=f.select(u).node().innerHTML;if(ee.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),O=a6t(O,d,vl(n.arrowMarkerAbsolute)),d){let L=f.select(u+" svg").node();O=s6t(O,L)}else p||(O=No.sanitize(O,{ADD_TAGS:e6t,ADD_ATTR:t6t,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(PEt(),y)throw y;return h(),{diagramType:x,svg:O,bindFunctions:m.db.bindFunctions}},"render");function ZRe(e={}){let t=Di({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),XY(t),t?.theme&&t.theme in vc?t.themeVariables=vc[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=vc.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?jY(t):wL();$v(r.logLevel),g7()}b(ZRe,"initialize");var QRe=b((e,t={})=>{let{code:r}=AW(e);return SW.fromText(r,t)},"getDiagramFromText");function JRe(e,t,r,i){URe(t,e),HRe(t,r,i,t.attr("id"))}b(JRe,"addA11yInfo");var jg=Object.freeze({render:l6t,parse:KRe,getDiagramFromText:QRe,initialize:ZRe,getConfig:It,setConfig:kL,getSiteConfig:wL,updateSiteConfig:KY,reset:b(()=>{Kv()},"reset"),globalReset:b(()=>{Kv(bp)},"globalReset"),defaultConfig:bp});$v(It().logLevel);Kv(It());var c6t=b((e,t,r)=>{ee.warn(e),e5(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),eIe=b(async function(e={querySelector:".mermaid"}){try{await u6t(e)}catch(t){if(e5(t)&&ee.error(t.str),tf.parseError&&tf.parseError(t),!e.suppressErrors)throw ee.error("Use the suppressErrors option to suppress these errors"),t}},"run"),u6t=b(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let i=jg.getConfig();ee.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");ee.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(ee.debug("Start On Load: "+i?.startOnLoad),jg.updateSiteConfig({startOnLoad:i?.startOnLoad}));let a=new jt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,o=[];for(let l of Array.from(n)){if(ee.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=c5(jt.entityDecode(s)).trim().replace(//gi,"
    ");let h=jt.detectInit(s);h&&ee.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await nIe(u,s,l);l.innerHTML=f,e&&await e(u),d&&d(l)}catch(f){c6t(f,o,tf.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),tIe=b(function(e){jg.initialize(e)},"initialize"),h6t=b(async function(e,t,r){ee.warn("mermaid.init is deprecated. Please use run instead."),e&&tIe(e);let i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await eIe(i)},"init"),f6t=b(async(e,{lazyLoad:t=!0}={})=>{g7(),r4(...e),t===!1&&await MEt()},"registerExternalDiagrams"),rIe=b(function(){if(tf.startOnLoad){let{startOnLoad:e}=jg.getConfig();e&&tf.run().catch(t=>ee.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",rIe,!1);var d6t=b(function(e){tf.parseError=e},"setParseErrorHandler"),p7=[],CW=!1,iIe=b(async()=>{if(!CW){for(CW=!0;p7.length>0;){let e=p7.shift();if(e)try{await e()}catch(t){ee.error("Error executing queue",t)}}CW=!1}},"executeQueue"),p6t=b(async(e,t)=>new Promise((r,i)=>{let n=b(()=>new Promise((a,s)=>{jg.parse(e,t).then(o=>{a(o),r(o)},o=>{ee.error("Error parsing",o),tf.parseError?.(o),s(o),i(o)})}),"performCall");p7.push(n),iIe().catch(i)}),"parse"),nIe=b((e,t,r)=>new Promise((i,n)=>{let a=b(()=>new Promise((s,o)=>{jg.render(e,t,r).then(l=>{s(l),i(l)},l=>{ee.error("Error parsing",l),tf.parseError?.(l),o(l),n(l)})}),"performCall");p7.push(a),iIe().catch(n)}),"render"),g6t=b(()=>Object.keys(yf).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),tf={startOnLoad:!0,mermaidAPI:jg,parse:p6t,render:nIe,init:h6t,run:eIe,registerExternalDiagrams:f6t,registerLayoutLoaders:gP,initialize:tIe,parseError:void 0,contentLoaded:rIe,setParseErrorHandler:d6t,detectType:Xv,registerIconPacks:h5,getRegisteredDiagramsMetadata:g6t},LW=tf;var m7=Symbol.for("yaml.alias"),y7=Symbol.for("yaml.document"),tc=Symbol.for("yaml.map"),RW=Symbol.for("yaml.pair"),Ao=Symbol.for("yaml.scalar"),rf=Symbol.for("yaml.seq"),ws=Symbol.for("yaml.node.type"),rc=e=>!!e&&typeof e=="object"&&e[ws]===m7,Eu=e=>!!e&&typeof e=="object"&&e[ws]===y7,ic=e=>!!e&&typeof e=="object"&&e[ws]===tc,Gr=e=>!!e&&typeof e=="object"&&e[ws]===RW,Nr=e=>!!e&&typeof e=="object"&&e[ws]===Ao,nc=e=>!!e&&typeof e=="object"&&e[ws]===rf;function li(e){if(e&&typeof e=="object")switch(e[ws]){case tc:case rf:return!0}return!1}function Ur(e){if(e&&typeof e=="object")switch(e[ws]){case m7:case tc:case Ao:case rf:return!0}return!1}var v7=e=>(Nr(e)||li(e))&&!!e.anchor;var Qs=Symbol("break visit"),aIe=Symbol("skip children"),Au=Symbol("remove node");function _u(e,t){let r=sIe(t);Eu(e)?vv(null,e.contents,r,Object.freeze([e]))===Au&&(e.contents=null):vv(null,e,r,Object.freeze([]))}_u.BREAK=Qs;_u.SKIP=aIe;_u.REMOVE=Au;function vv(e,t,r,i){let n=oIe(e,t,r,i);if(Ur(n)||Gr(n))return lIe(e,i,n),vv(e,n,r,i);if(typeof n!="symbol"){if(li(t)){i=Object.freeze(i.concat(t));for(let a=0;ae.replace(/[!,[\]{}]/g,t=>m6t[t]),Lu=class e{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,r)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let i=t.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[a,s]=i;return this.tags[a]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[a]=i;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{let s=/^\d+\.\d+$/.test(a);return r(6,`Unsupported YAML version ${a}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let s=t.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,i,n]=t.match(/^(.*!)([^!]*)$/s);n||r(`The ${t} tag has no suffix`);let a=this.tags[i];if(a)try{return a+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,i]of Object.entries(this.tags))if(t.startsWith(i))return r+y6t(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(t&&i.length>0&&Ur(t.contents)){let a={};_u(t.contents,(s,o)=>{Ur(o)&&o.tag&&(a[o.tag]=!0)}),n=Object.keys(a)}else n=[];for(let[a,s]of i)a==="!!"&&s==="tag:yaml.org,2002:"||(!t||n.some(o=>o.startsWith(s)))&&r.push(`%TAG ${a} ${s}`);return r.join(` -`)}};Lu.defaultYaml={explicit:!1,version:"1.2"};Lu.defaultTags={"!!":"tag:yaml.org,2002:"};function x7(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function IW(e){let t=new Set;return _u(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function DW(e,t){for(let r=1;;++r){let i=`${e}${r}`;if(!t.has(i))return i}}function cIe(e,t){let r=[],i=new Map,n=null;return{onAnchor:a=>{r.push(a),n??(n=IW(e));let s=DW(t,n);return n.add(s),s},setAnchors:()=>{for(let a of r){let s=i.get(a);if(typeof s=="object"&&s.anchor&&(Nr(s.node)||li(s.node)))s.node.anchor=s.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=a,o}}},sourceObjects:i}}function np(e,t,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,a=i.length;nZn(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!v7(e))return e.toJSON(t,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(e,i),r.onCreate=a=>{i.res=a,delete r.onCreate};let n=e.toJSON(t,r);return r.onCreate&&r.onCreate(n),n}return typeof e=="bigint"&&!r?.keep?Number(e):e}var ap=class{constructor(t){Object.defineProperty(this,ws,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:a}={}){if(!Eu(t))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},o=Zn(this,"",s);if(typeof n=="function")for(let{count:l,res:u}of s.anchors.values())n(u,l);return typeof a=="function"?np(a,{"":o},"",o):o}};var nf=class extends ap{constructor(t){super(m7),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],_u(t,{Node:(a,s)=>{(rc(s)||v7(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(let a of i){if(a===this)break;a.anchor===this.source&&(n=a)}return n}toJSON(t,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:a}=r,s=this.resolve(n,r);if(!s){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=i.get(s);if(o||(Zn(s,null,r),o=i.get(s)),o?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=T7(n,s,i)),o.count*o.aliasCount>a)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(t,r,i){let n=`*${this.source}`;if(t){if(x7(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${n} `}return n}};function T7(e,t,r){if(rc(t)){let i=t.resolve(e),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(li(t)){let i=0;for(let n of t.items){let a=T7(e,n,r);a>i&&(i=a)}return i}else if(Gr(t)){let i=T7(e,t.key,r),n=T7(e,t.value,r);return Math.max(i,n)}return 1}var w7=e=>!e||typeof e!="function"&&typeof e!="object",Ut=class extends ap{constructor(t){super(Ao),this.value=t}toJSON(t,r){return r?.keep?this.value:Zn(this.value,t,r)}toString(){return String(this.value)}};Ut.BLOCK_FOLDED="BLOCK_FOLDED";Ut.BLOCK_LITERAL="BLOCK_LITERAL";Ut.PLAIN="PLAIN";Ut.QUOTE_DOUBLE="QUOTE_DOUBLE";Ut.QUOTE_SINGLE="QUOTE_SINGLE";var v6t="tag:yaml.org,2002:";function b6t(e,t,r){if(t){let i=r.filter(a=>a.tag===t),n=i.find(a=>!a.format)??i[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(i=>i.identify?.(e)&&!i.format)}function af(e,t,r){if(Eu(e)&&(e=e.contents),Ur(e))return e;if(Gr(e)){let f=r.schema[tc].createNode?.(r.schema,null,r);return f.items.push(e),f}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:a,schema:s,sourceObjects:o}=r,l;if(i&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=n(e)),new nf(l.anchor);l={anchor:null,node:null},o.set(e,l)}t?.startsWith("!!")&&(t=v6t+t.slice(2));let u=b6t(e,t,s.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let f=new Ut(e);return l&&(l.node=f),f}u=e instanceof Map?s[tc]:Symbol.iterator in Object(e)?s[rf]:s[tc]}a&&(a(u),delete r.onTagObj);let h=u?.createNode?u.createNode(r.schema,e,r):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(r.schema,e,r):new Ut(e);return t?h.tag=t:u.default||(h.tag=u.tag),l&&(l.node=h),h}function qw(e,t,r){let i=r;for(let n=t.length-1;n>=0;--n){let a=t[n];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){let s=[];s[a]=i,i=s}else i=new Map([[a,i]])}return af(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Tv=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,xv=class extends ap{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(i=>Ur(i)||Gr(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(Tv(t))this.add(r);else{let[i,...n]=t,a=this.get(i,!0);if(li(a))a.addIn(n,r);else if(a===void 0&&this.schema)this.set(i,qw(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(t){let[r,...i]=t;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(li(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(t,r){let[i,...n]=t,a=this.get(i,!0);return n.length===0?!r&&Nr(a)?a.value:a:li(a)?a.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!Gr(r))return!1;let i=r.value;return i==null||t&&Nr(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){let[r,...i]=t;if(i.length===0)return this.has(r);let n=this.get(r,!0);return li(n)?n.hasIn(i):!1}setIn(t,r){let[i,...n]=t;if(n.length===0)this.set(i,r);else{let a=this.get(i,!0);if(li(a))a.setIn(n,r);else if(a===void 0&&this.schema)this.set(i,qw(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};var uIe=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function gl(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Ru=(e,t,r)=>e.endsWith(` -`)?gl(r,t):r.includes(` + fill: ${i.axisTextColor}; + } + `},"styles"),NRt={parser:s9e,db:ARt,renderer:MRt,styles:DRt}});var N9e={};cr(N9e,{diagram:()=>KRt});function fk(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function _9e(e){let t=0;for(let r=0;r{Us();qi();Ur();hr();ur();Yt();ss();A9e=v(()=>({domains:new Map,transitions:[]}),"createDefaultData"),dk=A9e(),ORt=v(()=>dk.domains,"getDomains"),PRt=v(()=>dk.transitions,"getTransitions"),BRt=v(e=>{if(e)for(let t of e){let r=t.domain,n=(t.items??[]).map(i=>({label:i.label}));dk.domains.set(r,{name:r,items:n})}},"setDomains"),$Rt=v(e=>{e&&(dk.transitions=e.filter(t=>t.from===t.to?(fe.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1):!0).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),FRt=v(()=>Qr({...dr.cynefin,...It().cynefin}),"getConfig"),zRt=v(()=>{pr(),dk=A9e()},"clear"),tL={getDomains:ORt,getTransitions:PRt,setDomains:BRt,setTransitions:$Rt,getConfig:FRt,clear:zRt,setAccTitle:Ar,getAccTitle:Lr,setDiagramTitle:$r,getDiagramTitle:Dr,getAccDescription:Mr,setAccDescription:Ir},GRt=v(e=>{Fn(e,tL),tL.setDomains(e.domains),tL.setTransitions(e.transitions)},"populate"),qRt={parse:v(async e=>{let t=await Ei("cynefin",e);fe.debug(t),GRt(t)},"parse")};v(fk,"seededRandom");v(_9e,"hashString");v(R9e,"resolveSeed");v(L9e,"generateFoldPath");v(I9e,"generateHorizontalBoundary");v(M9e,"generateCliffPath");v(D9e,"generateConfusionPath");E9e={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},VRt=v((e,t)=>{let r=e/2,n=t/2;return{complex:{cx:r/2,cy:n/2,x:0,y:0,w:r,h:n},complicated:{cx:r+r/2,cy:n/2,x:r,y:0,w:r,h:n},chaotic:{cx:r/2,cy:n+n/2,x:0,y:n,w:r,h:n},clear:{cx:r+r/2,cy:n+n/2,x:r,y:n,w:r,h:n},confusion:{cx:r,cy:n,x:r*.7,y:n*.7,w:r*.6,h:n*.6}}},"getDomainLayouts"),WRt=v(()=>{let e=ds(),t=It();return Qr(e,t.themeVariables).cynefin},"getCynefinDomainColors"),VX=3,URt=v((e,t,r,n)=>{let i=n.db,a=i.getDomains(),s=i.getTransitions(),o=i.getDiagramTitle(),l=i.getAccTitle(),u=i.getAccDescription(),h=i.getConfig(),f=WRt();fe.debug("Rendering Cynefin diagram");let d=h.width,p=h.height,g=h.padding,m=h.showDomainDescriptions,y=h.boundaryAmplitude,x=d+g*2,b=p+g*2,T={complex:f.complexBg,complicated:f.complicatedBg,clear:f.clearBg,chaotic:f.chaoticBg,confusion:f.confusionBg},k=xn(t);Vr(k,b,x,h.useMaxWidth??!0),k.attr("viewBox",`0 0 ${x} ${b}`),l&&k.append("title").text(l),u&&k.append("desc").text(u);let w=k.append("g").attr("transform",`translate(${g}, ${g})`),C=VRt(d,p),S=R9e(h.seed,t),E=w.append("g").attr("class","cynefin-backgrounds"),L=["complex","complicated","chaotic","clear"];for(let P of L){let $=C[P];E.append("rect").attr("class","cynefinDomain").attr("x",$.x).attr("y",$.y).attr("width",$.w).attr("height",$.h).attr("fill",T[P]).attr("fill-opacity",.4).attr("stroke","none")}let N=w.append("g").attr("class","cynefin-boundaries");N.append("path").attr("class","cynefinBoundary").attr("d",L9e(d,p,S,y)).attr("fill","none"),N.append("path").attr("class","cynefinBoundary").attr("d",I9e(d,p,S+100,y)).attr("fill","none"),N.append("path").attr("class","cynefinCliff").attr("d",M9e(d,p)).attr("fill","none");let O=d*.15,R=p*.15;w.append("path").attr("class","cynefinConfusion").attr("d",D9e(d/2,p/2,O,R)).attr("fill",T.confusion).attr("fill-opacity",.5);let _=w.append("g").attr("class","cynefin-labels");for(let P of L){let $=C[P];_.append("text").attr("class","cynefinDomainLabel").attr("x",$.cx).attr("y",m?$.cy-30:$.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(P.charAt(0).toUpperCase()+P.slice(1))}if(_.append("text").attr("class","cynefinDomainLabel").attr("x",d/2).attr("y",m?p/2-10:p/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),m){let P=w.append("g").attr("class","cynefin-subtitles");for(let $ of L){let G=C[$],q=E9e[$];P.append("text").attr("class","cynefinSubtitle").attr("x",G.cx).attr("y",G.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(q.model),P.append("text").attr("class","cynefinSubtitle").attr("x",G.cx).attr("y",G.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(q.practice)}P.append("text").attr("class","cynefinSubtitle").attr("x",d/2).attr("y",p/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(E9e.confusion.practice)}let D=w.append("g").attr("class","cynefin-items"),I=26,M=10,B=["complex","complicated","chaotic","clear","confusion"];for(let P of B){let $=a.get(P);if(!$||$.items.length===0)continue;let G=C[P],q=P==="confusion",z=$.items,V=0;q&&$.items.length>VX&&(V=$.items.length-VX,z=$.items.slice(0,VX));let j;if(q){let ee=m?22:14;j=G.cy+ee}else j=G.cy+(m?25:15);if([...z].forEach((ee,ne)=>{let Q=j+ne*(I+4),pe=D.append("g"),te=pe.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",I/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(ee.label),de=ee.label.length*7,ce=te.node();if(ce&&typeof ce.getBBox=="function"){let ve=ce.getBBox();ve.width>0&&(de=ve.width)}let ue=de+M*2,Re=G.cx-ue/2;pe.attr("transform",`translate(${Re}, ${Q})`),pe.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",ue).attr("height",I).attr("rx",4).attr("ry",4).attr("fill",T[P]).attr("fill-opacity",.95),te.attr("x",ue/2).attr("y",I/2)}),V>0){let ee=j+z.length*(I+4),ne=`+${V} more`,Q=D.append("g"),pe=Q.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",I/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(ne),te=ne.length*7,de=pe.node();if(de&&typeof de.getBBox=="function"){let Re=de.getBBox();Re.width>0&&(te=Re.width)}let ce=te+M*2,ue=G.cx-ce/2;Q.attr("transform",`translate(${ue}, ${ee})`),Q.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",ce).attr("height",I).attr("rx",4).attr("ry",4).attr("fill",T[P]).attr("fill-opacity",.6),pe.attr("x",ce/2).attr("y",I/2)}}if(s.length>0){let P=k.select("defs").empty()?k.append("defs"):k.select("defs"),$=`cynefin-arrow-${t}`;P.append("marker").attr("id",$).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let G=w.append("g").attr("class","cynefin-arrows");s.forEach(q=>{let z=C[q.from],V=C[q.to];if(!z||!V)return;if(q.from===q.to){fe.warn(`Cynefin renderer: skipping self-loop on domain "${q.from}"`);return}let j=z.cx,ee=z.cy,ne=V.cx,Q=V.cy,pe=(j+ne)/2,te=(ee+Q)/2,de=ne-j,ce=Q-ee,ue=Math.sqrt(de*de+ce*ce),Re=ue*.15,ve=-ce/ue,Ge=de/ue,He=pe+ve*Re,Ue=te+Ge*Re;G.append("path").attr("class","cynefinArrowLine").attr("d",`M${j},${ee} Q${He},${Ue} ${ne},${Q}`).attr("fill","none").attr("marker-end",`url(#${$})`),q.label&&G.append("text").attr("class","cynefinArrowLabel").attr("x",He).attr("y",Ue-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(q.label)})}o&&w.append("text").attr("class","cynefinTitle").attr("x",d/2).attr("y",-g/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(o)},"draw"),HRt={draw:URt},YRt=v(()=>{let e=ds(),t=It();return Qr(e,t.themeVariables).cynefin},"getCynefinTheme"),XRt=v(()=>{let e=YRt();return` + .cynefinDomain { + stroke: none; + } + .cynefinDomainLabel { + font-size: ${e.domainFontSize}px; + font-weight: bold; + fill: ${e.labelColor}; + } + .cynefinSubtitle { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + font-style: italic; + } + .cynefinItem { + fill-opacity: 0.95; + stroke: ${e.boundaryColor}; + stroke-width: 1; + } + .cynefinItemText { + font-size: ${e.itemFontSize}px; + fill: ${e.textColor}; + } + .cynefinItemOverflow { + fill-opacity: 0.6; + stroke: ${e.boundaryColor}; + stroke-width: 1; + stroke-dasharray: 3 2; + } + .cynefinBoundary { + stroke: ${e.boundaryColor}; + stroke-width: ${e.boundaryWidth}; + stroke-dasharray: 6 3; + } + .cynefinCliff { + stroke: ${e.cliffColor}; + stroke-width: ${e.cliffWidth}; + } + .cynefinConfusion { + stroke: ${e.boundaryColor}; + stroke-width: 1.5; + stroke-dasharray: 4 2; + } + .cynefinArrowLine { + stroke: ${e.arrowColor}; + stroke-width: ${e.arrowWidth}; + fill: none; + } + .cynefinArrowHead { + fill: ${e.arrowColor}; + stroke: none; + } + .cynefinArrowLabel { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + } + .cynefinTitle { + font-size: ${e.domainFontSize+2}px; + font-weight: bold; + fill: ${e.labelColor}; + } + `},"styles"),jRt=XRt,KRt={parser:qRt,db:tL,renderer:HRt,styles:jRt}});var WX,UX,HX,YX,rL,Zp,Px,ZRt,B9e,$9e,QRt,JRt,e7t,t7t,r7t,n7t,i7t,a7t,s7t,Gn,cs,o7t,l7t,c7t,F9e,u7t,h7t,Un,z9e,Jm,f7t,d7t,XX,Qp,Yl,p7t,P9e,g7t,Jp,pk=X(()=>{qi();hr();ur();Yt();WX="",UX="",HX="",YX=[],rL=new Map,Zp=v(e=>Cr(e,ze()),"sanitizeText"),Px=v(e=>{switch(e.type){case"terminal":return{...e,value:Zp(e.value)};case"nonterminal":return{...e,name:Zp(e.name)};case"sequence":return{...e,elements:e.elements.map(Px)};case"choice":return{...e,alternatives:e.alternatives.map(Px)};case"optional":return{...e,element:Px(e.element)};case"repetition":return{...e,element:Px(e.element),separator:e.separator?Px(e.separator):void 0};case"special":return{...e,text:Zp(e.text)}}},"sanitizeAstNode"),ZRt=v(()=>{WX="",UX="",HX="",YX.length=0,rL.clear(),pr(),fe.debug("[Railroad] Database cleared")},"clear"),B9e=v(e=>{WX=Zp(e),fe.debug("[Railroad] Title set:",e)},"setTitle"),$9e=v(()=>WX,"getTitle"),QRt=v(e=>{let t={...e,name:Zp(e.name),definition:Px(e.definition),comment:e.comment?Zp(e.comment):void 0};fe.debug("[Railroad] Adding rule:",t.name),rL.has(t.name)&&fe.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),YX.push(t),rL.set(t.name,t)},"addRule"),JRt=v(()=>YX,"getRules"),e7t=v(e=>rL.get(e),"getRule"),t7t=v(e=>{UX=Zp(e).replace(/^\s+/g,""),fe.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),r7t=v(()=>UX,"getAccTitle"),n7t=v(e=>{HX=Zp(e).replace(/\n\s+/g,` +`),fe.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),i7t=v(()=>HX,"getAccDescription"),a7t=B9e,s7t=$9e,Gn={clear:ZRt,setTitle:B9e,getTitle:$9e,addRule:QRt,getRules:JRt,getRule:e7t,setAccTitle:t7t,getAccTitle:r7t,setAccDescription:n7t,getAccDescription:i7t,setDiagramTitle:a7t,getDiagramTitle:s7t},cs={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},o7t=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,l7t=/^[\w "',.-]+$/,c7t=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),F9e=v(e=>e?Object.keys(e).every(t=>t==="railroad"||c7t.has(t)):!1,"isRailroadStyleOptions"),u7t=v(e=>e?"railroad"in e&&e.railroad?e.railroad:F9e(e)?e:{}:{},"extractRailroadOverrides"),h7t=v(e=>{if(!e||F9e(e))return{};let{railroad:t,svgId:r,theme:n,look:i,...a}=e;return a},"extractThemeOverrides"),Un=v((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return o7t.test(r)?r:t},"sanitizeColorValue"),z9e=v((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return l7t.test(r)?r:t},"sanitizeFontFamilyValue"),Jm=v((e,t)=>{let r=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(r)&&r>=0?r:t},"sanitizeNumberValue"),f7t=v(e=>{let t=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),d7t=v(e=>{let t=z9e(e.fontFamily,cs.fontFamily),r=f7t(e.fontSize)??cs.fontSize;return{...cs,fontFamily:t,fontSize:r,terminalFill:Un(e.secondBkg??e.secondaryColor,cs.terminalFill),terminalStroke:Un(e.secondaryBorderColor??e.lineColor,cs.terminalStroke),terminalTextColor:Un(e.secondaryTextColor??e.textColor,cs.terminalTextColor),nonTerminalFill:Un(e.mainBkg??e.background,cs.nonTerminalFill),nonTerminalStroke:Un(e.primaryBorderColor??e.lineColor,cs.nonTerminalStroke),nonTerminalTextColor:Un(e.primaryTextColor??e.textColor,cs.nonTerminalTextColor),lineColor:Un(e.lineColor,cs.lineColor),markerFill:Un(e.lineColor,cs.markerFill),commentFill:Un(e.labelBackground??e.tertiaryColor,cs.commentFill),commentStroke:Un(e.tertiaryBorderColor??e.lineColor,cs.commentStroke),commentTextColor:Un(e.tertiaryTextColor??e.textColor,cs.commentTextColor),specialFill:Un(e.tertiaryColor??e.secondaryColor,cs.specialFill),specialStroke:Un(e.tertiaryBorderColor??e.secondaryBorderColor,cs.specialStroke),ruleNameColor:Un(e.titleColor??e.textColor,cs.ruleNameColor)}},"buildThemeDefaults"),XX=v(e=>{let t=It(),r={...ds(),...t.themeVariables??{},...h7t(e)},n=d7t(r),i={...t.railroad??{},...u7t(e)};return{compactMode:i.compactMode??n.compactMode,padding:Jm(i.padding,n.padding),verticalSeparation:Jm(i.verticalSeparation,n.verticalSeparation),horizontalSeparation:Jm(i.horizontalSeparation,n.horizontalSeparation),arcRadius:Jm(i.arcRadius,n.arcRadius),fontSize:Jm(i.fontSize,n.fontSize),fontFamily:z9e(i.fontFamily,n.fontFamily),terminalFill:Un(i.terminalFill,n.terminalFill),terminalStroke:Un(i.terminalStroke,n.terminalStroke),terminalTextColor:Un(i.terminalTextColor,n.terminalTextColor),nonTerminalFill:Un(i.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:Un(i.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:Un(i.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:Un(i.lineColor,n.lineColor),strokeWidth:Jm(i.strokeWidth,n.strokeWidth),markerFill:Un(i.markerFill,n.markerFill),commentFill:Un(i.commentFill,n.commentFill),commentStroke:Un(i.commentStroke,n.commentStroke),commentTextColor:Un(i.commentTextColor,n.commentTextColor),specialFill:Un(i.specialFill,n.specialFill),specialStroke:Un(i.specialStroke,n.specialStroke),ruleNameColor:Un(i.ruleNameColor,n.ruleNameColor),showMarkers:i.showMarkers??n.showMarkers,markerRadius:Jm(i.markerRadius,n.markerRadius)}},"buildRailroadStyleOptions"),Qp=v(e=>{let{fontFamily:t,fontSize:r,terminalFill:n,terminalStroke:i,terminalTextColor:a,nonTerminalFill:s,nonTerminalStroke:o,nonTerminalTextColor:l,lineColor:u,strokeWidth:h,markerFill:f,commentFill:d,commentStroke:p,commentTextColor:g,specialFill:m,specialStroke:y,ruleNameColor:x}=XX(e);return` + .railroad-diagram { + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-terminal rect { + fill: ${n}; + stroke: ${i}; + stroke-width: ${h}px; + } + + .railroad-terminal text { + fill: ${a}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-nonterminal rect { + fill: ${s}; + stroke: ${o}; + stroke-width: ${h}px; + } + + .railroad-nonterminal text { + fill: ${l}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-line { + stroke: ${u}; + stroke-width: ${h}px; + fill: none; + } + + .railroad-start circle, + .railroad-end circle { + fill: ${f}; + } + + .railroad-comment ellipse { + fill: ${d}; + stroke: ${p}; + stroke-width: ${h}px; + } + + .railroad-comment text { + fill: ${g}; + font-style: italic; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-special rect { + fill: ${m}; + stroke: ${y}; + stroke-width: ${h}px; + stroke-dasharray: 5,3; + } + + .railroad-special text { + fill: ${l}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-rule-name { + font-weight: bold; + fill: ${x}; + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-group { + /* Grouping container, no specific styles */ + } +`},"getStyles"),Yl=class{constructor(){this.d=""}static{v(this,"PathBuilder")}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,r,n,i,a,s){return this.d+=`A ${e} ${t} ${r} ${n?1:0} ${i?1:0} ${a} ${s} `,this}build(){return this.d.trim()}},p7t=class{constructor(e,t=XX()){this.textCache=new Map,this.svg=e,this.config=t}static{v(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),r=t.node().getBBox(),n={width:r.width,height:r.height};return t.remove(),this.textCache.set(e,n),n}renderTerminal(e,t){let r=this.measureText(t),n=r.width+this.config.padding*2,i=r.height+this.config.padding*2,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",n).attr("height",i).attr("rx",10).attr("ry",10),a.append("text").attr("x",n/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:n,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){let r=this.measureText(t),n=r.width+this.config.padding*2,i=r.height+this.config.padding*2,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",n).attr("height",i),a.append("text").attr("x",n/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:n,height:i,up:i/2,down:i/2}}}renderSequence(e,t){let r=t.map(l=>this.renderExpression(e,l)),n=0,i=0,a=0;for(let l of r)n+=l.dimensions.width,i=Math.max(i,l.dimensions.up),a=Math.max(a,l.dimensions.down);n+=(r.length-1)*this.config.horizontalSeparation;let s=e.append("g").attr("class","railroad-sequence"),o=0;for(let l=0;lthis.renderExpression(e,f)),n=0,i=0;for(let f of r)n=Math.max(n,f.dimensions.width),i+=f.dimensions.height;i+=(r.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,s=a*4,o=n+s,l=e.append("g").attr("class","railroad-choice"),u=0,h=i/2;for(let f of r){let d=u,p=d+f.dimensions.up,g=a*2+(n-f.dimensions.width)/2;l.node().appendChild(f.element).setAttribute("transform",`translate(${g}, ${d})`);let y=new Yl,x=p>h;p===h?y.moveTo(0,h).lineTo(g,p):y.moveTo(0,h).arcTo(a,a,0,!1,x,a,h+(x?a:-a)).lineTo(a,p-(x?a:-a)).arcTo(a,a,0,!1,!x,a*2,p).lineTo(g,p),l.append("path").attr("class","railroad-line").attr("d",y.build());let b=new Yl,T=g+f.dimensions.width,k=o-a*2;p===h?b.moveTo(T,p).lineTo(o,h):b.moveTo(T,p).lineTo(k,p).arcTo(a,a,0,!1,!x,o-a,p+(x?-a:a)).lineTo(o-a,h+(x?a:-a)).arcTo(a,a,0,!1,x,o,h),l.append("path").attr("class","railroad-line").attr("d",b.build()),u+=f.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:i,up:h,down:i-h}}}renderOptional(e,t){let r=this.renderExpression(e,t),n=this.config.arcRadius,i=n*2,a=r.dimensions.width+n*4,s=r.dimensions.height+i,o=e.append("g").attr("class","railroad-optional"),l=n*2,u=i;o.node().appendChild(r.element).setAttribute("transform",`translate(${l}, ${u})`);let f=u+r.dimensions.up,d=new Yl().moveTo(0,f).lineTo(n*2,f);o.append("path").attr("class","railroad-line").attr("d",d.build());let p=new Yl().moveTo(l+r.dimensions.width,f).lineTo(a,f);o.append("path").attr("class","railroad-line").attr("d",p.build());let g=new Yl().moveTo(0,f).arcTo(n,n,0,!1,!1,n,f-n).lineTo(n,n).arcTo(n,n,0,!1,!0,n*2,0).lineTo(a-n*2,0).arcTo(n,n,0,!1,!0,a-n,n).lineTo(a-n,f-n).arcTo(n,n,0,!1,!1,a,f);return o.append("path").attr("class","railroad-line").attr("d",g.build()),{element:o.node(),dimensions:{width:a,height:s,up:f,down:s-f}}}renderRepetition(e,t,r){let n=this.renderExpression(e,t),i=this.config.arcRadius,a=i*2,s=n.dimensions.width+i*4,o=r===0,l=n.dimensions.height+a+(o?a:0),u=e.append("g").attr("class","railroad-repetition"),h=i*2,f=o?a:0;u.node().appendChild(n.element).setAttribute("transform",`translate(${h}, ${f})`);let p=f+n.dimensions.up;u.append("path").attr("class","railroad-line").attr("d",new Yl().moveTo(0,p).lineTo(i*2,p).build()),u.append("path").attr("class","railroad-line").attr("d",new Yl().moveTo(h+n.dimensions.width,p).lineTo(s,p).build());let g=f+n.dimensions.height+i,m=new Yl().moveTo(h+n.dimensions.width,p).arcTo(i,i,0,!1,!0,h+n.dimensions.width+i,p+i).lineTo(h+n.dimensions.width+i,g).arcTo(i,i,0,!1,!0,h+n.dimensions.width,g+i).lineTo(i*2,g+i).arcTo(i,i,0,!1,!0,i,g).lineTo(i,p+i).arcTo(i,i,0,!1,!0,i*2,p);if(u.append("path").attr("class","railroad-line").attr("d",m.build()),o){let y=new Yl().moveTo(0,p).arcTo(i,i,0,!1,!1,i,p-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(s-i*2,0).arcTo(i,i,0,!1,!0,s-i,i).lineTo(s-i,p-i).arcTo(i,i,0,!1,!1,s,p);u.append("path").attr("class","railroad-line").attr("d",y.build())}return{element:u.node(),dimensions:{width:s,height:l,up:p,down:l-p}}}renderSpecial(e,t){let r=this.measureText("? "+t+" ?"),n=r.width+this.config.padding*2,i=r.height+this.config.padding*2,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",n).attr("height",i),a.append("text").attr("x",n/2).attr("y",i/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:n,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let r=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),n=e.name+" =",i=this.measureText(n).width+20,a=i+20,s=r.append("g"),o=this.renderExpression(s,e.definition),l=Math.max(20,o.dimensions.up),u=l-o.dimensions.up;return s.attr("transform",`translate(${a}, ${u})`),r.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",l).text(n),r.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",l).attr("r",this.config.markerRadius),r.append("g").attr("class","railroad-end").append("circle").attr("cx",a+o.dimensions.width+10).attr("cy",l).attr("r",this.config.markerRadius),r.append("path").attr("class","railroad-line").attr("d",new Yl().moveTo(i+this.config.markerRadius,l).lineTo(a,l).build()),r.append("path").attr("class","railroad-line").attr("d",new Yl().moveTo(a+o.dimensions.width,l).lineTo(a+o.dimensions.width+10-this.config.markerRadius,l).build()),{height:Math.max(40,u+o.dimensions.height+this.config.padding*2),width:a+o.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,r=0;for(let n of e){let i=this.renderRule(n,t);t+=i.height+this.config.verticalSeparation,r=Math.max(r,i.width)}return{width:r+this.config.padding*2,height:t+this.config.padding}}},P9e=v((e,t,r)=>{Vr(e,t.height,t.width,r),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),g7t=v((e,t,r)=>{fe.debug(`[Railroad] Rendering diagram +`+e);try{let n=xn(t);n.attr("class","railroad-diagram");let a=It().railroad?.useMaxWidth??!0,s=Gn.getRules();if(fe.debug(`[Railroad] Rendering ${s.length} rules`),s.length===0){fe.warn("[Railroad] No rules to render"),P9e(n,{height:100,width:200},a);return}let l=new p7t(n,XX()).renderDiagram(s);P9e(n,l,a),fe.debug("[Railroad] Render complete")}catch(n){throw fe.error("[Railroad] Render error:",n),n}},"draw"),Jp={draw:g7t}});var q9e={};cr(q9e,{default:()=>b7t,diagram:()=>G9e});var m7t,Bx,y7t,v7t,x7t,G9e,b7t,V9e=X(()=>{pk();Us();qi();hr();ur();Yt();ss();m7t=ox().Railroad.parser.LangiumParser,Bx=v(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let t=e.elements.map(Bx);return t.length===1?t[0]:{type:"sequence",elements:t}}case"RailroadChoiceExpr":{let t=e.alternatives.map(Bx);return t.length===1?t[0]:{type:"choice",alternatives:t}}case"RailroadOptionalExpr":return{type:"optional",element:Bx(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:Bx(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:Bx(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),y7t=v(e=>({name:e.name,definition:Bx(e.definition)}),"transformRule"),v7t=v(e=>{Fn(e,Gn),e.title&&Gn.setTitle(e.title),e.rules.map(t=>Gn.addRule(y7t(t)))},"populateDb"),x7t={parse:v(e=>{Gn.clear(),fe.debug("[Railroad Parser] Starting Langium parse");let t=m7t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new _f(t);let r=t.value;fe.debug("[Railroad Parser] Parsed rules:",r.rules.length),v7t(r),fe.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:Gn}},G9e={parser:x7t,db:Gn,renderer:Jp,styles:Qp},b7t=G9e});var U9e={};cr(U9e,{diagram:()=>_7t});var T7t,nL,w7t,W9e,C7t,k7t,S7t,E7t,A7t,_7t,H9e=X(()=>{pk();Us();qi();hr();ur();Yt();ss();T7t=lx().RailroadEbnf.parser.LangiumParser,nL=v(e=>{let t=e.alternatives.map(w7t);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformChoice"),w7t=v(e=>{let t=e.elements.map(k7t);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),W9e=v(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return nL(e.element);case"EbnfOptional":return{type:"optional",element:nL(e.element)};case"EbnfRepetition":return{type:"repetition",element:nL(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),C7t=v((e,t)=>{switch(t.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},W9e(t.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${t.$type}`)}},"transformPostfix"),k7t=v(e=>e.postfixes.reduce((t,r)=>C7t(t,r),W9e(e.base)),"transformTerm"),S7t=v(e=>({name:e.name,definition:nL(e.definition)}),"transformRule"),E7t=v(e=>{Fn(e,Gn),e.title&&Gn.setTitle(e.title),e.rules.map(t=>Gn.addRule(S7t(t)))},"populateDb"),A7t={parse:v(e=>{Gn.clear(),fe.debug("[EBNF Parser] Starting Langium parse");let t=T7t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new _f(t);let r=t.value;fe.debug("[EBNF Parser] Parsed rules:",r.rules.length),E7t(r),fe.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:Gn}},_7t={parser:A7t,db:Gn,renderer:Jp,styles:Qp}});var Y9e={};cr(Y9e,{diagram:()=>B7t});var R7t,jX,L7t,I7t,M7t,D7t,N7t,O7t,P7t,B7t,X9e=X(()=>{pk();Us();qi();hr();ur();Yt();ss();R7t=cx().RailroadAbnf.parser.LangiumParser,jX=v(e=>{let t=e.alternatives.map(L7t);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformAlternation"),L7t=v(e=>{let t=e.elements.map(M7t);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformConcatenation"),I7t=v(e=>{if(e.includes("*")){let[r,n]=e.split("*"),i=r?parseInt(r,10):0,a=n?parseInt(n,10):1/0;return{min:i,max:a}}let t=parseInt(e,10);return{min:t,max:t}},"parseRepeat"),M7t=v(e=>{let t=D7t(e.primary);if(!e.repeat)return t;let{min:r,max:n}=I7t(e.repeat);return r===0&&n===1?{type:"optional",element:t}:{type:"repetition",element:t,min:r,max:n}},"transformElement"),D7t=v(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return jX(e.element);case"AbnfOptionalGroup":return{type:"optional",element:jX(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),N7t=v(e=>({name:e.name,definition:jX(e.definition)}),"transformRule"),O7t=v(e=>{Fn(e,Gn),e.title&&Gn.setTitle(e.title),e.rules.map(t=>Gn.addRule(N7t(t)))},"populateDb"),P7t={parse:v(e=>{Gn.clear(),fe.debug("[ABNF Parser] Starting Langium parse");let t=R7t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new _f(t);let r=t.value;fe.debug("[ABNF Parser] Parsed rules:",r.rules.length),O7t(r),fe.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:Gn}},B7t={parser:P7t,db:Gn,renderer:Jp,styles:Qp}});var Z9e={};cr(Z9e,{diagram:()=>H7t});var $7t,K9e,F7t,z7t,j9e,G7t,q7t,V7t,W7t,U7t,H7t,Q9e=X(()=>{pk();Us();qi();hr();ur();Yt();ss();$7t=ux().RailroadPeg.parser.LangiumParser,K9e=v(e=>{let t=e.alternatives.map(F7t);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformOrderedChoice"),F7t=v(e=>{let t=e.elements.map(z7t);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),z7t=v(e=>{let t=G7t(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${j9e(t)}`:`!${j9e(t)}`}:t},"transformPrefix"),j9e=v(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),G7t=v(e=>{let t=q7t(e.primary);if(!e.operator)return t;switch(e.operator){case"?":return{type:"optional",element:t};case"*":return{type:"repetition",element:t,min:0,max:1/0};case"+":return{type:"repetition",element:t,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),q7t=v(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return K9e(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),V7t=v(e=>({name:e.name,definition:K9e(e.definition)}),"transformRule"),W7t=v(e=>{Fn(e,Gn),e.title&&Gn.setTitle(e.title),e.rules.map(t=>Gn.addRule(V7t(t)))},"populateDb"),U7t={parse:v(e=>{Gn.clear(),fe.debug("[PEG Parser] Starting Langium parse");let t=$7t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new _f(t);let r=t.value;fe.debug("[PEG Parser] Parsed rules:",r.rules.length),W7t(r),fe.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:Gn}},H7t={parser:U7t,db:Gn,renderer:Jp,styles:Qp}});z8();qi();z5();cg();ko();ms();ys();pa();Li();ta();Wi();Vi();Ur();hr();ur();Yt();rN();zr();var lv="comm",yA="rule",vA="decl";var iTe="@media",aTe="@import";var sTe="@supports";var oTe="@namespace",cw="@keyframes";var xA="@layer",lTe="@scope";var cTe=Math.abs,Rg=String.fromCharCode;function bA(e){return e.trim()}function uw(e,t,r){return e.replace(t,r)}function nf(e,t){return e.charCodeAt(t)|0}function af(e,t,r){return e.slice(t,r)}function So(e){return e.length}function TA(e){return e.length}function cv(e,t){return t.push(e),e}var wA=1,uv=1,uTe=0,Pl=0,aa=0,fv="";function CA(e,t,r,n,i,a,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:wA,column:uv,length:s,return:"",siblings:o}}function hTe(){return aa}function fTe(){return aa=Pl>0?nf(fv,--Pl):0,uv--,aa===10&&(uv=1,wA--),aa}function Bl(){return aa=Pl2||hv(aa)>3?"":" "}function mTe(e,t){for(;--t&&Bl()&&!(aa<48||aa>102||aa>57&&aa<65||aa>70&&aa<97););return kA(e,hw()+(t<6&&sf()==32&&Bl()==32))}function BF(e){for(;Bl();)switch(aa){case e:return Pl;case 34:case 39:e!==34&&e!==39&&BF(aa);break;case 40:e===41&&BF(e);break;case 92:Bl();break}return Pl}function yTe(e,t){for(;Bl()&&e+aa!==57;)if(e+aa===84&&sf()===47)break;return"/*"+kA(t,Pl-1)+"*"+Rg(e===47?e:Bl())}function vTe(e){for(;!hv(sf());)Bl();return kA(e,Pl)}function TTe(e){return pTe(EA("",null,null,null,[""],e=dTe(e),0,[0],e))}function EA(e,t,r,n,i,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,g=0,m=1,y=1,x=1,b=0,T=0,k="",w=i,C=a,S=n,E=k;y;)switch(g=T,T=Bl()){case 40:g!=108&&nf(E,f-1)==58?(b++,E+="("):E+=SA(T);break;case 41:b--,E+=")";break;case 34:case 39:case 91:E+=SA(T);break;case 9:case 10:case 13:case 32:if(b>0){E+=Rg(T);break}E+=gTe(g);break;case 92:E+=mTe(hw()-1,7);continue;case 47:switch(sf()){case 42:case 47:cv(_ht(yTe(Bl(),hw()),t,r,l),l),(hv(g||1)==5||hv(sf()||1)==5)&&So(E)&&af(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*m:o[u++]=So(E)*x;case 125*m:case 59:case 0:if(b>0&&T){E+=Rg(T);break}switch(T){case 0:case 125:y=0;case 59+h:x==-1&&(E=uw(E,/\f/g,"")),p>0&&(So(E)-f||m===0)&&cv(p>32?bTe(E+";",n,r,f-1,l):bTe(uw(E," ","")+";",n,r,f-2,l),l);break;case 59:E+=";";default:if(cv(S=xTe(E,t,r,u,h,i,o,k,w=[],C=[],f,a),a),T===123)if(h===0)EA(E,t,S,S,w,a,f,o,C);else{switch(d){case 99:if(nf(E,3)===110)break;case 108:if(nf(E,2)===97)break;default:h=0;case 100:case 109:case 115:}h?EA(e,S,S,n&&cv(xTe(e,S,S,0,0,i,o,k,i,w=[],f,C),C),i,C,f,o,n?w:C):EA(E,S,S,S,[""],C,0,o,C)}}u=h=p=0,m=x=1,k=E="",f=s;break;case 58:f=1+So(E),p=g;default:if(m<1){if(T==123)--m;else if(T==125&&m++==0&&fTe()==125)continue}switch(E+=Rg(T),T*m){case 38:x=h>0?1:(E+="\f",-1);break;case 44:if(b>0)break;o[u++]=(So(E)-1)*x,x=1;break;case 64:sf()===45&&(E+=SA(Bl())),d=sf(),h=f=So(k=E+=vTe(hw())),T++;break;case 45:g===45&&So(E)==2&&(m=0)}}return a}function xTe(e,t,r,n,i,a,s,o,l,u,h,f){for(var d=i-1,p=i===0?a:[""],g=TA(p),m=0,y=0,x=0;m0?p[b]+" "+T:uw(T,/&\f/g,p[b])))&&(l[x++]=k);return CA(e,t,r,i===0?yA:o,l,u,h,f)}function _ht(e,t,r,n){return CA(e,t,r,lv,Rg(hTe()),af(e,2,-2),0,n)}function bTe(e,t,r,n,i){return CA(e,t,r,vA,af(e,0,n),af(e,n+1,-1),n,i)}function AA(e,t){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),X7t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(GTe(),zTe));return{id:nPe,diagram:e}},"loader"),j7t={id:nPe,detector:Y7t,loader:X7t},K7t=j7t,iPe="flowchart",Z7t=v((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Q7t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(BA(),PA));return{id:iPe,diagram:e}},"loader"),J7t={id:iPe,detector:Z7t,loader:Q7t},eLt=J7t,aPe="flowchart-v2",tLt=v((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),rLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(BA(),PA));return{id:aPe,diagram:e}},"loader"),nLt={id:aPe,detector:tLt,loader:rLt},iLt=nLt,sPe="swimlane",aLt=v(e=>/^\s*swimlane-beta\b/.test(e),"detector"),sLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(HTe(),UTe));return{id:sPe,diagram:e}},"loader"),oLt={id:sPe,detector:aLt,loader:sLt},lLt=oLt,oPe="er",cLt=v(e=>/^\s*erDiagram/.test(e),"detector"),uLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(KTe(),jTe));return{id:oPe,diagram:e}},"loader"),hLt={id:oPe,detector:cLt,loader:uLt},fLt=hLt,lPe="gitGraph",dLt=v(e=>/^\s*gitGraph/.test(e),"detector"),pLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(s8e(),a8e));return{id:lPe,diagram:e}},"loader"),gLt={id:lPe,detector:dLt,loader:pLt},mLt=gLt,cPe="gantt",yLt=v(e=>/^\s*gantt/.test(e),"detector"),vLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(R8e(),_8e));return{id:cPe,diagram:e}},"loader"),xLt={id:cPe,detector:yLt,loader:vLt},bLt=xLt,uPe="info",TLt=v(e=>/^\s*info/.test(e),"detector"),wLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(I8e(),L8e));return{id:uPe,diagram:e}},"loader"),CLt={id:uPe,detector:TLt,loader:wLt},hPe="pie",kLt=v(e=>/^\s*pie/.test(e),"detector"),SLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(O8e(),N8e));return{id:hPe,diagram:e}},"loader"),ELt={id:hPe,detector:kLt,loader:SLt},fPe="quadrantChart",ALt=v(e=>/^\s*quadrantChart/.test(e),"detector"),_Lt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Q8e(),Z8e));return{id:fPe,diagram:e}},"loader"),RLt={id:fPe,detector:ALt,loader:_Lt},LLt=RLt,dPe="xychart",ILt=v(e=>/^\s*xychart(-beta)?/.test(e),"detector"),MLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bIe(),xIe));return{id:dPe,diagram:e}},"loader"),DLt={id:dPe,detector:ILt,loader:MLt},NLt=DLt,pPe="requirement",OLt=v(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),PLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CIe(),wIe));return{id:pPe,diagram:e}},"loader"),BLt={id:pPe,detector:OLt,loader:PLt},$Lt=BLt,gPe="sequence",FLt=v(e=>/^\s*sequenceDiagram/.test(e),"detector"),zLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>($Ie(),BIe));return{id:gPe,diagram:e}},"loader"),GLt={id:gPe,detector:FLt,loader:zLt},qLt=GLt,mPe="class",VLt=v((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),WLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(VIe(),qIe));return{id:mPe,diagram:e}},"loader"),ULt={id:mPe,detector:VLt,loader:WLt},HLt=ULt,yPe="classDiagram",YLt=v((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),XLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(UIe(),WIe));return{id:yPe,diagram:e}},"loader"),jLt={id:yPe,detector:YLt,loader:XLt},KLt=jLt,vPe="state",ZLt=v((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),QLt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(yMe(),mMe));return{id:vPe,diagram:e}},"loader"),JLt={id:vPe,detector:ZLt,loader:QLt},e8t=JLt,xPe="stateDiagram",t8t=v((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),r8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(xMe(),vMe));return{id:xPe,diagram:e}},"loader"),n8t={id:xPe,detector:t8t,loader:r8t},i8t=n8t,bPe="journey",a8t=v(e=>/^\s*journey/.test(e),"detector"),s8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(RMe(),_Me));return{id:bPe,diagram:e}},"loader"),o8t={id:bPe,detector:a8t,loader:s8t},l8t=o8t,c8t=v((e,t,r)=>{fe.debug(`rendering svg for syntax error +`);let n=xn(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Vr(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),TPe={draw:c8t},u8t=TPe,h8t={db:{},renderer:TPe,parser:{parse:v(()=>{},"parse")}},f8t=h8t,wPe="flowchart-elk",d8t=v((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),p8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(BA(),PA));return{id:wPe,diagram:e}},"loader"),g8t={id:wPe,detector:d8t,loader:p8t},m8t=g8t,CPe="timeline",y8t=v(e=>/^\s*timeline/.test(e),"detector"),v8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(eDe(),JMe));return{id:CPe,diagram:e}},"loader"),x8t={id:CPe,detector:y8t,loader:v8t},b8t=x8t,kPe="mindmap",T8t=v(e=>/^\s*mindmap/.test(e),"detector"),w8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(oDe(),sDe));return{id:kPe,diagram:e}},"loader"),C8t={id:kPe,detector:T8t,loader:w8t},k8t=C8t,SPe="kanban",S8t=v(e=>/^\s*kanban/.test(e),"detector"),E8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uDe(),cDe));return{id:SPe,diagram:e}},"loader"),A8t={id:SPe,detector:S8t,loader:E8t},_8t=A8t,EPe="sankey",R8t=v(e=>/^\s*sankey(-beta)?/.test(e),"detector"),L8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ODe(),NDe));return{id:EPe,diagram:e}},"loader"),I8t={id:EPe,detector:R8t,loader:L8t},M8t=I8t,APe="packet",D8t=v(e=>/^\s*packet(-beta)?/.test(e),"detector"),N8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(FDe(),$De));return{id:APe,diagram:e}},"loader"),O8t={id:APe,detector:D8t,loader:N8t},_Pe="radar",P8t=v(e=>/^\s*radar-beta/.test(e),"detector"),B8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(YDe(),HDe));return{id:_Pe,diagram:e}},"loader"),$8t={id:_Pe,detector:P8t,loader:B8t},RPe="block",F8t=v(e=>/^\s*block(-beta)?/.test(e),"detector"),z8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fNe(),hNe));return{id:RPe,diagram:e}},"loader"),G8t={id:RPe,detector:F8t,loader:z8t},q8t=G8t,LPe="treeView",V8t=v(e=>/^\s*treeView-beta/.test(e),"detector"),W8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(SNe(),kNe));return{id:LPe,diagram:e}},"loader"),U8t={id:LPe,detector:V8t,loader:W8t},H8t=U8t,IPe="architecture",Y8t=v(e=>/^\s*architecture/.test(e),"detector"),X8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(WNe(),VNe));return{id:IPe,diagram:e}},"loader"),j8t={id:IPe,detector:Y8t,loader:X8t},K8t=j8t,MPe="eventmodeling",Z8t=v(e=>/^\s*eventmodeling/.test(e),"detector"),Q8t=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(xOe(),vOe));return{id:MPe,diagram:e}},"loader"),J8t={id:MPe,detector:Z8t,loader:Q8t},eIt=J8t,DPe="ishikawa",tIt=v(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),rIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Oe(),AOe));return{id:DPe,diagram:e}},"loader"),nIt={id:DPe,detector:tIt,loader:rIt},NPe="venn",iIt=v(e=>/^\s*venn-beta/.test(e),"detector"),aIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(JOe(),QOe));return{id:NPe,diagram:e}},"loader"),sIt={id:NPe,detector:iIt,loader:aIt},oIt=sIt,OPe="treemap",lIt=v(e=>/^\s*treemap/.test(e),"detector"),cIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(i9e(),n9e));return{id:OPe,diagram:e}},"loader"),uIt={id:OPe,detector:lIt,loader:cIt},PPe="wardley",hIt=v(e=>/^\s*wardley-beta/i.test(e),"detector"),fIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(S9e(),k9e));return{id:PPe,diagram:e}},"loader"),dIt={id:PPe,detector:hIt,loader:fIt},pIt=dIt,BPe="cynefin",gIt=v(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),mIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(O9e(),N9e));return{id:BPe,diagram:e}},"loader"),yIt={id:BPe,detector:gIt,loader:mIt},$Pe="railroad",vIt=v(e=>/^\s*railroad-beta/i.test(e),"detector"),xIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(V9e(),q9e));return{id:$Pe,diagram:e}},"loader"),bIt={id:$Pe,detector:vIt,loader:xIt},FPe="railroadEbnf",TIt=v(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),wIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(H9e(),U9e));return{id:FPe,diagram:e}},"loader"),CIt={id:FPe,detector:TIt,loader:wIt},zPe="railroadAbnf",kIt=v(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),SIt=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(X9e(),Y9e));return{id:zPe,diagram:e}},"loader"),EIt={id:zPe,detector:kIt,loader:SIt},GPe="railroadPeg",AIt=v(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),_It=v(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Q9e(),Z9e));return{id:GPe,diagram:e}},"loader"),RIt={id:GPe,detector:AIt,loader:_It},J9e=!1,aL=v(()=>{J9e||(J9e=!0,Cb("error",f8t,e=>e.toLowerCase().trim()==="error"),Cb("---",{db:{clear:v(()=>{},"clear")},styles:{},renderer:{draw:v(()=>{},"draw")},parser:{parse:v(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:v(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),_S(m8t,k8t,K8t),_S(K7t,_8t,KLt,HLt,fLt,bLt,CLt,ELt,$Lt,qLt,lLt,iLt,eLt,b8t,mLt,i8t,e8t,l8t,LLt,M8t,O8t,NLt,q8t,eIt,H8t,$8t,nIt,uIt,bIt,CIt,EIt,RIt,oIt,pIt,yIt))},"addDiagrams"),LIt=v(async()=>{fe.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(nd).map(async([r,{detector:n,loader:i}])=>{if(i)try{DS(r)}catch{try{let{diagram:a,id:s}=await i();Cb(s,a,n)}catch(a){throw fe.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete nd[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){fe.error(`Failed to load ${t.length} external diagrams`);for(let r of t)fe.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),IIt="graphics-document document";function qPe(e,t){e.attr("role",IIt),t!==""&&e.attr("aria-roledescription",t)}v(qPe,"setA11yDiagramInfo");function VPe(e,t,r,n){if(e.insert!==void 0){if(r){let i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){let i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}v(VPe,"addSVGa11yTitleDescription");var ZX=class WPe{constructor(t,r,n,i,a){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=a}static{v(this,"Diagram")}static async fromText(t,r={}){let n=It(),i=xb(t,n);t=kse(t)+` +`;try{DS(i)}catch{let u=CQ(i);if(!u)throw new uI(`Diagram ${i} not found.`);let{id:h,diagram:f}=await u();Cb(h,f)}let{db:a,parser:s,renderer:o,init:l}=DS(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new WPe(i,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},ePe=[],MIt=v(()=>{ePe.forEach(e=>{e()}),ePe=[]},"attachFunctions"),DIt=v(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function UPe(e){let t=e.match(cI);if(!t)return{text:e,metadata:{}};let r=t[1],n=r?t[2].split(` +`).map(s=>s.startsWith(r)?s.slice(r.length):s).join(` +`):t[2],i=Hd(n,{schema:Ud})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}v(UPe,"extractFrontMatter");var NIt=v(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),OIt=v(e=>{let{text:t,metadata:r}=UPe(e),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:t}},"processFrontmatter"),PIt=v(e=>{let t=ar.detectInit(e)??{},r=ar.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:vse(e),directive:t}},"processDirectives");function JX(e){let t=NIt(e),r=OIt(t),n=PIt(r.text),i=Qr(r.config,n.directive);return e=DIt(n.text),{code:e,title:r.title,config:i}}v(JX,"preprocessDiagram");function HPe(e){let t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}v(HPe,"toBase64");var BIt=5e4,$It="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",FIt="sandbox",zIt="loose",GIt="http://www.w3.org/2000/svg",qIt="http://www.w3.org/1999/xlink",VIt="http://www.w3.org/1999/xhtml",WIt="100%",UIt="100%",HIt="border:0;margin:0;",YIt="margin:0",XIt="allow-top-navigation-by-user-activation allow-popups",jIt='The "iframe" tag is not supported by your browser.',KIt=["foreignobject"],ZIt=["dominant-baseline"];function ej(e){let t=JX(e);return vb(),bQ(t.config??{}),t}v(ej,"processAndSetConfigs");async function YPe(e,t){aL();try{let{code:r,config:n}=ej(e);return{diagramType:(await jPe(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}v(YPe,"parse");var tPe=v((e,t,r=[])=>{let n=sI(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${n}`},"cssImportantStyles"),QIt=v((e,t=new Map)=>{let r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){let o=ea(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{uE(l.styles)||o.forEach(u=>{r.insertRule(tPe(l.id,u,l.styles),r.cssRules.length)}),uE(l.textStyles)||r.insertRule(tPe(l.id,"tspan",(l?.textStyles||[]).map(u=>u.replace("color","fill"))),r.cssRules.length)})}let n="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){let i=new CSSStyleSheet;i.replaceSync(e.themeCSS),n=RS(i)+` +`}else n+=`${e.themeCSS} +`;return n+RS(r)},"createCssStyles"),JIt=v((e,t)=>AA(TTe(`${e}{${t}}`),CTe([v(function(n,i,a,s){if(n.type==="rule"&&Array.isArray(n.props)){if(n.parent&&n.parent.type===cw)return;n.props=n.props.map(o=>o===e&&Array.isArray(n.children)&&n.children.every(u=>u.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(u.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else n.type.startsWith("@")&&([...[iTe,sTe,xA,lTe,"@container","@starting-style"],cw].includes(n.type)||(fe.warn(`Removing unsupported at-rule ${n.type} from CSS`),n.type=lv))},"addNamespace"),wTe])),"compileCSS"),eMt=v((e,t,r,n)=>{let i=QIt(e,r),a=AQ(t,i,{...e.themeVariables,theme:e.theme,look:e.look},n);return JIt(n,a)},"createUserStyles"),tMt=v((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=sc(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),rMt=v((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":UIt,n=HPe(`${e}`);return``},"putIntoIFrame"),rPe=v((e,t,r,n,i)=>{let a=e.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",GIt);return i&&s.attr("xmlns:xlink",i),s.append("g"),e},"appendDivSvgG");function QX(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}v(QX,"sandboxedIframe");var nMt=v((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),iMt=v(async function(e,t,r){aL();let n=ej(t);t=n.code;let i=It();fe.debug(i),t.length>(i?.maxTextSize??BIt)&&(t=$It);let a=`#${e}`,s="i"+e,o="#"+s,l="d"+e,u="#"+l,h=v(()=>{let D=ct(d?o:u).node();D&&"remove"in D&&D.remove()},"removeTempElements"),f=ct(document.body),d=i.securityLevel===FIt,p=i.securityLevel===zIt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let _=QX(ct(r),s);f=ct(_.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ct(r);rPe(f,e,l,`font-family: ${g}`,qIt)}else{if(nMt(document,e,l,s),d){let _=QX(ct(document.body),s);f=ct(_.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ct("body");rPe(f,e,l)}let m,y;try{m=await ZX.fromText(t,{title:n.title})}catch(_){if(i.suppressErrorRendering)throw h(),_;m=await ZX.fromText("error"),y=_}let x=f.select(u).node(),b=m.type,T=x.firstChild,k=T.firstChild,w=m.renderer.getClasses?.(t,m),C=eMt(i,b,w,a),S=document.createElement("style");S.innerHTML=C,T.insertBefore(S,k);try{await m.renderer.draw(t,e,"11.17.2",m)}catch(_){throw i.suppressErrorRendering?h():u8t.draw(t,e,"11.17.2"),_}let E=f.select(`${u} svg`),L=m.db.getAccTitle?.(),N=m.db.getAccDescription?.();KPe(b,E,L,N);let R=v(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",VIt);let _=f.select(u).node().innerHTML;if(fe.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),_=tMt(_,d,Ho(i.arrowMarkerAbsolute)),d){let D=f.select(u+" svg").node();_=rMt(_,D)}else p||(_=co.sanitize(_,{ADD_TAGS:KIt,ADD_ATTR:ZIt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return MIt(),_},"serializeSvg")();if(y)throw y;return h(),{diagramType:b,svg:R,bindFunctions:m.db.bindFunctions}},"render");function XPe(e={}){let t=ui({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),yQ(t),t?.theme&&t.theme in Zc?t.themeVariables=Zc[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Zc.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?mQ(t):oI();sb(r.logLevel),aL()}v(XPe,"initialize");var jPe=v((e,t={})=>{let{code:r}=JX(e);return ZX.fromText(r,t)},"getDiagramFromText");function KPe(e,t,r,n){qPe(t,e),VPe(t,r,n,t.attr("id"))}v(KPe,"addA11yInfo");var ey=Object.freeze({render:iMt,parse:YPe,getDiagramFromText:jPe,initialize:XPe,getConfig:It,setConfig:lI,getSiteConfig:oI,updateSiteConfig:vQ,reset:v(()=>{vb()},"reset"),globalReset:v(()=>{vb(y0)},"globalReset"),defaultConfig:y0});sb(It().logLevel);vb(It());var aMt=v((e,t,r)=>{fe.warn(e),gE(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ZPe=v(async function(e={querySelector:".mermaid"}){try{await sMt(e)}catch(t){if(gE(t)&&fe.error(t.str),Ff.parseError&&Ff.parseError(t),!e.suppressErrors)throw fe.error("Use the suppressErrors option to suppress these errors"),t}},"run"),sMt=v(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=ey.getConfig();fe.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");fe.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(fe.debug("Start On Load: "+n?.startOnLoad),ey.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new ar.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(i)){if(fe.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=wE(ar.entityDecode(s)).trim().replace(//gi,"
    ");let h=ar.detectInit(s);h&&fe.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await tBe(u,s,l);l.innerHTML=f,e&&await e(u),d&&d(l)}catch(f){aMt(f,o,Ff.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),QPe=v(function(e){ey.initialize(e)},"initialize"),oMt=v(async function(e,t,r){fe.warn("mermaid.init is deprecated. Please use run instead."),e&&QPe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await ZPe(n)},"init"),lMt=v(async(e,{lazyLoad:t=!0}={})=>{aL(),_S(...e),t===!1&&await LIt()},"registerExternalDiagrams"),JPe=v(function(){if(Ff.startOnLoad){let{startOnLoad:e}=ey.getConfig();e&&Ff.run().catch(t=>fe.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",JPe,!1);var cMt=v(function(e){Ff.parseError=e},"setParseErrorHandler"),iL=[],KX=!1,eBe=v(async()=>{if(!KX){for(KX=!0;iL.length>0;){let e=iL.shift();if(e)try{await e()}catch(t){fe.error("Error executing queue",t)}}KX=!1}},"executeQueue"),uMt=v(async(e,t)=>new Promise((r,n)=>{let i=v(()=>new Promise((a,s)=>{ey.parse(e,t).then(o=>{a(o),r(o)},o=>{fe.error("Error parsing",o),Ff.parseError?.(o),s(o),n(o)})}),"performCall");iL.push(i),eBe().catch(n)}),"parse"),tBe=v((e,t,r)=>new Promise((n,i)=>{let a=v(()=>new Promise((s,o)=>{ey.render(e,t,r).then(l=>{s(l),n(l)},l=>{fe.error("Error parsing",l),Ff.parseError?.(l),o(l),i(l)})}),"performCall");iL.push(a),eBe().catch(i)}),"render"),hMt=v(()=>Object.keys(nd).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ff={startOnLoad:!0,mermaidAPI:ey,parse:uMt,render:tBe,init:oMt,run:ZPe,registerExternalDiagrams:lMt,registerLayoutLoaders:PF,initialize:QPe,parseError:void 0,contentLoaded:JPe,setParseErrorHandler:cMt,detectType:xb,registerIconPacks:qy,getRegisteredDiagramsMetadata:hMt},tj=Ff;var sL=Symbol.for("yaml.alias"),oL=Symbol.for("yaml.document"),Dc=Symbol.for("yaml.map"),rj=Symbol.for("yaml.pair"),yl=Symbol.for("yaml.scalar"),zf=Symbol.for("yaml.seq"),io=Symbol.for("yaml.node.type"),Nc=e=>!!e&&typeof e=="object"&&e[io]===sL,uh=e=>!!e&&typeof e=="object"&&e[io]===oL,Oc=e=>!!e&&typeof e=="object"&&e[io]===Dc,nn=e=>!!e&&typeof e=="object"&&e[io]===rj,Xr=e=>!!e&&typeof e=="object"&&e[io]===yl,Pc=e=>!!e&&typeof e=="object"&&e[io]===zf;function Mn(e){if(e&&typeof e=="object")switch(e[io]){case Dc:case zf:return!0}return!1}function ln(e){if(e&&typeof e=="object")switch(e[io]){case sL:case Dc:case yl:case zf:return!0}return!1}var lL=e=>(Xr(e)||Mn(e))&&!!e.anchor;var Fo=Symbol("break visit"),rBe=Symbol("skip children"),hh=Symbol("remove node");function fh(e,t){let r=nBe(t);uh(e)?$x(null,e.contents,r,Object.freeze([e]))===hh&&(e.contents=null):$x(null,e,r,Object.freeze([]))}fh.BREAK=Fo;fh.SKIP=rBe;fh.REMOVE=hh;function $x(e,t,r,n){let i=iBe(e,t,r,n);if(ln(i)||nn(i))return aBe(e,n,i),$x(e,i,r,n);if(typeof i!="symbol"){if(Mn(t)){n=Object.freeze(n.concat(t));for(let a=0;ae.replace(/[!,[\]{}]/g,t=>fMt[t]),dh=class e{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,r)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let n=t.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[a,s]=n;return this.tags[a]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[a]=n;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{let s=/^\d+\.\d+$/.test(a);return r(6,`Unsupported YAML version ${a}`,s),!1}}default:return r(0,`Unknown directive ${i}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let s=t.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}let[,n,i]=t.match(/^(.*!)([^!]*)$/s);i||r(`The ${t} tag has no suffix`);let a=this.tags[n];if(a)try{return a+decodeURIComponent(i)}catch(s){return r(String(s)),null}return n==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,n]of Object.entries(this.tags))if(t.startsWith(n))return r+dMt(t.substring(n.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(t&&n.length>0&&ln(t.contents)){let a={};fh(t.contents,(s,o)=>{ln(o)&&o.tag&&(a[o.tag]=!0)}),i=Object.keys(a)}else i=[];for(let[a,s]of n)a==="!!"&&s==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(s)))&&r.push(`%TAG ${a} ${s}`);return r.join(` +`)}};dh.defaultYaml={explicit:!1,version:"1.2"};dh.defaultTags={"!!":"tag:yaml.org,2002:"};function uL(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function nj(e){let t=new Set;return fh(e,{Value(r,n){n.anchor&&t.add(n.anchor)}}),t}function ij(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function sBe(e,t){let r=[],n=new Map,i=null;return{onAnchor:a=>{r.push(a),i??(i=nj(e));let s=ij(t,i);return i.add(s),s},setAnchors:()=>{for(let a of r){let s=n.get(a);if(typeof s=="object"&&s.anchor&&(Xr(s.node)||Mn(s.node)))s.node.anchor=s.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=a,o}}},sourceObjects:n}}function e0(e,t,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,a=n.length;ika(n,String(i),r));if(e&&typeof e.toJSON=="function"){if(!r||!lL(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=a=>{n.res=a,delete r.onCreate};let i=e.toJSON(t,r);return r.onCreate&&r.onCreate(i),i}return typeof e=="bigint"&&!r?.keep?Number(e):e}var t0=class{constructor(t){Object.defineProperty(this,io,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:a}={}){if(!uh(t))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},o=ka(this,"",s);if(typeof i=="function")for(let{count:l,res:u}of s.anchors.values())i(u,l);return typeof a=="function"?e0(a,{"":o},"",o):o}};var Gf=class extends t0{constructor(t){super(sL),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],fh(t,{Node:(a,s)=>{(Nc(s)||lL(s))&&n.push(s)}}),r&&(r.aliasResolveCache=n));let i;for(let a of n){if(a===this)break;a.anchor===this.source&&(i=a)}return i}toJSON(t,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:a}=r,s=this.resolve(i,r);if(!s){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=n.get(s);if(o||(ka(s,null,r),o=n.get(s)),o?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=hL(i,s,n)),o.count*o.aliasCount>a)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(t,r,n){let i=`*${this.source}`;if(t){if(uL(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${i} `}return i}};function hL(e,t,r){if(Nc(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Mn(t)){let n=0;for(let i of t.items){let a=hL(e,i,r);a>n&&(n=a)}return n}else if(nn(t)){let n=hL(e,t.key,r),i=hL(e,t.value,r);return Math.max(n,i)}return 1}var fL=e=>!e||typeof e!="function"&&typeof e!="object",er=class extends t0{constructor(t){super(yl),this.value=t}toJSON(t,r){return r?.keep?this.value:ka(this.value,t,r)}toString(){return String(this.value)}};er.BLOCK_FOLDED="BLOCK_FOLDED";er.BLOCK_LITERAL="BLOCK_LITERAL";er.PLAIN="PLAIN";er.QUOTE_DOUBLE="QUOTE_DOUBLE";er.QUOTE_SINGLE="QUOTE_SINGLE";var pMt="tag:yaml.org,2002:";function gMt(e,t,r){if(t){let n=r.filter(a=>a.tag===t),i=n.find(a=>!a.format)??n[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return r.find(n=>n.identify?.(e)&&!n.format)}function qf(e,t,r){if(uh(e)&&(e=e.contents),ln(e))return e;if(nn(e)){let f=r.schema[Dc].createNode?.(r.schema,null,r);return f.items.push(e),f}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:a,schema:s,sourceObjects:o}=r,l;if(n&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=i(e)),new Gf(l.anchor);l={anchor:null,node:null},o.set(e,l)}t?.startsWith("!!")&&(t=pMt+t.slice(2));let u=gMt(e,t,s.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let f=new er(e);return l&&(l.node=f),f}u=e instanceof Map?s[Dc]:Symbol.iterator in Object(e)?s[zf]:s[Dc]}a&&(a(u),delete r.onTagObj);let h=u?.createNode?u.createNode(r.schema,e,r):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(r.schema,e,r):new er(e);return t?h.tag=t:u.default||(h.tag=u.tag),l&&(l.node=h),h}function gk(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let a=t[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){let s=[];s[a]=n,n=s}else n=new Map([[a,n]])}return qf(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Gx=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,zx=class extends t0{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(n=>ln(n)||nn(n)?n.clone(t):n),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(Gx(t))this.add(r);else{let[n,...i]=t,a=this.get(n,!0);if(Mn(a))a.addIn(i,r);else if(a===void 0&&this.schema)this.set(n,gk(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){let[r,...n]=t;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(Mn(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){let[n,...i]=t,a=this.get(n,!0);return i.length===0?!r&&Xr(a)?a.value:a:Mn(a)?a.getIn(i,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!nn(r))return!1;let n=r.value;return n==null||t&&Xr(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){let[r,...n]=t;if(n.length===0)return this.has(r);let i=this.get(r,!0);return Mn(i)?i.hasIn(n):!1}setIn(t,r){let[n,...i]=t;if(i.length===0)this.set(n,r);else{let a=this.get(n,!0);if(Mn(a))a.setIn(i,r);else if(a===void 0&&this.schema)this.set(n,gk(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var oBe=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Xl(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var ph=(e,t,r)=>e.endsWith(` +`)?Xl(r,t):r.includes(` `)?` -`+gl(r,t):(e.endsWith(" ")?"":" ")+r;var NW="flow",k7="block",Vw="quoted";function Ww(e,t,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:a=20,onFold:s,onOverflow:o}={}){if(!n||n<0)return e;nn-Math.max(2,a)?u.push(0):f=n-i);let d,p,g=!1,m=-1,y=-1,v=-1;r===k7&&(m=hIe(e,m,t.length),m!==-1&&(f=m+l));for(let T;T=e[m+=1];){if(r===Vw&&T==="\\"){switch(y=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}v=m}if(T===` -`)r===k7&&(m=hIe(e,m,t.length)),f=m+t.length+l,d=void 0;else{if(T===" "&&p&&p!==" "&&p!==` -`&&p!==" "){let C=e[m+1];C&&C!==" "&&C!==` -`&&C!==" "&&(d=m)}if(m>=f)if(d)u.push(d),f=d+l,d=void 0;else if(r===Vw){for(;p===" "||p===" ";)p=T,T=e[m+=1],g=!0;let C=m>v+1?m-2:y-1;if(h[C])return e;u.push(C),h[C]=!0,f=C+l,d=void 0}else g=!0}p=T}if(g&&o&&o(),u.length===0)return e;s&&s();let x=e.slice(0,u[0]);for(let T=0;T({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),E7=e=>/^(%|---|\.\.\.)/m.test(e);function x6t(e,t,r){if(!t||t<0)return!1;let i=t-r,n=e.length;if(n<=i)return!1;for(let a=0,s=0;ai)return!0;if(s=a+1,n-s<=i)return!1}return!0}function Uw(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=t,n=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(E7(e)?" ":""),s="",o=0;for(let l=0,u=r[l];u;u=r[++l])if(u===" "&&r[l+1]==="\\"&&r[l+2]==="n"&&(s+=r.slice(o,l)+"\\ ",l+=1,o=l,u="\\"),u==="\\")switch(r[l+1]){case"u":{s+=r.slice(o,l);let h=r.substr(l+2,4);switch(h){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:h.substr(0,2)==="00"?s+="\\x"+h.substr(2):s+=r.substr(l,6)}l+=5,o=l+1}break;case"n":if(i||r[l+2]==='"'||r.lengthi-Math.max(2,a)?u.push(0):f=i-n);let d,p,g=!1,m=-1,y=-1,x=-1;r===dL&&(m=lBe(e,m,t.length),m!==-1&&(f=m+l));for(let T;T=e[m+=1];){if(r===mk&&T==="\\"){switch(y=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}x=m}if(T===` +`)r===dL&&(m=lBe(e,m,t.length)),f=m+t.length+l,d=void 0;else{if(T===" "&&p&&p!==" "&&p!==` +`&&p!==" "){let k=e[m+1];k&&k!==" "&&k!==` +`&&k!==" "&&(d=m)}if(m>=f)if(d)u.push(d),f=d+l,d=void 0;else if(r===mk){for(;p===" "||p===" ";)p=T,T=e[m+=1],g=!0;let k=m>x+1?m-2:y-1;if(h[k])return e;u.push(k),h[k]=!0,f=k+l,d=void 0}else g=!0}p=T}if(g&&o&&o(),u.length===0)return e;s&&s();let b=e.slice(0,u[0]);for(let T=0;T({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),mL=e=>/^(%|---|\.\.\.)/m.test(e);function mMt(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let a=0,s=0;an)return!0;if(s=a+1,i-s<=n)return!1}return!0}function vk(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(mL(e)?" ":""),s="",o=0;for(let l=0,u=r[l];u;u=r[++l])if(u===" "&&r[l+1]==="\\"&&r[l+2]==="n"&&(s+=r.slice(o,l)+"\\ ",l+=1,o=l,u="\\"),u==="\\")switch(r[l+1]){case"u":{s+=r.slice(o,l);let h=r.substr(l+2,4);switch(h){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:h.substr(0,2)==="00"?s+="\\x"+h.substr(2):s+=r.substr(l,6)}l+=5,o=l+1}break;case"n":if(n||r[l+2]==='"'||r.length `;let f,d;for(d=r.length;d>0;--d){let w=r[d-1];if(w!==` `&&w!==" "&&w!==" ")break}let p=r.substring(d),g=p.indexOf(` `);g===-1?f="-":r===p||g!==p.length-1?(f="+",a&&a()):f="",p&&(r=r.slice(0,-p.length),p[p.length-1]===` -`&&(p=p.slice(0,-1)),p=p.replace(OW,`$&${u}`));let m=!1,y,v=-1;for(y=0;y{k=!0});let A=Ww(`${x}${w}${p}`,u,k7,E);if(!k)return`>${C} -${u}${A}`}return r=r.replace(/\n+/g,`$&${u}`),`|${C} -${u}${x}${r}${p}`}function T6t(e,t,r,i){let{type:n,value:a}=e,{actualString:s,implicitKey:o,indent:l,indentStep:u,inFlow:h}=t;if(o&&a.includes(` -`)||h&&/[[\]{},]/.test(a))return wv(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return o||h||!a.includes(` -`)?wv(a,t):C7(e,t,r,i);if(!o&&!h&&n!==Ut.PLAIN&&a.includes(` -`))return C7(e,t,r,i);if(E7(a)){if(l==="")return t.forceBlockIndent=!0,C7(e,t,r,i);if(o&&l===u)return wv(a,t)}let f=a.replace(/\n+/g,`$& -${l}`);if(s){let d=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:p,tags:g}=t.doc.schema;if(g.some(d)||p?.some(d))return wv(a,t)}return o?f:Ww(f,l,NW,S7(t,!1))}function Xg(e,t,r,i){let{implicitKey:n,inFlow:a}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==Ut.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=Ut.QUOTE_DOUBLE);let l=h=>{switch(h){case Ut.BLOCK_FOLDED:case Ut.BLOCK_LITERAL:return n||a?wv(s.value,t):C7(s,t,r,i);case Ut.QUOTE_DOUBLE:return Uw(s.value,t);case Ut.QUOTE_SINGLE:return MW(s.value,t);case Ut.PLAIN:return T6t(s,t,r,i);default:return null}},u=l(o);if(u===null){let{defaultKeyType:h,defaultStringType:f}=t.options,d=n&&h||f;if(u=l(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}function A7(e,t){let r=Object.assign({blockQuote:!0,commentString:uIe,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function w6t(e,t){if(t.tag){let n=e.filter(a=>a.tag===t.tag);if(n.length>0)return n.find(a=>a.format===t.format)??n[0]}let r,i;if(Nr(t)){i=t.value;let n=e.filter(a=>a.identify?.(i));if(n.length>1){let a=n.filter(s=>s.test);a.length>0&&(n=a)}r=n.find(a=>a.format===t.format)??n.find(a=>!a.format)}else i=t,r=e.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function k6t(e,t,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],a=(Nr(e)||li(e))&&e.anchor;a&&x7(a)&&(r.add(a),n.push(`&${a}`));let s=e.tag??(t.default?null:t.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function sf(e,t,r,i){if(Gr(e))return e.toString(t,r,i);if(rc(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n,a=Ur(e)?e:t.doc.createNode(e,{onTagObj:l=>n=l});n??(n=w6t(t.doc.schema.tags,a));let s=k6t(a,n,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let o=typeof n.stringify=="function"?n.stringify(a,t,r,i):Nr(a)?Xg(a,t,r,i):a.toString(t,r,i);return s?Nr(a)||o[0]==="{"||o[0]==="["?`${s} ${o}`:`${s} -${t.indent}${o}`:o}function fIe({key:e,value:t},r,i,n){let{allNullValues:a,doc:s,indent:o,indentStep:l,options:{commentString:u,indentSeq:h,simpleKeys:f}}=r,d=Ur(e)&&e.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(li(e)||!Ur(e)&&typeof e=="object"){let E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let p=!f&&(!e||d&&t==null&&!r.inFlow||li(e)||(Nr(e)?e.type===Ut.BLOCK_FOLDED||e.type===Ut.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(f||!a),indent:o+l});let g=!1,m=!1,y=sf(e,r,()=>g=!0,()=>m=!0);if(!p&&!r.inFlow&&y.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(a||t==null)return g&&i&&i(),y===""?"?":p?`? ${y}`:y}else if(a&&!f||t==null&&p)return y=`? ${y}`,d&&!g?y+=Ru(y,r.indent,u(d)):m&&n&&n(),y;g&&(d=null),p?(d&&(y+=Ru(y,r.indent,u(d))),y=`? ${y} -${o}:`):(y=`${y}:`,d&&(y+=Ru(y,r.indent,u(d))));let v,x,T;Ur(t)?(v=!!t.spaceBefore,x=t.commentBefore,T=t.comment):(v=!1,x=null,T=null,t&&typeof t=="object"&&(t=s.createNode(t))),r.implicitKey=!1,!p&&!d&&Nr(t)&&(r.indentAtStart=y.length+1),m=!1,!h&&l.length>=2&&!r.inFlow&&!p&&nc(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let C=!1,w=sf(t,r,()=>C=!0,()=>m=!0),k=" ";if(d||v||x){if(k=v?` -`:"",x){let E=u(x);k+=` -${gl(E,r.indent)}`}w===""&&!r.inFlow?k===` -`&&T&&(k=` - -`):k+=` -${r.indent}`}else if(!p&&li(t)){let E=w[0],A=w.indexOf(` -`),N=A!==-1,P=r.inFlow??t.flow??t.items.length===0;if(N||!P){let O=!1;if(N&&(E==="&"||E==="!")){let L=w.indexOf(" ");E==="&"&&L!==-1&&L{C=!0});let E=yk(`${b}${w}${p}`,u,dL,S);if(!C)return`>${k} +${u}${E}`}return r=r.replace(/\n+/g,`$&${u}`),`|${k} +${u}${b}${r}${p}`}function yMt(e,t,r,n){let{type:i,value:a}=e,{actualString:s,implicitKey:o,indent:l,indentStep:u,inFlow:h}=t;if(o&&a.includes(` +`)||h&&/[[\]{},]/.test(a))return qx(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return o||h||!a.includes(` +`)?qx(a,t):pL(e,t,r,n);if(!o&&!h&&i!==er.PLAIN&&a.includes(` +`))return pL(e,t,r,n);if(mL(a)){if(l==="")return t.forceBlockIndent=!0,pL(e,t,r,n);if(o&&l===u)return qx(a,t)}let f=a.replace(/\n+/g,`$& +${l}`);if(s){let d=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:p,tags:g}=t.doc.schema;if(g.some(d)||p?.some(d))return qx(a,t)}return o?f:yk(f,l,aj,gL(t,!1))}function ty(e,t,r,n){let{implicitKey:i,inFlow:a}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==er.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=er.QUOTE_DOUBLE);let l=h=>{switch(h){case er.BLOCK_FOLDED:case er.BLOCK_LITERAL:return i||a?qx(s.value,t):pL(s,t,r,n);case er.QUOTE_DOUBLE:return vk(s.value,t);case er.QUOTE_SINGLE:return sj(s.value,t);case er.PLAIN:return yMt(s,t,r,n);default:return null}},u=l(o);if(u===null){let{defaultKeyType:h,defaultStringType:f}=t.options,d=i&&h||f;if(u=l(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}function yL(e,t){let r=Object.assign({blockQuote:!0,commentString:oBe,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function vMt(e,t){if(t.tag){let i=e.filter(a=>a.tag===t.tag);if(i.length>0)return i.find(a=>a.format===t.format)??i[0]}let r,n;if(Xr(t)){n=t.value;let i=e.filter(a=>a.identify?.(n));if(i.length>1){let a=i.filter(s=>s.test);a.length>0&&(i=a)}r=i.find(a=>a.format===t.format)??i.find(a=>!a.format)}else n=t,r=e.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function xMt(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],a=(Xr(e)||Mn(e))&&e.anchor;a&&uL(a)&&(r.add(a),i.push(`&${a}`));let s=e.tag??(t.default?null:t.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}function Vf(e,t,r,n){if(nn(e))return e.toString(t,r,n);if(Nc(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=ln(e)?e:t.doc.createNode(e,{onTagObj:l=>i=l});i??(i=vMt(t.doc.schema.tags,a));let s=xMt(a,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let o=typeof i.stringify=="function"?i.stringify(a,t,r,n):Xr(a)?ty(a,t,r,n):a.toString(t,r,n);return s?Xr(a)||o[0]==="{"||o[0]==="["?`${s} ${o}`:`${s} +${t.indent}${o}`:o}function cBe({key:e,value:t},r,n,i){let{allNullValues:a,doc:s,indent:o,indentStep:l,options:{commentString:u,indentSeq:h,simpleKeys:f}}=r,d=ln(e)&&e.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Mn(e)||!ln(e)&&typeof e=="object"){let S="With simple keys, collection cannot be used as a key value";throw new Error(S)}}let p=!f&&(!e||d&&t==null&&!r.inFlow||Mn(e)||(Xr(e)?e.type===er.BLOCK_FOLDED||e.type===er.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(f||!a),indent:o+l});let g=!1,m=!1,y=Vf(e,r,()=>g=!0,()=>m=!0);if(!p&&!r.inFlow&&y.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(a||t==null)return g&&n&&n(),y===""?"?":p?`? ${y}`:y}else if(a&&!f||t==null&&p)return y=`? ${y}`,d&&!g?y+=ph(y,r.indent,u(d)):m&&i&&i(),y;g&&(d=null),p?(d&&(y+=ph(y,r.indent,u(d))),y=`? ${y} +${o}:`):(y=`${y}:`,d&&(y+=ph(y,r.indent,u(d))));let x,b,T;ln(t)?(x=!!t.spaceBefore,b=t.commentBefore,T=t.comment):(x=!1,b=null,T=null,t&&typeof t=="object"&&(t=s.createNode(t))),r.implicitKey=!1,!p&&!d&&Xr(t)&&(r.indentAtStart=y.length+1),m=!1,!h&&l.length>=2&&!r.inFlow&&!p&&Pc(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let k=!1,w=Vf(t,r,()=>k=!0,()=>m=!0),C=" ";if(d||x||b){if(C=x?` +`:"",b){let S=u(b);C+=` +${Xl(S,r.indent)}`}w===""&&!r.inFlow?C===` +`&&T&&(C=` + +`):C+=` +${r.indent}`}else if(!p&&Mn(t)){let S=w[0],E=w.indexOf(` +`),L=E!==-1,N=r.inFlow??t.flow??t.items.length===0;if(L||!N){let O=!1;if(L&&(S==="&"||S==="!")){let R=w.indexOf(" ");S==="&"&&R!==-1&&Re===L7||typeof e=="symbol"&&e.description===L7,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ut(Symbol(L7)),{addToJSMap:BW}),stringify:()=>L7},dIe=(e,t)=>(ac.identify(t)||Nr(t)&&(!t.type||t.type===Ut.PLAIN)&&ac.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===ac.tag&&r.default);function BW(e,t,r){let i=pIe(e,r);if(nc(i))for(let n of i.items)PW(e,t,n);else if(Array.isArray(i))for(let n of i)PW(e,t,n);else PW(e,t,i)}function PW(e,t,r){let i=pIe(e,r);if(!ic(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,e,Map);for(let[a,s]of n)t instanceof Map?t.has(a)||t.set(a,s):t instanceof Set?t.add(a):Object.prototype.hasOwnProperty.call(t,a)||Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function pIe(e,t){return e&&rc(t)?t.resolve(e.doc,e):t}function R7(e,t,{key:r,value:i}){if(Ur(r)&&r.addToJSMap)r.addToJSMap(e,t,i);else if(dIe(e,r))BW(e,t,i);else{let n=Zn(r,"",e);if(t instanceof Map)t.set(n,Zn(i,n,e));else if(t instanceof Set)t.add(n);else{let a=C6t(r,n,e),s=Zn(i,a,e);a in t?Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[a]=s}}return t}function C6t(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(Ur(e)&&r?.doc){let i=A7(r.doc,{});i.anchors=new Set;for(let a of r.anchors.keys())i.anchors.add(a.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=e.toString(i);if(!r.mapKeyWarned){let a=JSON.stringify(n);a.length>40&&(a=a.substring(0,36)+'..."'),_7(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}function kv(e,t,r){let i=af(e,void 0,r),n=af(t,void 0,r);return new pn(i,n)}var pn=class e{constructor(t,r=null){Object.defineProperty(this,ws,{value:RW}),this.key=t,this.value=r}clone(t){let{key:r,value:i}=this;return Ur(r)&&(r=r.clone(t)),Ur(i)&&(i=i.clone(t)),new e(r,i)}toJSON(t,r){let i=r?.mapAsMap?new Map:{};return R7(r,i,this)}toString(t,r,i){return t?.doc?fIe(this,t,r,i):JSON.stringify(this)}};function D7(e,t,r){return(t.inFlow??e.flow?E6t:S6t)(e,t,r)}function S6t({comment:e,items:t},r,{blockItemPrefix:i,flowChars:n,itemIndent:a,onChompKeep:s,onComment:o}){let{indent:l,options:{commentString:u}}=r,h=Object.assign({},r,{indent:a,type:null}),f=!1,d=[];for(let g=0;gy=null,()=>f=!0);y&&(v+=Ru(v,a,u(y))),f&&y&&(f=!1),d.push(i+v)}let p;if(d.length===0)p=n.start+n.end;else{p=d[0];for(let g=1;ge===xL||typeof e=="symbol"&&e.description===xL,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new er(Symbol(xL)),{addToJSMap:cj}),stringify:()=>xL},uBe=(e,t)=>(Bc.identify(t)||Xr(t)&&(!t.type||t.type===er.PLAIN)&&Bc.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===Bc.tag&&r.default);function cj(e,t,r){let n=hBe(e,r);if(Pc(n))for(let i of n.items)lj(e,t,i);else if(Array.isArray(n))for(let i of n)lj(e,t,i);else lj(e,t,n)}function lj(e,t,r){let n=hBe(e,r);if(!Oc(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[a,s]of i)t instanceof Map?t.has(a)||t.set(a,s):t instanceof Set?t.add(a):Object.prototype.hasOwnProperty.call(t,a)||Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function hBe(e,t){return e&&Nc(t)?t.resolve(e.doc,e):t}function bL(e,t,{key:r,value:n}){if(ln(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(uBe(e,r))cj(e,t,n);else{let i=ka(r,"",e);if(t instanceof Map)t.set(i,ka(n,i,e));else if(t instanceof Set)t.add(i);else{let a=bMt(r,i,e),s=ka(n,a,e);a in t?Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[a]=s}}return t}function bMt(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(ln(e)&&r?.doc){let n=yL(r.doc,{});n.anchors=new Set;for(let a of r.anchors.keys())n.anchors.add(a.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let a=JSON.stringify(i);a.length>40&&(a=a.substring(0,36)+'..."'),vL(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}function Vx(e,t,r){let n=qf(e,void 0,r),i=qf(t,void 0,r);return new zi(n,i)}var zi=class e{constructor(t,r=null){Object.defineProperty(this,io,{value:rj}),this.key=t,this.value=r}clone(t){let{key:r,value:n}=this;return ln(r)&&(r=r.clone(t)),ln(n)&&(n=n.clone(t)),new e(r,n)}toJSON(t,r){let n=r?.mapAsMap?new Map:{};return bL(r,n,this)}toString(t,r,n){return t?.doc?cBe(this,t,r,n):JSON.stringify(this)}};function wL(e,t,r){return(t.inFlow??e.flow?wMt:TMt)(e,t,r)}function TMt({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:a,onChompKeep:s,onComment:o}){let{indent:l,options:{commentString:u}}=r,h=Object.assign({},r,{indent:a,type:null}),f=!1,d=[];for(let g=0;gy=null,()=>f=!0);y&&(x+=ph(x,a,u(y))),f&&y&&(f=!1),d.push(n+x)}let p;if(d.length===0)p=i.start+i.end;else{p=d[0];for(let g=1;gy=null);u||(u=f.length>h||v.includes(` -`)),g0&&(u||(u=f.reduce((x,T)=>x+T.length+2,2)+(v.length+2)>t.options.lineWidth)),u&&(v+=",")),y&&(v+=Ru(v,i,o(y))),f.push(v),h=f.length}let{start:d,end:p}=r;if(f.length===0)return d+p;if(!u){let g=f.reduce((m,y)=>m+y.length+2,2);u=t.options.lineWidth>0&&g>t.options.lineWidth}if(u){let g=d;for(let m of f)g+=m?` -${a}${n}${m}`:` +`+Xl(u(e),l),o&&o()):f&&s&&s(),p}function wMt({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:a,flowCollectionPadding:s,options:{commentString:o}}=t;n+=a;let l=Object.assign({},t,{indent:n,inFlow:!0,type:null}),u=!1,h=0,f=[];for(let g=0;gy=null);u||(u=f.length>h||x.includes(` +`)),g0&&(u||(u=f.reduce((b,T)=>b+T.length+2,2)+(x.length+2)>t.options.lineWidth)),u&&(x+=",")),y&&(x+=ph(x,n,o(y))),f.push(x),h=f.length}let{start:d,end:p}=r;if(f.length===0)return d+p;if(!u){let g=f.reduce((m,y)=>m+y.length+2,2);u=t.options.lineWidth>0&&g>t.options.lineWidth}if(u){let g=d;for(let m of f)g+=m?` +${a}${i}${m}`:` `;return`${g} -${n}${p}`}else return`${d}${s}${f.join(" ")}${s}${p}`}function I7({indent:e,options:{commentString:t}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let a=gl(t(i),e);r.push(a.trimStart())}}function sp(e,t){let r=Nr(t)?t.value:t;for(let i of e)if(Gr(i)&&(i.key===t||i.key===r||Nr(i.key)&&i.key.value===r))return i}var wn=class extends xv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(tc,t),this.items=[]}static from(t,r,i){let{keepUndefined:n,replacer:a}=i,s=new this(t),o=(l,u)=>{if(typeof a=="function")u=a.call(r,l,u);else if(Array.isArray(a)&&!a.includes(l))return;(u!==void 0||n)&&s.items.push(kv(l,u,i))};if(r instanceof Map)for(let[l,u]of r)o(l,u);else if(r&&typeof r=="object")for(let l of Object.keys(r))o(l,r[l]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}add(t,r){let i;Gr(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new pn(t,t?.value):i=new pn(t.key,t.value);let n=sp(this.items,i.key),a=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Nr(n.value)&&w7(i.value)?n.value.value=i.value:n.value=i.value}else if(a){let s=this.items.findIndex(o=>a(i,o)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(t){let r=sp(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){let n=sp(this.items,t)?.value;return(!r&&Nr(n)?n.value:n)??void 0}has(t){return!!sp(this.items,t)}set(t,r){this.add(new pn(t,r),!0)}toJSON(t,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let a of this.items)R7(r,n,a);return n}toString(t,r,i){if(!t)return JSON.stringify(this);for(let n of this.items)if(!Gr(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),D7(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:r})}};var sc={collection:"map",default:!0,nodeClass:wn,tag:"tag:yaml.org,2002:map",resolve(e,t){return ic(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>wn.from(e,t,r)};var qa=class extends xv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(rf,t),this.items=[]}add(t){this.items.push(t)}delete(t){let r=N7(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){let i=N7(t);if(typeof i!="number")return;let n=this.items[i];return!r&&Nr(n)?n.value:n}has(t){let r=N7(t);return typeof r=="number"&&r=0?t:null}var oc={collection:"seq",default:!0,nodeClass:qa,tag:"tag:yaml.org,2002:seq",resolve(e,t){return nc(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>qa.from(e,t,r)};var op={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),Xg(e,t,r,i)}};var Kg={identify:e=>e==null,createNode:()=>new Ut(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ut(null),stringify:({source:e},t)=>typeof e=="string"&&Kg.test.test(e)?e:t.options.nullStr};var Hw={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Ut(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Hw.test.test(e)){let i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?r.options.trueStr:r.options.falseStr}};function Va({format:e,minFractionDigits:t,tag:r,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let a=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(a)&&!a.includes("e")){let s=a.indexOf(".");s<0&&(s=a.length,a+=".");let o=t-(a.length-s-1);for(;o-- >0;)a+="0"}return a}var M7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Va},O7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Va(e)}},P7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new Ut(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:Va};var B7=e=>typeof e=="bigint"||Number.isInteger(e),FW=(e,t,r,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),r);function gIe(e,t,r){let{value:i}=e;return B7(i)&&i>=0?r+i.toString(t):Va(e)}var F7={identify:e=>B7(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>FW(e,2,8,r),stringify:e=>gIe(e,8,"0o")},$7={identify:B7,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>FW(e,0,10,r),stringify:Va},z7={identify:e=>B7(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>FW(e,2,16,r),stringify:e=>gIe(e,16,"0x")};var mIe=[sc,oc,op,Kg,Hw,F7,$7,z7,M7,O7,P7];function yIe(e){return typeof e=="bigint"||Number.isInteger(e)}var G7=({value:e})=>JSON.stringify(e),A6t=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:G7},{identify:e=>e==null,createNode:()=>new Ut(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:G7},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:G7},{identify:yIe,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>yIe(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:G7}],_6t={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},vIe=[sc,oc].concat(A6t,_6t);var Yw={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n1&&t("Each pair must have its own sequence indicator");let n=i.items[0]||new pn(new Ut(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore} -${n.key.commentBefore}`:i.commentBefore),i.comment){let a=n.value??n.key;a.comment=a.comment?`${i.comment} -${a.comment}`:i.comment}i=n}e.items[r]=Gr(i)?i:new pn(i)}}else t("Expected a sequence for this tag");return e}function zW(e,t,r){let{replacer:i}=r,n=new qa(e);n.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof i=="function"&&(s=i.call(t,String(a++),s));let o,l;if(Array.isArray(s))if(s.length===2)o=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let u=Object.keys(s);if(u.length===1)o=u[0],l=s[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=s;n.items.push(kv(o,l,r))}return n}var jw={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:$W,createNode:zW};var Cv=class e extends qa{constructor(){super(),this.add=wn.prototype.add.bind(this),this.delete=wn.prototype.delete.bind(this),this.get=wn.prototype.get.bind(this),this.has=wn.prototype.has.bind(this),this.set=wn.prototype.set.bind(this),this.tag=e.tag}toJSON(t,r){if(!r)return super.toJSON(t);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let a,s;if(Gr(n)?(a=Zn(n.key,"",r),s=Zn(n.value,a,r)):a=Zn(n,"",r),i.has(a))throw new Error("Ordered maps must not include duplicate keys");i.set(a,s)}return i}static from(t,r,i){let n=zW(t,r,i),a=new this;return a.items=n.items,a}};Cv.tag="tag:yaml.org,2002:omap";var Xw={collection:"seq",identify:e=>e instanceof Map,nodeClass:Cv,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=$W(e,t),i=[];for(let{key:n}of r.items)Nr(n)&&(i.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Cv,r)},createNode:(e,t,r)=>Cv.from(e,t,r)};function bIe({value:e,source:t},r){return t&&(e?GW:qW).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var GW={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ut(!0),stringify:bIe},qW={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ut(!1),stringify:bIe};var xIe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Va},TIe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Va(e)}},wIe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Ut(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let i=e.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:Va};var Kw=e=>typeof e=="bigint"||Number.isInteger(e);function q7(e,t,r,{intAsBigInt:i}){let n=e[0];if((n==="-"||n==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let s=BigInt(e);return n==="-"?BigInt(-1)*s:s}let a=parseInt(e,r);return n==="-"?-1*a:a}function VW(e,t,r){let{value:i}=e;if(Kw(i)){let n=i.toString(t);return i<0?"-"+r+n.substr(1):r+n}return Va(e)}var kIe={identify:Kw,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>q7(e,2,2,r),stringify:e=>VW(e,2,"0b")},CIe={identify:Kw,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>q7(e,1,8,r),stringify:e=>VW(e,8,"0")},SIe={identify:Kw,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>q7(e,0,10,r),stringify:Va},EIe={identify:Kw,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>q7(e,2,16,r),stringify:e=>VW(e,16,"0x")};var Sv=class e extends wn{constructor(t){super(t),this.tag=e.tag}add(t){let r;Gr(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new pn(t.key,null):r=new pn(t,null),sp(this.items,r.key)||this.items.push(r)}get(t,r){let i=sp(this.items,t);return!r&&Gr(i)?Nr(i.key)?i.key.value:i.key:i}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=sp(this.items,t);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new pn(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(t,r,i){let{replacer:n}=i,a=new this(t);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),a.items.push(kv(s,null,i));return a}};Sv.tag="tag:yaml.org,2002:set";var Zw={collection:"map",identify:e=>e instanceof Set,nodeClass:Sv,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>Sv.from(e,t,r),resolve(e,t){if(ic(e)){if(e.hasAllNullValues(!0))return Object.assign(new Sv,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function WW(e,t){let r=e[0],i=r==="-"||r==="+"?e.substring(1):e,n=s=>t?BigInt(s):Number(s),a=i.replace(/_/g,"").split(":").reduce((s,o)=>s*n(60)+n(o),n(0));return r==="-"?n(-1)*a:a}function AIe(e){let{value:t}=e,r=s=>s;if(typeof t=="bigint")r=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return Va(e);let i="";t<0&&(i="-",t*=r(-1));let n=r(60),a=[t%n];return t<60?a.unshift(0):(t=(t-a[0])/n,a.unshift(t%n),t>=60&&(t=(t-a[0])/n,a.unshift(t))),i+a.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var V7={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>WW(e,r),stringify:AIe},W7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>WW(e,!1),stringify:AIe},Ev={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(Ev.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,a,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,u=Date.UTC(r,i-1,n,a||0,s||0,o||0,l),h=t[8];if(h&&h!=="Z"){let f=WW(h,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var UW=[sc,oc,op,Kg,GW,qW,kIe,CIe,SIe,EIe,xIe,TIe,wIe,Yw,ac,Xw,jw,Zw,V7,W7,Ev];var _Ie=new Map([["core",mIe],["failsafe",[sc,oc,op]],["json",vIe],["yaml11",UW],["yaml-1.1",UW]]),LIe={binary:Yw,bool:Hw,float:P7,floatExp:O7,floatNaN:M7,floatTime:W7,int:$7,intHex:z7,intOct:F7,intTime:V7,map:sc,merge:ac,null:Kg,omap:Xw,pairs:jw,seq:oc,set:Zw,timestamp:Ev},RIe={"tag:yaml.org,2002:binary":Yw,"tag:yaml.org,2002:merge":ac,"tag:yaml.org,2002:omap":Xw,"tag:yaml.org,2002:pairs":jw,"tag:yaml.org,2002:set":Zw,"tag:yaml.org,2002:timestamp":Ev};function U7(e,t,r){let i=_Ie.get(t);if(i&&!e)return r&&!i.includes(ac)?i.concat(ac):i.slice();let n=i;if(!n)if(Array.isArray(e))n=[];else{let a=Array.from(_Ie.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${a} or define customTags array`)}if(Array.isArray(e))for(let a of e)n=n.concat(a);else typeof e=="function"&&(n=e(n.slice()));return r&&(n=n.concat(ac)),n.reduce((a,s)=>{let o=typeof s=="string"?LIe[s]:s;if(!o){let l=JSON.stringify(s),u=Object.keys(LIe).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${u}`)}return a.includes(o)||a.push(o),a},[])}var L6t=(e,t)=>e.keyt.key?1:0,Qw=class e{constructor({compat:t,customTags:r,merge:i,resolveKnownTags:n,schema:a,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(t)?U7(t,"compat"):t?U7(null,t):null,this.name=typeof a=="string"&&a||"core",this.knownTags=n?RIe:{},this.tags=U7(r,this.name,i),this.toStringOptions=o??null,Object.defineProperty(this,tc,{value:sc}),Object.defineProperty(this,Ao,{value:op}),Object.defineProperty(this,rf,{value:oc}),this.sortMapEntries=typeof s=="function"?s:s===!0?L6t:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function IIe(e,t){let r=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(r.push(l),i=!0):e.directives.docStart&&(i=!0)}i&&r.push("---");let n=A7(e,t),{commentString:a}=n.options;if(e.commentBefore){r.length!==1&&r.unshift("");let l=a(e.commentBefore);r.unshift(gl(l,""))}let s=!1,o=null;if(e.contents){if(Ur(e.contents)){if(e.contents.spaceBefore&&i&&r.push(""),e.contents.commentBefore){let h=a(e.contents.commentBefore);r.push(gl(h,""))}n.forceBlockIndent=!!e.comment,o=e.contents.comment}let l=o?void 0:()=>s=!0,u=sf(e.contents,n,()=>o=null,l);o&&(u+=Ru(u,"",a(o))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(sf(e.contents,n));if(e.directives?.docEnd)if(e.comment){let l=a(e.comment);l.includes(` -`)?(r.push("..."),r.push(gl(l,""))):r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;l&&s&&(l=l.replace(/^\n+/,"")),l&&((!s||o)&&r[r.length-1]!==""&&r.push(""),r.push(gl(a(l),"")))}return r.join(` +${i}${p}`}else return`${d}${s}${f.join(" ")}${s}${p}`}function TL({indent:e,options:{commentString:t}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let a=Xl(t(n),e);r.push(a.trimStart())}}function r0(e,t){let r=Xr(t)?t.value:t;for(let n of e)if(nn(n)&&(n.key===t||n.key===r||Xr(n.key)&&n.key.value===r))return n}var ji=class extends zx{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Dc,t),this.items=[]}static from(t,r,n){let{keepUndefined:i,replacer:a}=n,s=new this(t),o=(l,u)=>{if(typeof a=="function")u=a.call(r,l,u);else if(Array.isArray(a)&&!a.includes(l))return;(u!==void 0||i)&&s.items.push(Vx(l,u,n))};if(r instanceof Map)for(let[l,u]of r)o(l,u);else if(r&&typeof r=="object")for(let l of Object.keys(r))o(l,r[l]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}add(t,r){let n;nn(t)?n=t:!t||typeof t!="object"||!("key"in t)?n=new zi(t,t?.value):n=new zi(t.key,t.value);let i=r0(this.items,n.key),a=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);Xr(i.value)&&fL(n.value)?i.value.value=n.value:i.value=n.value}else if(a){let s=this.items.findIndex(o=>a(n,o)<0);s===-1?this.items.push(n):this.items.splice(s,0,n)}else this.items.push(n)}delete(t){let r=r0(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){let i=r0(this.items,t)?.value;return(!r&&Xr(i)?i.value:i)??void 0}has(t){return!!r0(this.items,t)}set(t,r){this.add(new zi(t,r),!0)}toJSON(t,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let a of this.items)bL(r,i,a);return i}toString(t,r,n){if(!t)return JSON.stringify(this);for(let i of this.items)if(!nn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),wL(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:n,onComment:r})}};var $c={collection:"map",default:!0,nodeClass:ji,tag:"tag:yaml.org,2002:map",resolve(e,t){return Oc(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>ji.from(e,t,r)};var Ss=class extends zx{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(zf,t),this.items=[]}add(t){this.items.push(t)}delete(t){let r=CL(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){let n=CL(t);if(typeof n!="number")return;let i=this.items[n];return!r&&Xr(i)?i.value:i}has(t){let r=CL(t);return typeof r=="number"&&r=0?t:null}var Fc={collection:"seq",default:!0,nodeClass:Ss,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Pc(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>Ss.from(e,t,r)};var n0={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),ty(e,t,r,n)}};var ry={identify:e=>e==null,createNode:()=>new er(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new er(null),stringify:({source:e},t)=>typeof e=="string"&&ry.test.test(e)?e:t.options.nullStr};var xk={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new er(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&xk.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};function Es({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let a=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(a)&&!a.includes("e")){let s=a.indexOf(".");s<0&&(s=a.length,a+=".");let o=t-(a.length-s-1);for(;o-- >0;)a+="0"}return a}var kL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Es},SL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Es(e)}},EL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new er(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:Es};var AL=e=>typeof e=="bigint"||Number.isInteger(e),uj=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function fBe(e,t,r){let{value:n}=e;return AL(n)&&n>=0?r+n.toString(t):Es(e)}var _L={identify:e=>AL(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>uj(e,2,8,r),stringify:e=>fBe(e,8,"0o")},RL={identify:AL,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>uj(e,0,10,r),stringify:Es},LL={identify:e=>AL(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>uj(e,2,16,r),stringify:e=>fBe(e,16,"0x")};var dBe=[$c,Fc,n0,ry,xk,_L,RL,LL,kL,SL,EL];function pBe(e){return typeof e=="bigint"||Number.isInteger(e)}var IL=({value:e})=>JSON.stringify(e),CMt=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:IL},{identify:e=>e==null,createNode:()=>new er(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:IL},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:IL},{identify:pBe,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>pBe(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:IL}],kMt={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},gBe=[$c,Fc].concat(CMt,kMt);var bk={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i1&&t("Each pair must have its own sequence indicator");let i=n.items[0]||new zi(new er(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore} +${i.key.commentBefore}`:n.commentBefore),n.comment){let a=i.value??i.key;a.comment=a.comment?`${n.comment} +${a.comment}`:n.comment}n=i}e.items[r]=nn(n)?n:new zi(n)}}else t("Expected a sequence for this tag");return e}function fj(e,t,r){let{replacer:n}=r,i=new Ss(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof n=="function"&&(s=n.call(t,String(a++),s));let o,l;if(Array.isArray(s))if(s.length===2)o=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let u=Object.keys(s);if(u.length===1)o=u[0],l=s[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=s;i.items.push(Vx(o,l,r))}return i}var Tk={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:hj,createNode:fj};var Wx=class e extends Ss{constructor(){super(),this.add=ji.prototype.add.bind(this),this.delete=ji.prototype.delete.bind(this),this.get=ji.prototype.get.bind(this),this.has=ji.prototype.has.bind(this),this.set=ji.prototype.set.bind(this),this.tag=e.tag}toJSON(t,r){if(!r)return super.toJSON(t);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let a,s;if(nn(i)?(a=ka(i.key,"",r),s=ka(i.value,a,r)):a=ka(i,"",r),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,s)}return n}static from(t,r,n){let i=fj(t,r,n),a=new this;return a.items=i.items,a}};Wx.tag="tag:yaml.org,2002:omap";var wk={collection:"seq",identify:e=>e instanceof Map,nodeClass:Wx,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=hj(e,t),n=[];for(let{key:i}of r.items)Xr(i)&&(n.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new Wx,r)},createNode:(e,t,r)=>Wx.from(e,t,r)};function mBe({value:e,source:t},r){return t&&(e?dj:pj).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var dj={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new er(!0),stringify:mBe},pj={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new er(!1),stringify:mBe};var yBe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Es},vBe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Es(e)}},xBe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new er(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(t.minFractionDigits=n.length)}return t},stringify:Es};var Ck=e=>typeof e=="bigint"||Number.isInteger(e);function ML(e,t,r,{intAsBigInt:n}){let i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let s=BigInt(e);return i==="-"?BigInt(-1)*s:s}let a=parseInt(e,r);return i==="-"?-1*a:a}function gj(e,t,r){let{value:n}=e;if(Ck(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return Es(e)}var bBe={identify:Ck,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>ML(e,2,2,r),stringify:e=>gj(e,2,"0b")},TBe={identify:Ck,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>ML(e,1,8,r),stringify:e=>gj(e,8,"0")},wBe={identify:Ck,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>ML(e,0,10,r),stringify:Es},CBe={identify:Ck,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>ML(e,2,16,r),stringify:e=>gj(e,16,"0x")};var Ux=class e extends ji{constructor(t){super(t),this.tag=e.tag}add(t){let r;nn(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new zi(t.key,null):r=new zi(t,null),r0(this.items,r.key)||this.items.push(r)}get(t,r){let n=r0(this.items,t);return!r&&nn(n)?Xr(n.key)?n.key.value:n.key:n}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=r0(this.items,t);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new zi(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,n){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(t,r,n){let{replacer:i}=n,a=new this(t);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof i=="function"&&(s=i.call(r,s,s)),a.items.push(Vx(s,null,n));return a}};Ux.tag="tag:yaml.org,2002:set";var kk={collection:"map",identify:e=>e instanceof Set,nodeClass:Ux,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>Ux.from(e,t,r),resolve(e,t){if(Oc(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ux,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function mj(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=s=>t?BigInt(s):Number(s),a=n.replace(/_/g,"").split(":").reduce((s,o)=>s*i(60)+i(o),i(0));return r==="-"?i(-1)*a:a}function kBe(e){let{value:t}=e,r=s=>s;if(typeof t=="bigint")r=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return Es(e);let n="";t<0&&(n="-",t*=r(-1));let i=r(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),n+a.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var DL={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>mj(e,r),stringify:kBe},NL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>mj(e,!1),stringify:kBe},Hx={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(Hx.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,a,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,u=Date.UTC(r,n-1,i,a||0,s||0,o||0,l),h=t[8];if(h&&h!=="Z"){let f=mj(h,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var yj=[$c,Fc,n0,ry,dj,pj,bBe,TBe,wBe,CBe,yBe,vBe,xBe,bk,Bc,wk,Tk,kk,DL,NL,Hx];var SBe=new Map([["core",dBe],["failsafe",[$c,Fc,n0]],["json",gBe],["yaml11",yj],["yaml-1.1",yj]]),EBe={binary:bk,bool:xk,float:EL,floatExp:SL,floatNaN:kL,floatTime:NL,int:RL,intHex:LL,intOct:_L,intTime:DL,map:$c,merge:Bc,null:ry,omap:wk,pairs:Tk,seq:Fc,set:kk,timestamp:Hx},ABe={"tag:yaml.org,2002:binary":bk,"tag:yaml.org,2002:merge":Bc,"tag:yaml.org,2002:omap":wk,"tag:yaml.org,2002:pairs":Tk,"tag:yaml.org,2002:set":kk,"tag:yaml.org,2002:timestamp":Hx};function OL(e,t,r){let n=SBe.get(t);if(n&&!e)return r&&!n.includes(Bc)?n.concat(Bc):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let a=Array.from(SBe.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${a} or define customTags array`)}if(Array.isArray(e))for(let a of e)i=i.concat(a);else typeof e=="function"&&(i=e(i.slice()));return r&&(i=i.concat(Bc)),i.reduce((a,s)=>{let o=typeof s=="string"?EBe[s]:s;if(!o){let l=JSON.stringify(s),u=Object.keys(EBe).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${u}`)}return a.includes(o)||a.push(o),a},[])}var SMt=(e,t)=>e.keyt.key?1:0,Sk=class e{constructor({compat:t,customTags:r,merge:n,resolveKnownTags:i,schema:a,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(t)?OL(t,"compat"):t?OL(null,t):null,this.name=typeof a=="string"&&a||"core",this.knownTags=i?ABe:{},this.tags=OL(r,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Dc,{value:$c}),Object.defineProperty(this,yl,{value:n0}),Object.defineProperty(this,zf,{value:Fc}),this.sortMapEntries=typeof s=="function"?s:s===!0?SMt:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function _Be(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(r.push(l),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");let i=yL(e,t),{commentString:a}=i.options;if(e.commentBefore){r.length!==1&&r.unshift("");let l=a(e.commentBefore);r.unshift(Xl(l,""))}let s=!1,o=null;if(e.contents){if(ln(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){let h=a(e.contents.commentBefore);r.push(Xl(h,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}let l=o?void 0:()=>s=!0,u=Vf(e.contents,i,()=>o=null,l);o&&(u+=ph(u,"",a(o))),(u[0]==="|"||u[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${u}`:r.push(u)}else r.push(Vf(e.contents,i));if(e.directives?.docEnd)if(e.comment){let l=a(e.comment);l.includes(` +`)?(r.push("..."),r.push(Xl(l,""))):r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;l&&s&&(l=l.replace(/^\n+/,"")),l&&((!s||o)&&r[r.length-1]!==""&&r.push(""),r.push(Xl(a(l),"")))}return r.join(` `)+` -`}var lp=class e{constructor(t,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ws,{value:y7});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);let a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=a;let{version:s}=a;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new Lu({version:s}),this.setSchema(s,i),this.contents=t===void 0?null:this.createNode(t,n,i)}clone(){let t=Object.create(e.prototype,{[ws]:{value:y7}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Ur(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Av(this.contents)&&this.contents.add(t)}addIn(t,r){Av(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let i=IW(this);t.anchor=!r||i.has(r)?DW(r||"a",i):r}return new nf(t.anchor)}createNode(t,r,i){let n;if(typeof r=="function")t=r.call({"":t},"",t),n=r;else if(Array.isArray(r)){let y=x=>typeof x=="number"||x instanceof String||x instanceof Number,v=r.filter(y).map(String);v.length>0&&(r=r.concat(v)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:a,anchorPrefix:s,flow:o,keepUndefined:l,onTagObj:u,tag:h}=i??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=cIe(this,s||"a"),g={aliasDuplicateObjects:a??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:u,replacer:n,schema:this.schema,sourceObjects:p},m=af(t,h,g);return o&&li(m)&&(m.flow=!0),d(),m}createPair(t,r,i={}){let n=this.createNode(t,null,i),a=this.createNode(r,null,i);return new pn(n,a)}delete(t){return Av(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Tv(t)?this.contents==null?!1:(this.contents=null,!0):Av(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return li(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return Tv(t)?!r&&Nr(this.contents)?this.contents.value:this.contents:li(this.contents)?this.contents.getIn(t,r):void 0}has(t){return li(this.contents)?this.contents.has(t):!1}hasIn(t){return Tv(t)?this.contents!==void 0:li(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=qw(this.schema,[t],r):Av(this.contents)&&this.contents.set(t,r)}setIn(t,r){Tv(t)?this.contents=r:this.contents==null?this.contents=qw(this.schema,Array.from(t),r):Av(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Lu({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Lu({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new Qw(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:a,reviver:s}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Zn(this.contents,r??"",o);if(typeof a=="function")for(let{count:u,res:h}of o.anchors.values())a(h,u);return typeof s=="function"?np(s,{"":l},"",l):l}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return IIe(this,t)}};function Av(e){if(li(e))return!0;throw new Error("Expected a YAML collection as document contents")}var Jw=class extends Error{constructor(t,r,i,n){super(),this.name=t,this.code=i,this.message=n,this.pos=r}},lc=class extends Jw{constructor(t,r,i){super("YAMLParseError",t,r,i)}},ek=class extends Jw{constructor(t,r,i){super("YAMLWarning",t,r,i)}},HW=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>t.linePos(o));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let a=n-1,s=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(a>=60&&s.length>80){let o=Math.min(a-39,s.length-79);s="\u2026"+s.substring(o),a-=o-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(s.substring(0,a))){let o=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);o.length>80&&(o=o.substring(0,79)+`\u2026 -`),s=o+s}if(/[^ ]/.test(s)){let o=1,l=r.linePos[1];l?.line===i&&l.col>n&&(o=Math.max(1,Math.min(l.col-n,80-a)));let u=" ".repeat(a)+"^".repeat(o);r.message+=`: +`}var i0=class e{constructor(t,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,io,{value:oL});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=a;let{version:s}=a;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new dh({version:s}),this.setSchema(s,n),this.contents=t===void 0?null:this.createNode(t,i,n)}clone(){let t=Object.create(e.prototype,{[io]:{value:oL}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=ln(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Yx(this.contents)&&this.contents.add(t)}addIn(t,r){Yx(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let n=nj(this);t.anchor=!r||n.has(r)?ij(r||"a",n):r}return new Gf(t.anchor)}createNode(t,r,n){let i;if(typeof r=="function")t=r.call({"":t},"",t),i=r;else if(Array.isArray(r)){let y=b=>typeof b=="number"||b instanceof String||b instanceof Number,x=r.filter(y).map(String);x.length>0&&(r=r.concat(x)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:a,anchorPrefix:s,flow:o,keepUndefined:l,onTagObj:u,tag:h}=n??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=sBe(this,s||"a"),g={aliasDuplicateObjects:a??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:p},m=qf(t,h,g);return o&&Mn(m)&&(m.flow=!0),d(),m}createPair(t,r,n={}){let i=this.createNode(t,null,n),a=this.createNode(r,null,n);return new zi(i,a)}delete(t){return Yx(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Gx(t)?this.contents==null?!1:(this.contents=null,!0):Yx(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Mn(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return Gx(t)?!r&&Xr(this.contents)?this.contents.value:this.contents:Mn(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Mn(this.contents)?this.contents.has(t):!1}hasIn(t){return Gx(t)?this.contents!==void 0:Mn(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=gk(this.schema,[t],r):Yx(this.contents)&&this.contents.set(t,r)}setIn(t,r){Gx(t)?this.contents=r:this.contents==null?this.contents=gk(this.schema,Array.from(t),r):Yx(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let n;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dh({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new dh({version:t}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new Sk(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:a,reviver:s}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=ka(this.contents,r??"",o);if(typeof a=="function")for(let{count:u,res:h}of o.anchors.values())a(h,u);return typeof s=="function"?e0(s,{"":l},"",l):l}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return _Be(this,t)}};function Yx(e){if(Mn(e))return!0;throw new Error("Expected a YAML collection as document contents")}var Ek=class extends Error{constructor(t,r,n,i){super(),this.name=t,this.code=n,this.message=i,this.pos=r}},zc=class extends Ek{constructor(t,r,n){super("YAMLParseError",t,r,n)}},Ak=class extends Ek{constructor(t,r,n){super("YAMLWarning",t,r,n)}},vj=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>t.linePos(o));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let a=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&s.length>80){let o=Math.min(a-39,s.length-79);s="\u2026"+s.substring(o),a-=o-1}if(s.length>80&&(s=s.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(s.substring(0,a))){let o=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);o.length>80&&(o=o.substring(0,79)+`\u2026 +`),s=o+s}if(/[^ ]/.test(s)){let o=1,l=r.linePos[1];l?.line===n&&l.col>i&&(o=Math.max(1,Math.min(l.col-i,80-a)));let u=" ".repeat(a)+"^".repeat(o);r.message+=`: ${s} ${u} -`}};function Iu(e,{flow:t,indicator:r,next:i,offset:n,onError:a,parentIndent:s,startOnNewline:o}){let l=!1,u=o,h=o,f="",d="",p=!1,g=!1,m=null,y=null,v=null,x=null,T=null,C=null,w=null;for(let A of e)switch(g&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&a(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(u&&A.type!=="comment"&&A.type!=="newline"&&a(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),A.type){case"space":!t&&(r!=="doc-start"||i?.type!=="flow-collection")&&A.source.includes(" ")&&(m=A),h=!0;break;case"comment":{h||a(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let N=A.source.substring(1)||" ";f?f+=d+N:f=N,d="",u=!1;break}case"newline":u?f?f+=A.source:(!C||r!=="seq-item-ind")&&(l=!0):d+=A.source,u=!0,p=!0,(y||v)&&(x=A),h=!0;break;case"anchor":y&&a(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&a(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=A,w??(w=A.offset),u=!1,h=!1,g=!0;break;case"tag":{v&&a(A,"MULTIPLE_TAGS","A node can have at most one tag"),v=A,w??(w=A.offset),u=!1,h=!1,g=!0;break}case r:(y||v)&&a(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),C&&a(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${t??"collection"}`),C=A,u=r==="seq-item-ind"||r==="explicit-key-ind",h=!1;break;case"comma":if(t){T&&a(A,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=A,u=!1,h=!1;break}default:a(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),u=!1,h=!1}let k=e[e.length-1],E=k?k.offset+k.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&a(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=s||i?.type==="block-map"||i?.type==="block-seq")&&a(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:C,spaceBefore:l,comment:f,hasNewline:p,anchor:y,tag:v,newlineAfterProp:x,end:E,start:w??E}}function cp(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` -`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(cp(t.key)||cp(t.value))return!0}return!1;default:return!0}}function tk(e,t,r){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&cp(t)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function H7(e,t,r){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let n=typeof i=="function"?i:(a,s)=>a===s||Nr(a)&&Nr(s)&&a.value===s.value;return t.some(a=>n(a.key,r))}var DIe="All mapping items must start at the same column";function NIe({composeNode:e,composeEmptyNode:t},r,i,n,a){let s=a?.nodeClass??wn,o=new s(r.schema);r.atRoot&&(r.atRoot=!1);let l=i.offset,u=null;for(let h of i.items){let{start:f,key:d,sep:p,value:g}=h,m=Iu(f,{indicator:"explicit-key-ind",next:d??p?.[0],offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0}),y=!m.found;if(y){if(d&&(d.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==i.indent&&n(l,"BAD_INDENT",DIe)),!m.anchor&&!m.tag&&!p){u=m.end,m.comment&&(o.comment?o.comment+=` -`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||cp(d))&&n(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==i.indent&&n(l,"BAD_INDENT",DIe);r.atKey=!0;let v=m.end,x=d?e(r,d,m,n):t(r,v,f,null,m,n);r.schema.compat&&tk(i.indent,d,n),r.atKey=!1,H7(r,o.items,x)&&n(v,"DUPLICATE_KEY","Map keys must be unique");let T=Iu(p??[],{indicator:"map-value-ind",next:g,offset:x.range[2],onError:n,parentIndent:i.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=T.end,T.found){y&&(g?.type==="block-map"&&!T.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.starte&&(e.type==="block-map"||e.type==="block-seq");function OIe({composeNode:e,composeEmptyNode:t},r,i,n,a){let s=i.start.source==="{",o=s?"flow map":"flow sequence",l=a?.nodeClass??(s?wn:qa),u=new l(r.schema);u.flow=!0;let h=r.atRoot;h&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let f=i.offset+i.start.source.length;for(let y=0;y0){let y=Du(g,m,r.options.strict,n);y.comment&&(u.comment?u.comment+=` -`+y.comment:u.comment=y.comment),u.range=[i.offset,m,y.offset]}else u.range=[i.offset,m,m];return u}function XW(e,t,r,i,n,a){let s=r.type==="block-map"?NIe(e,t,r,i,a):r.type==="block-seq"?MIe(e,t,r,i,a):OIe(e,t,r,i,a),o=s.constructor;return n==="!"||n===o.tagName?(s.tag=o.tagName,s):(n&&(s.tag=n),s)}function PIe(e,t,r,i,n){let a=i.tag,s=a?t.directives.tagName(a.source,d=>n(a,"TAG_RESOLVE_FAILED",d)):null;if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:p}=i,g=d&&a?d.offset>a.offset?d:a:d??a;g&&(!p||p.offsetd.tag===s&&d.collection===o);if(!l){let d=t.schema.knownTags[s];if(d?.collection===o)t.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?n(a,"BAD_COLLECTION_TYPE",`${d.tag} used for ${o} collection, but expects ${d.collection??"scalar"}`,!0):n(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),XW(e,t,r,n,s)}let u=XW(e,t,r,n,s,l),h=l.resolve?.(u,d=>n(a,"TAG_RESOLVE_FAILED",d),t.options)??u,f=Ur(h)?h:new Ut(h);return f.range=u.range,f.tag=s,l?.format&&(f.format=l.format),f}function KW(e,t,r){let i=t.offset,n=R6t(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let a=n.mode===">"?Ut.BLOCK_FOLDED:Ut.BLOCK_LITERAL,s=t.source?I6t(t.source):[],o=s.length;for(let m=s.length-1;m>=0;--m){let y=s[m][1];if(y===""||y==="\r")o=m;else break}if(o===0){let m=n.chomp==="+"&&s.length>0?` -`.repeat(Math.max(1,s.length-1)):"",y=i+n.length;return t.source&&(y+=t.source.length),{value:m,type:a,comment:n.comment,range:[i,y,y]}}let l=t.indent+n.indent,u=t.offset+n.length,h=0;for(let m=0;ml&&(l=y.length);else{y.length=o;--m)s[m][0].length>l&&(o=m+1);let f="",d="",p=!1;for(let m=0;ml||v[0]===" "?(d===" "?d=` +`}};function gh(e,{flow:t,indicator:r,next:n,offset:i,onError:a,parentIndent:s,startOnNewline:o}){let l=!1,u=o,h=o,f="",d="",p=!1,g=!1,m=null,y=null,x=null,b=null,T=null,k=null,w=null;for(let E of e)switch(g&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&a(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(u&&E.type!=="comment"&&E.type!=="newline"&&a(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),E.type){case"space":!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&E.source.includes(" ")&&(m=E),h=!0;break;case"comment":{h||a(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let L=E.source.substring(1)||" ";f?f+=d+L:f=L,d="",u=!1;break}case"newline":u?f?f+=E.source:(!k||r!=="seq-item-ind")&&(l=!0):d+=E.source,u=!0,p=!0,(y||x)&&(b=E),h=!0;break;case"anchor":y&&a(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&a(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=E,w??(w=E.offset),u=!1,h=!1,g=!0;break;case"tag":{x&&a(E,"MULTIPLE_TAGS","A node can have at most one tag"),x=E,w??(w=E.offset),u=!1,h=!1,g=!0;break}case r:(y||x)&&a(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),k&&a(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${t??"collection"}`),k=E,u=r==="seq-item-ind"||r==="explicit-key-ind",h=!1;break;case"comma":if(t){T&&a(E,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=E,u=!1,h=!1;break}default:a(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),u=!1,h=!1}let C=e[e.length-1],S=C?C.offset+C.source.length:i;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&a(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=s||n?.type==="block-map"||n?.type==="block-seq")&&a(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:k,spaceBefore:l,comment:f,hasNewline:p,anchor:y,tag:x,newlineAfterProp:b,end:S,start:w??S}}function a0(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` +`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(a0(t.key)||a0(t.value))return!0}return!1;default:return!0}}function _k(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];n.indent===e&&(n.source==="]"||n.source==="}")&&a0(t)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function PL(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n=="function"?n:(a,s)=>a===s||Xr(a)&&Xr(s)&&a.value===s.value;return t.some(a=>i(a.key,r))}var RBe="All mapping items must start at the same column";function LBe({composeNode:e,composeEmptyNode:t},r,n,i,a){let s=a?.nodeClass??ji,o=new s(r.schema);r.atRoot&&(r.atRoot=!1);let l=n.offset,u=null;for(let h of n.items){let{start:f,key:d,sep:p,value:g}=h,m=gh(f,{indicator:"explicit-key-ind",next:d??p?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),y=!m.found;if(y){if(d&&(d.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(l,"BAD_INDENT",RBe)),!m.anchor&&!m.tag&&!p){u=m.end,m.comment&&(o.comment?o.comment+=` +`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||a0(d))&&i(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==n.indent&&i(l,"BAD_INDENT",RBe);r.atKey=!0;let x=m.end,b=d?e(r,d,m,i):t(r,x,f,null,m,i);r.schema.compat&&_k(n.indent,d,i),r.atKey=!1,PL(r,o.items,b)&&i(x,"DUPLICATE_KEY","Map keys must be unique");let T=gh(p??[],{indicator:"map-value-ind",next:g,offset:b.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=T.end,T.found){y&&(g?.type==="block-map"&&!T.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.starte&&(e.type==="block-map"||e.type==="block-seq");function MBe({composeNode:e,composeEmptyNode:t},r,n,i,a){let s=n.start.source==="{",o=s?"flow map":"flow sequence",l=a?.nodeClass??(s?ji:Ss),u=new l(r.schema);u.flow=!0;let h=r.atRoot;h&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let f=n.offset+n.start.source.length;for(let y=0;y0){let y=mh(g,m,r.options.strict,i);y.comment&&(u.comment?u.comment+=` +`+y.comment:u.comment=y.comment),u.range=[n.offset,m,y.offset]}else u.range=[n.offset,m,m];return u}function Tj(e,t,r,n,i,a){let s=r.type==="block-map"?LBe(e,t,r,n,a):r.type==="block-seq"?IBe(e,t,r,n,a):MBe(e,t,r,n,a),o=s.constructor;return i==="!"||i===o.tagName?(s.tag=o.tagName,s):(i&&(s.tag=i),s)}function DBe(e,t,r,n,i){let a=n.tag,s=a?t.directives.tagName(a.source,d=>i(a,"TAG_RESOLVE_FAILED",d)):null;if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:p}=n,g=d&&a?d.offset>a.offset?d:a:d??a;g&&(!p||p.offsetd.tag===s&&d.collection===o);if(!l){let d=t.schema.knownTags[s];if(d?.collection===o)t.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?i(a,"BAD_COLLECTION_TYPE",`${d.tag} used for ${o} collection, but expects ${d.collection??"scalar"}`,!0):i(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Tj(e,t,r,i,s)}let u=Tj(e,t,r,i,s,l),h=l.resolve?.(u,d=>i(a,"TAG_RESOLVE_FAILED",d),t.options)??u,f=ln(h)?h:new er(h);return f.range=u.range,f.tag=s,l?.format&&(f.format=l.format),f}function wj(e,t,r){let n=t.offset,i=EMt(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let a=i.mode===">"?er.BLOCK_FOLDED:er.BLOCK_LITERAL,s=t.source?AMt(t.source):[],o=s.length;for(let m=s.length-1;m>=0;--m){let y=s[m][1];if(y===""||y==="\r")o=m;else break}if(o===0){let m=i.chomp==="+"&&s.length>0?` +`.repeat(Math.max(1,s.length-1)):"",y=n+i.length;return t.source&&(y+=t.source.length),{value:m,type:a,comment:i.comment,range:[n,y,y]}}let l=t.indent+i.indent,u=t.offset+i.length,h=0;for(let m=0;ml&&(l=y.length);else{y.length=o;--m)s[m][0].length>l&&(o=m+1);let f="",d="",p=!1;for(let m=0;ml||x[0]===" "?(d===" "?d=` `:!p&&d===` `&&(d=` -`),f+=d+y.slice(l)+v,d=` -`,p=!0):v===""?d===` +`),f+=d+y.slice(l)+x,d=` +`,p=!0):x===""?d===` `?f+=` `:d=` -`:(f+=d+v,d=" ",p=!1)}switch(n.chomp){case"-":break;case"+":for(let m=o;mr(i+d,p,g);switch(n){case"scalar":o=Ut.PLAIN,l=D6t(a,u);break;case"single-quoted-scalar":o=Ut.QUOTE_SINGLE,l=N6t(a,u);break;case"double-quoted-scalar":o=Ut.QUOTE_DOUBLE,l=M6t(a,u);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+a.length,i+a.length]}}let h=i+a.length,f=Du(s,h,t,r);return{value:l,type:o,comment:f.comment,range:[i,h,f.offset]}}function D6t(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),BIe(e)}function N6t(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),BIe(e.slice(1,-1)).replace(/''/g,"'")}function BIe(e){let t,r;try{t=new RegExp(`(.*?)(?r(n+d,p,g);switch(i){case"scalar":o=er.PLAIN,l=_Mt(a,u);break;case"single-quoted-scalar":o=er.QUOTE_SINGLE,l=RMt(a,u);break;case"double-quoted-scalar":o=er.QUOTE_DOUBLE,l=LMt(a,u);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}let h=n+a.length,f=mh(s,h,t,r);return{value:l,type:o,comment:f.comment,range:[n,h,f.offset]}}function _Mt(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),NBe(e)}function RMt(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),NBe(e.slice(1,-1)).replace(/''/g,"'")}function NBe(e){let t,r;try{t=new RegExp(`(.*?)(?a?e.slice(a,i+1):n)}else r+=n}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function O6t(e,t){let r="",i=e[t+1];for(;(i===" "||i===" "||i===` -`||i==="\r")&&!(i==="\r"&&e[t+2]!==` -`);)i===` +`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let i=n[1],a=" ",s=t.lastIndex;for(r.lastIndex=s;n=r.exec(e);)n[1]===""?a===` +`?i+=a:a=` +`:(i+=a+n[1],a=" "),s=r.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=s,n=o.exec(e),i+a+(n?.[1]??"")}function LMt(e,t){let r="";for(let n=1;na?e.slice(a,n+1):i)}else r+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function IMt(e,t){let r="",n=e[t+1];for(;(n===" "||n===" "||n===` +`||n==="\r")&&!(n==="\r"&&e[t+2]!==` +`);)n===` `&&(r+=` -`),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}var P6t={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function B6t(e,t,r,i){let n=e.substr(t,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(s)}catch{let o=e.substr(t-2,r+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}function QW(e,t,r,i){let{value:n,type:a,comment:s,range:o}=t.type==="block-scalar"?KW(e,t,i):ZW(t,e.options.strict,i),l=r?e.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f)):null,u;e.options.stringKeys&&e.atKey?u=e.schema[Ao]:l?u=F6t(e.schema,n,l,r,i):t.type==="scalar"?u=$6t(e,n,t,i):u=e.schema[Ao];let h;try{let f=u.resolve(n,d=>i(r??t,"TAG_RESOLVE_FAILED",d),e.options);h=Nr(f)?f:new Ut(f)}catch(f){let d=f instanceof Error?f.message:String(f);i(r??t,"TAG_RESOLVE_FAILED",d),h=new Ut(n)}return h.range=o,h.source=n,a&&(h.type=a),l&&(h.tag=l),u.format&&(h.format=u.format),s&&(h.comment=s),h}function F6t(e,t,r,i,n){if(r==="!")return e[Ao];let a=[];for(let o of e.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)a.push(o);else return o;for(let o of a)if(o.test?.test(t))return o;let s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Ao])}function $6t({atKey:e,directives:t,schema:r},i,n,a){let s=r.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(i))||r[Ao];if(r.compat){let o=r.compat.find(l=>l.default&&l.test?.test(i))??r[Ao];if(s.tag!==o.tag){let l=t.tagString(s.tag),u=t.tagString(o.tag),h=`Value may be parsed as either ${l} or ${u}`;a(n,"TAG_RESOLVE_FAILED",h,!0)}}return s}function FIe(e,t,r){if(t){r??(r=t.length);for(let i=r-1;i>=0;--i){let n=t[i];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++i];n?.type==="space";)e+=n.source.length,n=t[++i];break}}return e}var z6t={composeNode:JW,composeEmptyNode:Y7};function JW(e,t,r,i){let n=e.atKey,{spaceBefore:a,comment:s,anchor:o,tag:l}=r,u,h=!0;switch(t.type){case"alias":u=G6t(e,t,i),(o||l)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=QW(e,t,l,i),o&&(u.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=PIe(z6t,e,t,r,i),o&&(u.anchor=o.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);i(t,"RESOURCE_EXHAUSTION",d)}break;default:{let f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",f),h=!1}}return u??(u=Y7(e,t.offset,void 0,null,r,i)),o&&u.anchor===""&&i(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!Nr(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&i(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),a&&(u.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?u.comment=s:u.commentBefore=s),e.options.keepSourceTokens&&h&&(u.srcToken=t),u}function Y7(e,t,r,i,{spaceBefore:n,comment:a,anchor:s,tag:o,end:l},u){let h={type:"scalar",offset:FIe(t,r,i),indent:-1,source:""},f=QW(e,h,o,u);return s&&(f.anchor=s.source.substring(1),f.anchor===""&&u(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),a&&(f.comment=a,f.range[2]=l),f}function G6t({options:e},{offset:t,source:r,end:i},n){let a=new nf(r.substring(1));a.source===""&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&n(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+r.length,o=Du(i,s,e.strict,n);return a.range=[t,s,o.offset],o.comment&&(a.comment=o.comment),a}function $Ie(e,t,{offset:r,start:i,value:n,end:a},s){let o=Object.assign({_directives:t},e),l=new lp(void 0,o),u={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},h=Iu(i,{indicator:"doc-start",next:n??a?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});h.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!h.hasNewline&&s(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?JW(u,n,h,s):Y7(u,h.end,i,null,h,s);let f=l.contents.range[2],d=Du(a,f,!1,s);return d.comment&&(l.comment=d.comment),l.range=[r,f,d.offset],l}function rk(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function zIe(e){let t="",r=!1,i=!1;for(let n=0;nn(r,"TAG_RESOLVE_FAILED",f)):null,u;e.options.stringKeys&&e.atKey?u=e.schema[yl]:l?u=NMt(e.schema,i,l,r,n):t.type==="scalar"?u=OMt(e,i,t,n):u=e.schema[yl];let h;try{let f=u.resolve(i,d=>n(r??t,"TAG_RESOLVE_FAILED",d),e.options);h=Xr(f)?f:new er(f)}catch(f){let d=f instanceof Error?f.message:String(f);n(r??t,"TAG_RESOLVE_FAILED",d),h=new er(i)}return h.range=o,h.source=i,a&&(h.type=a),l&&(h.tag=l),u.format&&(h.format=u.format),s&&(h.comment=s),h}function NMt(e,t,r,n,i){if(r==="!")return e[yl];let a=[];for(let o of e.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)a.push(o);else return o;for(let o of a)if(o.test?.test(t))return o;let s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[yl])}function OMt({atKey:e,directives:t,schema:r},n,i,a){let s=r.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(n))||r[yl];if(r.compat){let o=r.compat.find(l=>l.default&&l.test?.test(n))??r[yl];if(s.tag!==o.tag){let l=t.tagString(s.tag),u=t.tagString(o.tag),h=`Value may be parsed as either ${l} or ${u}`;a(i,"TAG_RESOLVE_FAILED",h,!0)}}return s}function OBe(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++n];i?.type==="space";)e+=i.source.length,i=t[++n];break}}return e}var PMt={composeNode:Sj,composeEmptyNode:BL};function Sj(e,t,r,n){let i=e.atKey,{spaceBefore:a,comment:s,anchor:o,tag:l}=r,u,h=!0;switch(t.type){case"alias":u=BMt(e,t,n),(o||l)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=kj(e,t,l,n),o&&(u.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=DBe(PMt,e,t,r,n),o&&(u.anchor=o.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);n(t,"RESOURCE_EXHAUSTION",d)}break;default:{let f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",f),h=!1}}return u??(u=BL(e,t.offset,void 0,null,r,n)),o&&u.anchor===""&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!Xr(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),a&&(u.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?u.comment=s:u.commentBefore=s),e.options.keepSourceTokens&&h&&(u.srcToken=t),u}function BL(e,t,r,n,{spaceBefore:i,comment:a,anchor:s,tag:o,end:l},u){let h={type:"scalar",offset:OBe(t,r,n),indent:-1,source:""},f=kj(e,h,o,u);return s&&(f.anchor=s.source.substring(1),f.anchor===""&&u(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),a&&(f.comment=a,f.range[2]=l),f}function BMt({options:e},{offset:t,source:r,end:n},i){let a=new Gf(r.substring(1));a.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+r.length,o=mh(n,s,e.strict,i);return a.range=[t,s,o.offset],o.comment&&(a.comment=o.comment),a}function PBe(e,t,{offset:r,start:n,value:i,end:a},s){let o=Object.assign({_directives:t},e),l=new i0(void 0,o),u={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},h=gh(n,{indicator:"doc-start",next:i??a?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});h.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!h.hasNewline&&s(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?Sj(u,i,h,s):BL(u,h.end,n,null,h,s);let f=l.contents.range[2],d=mh(a,f,!1,s);return d.comment&&(l.comment=d.comment),l.range=[r,f,d.offset],l}function Rk(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function BBe(e){let t="",r=!1,n=!1;for(let i=0;i{let s=rk(r);a?this.warnings.push(new ek(s,i,n)):this.errors.push(new lc(s,i,n))},this.directives=new Lu({version:t.version||"1.2"}),this.options=t}decorate(t,r){let{comment:i,afterEmptyLine:n}=zIe(this.prelude);if(i){let a=t.contents;if(r)t.comment=t.comment?`${t.comment} -${i}`:i;else if(n||t.directives.docStart||!a)t.commentBefore=i;else if(li(a)&&!a.flow&&a.items.length>0){let s=a.items[0];Gr(s)&&(s=s.key);let o=s.commentBefore;s.commentBefore=o?`${i} -${o}`:i}else{let s=a.commentBefore;a.commentBefore=s?`${i} -${s}`:i}}if(r){for(let a=0;a{let a=rk(t);a[0]+=r,this.onError(a,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let r=$Ie(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new lc(rk(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new lc(rk(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=Du(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let i=this.doc.comment;this.doc.comment=i?`${i} -${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new lc(rk(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let i=Object.assign({_directives:this.directives},this.options),n=new lp(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}};var eU=Symbol("break visit"),q6t=Symbol("skip children"),GIe=Symbol("remove item");function Zg(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),qIe(Object.freeze([]),e,t)}Zg.BREAK=eU;Zg.SKIP=q6t;Zg.REMOVE=GIe;Zg.itemAtPath=(e,t)=>{let r=e;for(let[i,n]of t){let a=r?.[i];if(a&&"items"in a)r=a.items[n];else return}return r};Zg.parentCollection=(e,t)=>{let r=Zg.itemAtPath(e,t.slice(0,-1)),i=t[t.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function qIe(e,t,r){let i=r(t,e);if(typeof i=="symbol")return i;for(let n of["key","value"]){let a=t[n];if(a&&"items"in a){for(let s=0;s{let s=Rk(r);a?this.warnings.push(new Ak(s,n,i)):this.errors.push(new zc(s,n,i))},this.directives=new dh({version:t.version||"1.2"}),this.options=t}decorate(t,r){let{comment:n,afterEmptyLine:i}=BBe(this.prelude);if(n){let a=t.contents;if(r)t.comment=t.comment?`${t.comment} +${n}`:n;else if(i||t.directives.docStart||!a)t.commentBefore=n;else if(Mn(a)&&!a.flow&&a.items.length>0){let s=a.items[0];nn(s)&&(s=s.key);let o=s.commentBefore;s.commentBefore=o?`${n} +${o}`:n}else{let s=a.commentBefore;a.commentBefore=s?`${n} +${s}`:n}}if(r){for(let a=0;a{let a=Rk(t);a[0]+=r,this.onError(a,"BAD_DIRECTIVE",n,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let r=PBe(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new zc(Rk(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new zc(Rk(t),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=mh(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n} +${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new zc(Rk(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let n=Object.assign({_directives:this.directives},this.options),i=new i0(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};var Ej=Symbol("break visit"),$Mt=Symbol("skip children"),$Be=Symbol("remove item");function ny(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),FBe(Object.freeze([]),e,t)}ny.BREAK=Ej;ny.SKIP=$Mt;ny.REMOVE=$Be;ny.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let a=r?.[n];if(a&&"items"in a)r=a.items[i];else return}return r};ny.parentCollection=(e,t)=>{let r=ny.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function FBe(e,t,r){let n=r(t,e);if(typeof n=="symbol")return n;for(let i of["key","value"]){let a=t[i];if(a&&"items"in a){for(let s=0;s":return"block-scalar-header"}return null}function cc(e){switch(e){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}var WIe=new Set("0123456789ABCDEFabcdef"),W6t=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),X7=new Set(",[]{}"),U6t=new Set(` ,[]{} -\r `),nU=e=>!e||U6t.has(e),nk=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===` +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Gc(e){switch(e){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}var GBe=new Set("0123456789ABCDEFabcdef"),zMt=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),FL=new Set(",[]{}"),GMt=new Set(` ,[]{} +\r `),Lj=e=>!e||GMt.has(e),Ik=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===` `?!0:r==="\r"?this.buffer[t+1]===` -`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+t];if(r==="\r"){let n=this.buffer[i+t+1];if(n===` -`||!n&&!this.atEnd)return t+i+1}return r===` -`||i>=this.indentNext||!r&&!this.atEnd?t+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&cc(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!cc(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&cc(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(nU),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r,i=-1;do t=yield*this.pushNewline(),t>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(t+r>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>cc(r)||r==="#")}*parseBlockScalar(){let t=this.pos-1,r=0,i;e:for(let a=this.pos;i=this.buffer[a];++a)switch(i){case" ":r+=1;break;case` +`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+t];if(r==="\r"){let i=this.buffer[n+t+1];if(i===` +`||!i&&!this.atEnd)return t+n+1}return r===` +`||n>=this.indentNext||!r&&!this.atEnd?t+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(t,3);if((n==="---"||n==="...")&&Gc(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!Gc(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Gc(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Lj),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r,n=-1;do t=yield*this.pushNewline(),t>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(t+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Gc(r)||r==="#")}*parseBlockScalar(){let t=this.pos-1,r=0,n;e:for(let a=this.pos;n=this.buffer[a];++a)switch(n){case" ":r+=1;break;case` `:t=a,r=0;break;case"\r":{let s=this.buffer[a+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===` -`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let a=this.continueScalar(t+1);if(a===-1)break;t=this.buffer.indexOf(` -`,a)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===` -`;)i=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)do{let a=t-1,s=this.buffer[a];s==="\r"&&(s=this.buffer[--a]);let o=a;for(;s===" ";)s=this.buffer[--a];if(s===` -`&&a>=this.pos&&a+1+r>o)t=a;else break}while(!0);return yield j7,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let a=this.buffer[i+1];if(cc(a)||t&&X7.has(a))break;r=i}else if(cc(n)){let a=this.buffer[i+1];if(n==="\r"&&(a===` -`?(i+=1,n=` -`,a=this.buffer[i+1]):r=i),a==="#"||t&&X7.has(a))break;if(n===` -`){let s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(t&&X7.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield j7,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){let i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(nU),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(cc(i)||r&&X7.has(i)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!cc(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(W6t.has(r))r=this.buffer[++t];else if(r==="%"&&WIe.has(this.buffer[t+1])&&WIe.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===` +`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let a=this.continueScalar(t+1);if(a===-1)break;t=this.buffer.indexOf(` +`,a)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` +`;)n=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)do{let a=t-1,s=this.buffer[a];s==="\r"&&(s=this.buffer[--a]);let o=a;for(;s===" ";)s=this.buffer[--a];if(s===` +`&&a>=this.pos&&a+1+r>o)t=a;else break}while(!0);return yield $L,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let a=this.buffer[n+1];if(Gc(a)||t&&FL.has(a))break;r=n}else if(Gc(i)){let a=this.buffer[n+1];if(i==="\r"&&(a===` +`?(n+=1,i=` +`,a=this.buffer[n+1]):r=n),a==="#"||t&&FL.has(a))break;if(i===` +`){let s=this.continueScalar(n+1);if(s===-1)break;n=Math.max(n,s-2)}}else{if(t&&FL.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield $L,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){let n=this.buffer.slice(this.pos,t);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(Lj),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(Gc(n)||r&&FL.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!Gc(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(zMt.has(r))r=this.buffer[++t];else if(r==="%"&&GBe.has(this.buffer[t+1])&&GBe.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===` `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||t&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(t){let r=this.pos,i=this.buffer[r];for(;!t(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};var ak=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,i=this.lineStarts.length;for(;r>1;this.lineStarts[a]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Z7(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&HIe(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&UIe(n.start)===-1&&(r.indent===0||n.start.every(a=>a.type!=="comment"||a.indent0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(t){let r=this.pos,n=this.buffer[r];for(;!t(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};var Mk=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,n=this.lineStarts.length;for(;r>1;this.lineStarts[a]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function GL(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&VBe(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&qBe(i.start)===-1&&(r.indent===0||i.start.every(a=>a.type!=="comment"||a.indent=t.indent){let i=!this.onKeyLine&&this.indent===t.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",a=[];if(n&&r.sep&&!r.value){let s=[];for(let o=0;ot.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(a=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(a.push(this.sourceToken),t.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(up(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(YIe(r.key)&&!up(r.sep,"newline")){let s=_v(r.start),o=r.key,l=r.sep;l.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:o,sep:l}]})}else a.length>0?r.sep=r.sep.concat(a,this.sourceToken):r.sep.push(this.sourceToken);else if(up(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=_v(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?t.items.push({start:a,key:null,sep:[this.sourceToken]}):up(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);n||r.value?(t.items.push({start:a,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!up(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:a});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){let n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Z7(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||up(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){let i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=K7(i),a=_v(n);HIe(t);let s=t.end.splice(1,t.end.length);s.push(this.sourceToken);let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(` +`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){GL(i,r.start),i.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let n=!this.onKeyLine&&this.indent===t.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",a=[];if(i&&r.sep&&!r.value){let s=[];for(let o=0;ot.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(a=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(a.push(this.sourceToken),t.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(s0(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(WBe(r.key)&&!s0(r.sep,"newline")){let s=Xx(r.start),o=r.key,l=r.sep;l.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:o,sep:l}]})}else a.length>0?r.sep=r.sep.concat(a,this.sourceToken):r.sep.push(this.sourceToken);else if(s0(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let s=Xx(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?t.items.push({start:a,key:null,sep:[this.sourceToken]}):s0(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);i||r.value?(t.items.push({start:a,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!s0(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&t.items.push({start:a});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){GL(i,r.start),i.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||s0(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){let n=this.startBlockValue(t);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===t.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=zL(n),a=Xx(i);VBe(t);let s=t.end.splice(1,t.end.length);s.push(this.sourceToken);let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(` `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(` -`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=K7(t),i=_v(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=K7(t),i=_v(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function H6t(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new ak||null,prettyErrors:t}}function jIe(e,t={}){let{lineCounter:r,prettyErrors:i}=H6t(t),n=new sk(r?.addNewLine),a=new ik(t),s=null;for(let o of a.compose(n.parse(e),!0,e.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new lc(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(HW(e,r)),s.warnings.forEach(HW(e,r))),s}function aU(e,t,r){let i;typeof t=="function"?i=t:r===void 0&&t&&typeof t=="object"&&(r=t);let n=jIe(e,r);if(!n)return null;if(n.warnings.forEach(a=>_7(n.options.logLevel,a)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}var XIe=!1;function obr(e,t={}){return J8.renderToString(String(e??""),{displayMode:t.displayMode===!0,output:"html",strict:"ignore",throwOnError:!1,trust:!1})}async function lbr(e,t){return XIe||(LW.initialize({startOnLoad:!1,suppressErrorRendering:!0,securityLevel:"strict",theme:"dark",themeVariables:{background:"#161616",primaryColor:"#252726",primaryTextColor:"#ecefec",primaryBorderColor:"#555b56",lineColor:"#8c948e",secondaryColor:"#202322",tertiaryColor:"#111312",noteBkgColor:"#202322",noteTextColor:"#ecefec",noteBorderColor:"#555b56"}}),XIe=!0),LW.render(typeof t=="string"?t:String(t??""),String(e??""))}function cbr(e){return aU(String(e??""),{prettyErrors:!1,schema:"core"})}export{cbr as parseYaml,obr as renderMath,lbr as renderMermaid}; +`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=zL(t),n=Xx(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=zL(t),n=Xx(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function qMt(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Mk||null,prettyErrors:t}}function UBe(e,t={}){let{lineCounter:r,prettyErrors:n}=qMt(t),i=new Dk(r?.addNewLine),a=new Lk(t),s=null;for(let o of a.compose(i.parse(e),!0,e.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new zc(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(s.errors.forEach(vj(e,r)),s.warnings.forEach(vj(e,r))),s}function Ij(e,t,r){let n;typeof t=="function"?n=t:r===void 0&&t&&typeof t=="object"&&(r=t);let i=UBe(e,r);if(!i)return null;if(i.warnings.forEach(a=>vL(i.options.logLevel,a)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}var HBe=!1;function x_r(e,t={}){return F8.renderToString(String(e??""),{displayMode:t.displayMode===!0,output:"html",strict:"ignore",throwOnError:!1,trust:!1})}async function b_r(e,t){return HBe||(tj.initialize({startOnLoad:!1,suppressErrorRendering:!0,securityLevel:"strict",theme:"dark",themeVariables:{background:"#161616",primaryColor:"#252726",primaryTextColor:"#ecefec",primaryBorderColor:"#555b56",lineColor:"#8c948e",secondaryColor:"#202322",tertiaryColor:"#111312",noteBkgColor:"#202322",noteTextColor:"#ecefec",noteBorderColor:"#555b56"}}),HBe=!0),tj.render(typeof t=="string"?t:String(t??""),String(e??""))}function T_r(e){return Ij(String(e??""),{prettyErrors:!1,schema:"core"})}export{T_r as parseYaml,x_r as renderMath,b_r as renderMermaid}; /*! Bundled license information: dompurify/dist/purify.es.mjs: - (*! @license DOMPurify 3.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.3/LICENSE *) - -mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.mjs: - (*! Bundled license information: - - js-yaml/dist/js-yaml.mjs: - (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) - *) + (*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE *) lodash-es/lodash.js: (** @@ -3517,7 +3749,7 @@ cytoscape/dist/cytoscape.esm.mjs: (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) -@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.mjs: +@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOHPRMQF.mjs: (*! Bundled license information: lodash-es/lodash.js: diff --git a/src/version.ts b/src/version.ts index 32502ed..036ed00 100644 --- a/src/version.ts +++ b/src/version.ts @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; import path from "node:path"; import { fileURLToPath } from "node:url"; -const FALLBACK_VERSION = "2.0.6"; +const FALLBACK_VERSION = "2.0.7"; /** * @param {NodeJS.ProcessEnv} [env]